@doppelgangerdev/doppelganger 0.4.3 → 0.5.2

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.
Files changed (55) hide show
  1. package/agent.js +415 -218
  2. package/dist/assets/index-BXRKDZ1_.css +1 -0
  3. package/dist/assets/index-Deb2QMGx.js +19 -0
  4. package/dist/captures/run_1769042882403_589_agent_1769042884446_initial.png +0 -0
  5. package/dist/captures/run_1769042882403_589_agent_1769042887058.png +0 -0
  6. package/dist/captures/run_1769042882403_589_agent_1769042888468.webm +0 -0
  7. package/dist/captures/run_1769043202318_943_agent_1769043206237.png +0 -0
  8. package/dist/captures/run_1769043202318_943_agent_1769043207415.webm +0 -0
  9. package/dist/captures/run_1769043449517_97_agent_1769043451350_initial.png +0 -0
  10. package/dist/captures/run_1769043449517_97_agent_1769043455038.png +0 -0
  11. package/dist/captures/run_1769043449517_97_agent_1769043456476.webm +0 -0
  12. package/dist/captures/run_1769043471164_239_agent_1769043472720_initial.png +0 -0
  13. package/dist/captures/run_1769043471164_239_agent_1769043474022.png +0 -0
  14. package/dist/captures/run_1769043471164_239_agent_1769043476419.png +0 -0
  15. package/dist/captures/run_1769043471164_239_agent_1769043477795.webm +0 -0
  16. package/dist/captures/run_1769080585290_151_agent_1769080595110.png +0 -0
  17. package/dist/captures/run_1769080585290_151_agent_1769080596335.webm +0 -0
  18. package/dist/index.html +2 -2
  19. package/dist/screenshots/agent_1769037343598.png +0 -0
  20. package/dist/screenshots/agent_1769037357541.png +0 -0
  21. package/dist/screenshots/scrape_1769037382254.png +0 -0
  22. package/dist/screenshots/scrape_1769037413189.png +0 -0
  23. package/dist/screenshots/scrape_1769037449707.png +0 -0
  24. package/dist/screenshots/scrape_1769037461756.png +0 -0
  25. package/dist/screenshots/scrape_1769037490581.png +0 -0
  26. package/dist/screenshots/scrape_1769038242368.png +0 -0
  27. package/headful.js +76 -21
  28. package/package.json +3 -1
  29. package/proxy-rotation.js +133 -90
  30. package/public/captures/run_1769042882403_589_agent_1769042884446_initial.png +0 -0
  31. package/public/captures/run_1769042882403_589_agent_1769042887058.png +0 -0
  32. package/public/captures/run_1769042882403_589_agent_1769042888468.webm +0 -0
  33. package/public/captures/run_1769043202318_943_agent_1769043206237.png +0 -0
  34. package/public/captures/run_1769043202318_943_agent_1769043207415.webm +0 -0
  35. package/public/captures/run_1769043449517_97_agent_1769043451350_initial.png +0 -0
  36. package/public/captures/run_1769043449517_97_agent_1769043455038.png +0 -0
  37. package/public/captures/run_1769043449517_97_agent_1769043456476.webm +0 -0
  38. package/public/captures/run_1769043471164_239_agent_1769043472720_initial.png +0 -0
  39. package/public/captures/run_1769043471164_239_agent_1769043474022.png +0 -0
  40. package/public/captures/run_1769043471164_239_agent_1769043476419.png +0 -0
  41. package/public/captures/run_1769043471164_239_agent_1769043477795.webm +0 -0
  42. package/public/captures/run_1769080585290_151_agent_1769080595110.png +0 -0
  43. package/public/captures/run_1769080585290_151_agent_1769080596335.webm +0 -0
  44. package/public/screenshots/agent_1769037343598.png +0 -0
  45. package/public/screenshots/agent_1769037357541.png +0 -0
  46. package/public/screenshots/scrape_1769037382254.png +0 -0
  47. package/public/screenshots/scrape_1769037413189.png +0 -0
  48. package/public/screenshots/scrape_1769037449707.png +0 -0
  49. package/public/screenshots/scrape_1769037461756.png +0 -0
  50. package/public/screenshots/scrape_1769037490581.png +0 -0
  51. package/public/screenshots/scrape_1769038242368.png +0 -0
  52. package/scrape.js +163 -66
  53. package/server.js +127 -72
  54. package/dist/assets/index-D68YZVOp.js +0 -19
  55. package/dist/assets/index-WbwoTnJa.css +0 -1
@@ -1,19 +0,0 @@
1
- (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))o(h);new MutationObserver(h=>{for(const p of h)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function f(h){const p={};return h.integrity&&(p.integrity=h.integrity),h.referrerPolicy&&(p.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?p.credentials="include":h.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function o(h){if(h.ep)return;h.ep=!0;const p=f(h);fetch(h.href,p)}})();function Vh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var ir={exports:{}},vi={};var wh;function R0(){if(wh)return vi;wh=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function f(o,h,p){var m=null;if(p!==void 0&&(m=""+p),h.key!==void 0&&(m=""+h.key),"key"in h){p={};for(var j in h)j!=="key"&&(p[j]=h[j])}else p=h;return h=p.ref,{$$typeof:s,type:o,key:m,ref:h!==void 0?h:null,props:p}}return vi.Fragment=r,vi.jsx=f,vi.jsxs=f,vi}var Sh;function M0(){return Sh||(Sh=1,ir.exports=R0()),ir.exports}var u=M0(),sr={exports:{}},be={};var jh;function O0(){if(jh)return be;jh=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),m=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),k=Symbol.iterator;function D(w){return w===null||typeof w!="object"?null:(w=k&&w[k]||w["@@iterator"],typeof w=="function"?w:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,V={};function J(w,R,G){this.props=w,this.context=R,this.refs=V,this.updater=G||O}J.prototype.isReactComponent={},J.prototype.setState=function(w,R){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,R,"setState")},J.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function q(){}q.prototype=J.prototype;function P(w,R,G){this.props=w,this.context=R,this.refs=V,this.updater=G||O}var xe=P.prototype=new q;xe.constructor=P,Y(xe,J.prototype),xe.isPureReactComponent=!0;var ye=Array.isArray;function me(){}var ue={H:null,A:null,T:null,S:null},ve=Object.prototype.hasOwnProperty;function Q(w,R,G){var W=G.ref;return{$$typeof:s,type:w,key:R,ref:W!==void 0?W:null,props:G}}function fe(w,R){return Q(w.type,R,w.props)}function Ne(w){return typeof w=="object"&&w!==null&&w.$$typeof===s}function ce(w){var R={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(G){return R[G]})}var de=/\/+/g;function De(w,R){return typeof w=="object"&&w!==null&&w.key!=null?ce(""+w.key):R.toString(36)}function Fe(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(me,me):(w.status="pending",w.then(function(R){w.status==="pending"&&(w.status="fulfilled",w.value=R)},function(R){w.status==="pending"&&(w.status="rejected",w.reason=R)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function U(w,R,G,W,ae){var pe=typeof w;(pe==="undefined"||pe==="boolean")&&(w=null);var X=!1;if(w===null)X=!0;else switch(pe){case"bigint":case"string":case"number":X=!0;break;case"object":switch(w.$$typeof){case s:case r:X=!0;break;case N:return X=w._init,U(X(w._payload),R,G,W,ae)}}if(X)return ae=ae(w),X=W===""?"."+De(w,0):W,ye(ae)?(G="",X!=null&&(G=X.replace(de,"$&/")+"/"),U(ae,R,G,"",function(ge){return ge})):ae!=null&&(Ne(ae)&&(ae=fe(ae,G+(ae.key==null||w&&w.key===ae.key?"":(""+ae.key).replace(de,"$&/")+"/")+X)),R.push(ae)),1;X=0;var re=W===""?".":W+":";if(ye(w))for(var ne=0;ne<w.length;ne++)W=w[ne],pe=re+De(W,ne),X+=U(W,R,G,pe,ae);else if(ne=D(w),typeof ne=="function")for(w=ne.call(w),ne=0;!(W=w.next()).done;)W=W.value,pe=re+De(W,ne++),X+=U(W,R,G,pe,ae);else if(pe==="object"){if(typeof w.then=="function")return U(Fe(w),R,G,W,ae);throw R=String(w),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return X}function $(w,R,G){if(w==null)return w;var W=[],ae=0;return U(w,W,"","",function(pe){return R.call(G,pe,ae++)}),W}function ie(w){if(w._status===-1){var R=w._result;R=R(),R.then(function(G){(w._status===0||w._status===-1)&&(w._status=1,w._result=G)},function(G){(w._status===0||w._status===-1)&&(w._status=2,w._result=G)}),w._status===-1&&(w._status=0,w._result=R)}if(w._status===1)return w._result.default;throw w._result}var Re=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},Ce={map:$,forEach:function(w,R,G){$(w,function(){R.apply(this,arguments)},G)},count:function(w){var R=0;return $(w,function(){R++}),R},toArray:function(w){return $(w,function(R){return R})||[]},only:function(w){if(!Ne(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return be.Activity=v,be.Children=Ce,be.Component=J,be.Fragment=f,be.Profiler=h,be.PureComponent=P,be.StrictMode=o,be.Suspense=b,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ue,be.__COMPILER_RUNTIME={__proto__:null,c:function(w){return ue.H.useMemoCache(w)}},be.cache=function(w){return function(){return w.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(w,R,G){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var W=Y({},w.props),ae=w.key;if(R!=null)for(pe in R.key!==void 0&&(ae=""+R.key),R)!ve.call(R,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&R.ref===void 0||(W[pe]=R[pe]);var pe=arguments.length-2;if(pe===1)W.children=G;else if(1<pe){for(var X=Array(pe),re=0;re<pe;re++)X[re]=arguments[re+2];W.children=X}return Q(w.type,ae,W)},be.createContext=function(w){return w={$$typeof:m,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:p,_context:w},w},be.createElement=function(w,R,G){var W,ae={},pe=null;if(R!=null)for(W in R.key!==void 0&&(pe=""+R.key),R)ve.call(R,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ae[W]=R[W]);var X=arguments.length-2;if(X===1)ae.children=G;else if(1<X){for(var re=Array(X),ne=0;ne<X;ne++)re[ne]=arguments[ne+2];ae.children=re}if(w&&w.defaultProps)for(W in X=w.defaultProps,X)ae[W]===void 0&&(ae[W]=X[W]);return Q(w,pe,ae)},be.createRef=function(){return{current:null}},be.forwardRef=function(w){return{$$typeof:j,render:w}},be.isValidElement=Ne,be.lazy=function(w){return{$$typeof:N,_payload:{_status:-1,_result:w},_init:ie}},be.memo=function(w,R){return{$$typeof:x,type:w,compare:R===void 0?null:R}},be.startTransition=function(w){var R=ue.T,G={};ue.T=G;try{var W=w(),ae=ue.S;ae!==null&&ae(G,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(me,Re)}catch(pe){Re(pe)}finally{R!==null&&G.types!==null&&(R.types=G.types),ue.T=R}},be.unstable_useCacheRefresh=function(){return ue.H.useCacheRefresh()},be.use=function(w){return ue.H.use(w)},be.useActionState=function(w,R,G){return ue.H.useActionState(w,R,G)},be.useCallback=function(w,R){return ue.H.useCallback(w,R)},be.useContext=function(w){return ue.H.useContext(w)},be.useDebugValue=function(){},be.useDeferredValue=function(w,R){return ue.H.useDeferredValue(w,R)},be.useEffect=function(w,R){return ue.H.useEffect(w,R)},be.useEffectEvent=function(w){return ue.H.useEffectEvent(w)},be.useId=function(){return ue.H.useId()},be.useImperativeHandle=function(w,R,G){return ue.H.useImperativeHandle(w,R,G)},be.useInsertionEffect=function(w,R){return ue.H.useInsertionEffect(w,R)},be.useLayoutEffect=function(w,R){return ue.H.useLayoutEffect(w,R)},be.useMemo=function(w,R){return ue.H.useMemo(w,R)},be.useOptimistic=function(w,R){return ue.H.useOptimistic(w,R)},be.useReducer=function(w,R,G){return ue.H.useReducer(w,R,G)},be.useRef=function(w){return ue.H.useRef(w)},be.useState=function(w){return ue.H.useState(w)},be.useSyncExternalStore=function(w,R,G){return ue.H.useSyncExternalStore(w,R,G)},be.useTransition=function(){return ue.H.useTransition()},be.version="19.2.3",be}var Nh;function wr(){return Nh||(Nh=1,sr.exports=O0()),sr.exports}var y=wr();const D0=Vh(y);var ur={exports:{}},bi={},cr={exports:{}},rr={};var Eh;function k0(){return Eh||(Eh=1,(function(s){function r(U,$){var ie=U.length;U.push($);e:for(;0<ie;){var Re=ie-1>>>1,Ce=U[Re];if(0<h(Ce,$))U[Re]=$,U[ie]=Ce,ie=Re;else break e}}function f(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var $=U[0],ie=U.pop();if(ie!==$){U[0]=ie;e:for(var Re=0,Ce=U.length,w=Ce>>>1;Re<w;){var R=2*(Re+1)-1,G=U[R],W=R+1,ae=U[W];if(0>h(G,ie))W<Ce&&0>h(ae,G)?(U[Re]=ae,U[W]=ie,Re=W):(U[Re]=G,U[R]=ie,Re=R);else if(W<Ce&&0>h(ae,ie))U[Re]=ae,U[W]=ie,Re=W;else break e}}return $}function h(U,$){var ie=U.sortIndex-$.sortIndex;return ie!==0?ie:U.id-$.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,j=m.now();s.unstable_now=function(){return m.now()-j}}var b=[],x=[],N=1,v=null,k=3,D=!1,O=!1,Y=!1,V=!1,J=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function xe(U){for(var $=f(x);$!==null;){if($.callback===null)o(x);else if($.startTime<=U)o(x),$.sortIndex=$.expirationTime,r(b,$);else break;$=f(x)}}function ye(U){if(Y=!1,xe(U),!O)if(f(b)!==null)O=!0,me||(me=!0,ce());else{var $=f(x);$!==null&&Fe(ye,$.startTime-U)}}var me=!1,ue=-1,ve=5,Q=-1;function fe(){return V?!0:!(s.unstable_now()-Q<ve)}function Ne(){if(V=!1,me){var U=s.unstable_now();Q=U;var $=!0;try{e:{O=!1,Y&&(Y=!1,q(ue),ue=-1),D=!0;var ie=k;try{t:{for(xe(U),v=f(b);v!==null&&!(v.expirationTime>U&&fe());){var Re=v.callback;if(typeof Re=="function"){v.callback=null,k=v.priorityLevel;var Ce=Re(v.expirationTime<=U);if(U=s.unstable_now(),typeof Ce=="function"){v.callback=Ce,xe(U),$=!0;break t}v===f(b)&&o(b),xe(U)}else o(b);v=f(b)}if(v!==null)$=!0;else{var w=f(x);w!==null&&Fe(ye,w.startTime-U),$=!1}}break e}finally{v=null,k=ie,D=!1}$=void 0}}finally{$?ce():me=!1}}}var ce;if(typeof P=="function")ce=function(){P(Ne)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,De=de.port2;de.port1.onmessage=Ne,ce=function(){De.postMessage(null)}}else ce=function(){J(Ne,0)};function Fe(U,$){ue=J(function(){U(s.unstable_now())},$)}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(U){U.callback=null},s.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ve=0<U?Math.floor(1e3/U):5},s.unstable_getCurrentPriorityLevel=function(){return k},s.unstable_next=function(U){switch(k){case 1:case 2:case 3:var $=3;break;default:$=k}var ie=k;k=$;try{return U()}finally{k=ie}},s.unstable_requestPaint=function(){V=!0},s.unstable_runWithPriority=function(U,$){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ie=k;k=U;try{return $()}finally{k=ie}},s.unstable_scheduleCallback=function(U,$,ie){var Re=s.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?Re+ie:Re):ie=Re,U){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=ie+Ce,U={id:N++,callback:$,priorityLevel:U,startTime:ie,expirationTime:Ce,sortIndex:-1},ie>Re?(U.sortIndex=ie,r(x,U),f(b)===null&&U===f(x)&&(Y?(q(ue),ue=-1):Y=!0,Fe(ye,ie-Re))):(U.sortIndex=Ce,r(b,U),O||D||(O=!0,me||(me=!0,ce()))),U},s.unstable_shouldYield=fe,s.unstable_wrapCallback=function(U){var $=k;return function(){var ie=k;k=$;try{return U.apply(this,arguments)}finally{k=ie}}}})(rr)),rr}var Ch;function U0(){return Ch||(Ch=1,cr.exports=k0()),cr.exports}var or={exports:{}},At={};var Ah;function L0(){if(Ah)return At;Ah=1;var s=wr();function r(b){var x="https://react.dev/errors/"+b;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)x+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+b+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var o={d:{f,r:function(){throw Error(r(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function p(b,x,N){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:v==null?null:""+v,children:b,containerInfo:x,implementation:N}}var m=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(b,x){if(b==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,At.createPortal=function(b,x){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return p(b,x,null,N)},At.flushSync=function(b){var x=m.T,N=o.p;try{if(m.T=null,o.p=2,b)return b()}finally{m.T=x,o.p=N,o.d.f()}},At.preconnect=function(b,x){typeof b=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(b,x))},At.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},At.preinit=function(b,x){if(typeof b=="string"&&x&&typeof x.as=="string"){var N=x.as,v=j(N,x.crossOrigin),k=typeof x.integrity=="string"?x.integrity:void 0,D=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;N==="style"?o.d.S(b,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:v,integrity:k,fetchPriority:D}):N==="script"&&o.d.X(b,{crossOrigin:v,integrity:k,fetchPriority:D,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},At.preinitModule=function(b,x){if(typeof b=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var N=j(x.as,x.crossOrigin);o.d.M(b,{crossOrigin:N,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(b)},At.preload=function(b,x){if(typeof b=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var N=x.as,v=j(N,x.crossOrigin);o.d.L(b,N,{crossOrigin:v,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},At.preloadModule=function(b,x){if(typeof b=="string")if(x){var N=j(x.as,x.crossOrigin);o.d.m(b,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:N,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(b)},At.requestFormReset=function(b){o.d.r(b)},At.unstable_batchedUpdates=function(b,x){return b(x)},At.useFormState=function(b,x,N){return m.H.useFormState(b,x,N)},At.useFormStatus=function(){return m.H.useHostTransitionStatus()},At.version="19.2.3",At}var Th;function H0(){if(Th)return or.exports;Th=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(r){console.error(r)}}return s(),or.exports=L0(),or.exports}var _h;function B0(){if(_h)return bi;_h=1;var s=U0(),r=wr(),f=H0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l: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 j(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(o(188))}function x(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return b(n),e;if(i===a)return b(n),t;i=i.sibling}throw Error(o(188))}if(l.return!==a.return)l=n,a=i;else{for(var c=!1,d=n.child;d;){if(d===l){c=!0,l=n,a=i;break}if(d===a){c=!0,a=n,l=i;break}d=d.sibling}if(!c){for(d=i.child;d;){if(d===l){c=!0,l=i,a=n;break}if(d===a){c=!0,a=i,l=n;break}d=d.sibling}if(!c)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function N(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,k=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),P=Symbol.for("react.context"),xe=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),Ne=Symbol.iterator;function ce(e){return e===null||typeof e!="object"?null:(e=Ne&&e[Ne]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function De(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case J:return"Profiler";case V:return"StrictMode";case ye:return"Suspense";case me:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case P:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case xe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ue:return t=e.displayName||null,t!==null?t:De(e.type)||"Memo";case ve:t=e._payload,e=e._init;try{return De(e(t))}catch{}}return null}var Fe=Array.isArray,U=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},Re=[],Ce=-1;function w(e){return{current:e}}function R(e){0>Ce||(e.current=Re[Ce],Re[Ce]=null,Ce--)}function G(e,t){Ce++,Re[Ce]=e.current,e.current=t}var W=w(null),ae=w(null),pe=w(null),X=w(null);function re(e,t){switch(G(pe,t),G(ae,e),G(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Qd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}R(W),G(W,e)}function ne(){R(W),R(ae),R(pe)}function ge(e){e.memoizedState!==null&&G(X,e);var t=W.current,l=Qd(t,e.type);t!==l&&(G(ae,e),G(W,l))}function ut(e){ae.current===e&&(R(W),R(ae)),X.current===e&&(R(X),mi._currentValue=ie)}var il,Vl;function zt(e){if(il===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);il=t&&t[1]||"",Vl=-1<l.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+il+e+Vl}var Gl=!1;function gl(e,t){if(!e||Gl)return"";Gl=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(M){var z=M}Reflect.construct(e,[],B)}else{try{B.call()}catch(M){z=M}e.call(B.prototype)}}else{try{throw Error()}catch(M){z=M}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(M){if(M&&z&&typeof M.stack=="string")return[M.stack,z.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),c=i[0],d=i[1];if(c&&d){var g=c.split(`
4
- `),_=d.split(`
5
- `);for(n=a=0;a<g.length&&!g[a].includes("DetermineComponentFrameRoot");)a++;for(;n<_.length&&!_[n].includes("DetermineComponentFrameRoot");)n++;if(a===g.length||n===_.length)for(a=g.length-1,n=_.length-1;1<=a&&0<=n&&g[a]!==_[n];)n--;for(;1<=a&&0<=n;a--,n--)if(g[a]!==_[n]){if(a!==1||n!==1)do if(a--,n--,0>n||g[a]!==_[n]){var L=`
6
- `+g[a].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=a&&0<=n);break}}}finally{Gl=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?zt(l):""}function Xl(e,t){switch(e.tag){case 26:case 27:case 5:return zt(e.type);case 16:return zt("Lazy");case 13:return e.child!==t&&t!==null?zt("Suspense Fallback"):zt("Suspense");case 19:return zt("SuspenseList");case 0:case 15:return gl(e.type,!1);case 11:return gl(e.type.render,!1);case 1:return gl(e.type,!0);case 31:return zt("Activity");default:return""}}function Ql(e){try{var t="",l=null;do t+=Xl(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
7
- Error generating stack: `+a.message+`
8
- `+a.stack}}var Rt=Object.prototype.hasOwnProperty,vl=s.unstable_scheduleCallback,va=s.unstable_cancelCallback,Zl=s.unstable_shouldYield,Tn=s.unstable_requestPaint,xt=s.unstable_now,Kl=s.unstable_getCurrentPriorityLevel,bl=s.unstable_ImmediatePriority,K=s.unstable_UserBlockingPriority,ee=s.unstable_NormalPriority,le=s.unstable_LowPriority,I=s.unstable_IdlePriority,Ke=s.log,Ie=s.unstable_setDisableYieldValue,Pe=null,Me=null;function dt(e){if(typeof Ke=="function"&&Ie(e),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Pe,e)}catch{}}var lt=Math.clz32?Math.clz32:yt,ba=Math.log,Mt=Math.LN2;function yt(e){return e>>>=0,e===0?32:31-(ba(e)/Mt|0)|0}var Zt=256,Et=262144,bt=4194304;function Kt(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 A(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var d=a&134217727;return d!==0?(a=d&~i,a!==0?n=Kt(a):(c&=d,c!==0?n=Kt(c):l||(l=d&~e,l!==0&&(n=Kt(l))))):(d=a&~i,d!==0?n=Kt(d):c!==0?n=Kt(c):l||(l=a&~e,l!==0&&(n=Kt(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function C(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Z(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 Ee(){var e=bt;return bt<<=1,(bt&62914560)===0&&(bt=4194304),e}function ke(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ct(e,t,l,a,n,i){var c=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var d=e.entanglements,g=e.expirationTimes,_=e.hiddenUpdates;for(l=c&~l;0<l;){var L=31-lt(l),B=1<<L;d[L]=0,g[L]=-1;var z=_[L];if(z!==null)for(_[L]=null,L=0;L<z.length;L++){var M=z[L];M!==null&&(M.lane&=-536870913)}l&=~B}a!==0&&fl(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function fl(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-lt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function wa(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-lt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Ba(e,t){var l=t&-t;return l=(l&42)!==0?1:F(l),(l&(e.suspendedLanes|t))!==0?0:l}function F(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 Ve(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qa(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:ph(e.type))}function Jl(e,t){var l=$.p;try{return $.p=e,t()}finally{$.p=l}}var sl=Math.random().toString(36).slice(2),ht="__reactFiber$"+sl,Be="__reactProps$"+sl,dl="__reactContainer$"+sl,_n="__reactEvents$"+sl,bp="__reactListeners$"+sl,wp="__reactHandles$"+sl,_r="__reactResources$"+sl,zn="__reactMarker$"+sl;function Fs(e){delete e[ht],delete e[Be],delete e[_n],delete e[bp],delete e[wp]}function Ya(e){var t=e[ht];if(t)return t;for(var l=e.parentNode;l;){if(t=l[dl]||l[ht]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Id(e);e!==null;){if(l=e[ht])return l;e=Id(e)}return t}e=l,l=e.parentNode}return null}function Va(e){if(e=e[ht]||e[dl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Rn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ga(e){var t=e[_r];return t||(t=e[_r]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[zn]=!0}var zr=new Set,Rr={};function Sa(e,t){Xa(e,t),Xa(e+"Capture",t)}function Xa(e,t){for(Rr[e]=t,e=0;e<t.length;e++)zr.add(t[e])}var Sp=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]*$"),Mr={},Or={};function jp(e){return Rt.call(Or,e)?!0:Rt.call(Mr,e)?!1:Sp.test(e)?Or[e]=!0:(Mr[e]=!0,!1)}function zi(e,t,l){if(jp(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Ri(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function wl(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Np(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(c){l=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Is(e){if(!e._valueTracker){var t=Dr(e)?"checked":"value";e._valueTracker=Np(e,t,""+e[t])}}function kr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Dr(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Mi(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 Ep=/[\n"\\]/g;function $t(e){return e.replace(Ep,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ps(e,t,l,a,n,i,c,d){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Jt(t)):e.value!==""+Jt(t)&&(e.value=""+Jt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?eu(e,c,Jt(t)):l!=null?eu(e,c,Jt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+Jt(d):e.removeAttribute("name")}function Ur(e,t,l,a,n,i,c,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Is(e);return}l=l!=null?""+Jt(l):"",t=t!=null?""+Jt(t):l,d||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=d?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),Is(e)}function eu(e,t,l){t==="number"&&Mi(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Qa(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Jt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Lr(e,t,l){if(t!=null&&(t=""+Jt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Jt(l):""}function Hr(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(o(92));if(Fe(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Jt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Is(e)}function Za(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Cp=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 Br(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Cp.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function qr(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&Br(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&Br(e,i,t[i])}function tu(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 Ap=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"]]),Tp=/^[\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 Oi(e){return Tp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Sl(){}var lu=null;function au(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ka=null,Ja=null;function Yr(e){var t=Va(e);if(t&&(e=t.stateNode)){var l=e[Be]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ps(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+$t(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Be]||null;if(!n)throw Error(o(90));Ps(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&kr(a)}break e;case"textarea":Lr(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Qa(e,!!l.multiple,t,!1)}}}var nu=!1;function Vr(e,t,l){if(nu)return e(t,l);nu=!0;try{var a=e(t);return a}finally{if(nu=!1,(Ka!==null||Ja!==null)&&(bs(),Ka&&(t=Ka,e=Ja,Ja=Ka=null,Yr(t),e)))for(t=0;t<e.length;t++)Yr(e[t])}}function Mn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Be]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var jl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iu=!1;if(jl)try{var On={};Object.defineProperty(On,"passive",{get:function(){iu=!0}}),window.addEventListener("test",On,On),window.removeEventListener("test",On,On)}catch{iu=!1}var $l=null,su=null,Di=null;function Gr(){if(Di)return Di;var e,t=su,l=t.length,a,n="value"in $l?$l.value:$l.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var c=l-e;for(a=1;a<=c&&t[l-a]===n[i-a];a++);return Di=n.slice(e,1<a?1-a:void 0)}function ki(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 Ui(){return!0}function Xr(){return!1}function Ot(e){function t(l,a,n,i,c){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(l=e[d],this[d]=l?l(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ui:Xr,this.isPropagationStopped=Xr,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ui)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ui)},persist:function(){},isPersistent:Ui}),t}var ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Li=Ot(ja),Dn=v({},ja,{view:0,detail:0}),_p=Ot(Dn),uu,cu,kn,Hi=v({},Dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ou,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!==kn&&(kn&&e.type==="mousemove"?(uu=e.screenX-kn.screenX,cu=e.screenY-kn.screenY):cu=uu=0,kn=e),uu)},movementY:function(e){return"movementY"in e?e.movementY:cu}}),Qr=Ot(Hi),zp=v({},Hi,{dataTransfer:0}),Rp=Ot(zp),Mp=v({},Dn,{relatedTarget:0}),ru=Ot(Mp),Op=v({},ja,{animationName:0,elapsedTime:0,pseudoElement:0}),Dp=Ot(Op),kp=v({},ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Up=Ot(kp),Lp=v({},ja,{data:0}),Zr=Ot(Lp),Hp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bp={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"},qp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qp[e])?!!t[e]:!1}function ou(){return Yp}var Vp=v({},Dn,{key:function(e){if(e.key){var t=Hp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ki(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ou,charCode:function(e){return e.type==="keypress"?ki(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ki(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gp=Ot(Vp),Xp=v({},Hi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kr=Ot(Xp),Qp=v({},Dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ou}),Zp=Ot(Qp),Kp=v({},ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jp=Ot(Kp),$p=v({},Hi,{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}),Wp=Ot($p),Fp=v({},ja,{newState:0,oldState:0}),Ip=Ot(Fp),Pp=[9,13,27,32],fu=jl&&"CompositionEvent"in window,Un=null;jl&&"documentMode"in document&&(Un=document.documentMode);var em=jl&&"TextEvent"in window&&!Un,Jr=jl&&(!fu||Un&&8<Un&&11>=Un),$r=" ",Wr=!1;function Fr(e,t){switch(e){case"keyup":return Pp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ir(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $a=!1;function tm(e,t){switch(e){case"compositionend":return Ir(t);case"keypress":return t.which!==32?null:(Wr=!0,$r);case"textInput":return e=t.data,e===$r&&Wr?null:e;default:return null}}function lm(e,t){if($a)return e==="compositionend"||!fu&&Fr(e,t)?(e=Gr(),Di=su=$l=null,$a=!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 Jr&&t.locale!=="ko"?null:t.data;default:return null}}var am={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 Pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!am[e.type]:t==="textarea"}function eo(e,t,l,a){Ka?Ja?Ja.push(a):Ja=[a]:Ka=a,t=As(t,"onChange"),0<t.length&&(l=new Li("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Ln=null,Hn=null;function nm(e){Hd(e,0)}function Bi(e){var t=Rn(e);if(kr(t))return e}function to(e,t){if(e==="change")return t}var lo=!1;if(jl){var du;if(jl){var hu="oninput"in document;if(!hu){var ao=document.createElement("div");ao.setAttribute("oninput","return;"),hu=typeof ao.oninput=="function"}du=hu}else du=!1;lo=du&&(!document.documentMode||9<document.documentMode)}function no(){Ln&&(Ln.detachEvent("onpropertychange",io),Hn=Ln=null)}function io(e){if(e.propertyName==="value"&&Bi(Hn)){var t=[];eo(t,Hn,e,au(e)),Vr(nm,t)}}function im(e,t,l){e==="focusin"?(no(),Ln=t,Hn=l,Ln.attachEvent("onpropertychange",io)):e==="focusout"&&no()}function sm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bi(Hn)}function um(e,t){if(e==="click")return Bi(t)}function cm(e,t){if(e==="input"||e==="change")return Bi(t)}function rm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:rm;function Bn(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!Rt.call(t,n)||!Bt(e[n],t[n]))return!1}return!0}function so(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uo(e,t){var l=so(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=so(l)}}function co(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?co(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ro(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mi(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Mi(e.document)}return t}function pu(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=jl&&"documentMode"in document&&11>=document.documentMode,Wa=null,mu=null,qn=null,xu=!1;function oo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;xu||Wa==null||Wa!==Mi(a)||(a=Wa,"selectionStart"in a&&pu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),qn&&Bn(qn,a)||(qn=a,a=As(mu,"onSelect"),0<a.length&&(t=new Li("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Wa)))}function Na(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Fa={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionrun:Na("Transition","TransitionRun"),transitionstart:Na("Transition","TransitionStart"),transitioncancel:Na("Transition","TransitionCancel"),transitionend:Na("Transition","TransitionEnd")},yu={},fo={};jl&&(fo=document.createElement("div").style,"AnimationEvent"in window||(delete Fa.animationend.animation,delete Fa.animationiteration.animation,delete Fa.animationstart.animation),"TransitionEvent"in window||delete Fa.transitionend.transition);function Ea(e){if(yu[e])return yu[e];if(!Fa[e])return e;var t=Fa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in fo)return yu[e]=t[l];return e}var ho=Ea("animationend"),po=Ea("animationiteration"),mo=Ea("animationstart"),fm=Ea("transitionrun"),dm=Ea("transitionstart"),hm=Ea("transitioncancel"),xo=Ea("transitionend"),yo=new Map,gu="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(" ");gu.push("scrollEnd");function ul(e,t){yo.set(e,t),Sa(t,[e])}var qi=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)},Wt=[],Ia=0,vu=0;function Yi(){for(var e=Ia,t=vu=Ia=0;t<e;){var l=Wt[t];Wt[t++]=null;var a=Wt[t];Wt[t++]=null;var n=Wt[t];Wt[t++]=null;var i=Wt[t];if(Wt[t++]=null,a!==null&&n!==null){var c=a.pending;c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n}i!==0&&go(l,n,i)}}function Vi(e,t,l,a){Wt[Ia++]=e,Wt[Ia++]=t,Wt[Ia++]=l,Wt[Ia++]=a,vu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function bu(e,t,l,a){return Vi(e,t,l,a),Gi(e)}function Ca(e,t){return Vi(e,null,null,t),Gi(e)}function go(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),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-lt(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function Gi(e){if(50<ci)throw ci=0,_c=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Pa={};function pm(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,t,l,a){return new pm(e,t,l,a)}function wu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Nl(e,t){var l=e.alternate;return l===null?(l=qt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function vo(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Xi(e,t,l,a,n,i){var c=0;if(a=e,typeof e=="function")wu(e)&&(c=1);else if(typeof e=="string")c=v0(e,l,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=qt(31,l,t,n),e.elementType=Q,e.lanes=i,e;case Y:return Aa(l.children,n,i,t);case V:c=8,n|=24;break;case J:return e=qt(12,l,t,n|2),e.elementType=J,e.lanes=i,e;case ye:return e=qt(13,l,t,n),e.elementType=ye,e.lanes=i,e;case me:return e=qt(19,l,t,n),e.elementType=me,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P:c=10;break e;case q:c=9;break e;case xe:c=11;break e;case ue:c=14;break e;case ve:c=16,a=null;break e}c=29,l=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=qt(c,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function Aa(e,t,l,a){return e=qt(7,e,a,t),e.lanes=l,e}function Su(e,t,l){return e=qt(6,e,null,t),e.lanes=l,e}function bo(e){var t=qt(18,null,null,0);return t.stateNode=e,t}function ju(e,t,l){return t=qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wo=new WeakMap;function Ft(e,t){if(typeof e=="object"&&e!==null){var l=wo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ql(t)},wo.set(e,t),t)}return{value:e,source:t,stack:Ql(t)}}var en=[],tn=0,Qi=null,Yn=0,It=[],Pt=0,Wl=null,hl=1,pl="";function El(e,t){en[tn++]=Yn,en[tn++]=Qi,Qi=e,Yn=t}function So(e,t,l){It[Pt++]=hl,It[Pt++]=pl,It[Pt++]=Wl,Wl=e;var a=hl;e=pl;var n=32-lt(a)-1;a&=~(1<<n),l+=1;var i=32-lt(t)+n;if(30<i){var c=n-n%5;i=(a&(1<<c)-1).toString(32),a>>=c,n-=c,hl=1<<32-lt(t)+n|l<<n|a,pl=i+e}else hl=1<<i|l<<n|a,pl=e}function Nu(e){e.return!==null&&(El(e,1),So(e,1,0))}function Eu(e){for(;e===Qi;)Qi=en[--tn],en[tn]=null,Yn=en[--tn],en[tn]=null;for(;e===Wl;)Wl=It[--Pt],It[Pt]=null,pl=It[--Pt],It[Pt]=null,hl=It[--Pt],It[Pt]=null}function jo(e,t){It[Pt++]=hl,It[Pt++]=pl,It[Pt++]=Wl,hl=t.id,pl=t.overflow,Wl=e}var wt=null,$e=null,Oe=!1,Fl=null,el=!1,Cu=Error(o(519));function Il(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vn(Ft(t,e)),Cu}function No(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ht]=e,t[Be]=a,l){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(l=0;l<oi.length;l++)Te(oi[l],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),Ur(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),Hr(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||Vd(t.textContent,l)?(a.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),a.onScroll!=null&&Te("scroll",t),a.onScrollEnd!=null&&Te("scrollend",t),a.onClick!=null&&(t.onclick=Sl),t=!0):t=!1,t||Il(e,!0)}function Eo(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:el=!1;return;case 27:case 3:el=!0;return;default:wt=wt.return}}function ln(e){if(e!==wt)return!1;if(!Oe)return Eo(e),Oe=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Xc(e.type,e.memoizedProps)),l=!l),l&&$e&&Il(e),Eo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));$e=Fd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));$e=Fd(e)}else t===27?(t=$e,da(e.type)?(e=$c,$c=null,$e=e):$e=t):$e=wt?ll(e.stateNode.nextSibling):null;return!0}function Ta(){$e=wt=null,Oe=!1}function Au(){var e=Fl;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),Fl=null),e}function Vn(e){Fl===null?Fl=[e]:Fl.push(e)}var Tu=w(null),_a=null,Cl=null;function Pl(e,t,l){G(Tu,t._currentValue),t._currentValue=l}function Al(e){e._currentValue=Tu.current,R(Tu)}function _u(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function zu(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var c=n.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=n;for(var g=0;g<t.length;g++)if(d.context===t[g]){i.lanes|=l,d=i.alternate,d!==null&&(d.lanes|=l),_u(i.return,l,e),a||(c=null);break e}i=d.next}}else if(n.tag===18){if(c=n.return,c===null)throw Error(o(341));c.lanes|=l,i=c.alternate,i!==null&&(i.lanes|=l),_u(c,l,e),c=null}else c=n.child;if(c!==null)c.return=n;else for(c=n;c!==null;){if(c===e){c=null;break}if(n=c.sibling,n!==null){n.return=c.return,c=n;break}c=c.return}n=c}}function an(e,t,l,a){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 c=n.alternate;if(c===null)throw Error(o(387));if(c=c.memoizedProps,c!==null){var d=n.type;Bt(n.pendingProps.value,c.value)||(e!==null?e.push(d):e=[d])}}else if(n===X.current){if(c=n.alternate,c===null)throw Error(o(387));c.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(mi):e=[mi])}n=n.return}e!==null&&zu(t,e,l,a),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!Bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){_a=e,Cl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return Co(_a,e)}function Ki(e,t){return _a===null&&za(e),Co(e,t)}function Co(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Cl===null){if(e===null)throw Error(o(308));Cl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Cl=Cl.next=t;return l}var mm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},xm=s.unstable_scheduleCallback,ym=s.unstable_NormalPriority,ct={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ru(){return{controller:new mm,data:new Map,refCount:0}}function Gn(e){e.refCount--,e.refCount===0&&xm(ym,function(){e.controller.abort()})}var Xn=null,Mu=0,nn=0,sn=null;function gm(e,t){if(Xn===null){var l=Xn=[];Mu=0,nn=kc(),sn={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Mu++,t.then(Ao,Ao),t}function Ao(){if(--Mu===0&&Xn!==null){sn!==null&&(sn.status="fulfilled");var e=Xn;Xn=null,nn=0,sn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function vm(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var To=U.S;U.S=function(e,t){dd=xt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gm(e,t),To!==null&&To(e,t)};var Ra=w(null);function Ou(){var e=Ra.current;return e!==null?e:Ze.pooledCache}function Ji(e,t){t===null?G(Ra,Ra.current):G(Ra,t.pool)}function _o(){var e=Ou();return e===null?null:{parent:ct._currentValue,pool:e}}var un=Error(o(460)),Du=Error(o(474)),$i=Error(o(542)),Wi={then:function(){}};function zo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ro(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Sl,Sl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oo(e),e;default:if(typeof t.status=="string")t.then(Sl,Sl);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oo(e),e}throw Oa=t,un}}function Ma(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Oa=l,un):l}}var Oa=null;function Mo(){if(Oa===null)throw Error(o(459));var e=Oa;return Oa=null,e}function Oo(e){if(e===un||e===$i)throw Error(o(483))}var cn=null,Qn=0;function Fi(e){var t=Qn;return Qn+=1,cn===null&&(cn=[]),Ro(cn,e,t)}function Zn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ii(e,t){throw t.$$typeof===k?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Do(e){function t(E,S){if(e){var T=E.deletions;T===null?(E.deletions=[S],E.flags|=16):T.push(S)}}function l(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function a(E){for(var S=new Map;E!==null;)E.key!==null?S.set(E.key,E):S.set(E.index,E),E=E.sibling;return S}function n(E,S){return E=Nl(E,S),E.index=0,E.sibling=null,E}function i(E,S,T){return E.index=T,e?(T=E.alternate,T!==null?(T=T.index,T<S?(E.flags|=67108866,S):T):(E.flags|=67108866,S)):(E.flags|=1048576,S)}function c(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function d(E,S,T,H){return S===null||S.tag!==6?(S=Su(T,E.mode,H),S.return=E,S):(S=n(S,T),S.return=E,S)}function g(E,S,T,H){var oe=T.type;return oe===Y?L(E,S,T.props.children,H,T.key):S!==null&&(S.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===ve&&Ma(oe)===S.type)?(S=n(S,T.props),Zn(S,T),S.return=E,S):(S=Xi(T.type,T.key,T.props,null,E.mode,H),Zn(S,T),S.return=E,S)}function _(E,S,T,H){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=ju(T,E.mode,H),S.return=E,S):(S=n(S,T.children||[]),S.return=E,S)}function L(E,S,T,H,oe){return S===null||S.tag!==7?(S=Aa(T,E.mode,H,oe),S.return=E,S):(S=n(S,T),S.return=E,S)}function B(E,S,T){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Su(""+S,E.mode,T),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case D:return T=Xi(S.type,S.key,S.props,null,E.mode,T),Zn(T,S),T.return=E,T;case O:return S=ju(S,E.mode,T),S.return=E,S;case ve:return S=Ma(S),B(E,S,T)}if(Fe(S)||ce(S))return S=Aa(S,E.mode,T,null),S.return=E,S;if(typeof S.then=="function")return B(E,Fi(S),T);if(S.$$typeof===P)return B(E,Ki(E,S),T);Ii(E,S)}return null}function z(E,S,T,H){var oe=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return oe!==null?null:d(E,S,""+T,H);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case D:return T.key===oe?g(E,S,T,H):null;case O:return T.key===oe?_(E,S,T,H):null;case ve:return T=Ma(T),z(E,S,T,H)}if(Fe(T)||ce(T))return oe!==null?null:L(E,S,T,H,null);if(typeof T.then=="function")return z(E,S,Fi(T),H);if(T.$$typeof===P)return z(E,S,Ki(E,T),H);Ii(E,T)}return null}function M(E,S,T,H,oe){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return E=E.get(T)||null,d(S,E,""+H,oe);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case D:return E=E.get(H.key===null?T:H.key)||null,g(S,E,H,oe);case O:return E=E.get(H.key===null?T:H.key)||null,_(S,E,H,oe);case ve:return H=Ma(H),M(E,S,T,H,oe)}if(Fe(H)||ce(H))return E=E.get(T)||null,L(S,E,H,oe,null);if(typeof H.then=="function")return M(E,S,T,Fi(H),oe);if(H.$$typeof===P)return M(E,S,T,Ki(S,H),oe);Ii(S,H)}return null}function te(E,S,T,H){for(var oe=null,Ue=null,se=S,je=S=0,ze=null;se!==null&&je<T.length;je++){se.index>je?(ze=se,se=null):ze=se.sibling;var Le=z(E,se,T[je],H);if(Le===null){se===null&&(se=ze);break}e&&se&&Le.alternate===null&&t(E,se),S=i(Le,S,je),Ue===null?oe=Le:Ue.sibling=Le,Ue=Le,se=ze}if(je===T.length)return l(E,se),Oe&&El(E,je),oe;if(se===null){for(;je<T.length;je++)se=B(E,T[je],H),se!==null&&(S=i(se,S,je),Ue===null?oe=se:Ue.sibling=se,Ue=se);return Oe&&El(E,je),oe}for(se=a(se);je<T.length;je++)ze=M(se,E,je,T[je],H),ze!==null&&(e&&ze.alternate!==null&&se.delete(ze.key===null?je:ze.key),S=i(ze,S,je),Ue===null?oe=ze:Ue.sibling=ze,Ue=ze);return e&&se.forEach(function(ya){return t(E,ya)}),Oe&&El(E,je),oe}function he(E,S,T,H){if(T==null)throw Error(o(151));for(var oe=null,Ue=null,se=S,je=S=0,ze=null,Le=T.next();se!==null&&!Le.done;je++,Le=T.next()){se.index>je?(ze=se,se=null):ze=se.sibling;var ya=z(E,se,Le.value,H);if(ya===null){se===null&&(se=ze);break}e&&se&&ya.alternate===null&&t(E,se),S=i(ya,S,je),Ue===null?oe=ya:Ue.sibling=ya,Ue=ya,se=ze}if(Le.done)return l(E,se),Oe&&El(E,je),oe;if(se===null){for(;!Le.done;je++,Le=T.next())Le=B(E,Le.value,H),Le!==null&&(S=i(Le,S,je),Ue===null?oe=Le:Ue.sibling=Le,Ue=Le);return Oe&&El(E,je),oe}for(se=a(se);!Le.done;je++,Le=T.next())Le=M(se,E,je,Le.value,H),Le!==null&&(e&&Le.alternate!==null&&se.delete(Le.key===null?je:Le.key),S=i(Le,S,je),Ue===null?oe=Le:Ue.sibling=Le,Ue=Le);return e&&se.forEach(function(z0){return t(E,z0)}),Oe&&El(E,je),oe}function Qe(E,S,T,H){if(typeof T=="object"&&T!==null&&T.type===Y&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case D:e:{for(var oe=T.key;S!==null;){if(S.key===oe){if(oe=T.type,oe===Y){if(S.tag===7){l(E,S.sibling),H=n(S,T.props.children),H.return=E,E=H;break e}}else if(S.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===ve&&Ma(oe)===S.type){l(E,S.sibling),H=n(S,T.props),Zn(H,T),H.return=E,E=H;break e}l(E,S);break}else t(E,S);S=S.sibling}T.type===Y?(H=Aa(T.props.children,E.mode,H,T.key),H.return=E,E=H):(H=Xi(T.type,T.key,T.props,null,E.mode,H),Zn(H,T),H.return=E,E=H)}return c(E);case O:e:{for(oe=T.key;S!==null;){if(S.key===oe)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){l(E,S.sibling),H=n(S,T.children||[]),H.return=E,E=H;break e}else{l(E,S);break}else t(E,S);S=S.sibling}H=ju(T,E.mode,H),H.return=E,E=H}return c(E);case ve:return T=Ma(T),Qe(E,S,T,H)}if(Fe(T))return te(E,S,T,H);if(ce(T)){if(oe=ce(T),typeof oe!="function")throw Error(o(150));return T=oe.call(T),he(E,S,T,H)}if(typeof T.then=="function")return Qe(E,S,Fi(T),H);if(T.$$typeof===P)return Qe(E,S,Ki(E,T),H);Ii(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,S!==null&&S.tag===6?(l(E,S.sibling),H=n(S,T),H.return=E,E=H):(l(E,S),H=Su(T,E.mode,H),H.return=E,E=H),c(E)):l(E,S)}return function(E,S,T,H){try{Qn=0;var oe=Qe(E,S,T,H);return cn=null,oe}catch(se){if(se===un||se===$i)throw se;var Ue=qt(29,se,null,E.mode);return Ue.lanes=H,Ue.return=E,Ue}}}var Da=Do(!0),ko=Do(!1),ea=!1;function ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uu(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 ta(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function la(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(He&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Gi(e),go(e,null,l),t}return Vi(e,a,t,l),Gi(e)}function Kn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,wa(e,l)}}function Lu(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=c:i=i.next=c,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Hu=!1;function Jn(){if(Hu){var e=sn;if(e!==null)throw e}}function $n(e,t,l,a){Hu=!1;var n=e.updateQueue;ea=!1;var i=n.firstBaseUpdate,c=n.lastBaseUpdate,d=n.shared.pending;if(d!==null){n.shared.pending=null;var g=d,_=g.next;g.next=null,c===null?i=_:c.next=_,c=g;var L=e.alternate;L!==null&&(L=L.updateQueue,d=L.lastBaseUpdate,d!==c&&(d===null?L.firstBaseUpdate=_:d.next=_,L.lastBaseUpdate=g))}if(i!==null){var B=n.baseState;c=0,L=_=g=null,d=i;do{var z=d.lane&-536870913,M=z!==d.lane;if(M?(_e&z)===z:(a&z)===z){z!==0&&z===nn&&(Hu=!0),L!==null&&(L=L.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var te=e,he=d;z=t;var Qe=l;switch(he.tag){case 1:if(te=he.payload,typeof te=="function"){B=te.call(Qe,B,z);break e}B=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=he.payload,z=typeof te=="function"?te.call(Qe,B,z):te,z==null)break e;B=v({},B,z);break e;case 2:ea=!0}}z=d.callback,z!==null&&(e.flags|=64,M&&(e.flags|=8192),M=n.callbacks,M===null?n.callbacks=[z]:M.push(z))}else M={lane:z,tag:d.tag,payload:d.payload,callback:d.callback,next:null},L===null?(_=L=M,g=B):L=L.next=M,c|=z;if(d=d.next,d===null){if(d=n.shared.pending,d===null)break;M=d,d=M.next,M.next=null,n.lastBaseUpdate=M,n.shared.pending=null}}while(!0);L===null&&(g=B),n.baseState=g,n.firstBaseUpdate=_,n.lastBaseUpdate=L,i===null&&(n.shared.lanes=0),ua|=c,e.lanes=c,e.memoizedState=B}}function Uo(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Lo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Uo(l[e],t)}var rn=w(null),Pi=w(0);function Ho(e,t){e=Ul,G(Pi,e),G(rn,t),Ul=e|t.baseLanes}function Bu(){G(Pi,Ul),G(rn,rn.current)}function qu(){Ul=Pi.current,R(rn),R(Pi)}var Yt=w(null),tl=null;function aa(e){var t=e.alternate;G(it,it.current&1),G(Yt,e),tl===null&&(t===null||rn.current!==null||t.memoizedState!==null)&&(tl=e)}function Yu(e){G(it,it.current),G(Yt,e),tl===null&&(tl=e)}function Bo(e){e.tag===22?(G(it,it.current),G(Yt,e),tl===null&&(tl=e)):na()}function na(){G(it,it.current),G(Yt,Yt.current)}function Vt(e){R(Yt),tl===e&&(tl=null),R(it)}var it=w(0);function es(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Kc(l)||Jc(l)))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 Tl=0,we=null,Ge=null,rt=null,ts=!1,on=!1,ka=!1,ls=0,Wn=0,fn=null,bm=0;function at(){throw Error(o(321))}function Vu(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Bt(e[l],t[l]))return!1;return!0}function Gu(e,t,l,a,n,i){return Tl=i,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?jf:nc,ka=!1,i=l(a,n),ka=!1,on&&(i=Yo(t,l,a,n)),qo(e),i}function qo(e){U.H=Pn;var t=Ge!==null&&Ge.next!==null;if(Tl=0,rt=Ge=we=null,ts=!1,Wn=0,fn=null,t)throw Error(o(300));e===null||ot||(e=e.dependencies,e!==null&&Zi(e)&&(ot=!0))}function Yo(e,t,l,a){we=e;var n=0;do{if(on&&(fn=null),Wn=0,on=!1,25<=n)throw Error(o(301));if(n+=1,rt=Ge=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}U.H=Nf,i=t(l,a)}while(on);return i}function wm(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Fn(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(we.flags|=1024),t}function Xu(){var e=ls!==0;return ls=0,e}function Qu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Zu(e){if(ts){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ts=!1}Tl=0,rt=Ge=we=null,on=!1,Wn=ls=0,fn=null}function Tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?we.memoizedState=rt=e:rt=rt.next=e,rt}function st(){if(Ge===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=rt===null?we.memoizedState:rt.next;if(t!==null)rt=t,Ge=e;else{if(e===null)throw we.alternate===null?Error(o(467)):Error(o(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},rt===null?we.memoizedState=rt=e:rt=rt.next=e}return rt}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fn(e){var t=Wn;return Wn+=1,fn===null&&(fn=[]),e=Ro(fn,e,t),t=we,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?jf:nc),e}function ns(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Fn(e);if(e.$$typeof===P)return St(e)}throw Error(o(438,String(e)))}function Ku(e){var t=null,l=we.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=we.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=as(),we.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=fe;return t.index++,l}function _l(e,t){return typeof t=="function"?t(e):t}function is(e){var t=st();return Ju(t,Ge,e)}function Ju(e,t,l){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var c=n.next;n.next=i.next,i.next=c}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var d=c=null,g=null,_=t,L=!1;do{var B=_.lane&-536870913;if(B!==_.lane?(_e&B)===B:(Tl&B)===B){var z=_.revertLane;if(z===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),B===nn&&(L=!0);else if((Tl&z)===z){_=_.next,z===nn&&(L=!0);continue}else B={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},g===null?(d=g=B,c=i):g=g.next=B,we.lanes|=z,ua|=z;B=_.action,ka&&l(i,B),i=_.hasEagerState?_.eagerState:l(i,B)}else z={lane:B,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},g===null?(d=g=z,c=i):g=g.next=z,we.lanes|=B,ua|=B;_=_.next}while(_!==null&&_!==t);if(g===null?c=i:g.next=d,!Bt(i,e.memoizedState)&&(ot=!0,L&&(l=sn,l!==null)))throw l;e.memoizedState=i,e.baseState=c,e.baseQueue=g,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function $u(e){var t=st(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var c=n=n.next;do i=e(i,c.action),c=c.next;while(c!==n);Bt(i,t.memoizedState)||(ot=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function Vo(e,t,l){var a=we,n=st(),i=Oe;if(i){if(l===void 0)throw Error(o(407));l=l()}else l=t();var c=!Bt((Ge||n).memoizedState,l);if(c&&(n.memoizedState=l,ot=!0),n=n.queue,Iu(Qo.bind(null,a,n,e),[e]),n.getSnapshot!==t||c||rt!==null&&rt.memoizedState.tag&1){if(a.flags|=2048,dn(9,{destroy:void 0},Xo.bind(null,a,n,l,t),null),Ze===null)throw Error(o(349));i||(Tl&127)!==0||Go(a,t,l)}return l}function Go(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=we.updateQueue,t===null?(t=as(),we.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Xo(e,t,l,a){t.value=l,t.getSnapshot=a,Zo(t)&&Ko(e)}function Qo(e,t,l){return l(function(){Zo(t)&&Ko(e)})}function Zo(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Bt(e,l)}catch{return!0}}function Ko(e){var t=Ca(e,2);t!==null&&Ht(t,e,2)}function Wu(e){var t=Tt();if(typeof e=="function"){var l=e;if(e=l(),ka){dt(!0);try{l()}finally{dt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:e},t}function Jo(e,t,l,a){return e.baseState=l,Ju(e,Ge,typeof a=="function"?a:_l)}function Sm(e,t,l,a,n){if(cs(e))throw Error(o(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(c){i.listeners.push(c)}};U.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,$o(t,i)):(i.next=l.next,t.pending=l.next=i)}}function $o(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=U.T,c={};U.T=c;try{var d=l(n,a),g=U.S;g!==null&&g(c,d),Wo(e,t,d)}catch(_){Fu(e,t,_)}finally{i!==null&&c.types!==null&&(i.types=c.types),U.T=i}}else try{i=l(n,a),Wo(e,t,i)}catch(_){Fu(e,t,_)}}function Wo(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Fo(e,t,a)},function(a){return Fu(e,t,a)}):Fo(e,t,l)}function Fo(e,t,l){t.status="fulfilled",t.value=l,Io(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,$o(e,l)))}function Fu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Io(t),t=t.next;while(t!==a)}e.action=null}function Io(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Po(e,t){return t}function ef(e,t){if(Oe){var l=Ze.formState;if(l!==null){e:{var a=we;if(Oe){if($e){t:{for(var n=$e,i=el;n.nodeType!==8;){if(!i){n=null;break t}if(n=ll(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){$e=ll(n.nextSibling),a=n.data==="F!";break e}}Il(a)}a=!1}a&&(t=l[0])}}return l=Tt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:t},l.queue=a,l=bf.bind(null,we,a),a.dispatch=l,a=Wu(!1),i=ac.bind(null,we,!1,a.queue),a=Tt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=Sm.bind(null,we,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function tf(e){var t=st();return lf(t,Ge,e)}function lf(e,t,l){if(t=Ju(e,t,Po)[0],e=is(_l)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Fn(t)}catch(c){throw c===un?$i:c}else a=t;t=st();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(we.flags|=2048,dn(9,{destroy:void 0},jm.bind(null,n,l),null)),[a,i,e]}function jm(e,t){e.action=t}function af(e){var t=st(),l=Ge;if(l!==null)return lf(t,l,e);st(),t=t.memoizedState,l=st();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function dn(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=we.updateQueue,t===null&&(t=as(),we.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function nf(){return st().memoizedState}function ss(e,t,l,a){var n=Tt();we.flags|=e,n.memoizedState=dn(1|t,{destroy:void 0},l,a===void 0?null:a)}function us(e,t,l,a){var n=st();a=a===void 0?null:a;var i=n.memoizedState.inst;Ge!==null&&a!==null&&Vu(a,Ge.memoizedState.deps)?n.memoizedState=dn(t,i,l,a):(we.flags|=e,n.memoizedState=dn(1|t,i,l,a))}function sf(e,t){ss(8390656,8,e,t)}function Iu(e,t){us(2048,8,e,t)}function Nm(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=as(),we.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function uf(e){var t=st().memoizedState;return Nm({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function cf(e,t){return us(4,2,e,t)}function rf(e,t){return us(4,4,e,t)}function of(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ff(e,t,l){l=l!=null?l.concat([e]):null,us(4,4,of.bind(null,t,e),l)}function Pu(){}function df(e,t){var l=st();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Vu(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function hf(e,t){var l=st();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Vu(t,a[1]))return a[0];if(a=e(),ka){dt(!0);try{e()}finally{dt(!1)}}return l.memoizedState=[a,t],a}function ec(e,t,l){return l===void 0||(Tl&1073741824)!==0&&(_e&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=pd(),we.lanes|=e,ua|=e,l)}function pf(e,t,l,a){return Bt(l,t)?l:rn.current!==null?(e=ec(e,l,a),Bt(e,t)||(ot=!0),e):(Tl&42)===0||(Tl&1073741824)!==0&&(_e&261930)===0?(ot=!0,e.memoizedState=l):(e=pd(),we.lanes|=e,ua|=e,t)}function mf(e,t,l,a,n){var i=$.p;$.p=i!==0&&8>i?i:8;var c=U.T,d={};U.T=d,ac(e,!1,t,l);try{var g=n(),_=U.S;if(_!==null&&_(d,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var L=vm(g,a);In(e,t,L,Qt(e))}else In(e,t,a,Qt(e))}catch(B){In(e,t,{then:function(){},status:"rejected",reason:B},Qt())}finally{$.p=i,c!==null&&d.types!==null&&(c.types=d.types),U.T=c}}function Em(){}function tc(e,t,l,a){if(e.tag!==5)throw Error(o(476));var n=xf(e).queue;mf(e,n,t,ie,l===null?Em:function(){return yf(e),l(a)})}function xf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:ie},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function yf(e){var t=xf(e);t.next===null&&(t=e.alternate.memoizedState),In(e,t.next.queue,{},Qt())}function lc(){return St(mi)}function gf(){return st().memoizedState}function vf(){return st().memoizedState}function Cm(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Qt();e=ta(l);var a=la(t,e,l);a!==null&&(Ht(a,t,l),Kn(a,t,l)),t={cache:Ru()},e.payload=t;return}t=t.return}}function Am(e,t,l){var a=Qt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},cs(e)?wf(t,l):(l=bu(e,t,l,a),l!==null&&(Ht(l,e,a),Sf(l,t,a)))}function bf(e,t,l){var a=Qt();In(e,t,l,a)}function In(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(cs(e))wf(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,d=i(c,l);if(n.hasEagerState=!0,n.eagerState=d,Bt(d,c))return Vi(e,t,n,0),Ze===null&&Yi(),!1}catch{}if(l=bu(e,t,n,a),l!==null)return Ht(l,e,a),Sf(l,t,a),!0}return!1}function ac(e,t,l,a){if(a={lane:2,revertLane:kc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},cs(e)){if(t)throw Error(o(479))}else t=bu(e,l,a,2),t!==null&&Ht(t,e,2)}function cs(e){var t=e.alternate;return e===we||t!==null&&t===we}function wf(e,t){on=ts=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Sf(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,wa(e,l)}}var Pn={readContext:St,use:ns,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at};Pn.useEffectEvent=at;var jf={readContext:St,use:ns,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:sf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ss(4194308,4,of.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var l=Tt();t=t===void 0?null:t;var a=e();if(ka){dt(!0);try{e()}finally{dt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Tt();if(l!==void 0){var n=l(t);if(ka){dt(!0);try{l(t)}finally{dt(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Am.bind(null,we,e),[a.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:function(e){e=Wu(e);var t=e.queue,l=bf.bind(null,we,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Pu,useDeferredValue:function(e,t){var l=Tt();return ec(l,e,t)},useTransition:function(){var e=Wu(!1);return e=mf.bind(null,we,e.queue,!0,!1),Tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=we,n=Tt();if(Oe){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Ze===null)throw Error(o(349));(_e&127)!==0||Go(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,sf(Qo.bind(null,a,i,e),[e]),a.flags|=2048,dn(9,{destroy:void 0},Xo.bind(null,a,i,l,t),null),l},useId:function(){var e=Tt(),t=Ze.identifierPrefix;if(Oe){var l=pl,a=hl;l=(a&~(1<<32-lt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=ls++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=bm++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:lc,useFormState:ef,useActionState:ef,useOptimistic:function(e){var t=Tt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=ac.bind(null,we,!0,l),l.dispatch=t,[e,t]},useMemoCache:Ku,useCacheRefresh:function(){return Tt().memoizedState=Cm.bind(null,we)},useEffectEvent:function(e){var t=Tt(),l={impl:e};return t.memoizedState=l,function(){if((He&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},nc={readContext:St,use:ns,useCallback:df,useContext:St,useEffect:Iu,useImperativeHandle:ff,useInsertionEffect:cf,useLayoutEffect:rf,useMemo:hf,useReducer:is,useRef:nf,useState:function(){return is(_l)},useDebugValue:Pu,useDeferredValue:function(e,t){var l=st();return pf(l,Ge.memoizedState,e,t)},useTransition:function(){var e=is(_l)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Fn(e),t]},useSyncExternalStore:Vo,useId:gf,useHostTransitionStatus:lc,useFormState:tf,useActionState:tf,useOptimistic:function(e,t){var l=st();return Jo(l,Ge,e,t)},useMemoCache:Ku,useCacheRefresh:vf};nc.useEffectEvent=uf;var Nf={readContext:St,use:ns,useCallback:df,useContext:St,useEffect:Iu,useImperativeHandle:ff,useInsertionEffect:cf,useLayoutEffect:rf,useMemo:hf,useReducer:$u,useRef:nf,useState:function(){return $u(_l)},useDebugValue:Pu,useDeferredValue:function(e,t){var l=st();return Ge===null?ec(l,e,t):pf(l,Ge.memoizedState,e,t)},useTransition:function(){var e=$u(_l)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Fn(e),t]},useSyncExternalStore:Vo,useId:gf,useHostTransitionStatus:lc,useFormState:af,useActionState:af,useOptimistic:function(e,t){var l=st();return Ge!==null?Jo(l,Ge,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ku,useCacheRefresh:vf};Nf.useEffectEvent=uf;function ic(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:v({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var sc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Qt(),n=ta(a);n.payload=t,l!=null&&(n.callback=l),t=la(e,n,a),t!==null&&(Ht(t,e,a),Kn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Qt(),n=ta(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=la(e,n,a),t!==null&&(Ht(t,e,a),Kn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Qt(),a=ta(l);a.tag=2,t!=null&&(a.callback=t),t=la(e,a,l),t!==null&&(Ht(t,e,l),Kn(t,e,l))}};function Ef(e,t,l,a,n,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,c):t.prototype&&t.prototype.isPureReactComponent?!Bn(l,a)||!Bn(n,i):!0}function Cf(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&sc.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=v({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Af(e){qi(e)}function Tf(e){console.error(e)}function _f(e){qi(e)}function rs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function zf(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function uc(e,t,l){return l=ta(l),l.tag=3,l.payload={element:null},l.callback=function(){rs(e,t)},l}function Rf(e){return e=ta(e),e.tag=3,e}function Mf(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){zf(t,l,a)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){zf(t,l,a),typeof n!="function"&&(ca===null?ca=new Set([this]):ca.add(this));var d=a.stack;this.componentDidCatch(a.value,{componentStack:d!==null?d:""})})}function Tm(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&an(t,l,n,!0),l=Yt.current,l!==null){switch(l.tag){case 31:case 13:return tl===null?ws():l.alternate===null&&nt===0&&(nt=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Wi?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Mc(e,a,n)),!1;case 22:return l.flags|=65536,a===Wi?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Mc(e,a,n)),!1}throw Error(o(435,l.tag))}return Mc(e,a,n),ws(),!1}if(Oe)return t=Yt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Cu&&(e=Error(o(422),{cause:a}),Vn(Ft(e,l)))):(a!==Cu&&(t=Error(o(423),{cause:a}),Vn(Ft(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Ft(a,l),n=uc(e.stateNode,a,n),Lu(e,n),nt!==4&&(nt=2)),!1;var i=Error(o(520),{cause:a});if(i=Ft(i,l),ui===null?ui=[i]:ui.push(i),nt!==4&&(nt=2),t===null)return!0;a=Ft(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=uc(l.stateNode,a,e),Lu(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(ca===null||!ca.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Rf(n),Mf(n,e,l,a),Lu(l,n),!1}l=l.return}while(l!==null);return!1}var cc=Error(o(461)),ot=!1;function jt(e,t,l,a){t.child=e===null?ko(t,null,l,a):Da(t,e.child,l,a)}function Of(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var c={};for(var d in a)d!=="ref"&&(c[d]=a[d])}else c=a;return za(t),a=Gu(e,t,l,c,i,n),d=Xu(),e!==null&&!ot?(Qu(e,t,n),zl(e,t,n)):(Oe&&d&&Nu(t),t.flags|=1,jt(e,t,a,n),t.child)}function Df(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!wu(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,kf(e,t,i,a,n)):(e=Xi(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!xc(e,n)){var c=i.memoizedProps;if(l=l.compare,l=l!==null?l:Bn,l(c,a)&&e.ref===t.ref)return zl(e,t,n)}return t.flags|=1,e=Nl(i,a),e.ref=t.ref,e.return=t,t.child=e}function kf(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(Bn(i,a)&&e.ref===t.ref)if(ot=!1,t.pendingProps=a=i,xc(e,n))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,zl(e,t,n)}return rc(e,t,l,a,n)}function Uf(e,t,l,a){var n=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return Lf(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ji(t,i!==null?i.cachePool:null),i!==null?Ho(t,i):Bu(),Bo(t);else return a=t.lanes=536870912,Lf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Ji(t,i.cachePool),Ho(t,i),na(),t.memoizedState=null):(e!==null&&Ji(t,null),Bu(),na());return jt(e,t,n,l),t.child}function ei(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Lf(e,t,l,a,n){var i=Ou();return i=i===null?null:{parent:ct._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Ji(t,null),Bu(),Bo(t),e!==null&&an(e,t,a,!0),t.childLanes=n,null}function os(e,t){return t=ds({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hf(e,t,l){return Da(t,e.child,null,l),e=os(t,t.pendingProps),e.flags|=2,Vt(t),t.memoizedState=null,e}function _m(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(a.mode==="hidden")return e=os(t,a),t.lanes=536870912,ei(null,e);if(Yu(t),(e=$e)?(e=Wd(e,el),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wl!==null?{id:hl,overflow:pl}:null,retryLane:536870912,hydrationErrors:null},l=bo(e),l.return=t,t.child=l,wt=t,$e=null)):e=null,e===null)throw Il(t);return t.lanes=536870912,null}return os(t,a)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(Yu(t),n)if(t.flags&256)t.flags&=-257,t=Hf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(ot||an(e,t,l,!1),n=(l&e.childLanes)!==0,ot||n){if(a=Ze,a!==null&&(c=Ba(a,l),c!==0&&c!==i.retryLane))throw i.retryLane=c,Ca(e,c),Ht(a,e,c),cc;ws(),t=Hf(e,t,l)}else e=i.treeContext,$e=ll(c.nextSibling),wt=t,Oe=!0,Fl=null,el=!1,e!==null&&jo(t,e),t=os(t,a),t.flags|=4096;return t}return e=Nl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fs(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function rc(e,t,l,a,n){return za(t),l=Gu(e,t,l,a,void 0,n),a=Xu(),e!==null&&!ot?(Qu(e,t,n),zl(e,t,n)):(Oe&&a&&Nu(t),t.flags|=1,jt(e,t,l,n),t.child)}function Bf(e,t,l,a,n,i){return za(t),t.updateQueue=null,l=Yo(t,a,l,n),qo(e),a=Xu(),e!==null&&!ot?(Qu(e,t,i),zl(e,t,i)):(Oe&&a&&Nu(t),t.flags|=1,jt(e,t,l,i),t.child)}function qf(e,t,l,a,n){if(za(t),t.stateNode===null){var i=Pa,c=l.contextType;typeof c=="object"&&c!==null&&(i=St(c)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=sc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},ku(t),c=l.contextType,i.context=typeof c=="object"&&c!==null?St(c):Pa,i.state=t.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(ic(t,l,c,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&sc.enqueueReplaceState(i,i.state,null),$n(t,a,i,n),Jn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,g=Ua(l,d);i.props=g;var _=i.context,L=l.contextType;c=Pa,typeof L=="object"&&L!==null&&(c=St(L));var B=l.getDerivedStateFromProps;L=typeof B=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,L||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||_!==c)&&Cf(t,i,a,c),ea=!1;var z=t.memoizedState;i.state=z,$n(t,a,i,n),Jn(),_=t.memoizedState,d||z!==_||ea?(typeof B=="function"&&(ic(t,l,B,a),_=t.memoizedState),(g=ea||Ef(t,l,g,a,z,_,c))?(L||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=a,t.memoizedState=_),i.props=a,i.state=_,i.context=c,a=g):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Uu(e,t),c=t.memoizedProps,L=Ua(l,c),i.props=L,B=t.pendingProps,z=i.context,_=l.contextType,g=Pa,typeof _=="object"&&_!==null&&(g=St(_)),d=l.getDerivedStateFromProps,(_=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==B||z!==g)&&Cf(t,i,a,g),ea=!1,z=t.memoizedState,i.state=z,$n(t,a,i,n),Jn();var M=t.memoizedState;c!==B||z!==M||ea||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof d=="function"&&(ic(t,l,d,a),M=t.memoizedState),(L=ea||Ef(t,l,L,a,z,M,g)||e!==null&&e.dependencies!==null&&Zi(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,M,g),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,M,g)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=M),i.props=a,i.state=M,i.context=g,a=L):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,fs(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Da(t,e.child,null,n),t.child=Da(t,null,l,n)):jt(e,t,l,n),t.memoizedState=i.state,e=t.child):e=zl(e,t,n),e}function Yf(e,t,l,a){return Ta(),t.flags|=256,jt(e,t,l,a),t.child}var oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fc(e){return{baseLanes:e,cachePool:_o()}}function dc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Xt),e}function Vf(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),c&&(n=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(n?aa(t):na(),(e=$e)?(e=Wd(e,el),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wl!==null?{id:hl,overflow:pl}:null,retryLane:536870912,hydrationErrors:null},l=bo(e),l.return=t,t.child=l,wt=t,$e=null)):e=null,e===null)throw Il(t);return Jc(e)?t.lanes=32:t.lanes=536870912,null}var d=a.children;return a=a.fallback,n?(na(),n=t.mode,d=ds({mode:"hidden",children:d},n),a=Aa(a,n,l,null),d.return=t,a.return=t,d.sibling=a,t.child=d,a=t.child,a.memoizedState=fc(l),a.childLanes=dc(e,c,l),t.memoizedState=oc,ei(null,a)):(aa(t),hc(t,d))}var g=e.memoizedState;if(g!==null&&(d=g.dehydrated,d!==null)){if(i)t.flags&256?(aa(t),t.flags&=-257,t=pc(e,t,l)):t.memoizedState!==null?(na(),t.child=e.child,t.flags|=128,t=null):(na(),d=a.fallback,n=t.mode,a=ds({mode:"visible",children:a.children},n),d=Aa(d,n,l,null),d.flags|=2,a.return=t,d.return=t,a.sibling=d,t.child=a,Da(t,e.child,null,l),a=t.child,a.memoizedState=fc(l),a.childLanes=dc(e,c,l),t.memoizedState=oc,t=ei(null,a));else if(aa(t),Jc(d)){if(c=d.nextSibling&&d.nextSibling.dataset,c)var _=c.dgst;c=_,a=Error(o(419)),a.stack="",a.digest=c,Vn({value:a,source:null,stack:null}),t=pc(e,t,l)}else if(ot||an(e,t,l,!1),c=(l&e.childLanes)!==0,ot||c){if(c=Ze,c!==null&&(a=Ba(c,l),a!==0&&a!==g.retryLane))throw g.retryLane=a,Ca(e,a),Ht(c,e,a),cc;Kc(d)||ws(),t=pc(e,t,l)}else Kc(d)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,$e=ll(d.nextSibling),wt=t,Oe=!0,Fl=null,el=!1,e!==null&&jo(t,e),t=hc(t,a.children),t.flags|=4096);return t}return n?(na(),d=a.fallback,n=t.mode,g=e.child,_=g.sibling,a=Nl(g,{mode:"hidden",children:a.children}),a.subtreeFlags=g.subtreeFlags&65011712,_!==null?d=Nl(_,d):(d=Aa(d,n,l,null),d.flags|=2),d.return=t,a.return=t,a.sibling=d,t.child=a,ei(null,a),a=t.child,d=e.child.memoizedState,d===null?d=fc(l):(n=d.cachePool,n!==null?(g=ct._currentValue,n=n.parent!==g?{parent:g,pool:g}:n):n=_o(),d={baseLanes:d.baseLanes|l,cachePool:n}),a.memoizedState=d,a.childLanes=dc(e,c,l),t.memoizedState=oc,ei(e.child,a)):(aa(t),l=e.child,e=l.sibling,l=Nl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=l,t.memoizedState=null,l)}function hc(e,t){return t=ds({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ds(e,t){return e=qt(22,e,null,t),e.lanes=0,e}function pc(e,t,l){return Da(t,e.child,null,l),e=hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),_u(e.return,t,l)}function mc(e,t,l,a,n,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=l,c.tailMode=n,c.treeForkCount=i)}function Xf(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var c=it.current,d=(c&2)!==0;if(d?(c=c&1|2,t.flags|=128):c&=1,G(it,c),jt(e,t,a,l),a=Oe?Yn:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gf(e,l,t);else if(e.tag===19)Gf(e,l,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(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&es(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),mc(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&es(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}mc(t,!0,l,null,i,a);break;case"together":mc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function zl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ua|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(an(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=Nl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Nl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function xc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Zi(e)))}function zm(e,t,l){switch(t.tag){case 3:re(t,t.stateNode.containerInfo),Pl(t,ct,e.memoizedState.cache),Ta();break;case 27:case 5:ge(t);break;case 4:re(t,t.stateNode.containerInfo);break;case 10:Pl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(aa(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Vf(e,t,l):(aa(t),e=zl(e,t,l),e!==null?e.sibling:null);aa(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(an(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return Xf(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),G(it,it.current),a)break;return null;case 22:return t.lanes=0,Uf(e,t,l,t.pendingProps);case 24:Pl(t,ct,e.memoizedState.cache)}return zl(e,t,l)}function Qf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!xc(e,l)&&(t.flags&128)===0)return ot=!1,zm(e,t,l);ot=(e.flags&131072)!==0}else ot=!1,Oe&&(t.flags&1048576)!==0&&So(t,Yn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ma(t.elementType),t.type=e,typeof e=="function")wu(e)?(a=Ua(e,a),t.tag=1,t=qf(null,t,e,a,l)):(t.tag=0,t=rc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===xe){t.tag=11,t=Of(null,t,e,a,l);break e}else if(n===ue){t.tag=14,t=Df(null,t,e,a,l);break e}}throw t=De(e)||e,Error(o(306,t,""))}}return t;case 0:return rc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Ua(a,t.pendingProps),qf(e,t,a,n,l);case 3:e:{if(re(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,Uu(e,t),$n(t,a,null,l);var c=t.memoizedState;if(a=c.cache,Pl(t,ct,a),a!==i.cache&&zu(t,[ct],l,!0),Jn(),a=c.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Yf(e,t,a,l);break e}else if(a!==n){n=Ft(Error(o(424)),t),Vn(n),t=Yf(e,t,a,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,$e=ll(e.firstChild),wt=t,Oe=!0,Fl=null,el=!0,l=ko(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ta(),a===n){t=zl(e,t,l);break e}jt(e,t,a,l)}t=t.child}return t;case 26:return fs(e,t),e===null?(l=lh(t.type,null,t.pendingProps,null))?t.memoizedState=l:Oe||(l=t.type,e=t.pendingProps,a=Ts(pe.current).createElement(l),a[ht]=t,a[Be]=e,Nt(a,l,e),gt(a),t.stateNode=a):t.memoizedState=lh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&Oe&&(a=t.stateNode=Pd(t.type,t.pendingProps,pe.current),wt=t,el=!0,n=$e,da(t.type)?($c=n,$e=ll(a.firstChild)):$e=n),jt(e,t,t.pendingProps.children,l),fs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((n=a=$e)&&(a=s0(a,t.type,t.pendingProps,el),a!==null?(t.stateNode=a,wt=t,$e=ll(a.firstChild),el=!1,n=!0):n=!1),n||Il(t)),ge(t),n=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,a=i.children,Xc(n,i)?a=null:c!==null&&Xc(n,c)&&(t.flags|=32),t.memoizedState!==null&&(n=Gu(e,t,wm,null,null,l),mi._currentValue=n),fs(e,t),jt(e,t,a,l),t.child;case 6:return e===null&&Oe&&((e=l=$e)&&(l=u0(l,t.pendingProps,el),l!==null?(t.stateNode=l,wt=t,$e=null,e=!0):e=!1),e||Il(t)),null;case 13:return Vf(e,t,l);case 4:return re(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Da(t,null,a,l):jt(e,t,a,l),t.child;case 11:return Of(e,t,t.type,t.pendingProps,l);case 7:return jt(e,t,t.pendingProps,l),t.child;case 8:return jt(e,t,t.pendingProps.children,l),t.child;case 12:return jt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Pl(t,t.type,a.value),jt(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,za(t),n=St(n),a=a(n),t.flags|=1,jt(e,t,a,l),t.child;case 14:return Df(e,t,t.type,t.pendingProps,l);case 15:return kf(e,t,t.type,t.pendingProps,l);case 19:return Xf(e,t,l);case 31:return _m(e,t,l);case 22:return Uf(e,t,l,t.pendingProps);case 24:return za(t),a=St(ct),e===null?(n=Ou(),n===null&&(n=Ze,i=Ru(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},ku(t),Pl(t,ct,n)):((e.lanes&l)!==0&&(Uu(e,t),$n(t,null,null,l),Jn()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Pl(t,ct,a)):(a=i.cache,Pl(t,ct,a),a!==n.cache&&zu(t,[ct],l,!0))),jt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Rl(e){e.flags|=4}function yc(e,t,l,a,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(gd())e.flags|=8192;else throw Oa=Wi,Du}else e.flags&=-16777217}function Zf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!uh(t))if(gd())e.flags|=8192;else throw Oa=Wi,Du}function hs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ee():536870912,e.lanes|=t,xn|=t)}function ti(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Rm(e,t,l){var a=t.pendingProps;switch(Eu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Al(ct),ne(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ln(t)?Rl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Au())),We(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(Rl(t),i!==null?(We(t),Zf(t,i)):(We(t),yc(t,n,null,a,l))):i?i!==e.memoizedState?(Rl(t),We(t),Zf(t,i)):(We(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Rl(t),We(t),yc(t,n,e,a,l)),null;case 27:if(ut(t),l=pe.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Rl(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return We(t),null}e=W.current,ln(t)?No(t):(e=Pd(n,a,l),t.stateNode=e,Rl(t))}return We(t),null;case 5:if(ut(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Rl(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return We(t),null}if(i=W.current,ln(t))No(t);else{var c=Ts(pe.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?c.createElement(n,{is:a.is}):c.createElement(n)}}i[ht]=t,i[Be]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(Nt(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Rl(t)}}return We(t),yc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Rl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=pe.current,ln(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=wt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[ht]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Vd(e.nodeValue,l)),e||Il(t,!0)}else e=Ts(e).createTextNode(a),e[ht]=t,t.stateNode=e}return We(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ln(t),l!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[ht]=t}else Ta(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else l=Au(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Vt(t),t):(Vt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return We(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=ln(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(o(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[ht]=t}else Ta(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),n=!1}else n=Au(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Vt(t),t):(Vt(t),null)}return Vt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),hs(t,t.updateQueue),We(t),null);case 4:return ne(),e===null&&Bc(t.stateNode.containerInfo),We(t),null;case 10:return Al(t.type),We(t),null;case 19:if(R(it),a=t.memoizedState,a===null)return We(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)ti(a,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=es(e),i!==null){for(t.flags|=128,ti(a,!1),e=i.updateQueue,t.updateQueue=e,hs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)vo(l,e),l=l.sibling;return G(it,it.current&1|2),Oe&&El(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&xt()>gs&&(t.flags|=128,n=!0,ti(a,!1),t.lanes=4194304)}else{if(!n)if(e=es(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,hs(t,e),ti(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Oe)return We(t),null}else 2*xt()-a.renderingStartTime>gs&&l!==536870912&&(t.flags|=128,n=!0,ti(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=xt(),e.sibling=null,l=it.current,G(it,n?l&1|2:l&1),Oe&&El(t,a.treeForkCount),e):(We(t),null);case 22:case 23:return Vt(t),qu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),l=t.updateQueue,l!==null&&hs(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&R(Ra),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Al(ct),We(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Mm(e,t){switch(Eu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Al(ct),ne(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ut(t),null;case 31:if(t.memoizedState!==null){if(Vt(t),t.alternate===null)throw Error(o(340));Ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(it),null;case 4:return ne(),null;case 10:return Al(t.type),null;case 22:case 23:return Vt(t),qu(),e!==null&&R(Ra),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Al(ct),null;case 25:return null;default:return null}}function Kf(e,t){switch(Eu(t),t.tag){case 3:Al(ct),ne();break;case 26:case 27:case 5:ut(t);break;case 4:ne();break;case 31:t.memoizedState!==null&&Vt(t);break;case 13:Vt(t);break;case 19:R(it);break;case 10:Al(t.type);break;case 22:case 23:Vt(t),qu(),e!==null&&R(Ra);break;case 24:Al(ct)}}function li(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,c=l.inst;a=i(),c.destroy=a}l=l.next}while(l!==n)}}catch(d){Ye(t,t.return,d)}}function ia(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var c=a.inst,d=c.destroy;if(d!==void 0){c.destroy=void 0,n=t;var g=l,_=d;try{_()}catch(L){Ye(n,g,L)}}}a=a.next}while(a!==i)}}catch(L){Ye(t,t.return,L)}}function Jf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Lo(t,l)}catch(a){Ye(e,e.return,a)}}}function $f(e,t,l){l.props=Ua(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ye(e,t,a)}}function ai(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Ye(e,t,n)}}function ml(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ye(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ye(e,t,n)}else l.current=null}function Wf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Ye(e,e.return,n)}}function gc(e,t,l){try{var a=e.stateNode;e0(a,e.type,l,t),a[Be]=t}catch(n){Ye(e,e.return,n)}}function Ff(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&da(e.type)||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ff(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&&da(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 bc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Sl));else if(a!==4&&(a===27&&da(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(bc(e,t,l),e=e.sibling;e!==null;)bc(e,t,l),e=e.sibling}function ps(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&da(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ps(e,t,l),e=e.sibling;e!==null;)ps(e,t,l),e=e.sibling}function If(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Nt(t,a,l),t[ht]=e,t[Be]=l}catch(i){Ye(e,e.return,i)}}var Ml=!1,ft=!1,wc=!1,Pf=typeof WeakSet=="function"?WeakSet:Set,vt=null;function Om(e,t){if(e=e.containerInfo,Vc=ks,e=ro(e),pu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var c=0,d=-1,g=-1,_=0,L=0,B=e,z=null;t:for(;;){for(var M;B!==l||n!==0&&B.nodeType!==3||(d=c+n),B!==i||a!==0&&B.nodeType!==3||(g=c+a),B.nodeType===3&&(c+=B.nodeValue.length),(M=B.firstChild)!==null;)z=B,B=M;for(;;){if(B===e)break t;if(z===l&&++_===n&&(d=c),z===i&&++L===a&&(g=c),(M=B.nextSibling)!==null)break;B=z,z=B.parentNode}B=M}l=d===-1||g===-1?null:{start:d,end:g}}else l=null}l=l||{start:0,end:0}}else l=null;for(Gc={focusedElem:e,selectionRange:l},ks=!1,vt=t;vt!==null;)if(t=vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,vt=e;else for(;vt!==null;){switch(t=vt,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(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var te=Ua(l.type,n);e=a.getSnapshotBeforeUpdate(te,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(he){Ye(l,l.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Zc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zc(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,vt=e;break}vt=t.return}}function ed(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Dl(e,l),a&4&&li(5,l);break;case 1:if(Dl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(c){Ye(l,l.return,c)}else{var n=Ua(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Ye(l,l.return,c)}}a&64&&Jf(l),a&512&&ai(l,l.return);break;case 3:if(Dl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Lo(e,t)}catch(c){Ye(l,l.return,c)}}break;case 27:t===null&&a&4&&If(l);case 26:case 5:Dl(e,l),t===null&&a&4&&Wf(l),a&512&&ai(l,l.return);break;case 12:Dl(e,l);break;case 31:Dl(e,l),a&4&&ad(e,l);break;case 13:Dl(e,l),a&4&&nd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Vm.bind(null,l),c0(e,l))));break;case 22:if(a=l.memoizedState!==null||Ml,!a){t=t!==null&&t.memoizedState!==null||ft,n=Ml;var i=ft;Ml=a,(ft=t)&&!i?kl(e,l,(l.subtreeFlags&8772)!==0):Dl(e,l),Ml=n,ft=i}break;case 30:break;default:Dl(e,l)}}function td(e){var t=e.alternate;t!==null&&(e.alternate=null,td(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fs(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 et=null,Dt=!1;function Ol(e,t,l){for(l=l.child;l!==null;)ld(e,t,l),l=l.sibling}function ld(e,t,l){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(Pe,l)}catch{}switch(l.tag){case 26:ft||ml(l,t),Ol(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ft||ml(l,t);var a=et,n=Dt;da(l.type)&&(et=l.stateNode,Dt=!1),Ol(e,t,l),di(l.stateNode),et=a,Dt=n;break;case 5:ft||ml(l,t);case 6:if(a=et,n=Dt,et=null,Ol(e,t,l),et=a,Dt=n,et!==null)if(Dt)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(l.stateNode)}catch(i){Ye(l,t,i)}else try{et.removeChild(l.stateNode)}catch(i){Ye(l,t,i)}break;case 18:et!==null&&(Dt?(e=et,Jd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Nn(e)):Jd(et,l.stateNode));break;case 4:a=et,n=Dt,et=l.stateNode.containerInfo,Dt=!0,Ol(e,t,l),et=a,Dt=n;break;case 0:case 11:case 14:case 15:ia(2,l,t),ft||ia(4,l,t),Ol(e,t,l);break;case 1:ft||(ml(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&$f(l,t,a)),Ol(e,t,l);break;case 21:Ol(e,t,l);break;case 22:ft=(a=ft)||l.memoizedState!==null,Ol(e,t,l),ft=a;break;default:Ol(e,t,l)}}function ad(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Nn(e)}catch(l){Ye(t,t.return,l)}}}function nd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nn(e)}catch(l){Ye(t,t.return,l)}}function Dm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Pf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Pf),t;default:throw Error(o(435,e.tag))}}function ms(e,t){var l=Dm(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Gm.bind(null,e,a);a.then(n,n)}})}function kt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,c=t,d=c;e:for(;d!==null;){switch(d.tag){case 27:if(da(d.type)){et=d.stateNode,Dt=!1;break e}break;case 5:et=d.stateNode,Dt=!1;break e;case 3:case 4:et=d.stateNode.containerInfo,Dt=!0;break e}d=d.return}if(et===null)throw Error(o(160));ld(i,c,n),et=null,Dt=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)id(t,e),t=t.sibling}var cl=null;function id(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:kt(t,e),Ut(e),a&4&&(ia(3,e,e.return),li(3,e),ia(5,e,e.return));break;case 1:kt(t,e),Ut(e),a&512&&(ft||l===null||ml(l,l.return)),a&64&&Ml&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=cl;if(kt(t,e),Ut(e),a&512&&(ft||l===null||ml(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[zn]||i[ht]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),Nt(i,a,l),i[ht]=e,gt(i),a=i;break e;case"link":var c=ih("link","href",n).get(a+(l.href||""));if(c){for(var d=0;d<c.length;d++)if(i=c[d],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(d,1);break t}}i=n.createElement(a),Nt(i,a,l),n.head.appendChild(i);break;case"meta":if(c=ih("meta","content",n).get(a+(l.content||""))){for(d=0;d<c.length;d++)if(i=c[d],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(d,1);break t}}i=n.createElement(a),Nt(i,a,l),n.head.appendChild(i);break;default:throw Error(o(468,a))}i[ht]=e,gt(i),a=i}e.stateNode=a}else sh(n,e.type,e.stateNode);else e.stateNode=nh(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?sh(n,e.type,e.stateNode):nh(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&gc(e,e.memoizedProps,l.memoizedProps)}break;case 27:kt(t,e),Ut(e),a&512&&(ft||l===null||ml(l,l.return)),l!==null&&a&4&&gc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(kt(t,e),Ut(e),a&512&&(ft||l===null||ml(l,l.return)),e.flags&32){n=e.stateNode;try{Za(n,"")}catch(te){Ye(e,e.return,te)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,gc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(wc=!0);break;case 6:if(kt(t,e),Ut(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(te){Ye(e,e.return,te)}}break;case 3:if(Rs=null,n=cl,cl=_s(t.containerInfo),kt(t,e),cl=n,Ut(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Nn(t.containerInfo)}catch(te){Ye(e,e.return,te)}wc&&(wc=!1,sd(e));break;case 4:a=cl,cl=_s(e.stateNode.containerInfo),kt(t,e),Ut(e),cl=a;break;case 12:kt(t,e),Ut(e);break;case 31:kt(t,e),Ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ms(e,a)));break;case 13:kt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ys=xt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ms(e,a)));break;case 22:n=e.memoizedState!==null;var g=l!==null&&l.memoizedState!==null,_=Ml,L=ft;if(Ml=_||n,ft=L||g,kt(t,e),ft=L,Ml=_,Ut(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||g||Ml||ft||La(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){g=l=t;try{if(i=g.stateNode,n)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{d=g.stateNode;var B=g.memoizedProps.style,z=B!=null&&B.hasOwnProperty("display")?B.display:null;d.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(te){Ye(g,g.return,te)}}}else if(t.tag===6){if(l===null){g=t;try{g.stateNode.nodeValue=n?"":g.memoizedProps}catch(te){Ye(g,g.return,te)}}}else if(t.tag===18){if(l===null){g=t;try{var M=g.stateNode;n?$d(M,!0):$d(g.stateNode,!1)}catch(te){Ye(g,g.return,te)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,ms(e,l))));break;case 19:kt(t,e),Ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ms(e,a)));break;case 30:break;case 21:break;default:kt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Ff(a)){l=a;break}a=a.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var n=l.stateNode,i=vc(e);ps(e,i,n);break;case 5:var c=l.stateNode;l.flags&32&&(Za(c,""),l.flags&=-33);var d=vc(e);ps(e,d,c);break;case 3:case 4:var g=l.stateNode.containerInfo,_=vc(e);bc(e,_,g);break;default:throw Error(o(161))}}catch(L){Ye(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ed(e,t.alternate,t),t=t.sibling}function La(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ia(4,t,t.return),La(t);break;case 1:ml(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&$f(t,t.return,l),La(t);break;case 27:di(t.stateNode);case 26:case 5:ml(t,t.return),La(t);break;case 22:t.memoizedState===null&&La(t);break;case 30:La(t);break;default:La(t)}e=e.sibling}}function kl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:kl(n,i,l),li(4,i);break;case 1:if(kl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(_){Ye(a,a.return,_)}if(a=i,n=a.updateQueue,n!==null){var d=a.stateNode;try{var g=n.shared.hiddenCallbacks;if(g!==null)for(n.shared.hiddenCallbacks=null,n=0;n<g.length;n++)Uo(g[n],d)}catch(_){Ye(a,a.return,_)}}l&&c&64&&Jf(i),ai(i,i.return);break;case 27:If(i);case 26:case 5:kl(n,i,l),l&&a===null&&c&4&&Wf(i),ai(i,i.return);break;case 12:kl(n,i,l);break;case 31:kl(n,i,l),l&&c&4&&ad(n,i);break;case 13:kl(n,i,l),l&&c&4&&nd(n,i);break;case 22:i.memoizedState===null&&kl(n,i,l),ai(i,i.return);break;case 30:break;default:kl(n,i,l)}t=t.sibling}}function Sc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Gn(l))}function jc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gn(e))}function rl(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ud(e,t,l,a),t=t.sibling}function ud(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:rl(e,t,l,a),n&2048&&li(9,t);break;case 1:rl(e,t,l,a);break;case 3:rl(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gn(e)));break;case 12:if(n&2048){rl(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,d=i.onPostCommit;typeof d=="function"&&d(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(g){Ye(t,t.return,g)}}else rl(e,t,l,a);break;case 31:rl(e,t,l,a);break;case 13:rl(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?rl(e,t,l,a):ni(e,t):i._visibility&2?rl(e,t,l,a):(i._visibility|=2,hn(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Sc(c,t);break;case 24:rl(e,t,l,a),n&2048&&jc(t.alternate,t);break;default:rl(e,t,l,a)}}function hn(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,d=l,g=a,_=c.flags;switch(c.tag){case 0:case 11:case 15:hn(i,c,d,g,n),li(8,c);break;case 23:break;case 22:var L=c.stateNode;c.memoizedState!==null?L._visibility&2?hn(i,c,d,g,n):ni(i,c):(L._visibility|=2,hn(i,c,d,g,n)),n&&_&2048&&Sc(c.alternate,c);break;case 24:hn(i,c,d,g,n),n&&_&2048&&jc(c.alternate,c);break;default:hn(i,c,d,g,n)}t=t.sibling}}function ni(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:ni(l,a),n&2048&&Sc(a.alternate,a);break;case 24:ni(l,a),n&2048&&jc(a.alternate,a);break;default:ni(l,a)}t=t.sibling}}var ii=8192;function pn(e,t,l){if(e.subtreeFlags&ii)for(e=e.child;e!==null;)cd(e,t,l),e=e.sibling}function cd(e,t,l){switch(e.tag){case 26:pn(e,t,l),e.flags&ii&&e.memoizedState!==null&&b0(l,cl,e.memoizedState,e.memoizedProps);break;case 5:pn(e,t,l);break;case 3:case 4:var a=cl;cl=_s(e.stateNode.containerInfo),pn(e,t,l),cl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=ii,ii=16777216,pn(e,t,l),ii=a):pn(e,t,l));break;default:pn(e,t,l)}}function rd(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 si(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];vt=a,fd(a,e)}rd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)od(e),e=e.sibling}function od(e){switch(e.tag){case 0:case 11:case 15:si(e),e.flags&2048&&ia(9,e,e.return);break;case 3:si(e);break;case 12:si(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xs(e)):si(e);break;default:si(e)}}function xs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];vt=a,fd(a,e)}rd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ia(8,t,t.return),xs(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,xs(t));break;default:xs(t)}e=e.sibling}}function fd(e,t){for(;vt!==null;){var l=vt;switch(l.tag){case 0:case 11:case 15:ia(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Gn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,vt=a;else e:for(l=e;vt!==null;){a=vt;var n=a.sibling,i=a.return;if(td(a),a===l){vt=null;break e}if(n!==null){n.return=i,vt=n;break e}vt=i}}}var km={getCacheForType:function(e){var t=St(ct),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return St(ct).controller.signal}},Um=typeof WeakMap=="function"?WeakMap:Map,He=0,Ze=null,Ae=null,_e=0,qe=0,Gt=null,sa=!1,mn=!1,Nc=!1,Ul=0,nt=0,ua=0,Ha=0,Ec=0,Xt=0,xn=0,ui=null,Lt=null,Cc=!1,ys=0,dd=0,gs=1/0,vs=null,ca=null,pt=0,ra=null,yn=null,Ll=0,Ac=0,Tc=null,hd=null,ci=0,_c=null;function Qt(){return(He&2)!==0&&_e!==0?_e&-_e:U.T!==null?kc():qa()}function pd(){if(Xt===0)if((_e&536870912)===0||Oe){var e=Et;Et<<=1,(Et&3932160)===0&&(Et=262144),Xt=e}else Xt=536870912;return e=Yt.current,e!==null&&(e.flags|=32),Xt}function Ht(e,t,l){(e===Ze&&(qe===2||qe===9)||e.cancelPendingCommit!==null)&&(gn(e,0),oa(e,_e,Xt,!1)),Je(e,l),((He&2)===0||e!==Ze)&&(e===Ze&&((He&2)===0&&(Ha|=l),nt===4&&oa(e,_e,Xt,!1)),xl(e))}function md(e,t,l){if((He&6)!==0)throw Error(o(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||C(e,t),n=a?Bm(e,t):Rc(e,t,!0),i=a;do{if(n===0){mn&&!a&&oa(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Lm(l)){n=Rc(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var d=e;n=ui;var g=d.current.memoizedState.isDehydrated;if(g&&(gn(d,c).flags|=256),c=Rc(d,c,!1),c!==2){if(Nc&&!g){d.errorRecoveryDisabledLanes|=i,Ha|=i,n=4;break e}i=Lt,Lt=n,i!==null&&(Lt===null?Lt=i:Lt.push.apply(Lt,i))}n=c}if(i=!1,n!==2)continue}}if(n===1){gn(e,0),oa(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:oa(a,t,Xt,!sa);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(n=ys+300-xt(),10<n)){if(oa(a,t,Xt,!sa),A(a,0,!0)!==0)break e;Ll=t,a.timeoutHandle=Zd(xd.bind(null,a,l,Lt,vs,Cc,t,Xt,Ha,xn,sa,i,"Throttled",-0,0),n);break e}xd(a,l,Lt,vs,Cc,t,Xt,Ha,xn,sa,i,null,-0,0)}}break}while(!0);xl(e)}function xd(e,t,l,a,n,i,c,d,g,_,L,B,z,M){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sl},cd(t,i,B);var te=(i&62914560)===i?ys-xt():(i&4194048)===i?dd-xt():0;if(te=w0(B,te),te!==null){Ll=i,e.cancelPendingCommit=te(Nd.bind(null,e,t,i,l,a,n,c,d,g,L,B,null,z,M)),oa(e,i,c,!_);return}}Nd(e,t,i,l,a,n,c,d,g)}function Lm(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!Bt(i(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 oa(e,t,l,a){t&=~Ec,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-lt(n),c=1<<i;a[i]=-1,n&=~c}l!==0&&fl(e,l,t)}function bs(){return(He&6)===0?(ri(0),!1):!0}function zc(){if(Ae!==null){if(qe===0)var e=Ae.return;else e=Ae,Cl=_a=null,Zu(e),cn=null,Qn=0,e=Ae;for(;e!==null;)Kf(e.alternate,e),e=e.return;Ae=null}}function gn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,a0(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ll=0,zc(),Ze=e,Ae=l=Nl(e.current,null),_e=t,qe=0,Gt=null,sa=!1,mn=C(e,t),Nc=!1,xn=Xt=Ec=Ha=ua=nt=0,Lt=ui=null,Cc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-lt(a),i=1<<n;t|=e[n],a&=~i}return Ul=t,Yi(),l}function yd(e,t){we=null,U.H=Pn,t===un||t===$i?(t=Mo(),qe=3):t===Du?(t=Mo(),qe=4):qe=t===cc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Gt=t,Ae===null&&(nt=1,rs(e,Ft(t,e.current)))}function gd(){var e=Yt.current;return e===null?!0:(_e&4194048)===_e?tl===null:(_e&62914560)===_e||(_e&536870912)!==0?e===tl:!1}function vd(){var e=U.H;return U.H=Pn,e===null?Pn:e}function bd(){var e=U.A;return U.A=km,e}function ws(){nt=4,sa||(_e&4194048)!==_e&&Yt.current!==null||(mn=!0),(ua&134217727)===0&&(Ha&134217727)===0||Ze===null||oa(Ze,_e,Xt,!1)}function Rc(e,t,l){var a=He;He|=2;var n=vd(),i=bd();(Ze!==e||_e!==t)&&(vs=null,gn(e,t)),t=!1;var c=nt;e:do try{if(qe!==0&&Ae!==null){var d=Ae,g=Gt;switch(qe){case 8:zc(),c=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&&(t=!0);var _=qe;if(qe=0,Gt=null,vn(e,d,g,_),l&&mn){c=0;break e}break;default:_=qe,qe=0,Gt=null,vn(e,d,g,_)}}Hm(),c=nt;break}catch(L){yd(e,L)}while(!0);return t&&e.shellSuspendCounter++,Cl=_a=null,He=a,U.H=n,U.A=i,Ae===null&&(Ze=null,_e=0,Yi()),c}function Hm(){for(;Ae!==null;)wd(Ae)}function Bm(e,t){var l=He;He|=2;var a=vd(),n=bd();Ze!==e||_e!==t?(vs=null,gs=xt()+500,gn(e,t)):mn=C(e,t);e:do try{if(qe!==0&&Ae!==null){t=Ae;var i=Gt;t:switch(qe){case 1:qe=0,Gt=null,vn(e,t,i,1);break;case 2:case 9:if(zo(i)){qe=0,Gt=null,Sd(t);break}t=function(){qe!==2&&qe!==9||Ze!==e||(qe=7),xl(e)},i.then(t,t);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:zo(i)?(qe=0,Gt=null,Sd(t)):(qe=0,Gt=null,vn(e,t,i,7));break;case 5:var c=null;switch(Ae.tag){case 26:c=Ae.memoizedState;case 5:case 27:var d=Ae;if(c?uh(c):d.stateNode.complete){qe=0,Gt=null;var g=d.sibling;if(g!==null)Ae=g;else{var _=d.return;_!==null?(Ae=_,Ss(_)):Ae=null}break t}}qe=0,Gt=null,vn(e,t,i,5);break;case 6:qe=0,Gt=null,vn(e,t,i,6);break;case 8:zc(),nt=6;break e;default:throw Error(o(462))}}qm();break}catch(L){yd(e,L)}while(!0);return Cl=_a=null,U.H=a,U.A=n,He=l,Ae!==null?0:(Ze=null,_e=0,Yi(),nt)}function qm(){for(;Ae!==null&&!Zl();)wd(Ae)}function wd(e){var t=Qf(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Ss(e):Ae=t}function Sd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Bf(l,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=Bf(l,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:Zu(t);default:Kf(l,t),t=Ae=vo(t,Ul),t=Qf(l,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Ss(e):Ae=t}function vn(e,t,l,a){Cl=_a=null,Zu(t),cn=null,Qn=0;var n=t.return;try{if(Tm(e,n,t,l,_e)){nt=1,rs(e,Ft(l,e.current)),Ae=null;return}}catch(i){if(n!==null)throw Ae=n,i;nt=1,rs(e,Ft(l,e.current)),Ae=null;return}t.flags&32768?(Oe||a===1?e=!0:mn||(_e&536870912)!==0?e=!1:(sa=e=!0,(a===2||a===9||a===3||a===6)&&(a=Yt.current,a!==null&&a.tag===13&&(a.flags|=16384))),jd(t,e)):Ss(t)}function Ss(e){var t=e;do{if((t.flags&32768)!==0){jd(t,sa);return}e=t.return;var l=Rm(t.alternate,t,Ul);if(l!==null){Ae=l;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);nt===0&&(nt=5)}function jd(e,t){do{var l=Mm(e.alternate,e);if(l!==null){l.flags&=32767,Ae=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=l}while(e!==null);nt=6,Ae=null}function Nd(e,t,l,a,n,i,c,d,g){e.cancelPendingCommit=null;do js();while(pt!==0);if((He&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(i=t.lanes|t.childLanes,i|=vu,Ct(e,l,i,c,d,g),e===Ze&&(Ae=Ze=null,_e=0),yn=t,ra=e,Ll=l,Ac=i,Tc=n,hd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Xm(ee,function(){return _d(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null,n=$.p,$.p=2,c=He,He|=4;try{Om(e,t,l)}finally{He=c,$.p=n,U.T=a}}pt=1,Ed(),Cd(),Ad()}}function Ed(){if(pt===1){pt=0;var e=ra,t=yn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var a=$.p;$.p=2;var n=He;He|=4;try{id(t,e);var i=Gc,c=ro(e.containerInfo),d=i.focusedElem,g=i.selectionRange;if(c!==d&&d&&d.ownerDocument&&co(d.ownerDocument.documentElement,d)){if(g!==null&&pu(d)){var _=g.start,L=g.end;if(L===void 0&&(L=_),"selectionStart"in d)d.selectionStart=_,d.selectionEnd=Math.min(L,d.value.length);else{var B=d.ownerDocument||document,z=B&&B.defaultView||window;if(z.getSelection){var M=z.getSelection(),te=d.textContent.length,he=Math.min(g.start,te),Qe=g.end===void 0?he:Math.min(g.end,te);!M.extend&&he>Qe&&(c=Qe,Qe=he,he=c);var E=uo(d,he),S=uo(d,Qe);if(E&&S&&(M.rangeCount!==1||M.anchorNode!==E.node||M.anchorOffset!==E.offset||M.focusNode!==S.node||M.focusOffset!==S.offset)){var T=B.createRange();T.setStart(E.node,E.offset),M.removeAllRanges(),he>Qe?(M.addRange(T),M.extend(S.node,S.offset)):(T.setEnd(S.node,S.offset),M.addRange(T))}}}}for(B=[],M=d;M=M.parentNode;)M.nodeType===1&&B.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<B.length;d++){var H=B[d];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}ks=!!Vc,Gc=Vc=null}finally{He=n,$.p=a,U.T=l}}e.current=t,pt=2}}function Cd(){if(pt===2){pt=0;var e=ra,t=yn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var a=$.p;$.p=2;var n=He;He|=4;try{ed(e,t.alternate,t)}finally{He=n,$.p=a,U.T=l}}pt=3}}function Ad(){if(pt===4||pt===3){pt=0,Tn();var e=ra,t=yn,l=Ll,a=hd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?pt=5:(pt=0,yn=ra=null,Td(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(ca=null),Ve(l),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=U.T,n=$.p,$.p=2,U.T=null;try{for(var i=e.onRecoverableError,c=0;c<a.length;c++){var d=a[c];i(d.value,{componentStack:d.stack})}}finally{U.T=t,$.p=n}}(Ll&3)!==0&&js(),xl(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===_c?ci++:(ci=0,_c=e):ci=0,ri(0)}}function Td(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gn(t)))}function js(){return Ed(),Cd(),Ad(),_d()}function _d(){if(pt!==5)return!1;var e=ra,t=Ac;Ac=0;var l=Ve(Ll),a=U.T,n=$.p;try{$.p=32>l?32:l,U.T=null,l=Tc,Tc=null;var i=ra,c=Ll;if(pt=0,yn=ra=null,Ll=0,(He&6)!==0)throw Error(o(331));var d=He;if(He|=4,od(i.current),ud(i,i.current,c,l),He=d,ri(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Pe,i)}catch{}return!0}finally{$.p=n,U.T=a,Td(e,t)}}function zd(e,t,l){t=Ft(l,t),t=uc(e.stateNode,t,2),e=la(e,t,2),e!==null&&(Je(e,2),xl(e))}function Ye(e,t,l){if(e.tag===3)zd(e,e,l);else for(;t!==null;){if(t.tag===3){zd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ca===null||!ca.has(a))){e=Ft(l,e),l=Rf(2),a=la(t,l,2),a!==null&&(Mf(l,a,t,e),Je(a,2),xl(a));break}}t=t.return}}function Mc(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Um;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Nc=!0,n.add(l),e=Ym.bind(null,e,t,l),t.then(e,e))}function Ym(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ze===e&&(_e&l)===l&&(nt===4||nt===3&&(_e&62914560)===_e&&300>xt()-ys?(He&2)===0&&gn(e,0):Ec|=l,xn===_e&&(xn=0)),xl(e)}function Rd(e,t){t===0&&(t=Ee()),e=Ca(e,t),e!==null&&(Je(e,t),xl(e))}function Vm(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Rd(e,l)}function Gm(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),Rd(e,l)}function Xm(e,t){return vl(e,t)}var Ns=null,bn=null,Oc=!1,Es=!1,Dc=!1,fa=0;function xl(e){e!==bn&&e.next===null&&(bn===null?Ns=bn=e:bn=bn.next=e),Es=!0,Oc||(Oc=!0,Zm())}function ri(e,t){if(!Dc&&Es){Dc=!0;do for(var l=!1,a=Ns;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var c=a.suspendedLanes,d=a.pingedLanes;i=(1<<31-lt(42|e)+1)-1,i&=n&~(c&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,kd(a,i))}else i=_e,i=A(a,a===Ze?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||C(a,i)||(l=!0,kd(a,i));a=a.next}while(l);Dc=!1}}function Qm(){Md()}function Md(){Es=Oc=!1;var e=0;fa!==0&&l0()&&(e=fa);for(var t=xt(),l=null,a=Ns;a!==null;){var n=a.next,i=Od(a,t);i===0?(a.next=null,l===null?Ns=n:l.next=n,n===null&&(bn=l)):(l=a,(e!==0||(i&3)!==0)&&(Es=!0)),a=n}pt!==0&&pt!==5||ri(e),fa!==0&&(fa=0)}function Od(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-lt(i),d=1<<c,g=n[c];g===-1?((d&l)===0||(d&a)!==0)&&(n[c]=Z(d,t)):g<=t&&(e.expiredLanes|=d),i&=~d}if(t=Ze,l=_e,l=A(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(qe===2||qe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&va(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||C(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&va(a),Ve(l)){case 2:case 8:l=K;break;case 32:l=ee;break;case 268435456:l=I;break;default:l=ee}return a=Dd.bind(null,e),l=vl(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&va(a),e.callbackPriority=2,e.callbackNode=null,2}function Dd(e,t){if(pt!==0&&pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(js()&&e.callbackNode!==l)return null;var a=_e;return a=A(e,e===Ze?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(md(e,a,t),Od(e,xt()),e.callbackNode!=null&&e.callbackNode===l?Dd.bind(null,e):null)}function kd(e,t){if(js())return null;md(e,t,!0)}function Zm(){n0(function(){(He&6)!==0?vl(bl,Qm):Md()})}function kc(){if(fa===0){var e=nn;e===0&&(e=Zt,Zt<<=1,(Zt&261888)===0&&(Zt=256)),fa=e}return fa}function Ud(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Oi(""+e)}function Ld(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Km(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=Ud((n[Be]||null).action),c=a.submitter;c&&(t=(t=c[Be]||null)?Ud(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var d=new Li("action","action",null,a,n);e.push({event:d,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(fa!==0){var g=c?Ld(n,c):new FormData(n);tc(l,{pending:!0,data:g,method:n.method,action:i},null,g)}}else typeof i=="function"&&(d.preventDefault(),g=c?Ld(n,c):new FormData(n),tc(l,{pending:!0,data:g,method:n.method,action:i},i,g))},currentTarget:n}]})}}for(var Uc=0;Uc<gu.length;Uc++){var Lc=gu[Uc],Jm=Lc.toLowerCase(),$m=Lc[0].toUpperCase()+Lc.slice(1);ul(Jm,"on"+$m)}ul(ho,"onAnimationEnd"),ul(po,"onAnimationIteration"),ul(mo,"onAnimationStart"),ul("dblclick","onDoubleClick"),ul("focusin","onFocus"),ul("focusout","onBlur"),ul(fm,"onTransitionRun"),ul(dm,"onTransitionStart"),ul(hm,"onTransitionCancel"),ul(xo,"onTransitionEnd"),Xa("onMouseEnter",["mouseout","mouseover"]),Xa("onMouseLeave",["mouseout","mouseover"]),Xa("onPointerEnter",["pointerout","pointerover"]),Xa("onPointerLeave",["pointerout","pointerover"]),Sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oi="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(" "),Wm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(oi));function Hd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var c=a.length-1;0<=c;c--){var d=a[c],g=d.instance,_=d.currentTarget;if(d=d.listener,g!==i&&n.isPropagationStopped())break e;i=d,n.currentTarget=_;try{i(n)}catch(L){qi(L)}n.currentTarget=null,i=g}else for(c=0;c<a.length;c++){if(d=a[c],g=d.instance,_=d.currentTarget,d=d.listener,g!==i&&n.isPropagationStopped())break e;i=d,n.currentTarget=_;try{i(n)}catch(L){qi(L)}n.currentTarget=null,i=g}}}}function Te(e,t){var l=t[_n];l===void 0&&(l=t[_n]=new Set);var a=e+"__bubble";l.has(a)||(Bd(t,e,2,!1),l.add(a))}function Hc(e,t,l){var a=0;t&&(a|=4),Bd(l,e,a,t)}var Cs="_reactListening"+Math.random().toString(36).slice(2);function Bc(e){if(!e[Cs]){e[Cs]=!0,zr.forEach(function(l){l!=="selectionchange"&&(Wm.has(l)||Hc(l,!1,e),Hc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cs]||(t[Cs]=!0,Hc("selectionchange",!1,t))}}function Bd(e,t,l,a){switch(ph(t)){case 2:var n=N0;break;case 8:n=E0;break;default:n=er}l=n.bind(null,t,l,e),n=void 0,!iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function qc(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var d=a.stateNode.containerInfo;if(d===n)break;if(c===4)for(c=a.return;c!==null;){var g=c.tag;if((g===3||g===4)&&c.stateNode.containerInfo===n)return;c=c.return}for(;d!==null;){if(c=Ya(d),c===null)return;if(g=c.tag,g===5||g===6||g===26||g===27){a=i=c;continue e}d=d.parentNode}}a=a.return}Vr(function(){var _=i,L=au(l),B=[];e:{var z=yo.get(e);if(z!==void 0){var M=Li,te=e;switch(e){case"keypress":if(ki(l)===0)break e;case"keydown":case"keyup":M=Gp;break;case"focusin":te="focus",M=ru;break;case"focusout":te="blur",M=ru;break;case"beforeblur":case"afterblur":M=ru;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=Qr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Rp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Zp;break;case ho:case po:case mo:M=Dp;break;case xo:M=Jp;break;case"scroll":case"scrollend":M=_p;break;case"wheel":M=Wp;break;case"copy":case"cut":case"paste":M=Up;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=Kr;break;case"toggle":case"beforetoggle":M=Ip}var he=(t&4)!==0,Qe=!he&&(e==="scroll"||e==="scrollend"),E=he?z!==null?z+"Capture":null:z;he=[];for(var S=_,T;S!==null;){var H=S;if(T=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||T===null||E===null||(H=Mn(S,E),H!=null&&he.push(fi(S,H,T))),Qe)break;S=S.return}0<he.length&&(z=new M(z,te,null,l,L),B.push({event:z,listeners:he}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",z&&l!==lu&&(te=l.relatedTarget||l.fromElement)&&(Ya(te)||te[dl]))break e;if((M||z)&&(z=L.window===L?L:(z=L.ownerDocument)?z.defaultView||z.parentWindow:window,M?(te=l.relatedTarget||l.toElement,M=_,te=te?Ya(te):null,te!==null&&(Qe=p(te),he=te.tag,te!==Qe||he!==5&&he!==27&&he!==6)&&(te=null)):(M=null,te=_),M!==te)){if(he=Qr,H="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(he=Kr,H="onPointerLeave",E="onPointerEnter",S="pointer"),Qe=M==null?z:Rn(M),T=te==null?z:Rn(te),z=new he(H,S+"leave",M,l,L),z.target=Qe,z.relatedTarget=T,H=null,Ya(L)===_&&(he=new he(E,S+"enter",te,l,L),he.target=T,he.relatedTarget=Qe,H=he),Qe=H,M&&te)t:{for(he=Fm,E=M,S=te,T=0,H=E;H;H=he(H))T++;H=0;for(var oe=S;oe;oe=he(oe))H++;for(;0<T-H;)E=he(E),T--;for(;0<H-T;)S=he(S),H--;for(;T--;){if(E===S||S!==null&&E===S.alternate){he=E;break t}E=he(E),S=he(S)}he=null}else he=null;M!==null&&qd(B,z,M,he,!1),te!==null&&Qe!==null&&qd(B,Qe,te,he,!0)}}e:{if(z=_?Rn(_):window,M=z.nodeName&&z.nodeName.toLowerCase(),M==="select"||M==="input"&&z.type==="file")var Ue=to;else if(Pr(z))if(lo)Ue=cm;else{Ue=sm;var se=im}else M=z.nodeName,!M||M.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?_&&tu(_.elementType)&&(Ue=to):Ue=um;if(Ue&&(Ue=Ue(e,_))){eo(B,Ue,l,L);break e}se&&se(e,z,_),e==="focusout"&&_&&z.type==="number"&&_.memoizedProps.value!=null&&eu(z,"number",z.value)}switch(se=_?Rn(_):window,e){case"focusin":(Pr(se)||se.contentEditable==="true")&&(Wa=se,mu=_,qn=null);break;case"focusout":qn=mu=Wa=null;break;case"mousedown":xu=!0;break;case"contextmenu":case"mouseup":case"dragend":xu=!1,oo(B,l,L);break;case"selectionchange":if(om)break;case"keydown":case"keyup":oo(B,l,L)}var je;if(fu)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else $a?Fr(e,l)&&(ze="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(Jr&&l.locale!=="ko"&&($a||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&$a&&(je=Gr()):($l=L,su="value"in $l?$l.value:$l.textContent,$a=!0)),se=As(_,ze),0<se.length&&(ze=new Zr(ze,e,null,l,L),B.push({event:ze,listeners:se}),je?ze.data=je:(je=Ir(l),je!==null&&(ze.data=je)))),(je=em?tm(e,l):lm(e,l))&&(ze=As(_,"onBeforeInput"),0<ze.length&&(se=new Zr("onBeforeInput","beforeinput",null,l,L),B.push({event:se,listeners:ze}),se.data=je)),Km(B,e,_,l,L)}Hd(B,t)})}function fi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function As(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=Mn(e,l),n!=null&&a.unshift(fi(e,n,i)),n=Mn(e,t),n!=null&&a.push(fi(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Fm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function qd(e,t,l,a,n){for(var i=t._reactName,c=[];l!==null&&l!==a;){var d=l,g=d.alternate,_=d.stateNode;if(d=d.tag,g!==null&&g===a)break;d!==5&&d!==26&&d!==27||_===null||(g=_,n?(_=Mn(l,i),_!=null&&c.unshift(fi(l,_,g))):n||(_=Mn(l,i),_!=null&&c.push(fi(l,_,g)))),l=l.return}c.length!==0&&e.push({event:t,listeners:c})}var Im=/\r\n?/g,Pm=/\u0000|\uFFFD/g;function Yd(e){return(typeof e=="string"?e:""+e).replace(Im,`
9
- `).replace(Pm,"")}function Vd(e,t){return t=Yd(t),Yd(e)===t}function Xe(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Za(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Za(e,""+a);break;case"className":Ri(e,"class",a);break;case"tabIndex":Ri(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Ri(e,l,a);break;case"style":qr(e,a,i);break;case"data":if(t!=="object"){Ri(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Oi(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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"&&(l==="formAction"?(t!=="input"&&Xe(e,t,"name",n.name,n,null),Xe(e,t,"formEncType",n.formEncType,n,null),Xe(e,t,"formMethod",n.formMethod,n,null),Xe(e,t,"formTarget",n.formTarget,n,null)):(Xe(e,t,"encType",n.encType,n,null),Xe(e,t,"method",n.method,n,null),Xe(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Oi(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Sl);break;case"onScroll":a!=null&&Te("scroll",e);break;case"onScrollEnd":a!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Oi(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Te("beforetoggle",e),Te("toggle",e),zi(e,"popover",a);break;case"xlinkActuate":wl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":wl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":wl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":wl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":wl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":wl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":wl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":wl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":wl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":zi(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ap.get(l)||l,zi(e,l,a))}}function Yc(e,t,l,a,n,i){switch(l){case"style":qr(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Za(e,a):(typeof a=="number"||typeof a=="bigint")&&Za(e,""+a);break;case"onScroll":a!=null&&Te("scroll",e);break;case"onScrollEnd":a!=null&&Te("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Sl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[Be]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):zi(e,l,a)}}}function Nt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];if(c!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Xe(e,t,i,c,l,null)}}n&&Xe(e,t,"srcSet",l.srcSet,l,null),a&&Xe(e,t,"src",l.src,l,null);return;case"input":Te("invalid",e);var d=i=c=n=null,g=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var L=l[a];if(L!=null)switch(a){case"name":n=L;break;case"type":c=L;break;case"checked":g=L;break;case"defaultChecked":_=L;break;case"value":i=L;break;case"defaultValue":d=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:Xe(e,t,a,L,l,null)}}Ur(e,i,d,g,_,c,n,!1);return;case"select":Te("invalid",e),a=c=i=null;for(n in l)if(l.hasOwnProperty(n)&&(d=l[n],d!=null))switch(n){case"value":i=d;break;case"defaultValue":c=d;break;case"multiple":a=d;default:Xe(e,t,n,d,l,null)}t=i,l=c,e.multiple=!!a,t!=null?Qa(e,!!a,t,!1):l!=null&&Qa(e,!!a,l,!0);return;case"textarea":Te("invalid",e),i=n=a=null;for(c in l)if(l.hasOwnProperty(c)&&(d=l[c],d!=null))switch(c){case"value":a=d;break;case"defaultValue":n=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:Xe(e,t,c,d,l,null)}Hr(e,a,n,i);return;case"option":for(g in l)l.hasOwnProperty(g)&&(a=l[g],a!=null)&&(g==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Xe(e,t,g,a,l,null));return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(a=0;a<oi.length;a++)Te(oi[a],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("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(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Xe(e,t,_,a,l,null)}return;default:if(tu(t)){for(L in l)l.hasOwnProperty(L)&&(a=l[L],a!==void 0&&Yc(e,t,L,a,l,void 0));return}}for(d in l)l.hasOwnProperty(d)&&(a=l[d],a!=null&&Xe(e,t,d,a,l,null))}function e0(e,t,l,a){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,c=null,d=null,g=null,_=null,L=null;for(M in l){var B=l[M];if(l.hasOwnProperty(M)&&B!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":g=B;default:a.hasOwnProperty(M)||Xe(e,t,M,null,a,B)}}for(var z in a){var M=a[z];if(B=l[z],a.hasOwnProperty(z)&&(M!=null||B!=null))switch(z){case"type":i=M;break;case"name":n=M;break;case"checked":_=M;break;case"defaultChecked":L=M;break;case"value":c=M;break;case"defaultValue":d=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:M!==B&&Xe(e,t,z,M,a,B)}}Ps(e,c,d,g,_,L,i,n);return;case"select":M=c=d=z=null;for(i in l)if(g=l[i],l.hasOwnProperty(i)&&g!=null)switch(i){case"value":break;case"multiple":M=g;default:a.hasOwnProperty(i)||Xe(e,t,i,null,a,g)}for(n in a)if(i=a[n],g=l[n],a.hasOwnProperty(n)&&(i!=null||g!=null))switch(n){case"value":z=i;break;case"defaultValue":d=i;break;case"multiple":c=i;default:i!==g&&Xe(e,t,n,i,a,g)}t=d,l=c,a=M,z!=null?Qa(e,!!l,z,!1):!!a!=!!l&&(t!=null?Qa(e,!!l,t,!0):Qa(e,!!l,l?[]:"",!1));return;case"textarea":M=z=null;for(d in l)if(n=l[d],l.hasOwnProperty(d)&&n!=null&&!a.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:Xe(e,t,d,null,a,n)}for(c in a)if(n=a[c],i=l[c],a.hasOwnProperty(c)&&(n!=null||i!=null))switch(c){case"value":z=n;break;case"defaultValue":M=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(o(91));break;default:n!==i&&Xe(e,t,c,n,a,i)}Lr(e,z,M);return;case"option":for(var te in l)z=l[te],l.hasOwnProperty(te)&&z!=null&&!a.hasOwnProperty(te)&&(te==="selected"?e.selected=!1:Xe(e,t,te,null,a,z));for(g in a)z=a[g],M=l[g],a.hasOwnProperty(g)&&z!==M&&(z!=null||M!=null)&&(g==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Xe(e,t,g,z,a,M));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 he in l)z=l[he],l.hasOwnProperty(he)&&z!=null&&!a.hasOwnProperty(he)&&Xe(e,t,he,null,a,z);for(_ in a)if(z=a[_],M=l[_],a.hasOwnProperty(_)&&z!==M&&(z!=null||M!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:Xe(e,t,_,z,a,M)}return;default:if(tu(t)){for(var Qe in l)z=l[Qe],l.hasOwnProperty(Qe)&&z!==void 0&&!a.hasOwnProperty(Qe)&&Yc(e,t,Qe,void 0,a,z);for(L in a)z=a[L],M=l[L],!a.hasOwnProperty(L)||z===M||z===void 0&&M===void 0||Yc(e,t,L,z,a,M);return}}for(var E in l)z=l[E],l.hasOwnProperty(E)&&z!=null&&!a.hasOwnProperty(E)&&Xe(e,t,E,null,a,z);for(B in a)z=a[B],M=l[B],!a.hasOwnProperty(B)||z===M||z==null&&M==null||Xe(e,t,B,z,a,M)}function Gd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function t0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,c=n.initiatorType,d=n.duration;if(i&&d&&Gd(c)){for(c=0,d=n.responseEnd,a+=1;a<l.length;a++){var g=l[a],_=g.startTime;if(_>d)break;var L=g.transferSize,B=g.initiatorType;L&&Gd(B)&&(g=g.responseEnd,c+=L*(g<d?1:(d-_)/(g-_)))}if(--a,t+=8*(i+c)/(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 Vc=null,Gc=null;function Ts(e){return e.nodeType===9?e:e.ownerDocument}function Xd(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 Qd(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 Xc(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 Qc=null;function l0(){var e=window.event;return e&&e.type==="popstate"?e===Qc?!1:(Qc=e,!0):(Qc=null,!1)}var Zd=typeof setTimeout=="function"?setTimeout:void 0,a0=typeof clearTimeout=="function"?clearTimeout:void 0,Kd=typeof Promise=="function"?Promise:void 0,n0=typeof queueMicrotask=="function"?queueMicrotask:typeof Kd<"u"?function(e){return Kd.resolve(null).then(e).catch(i0)}:Zd;function i0(e){setTimeout(function(){throw e})}function da(e){return e==="head"}function Jd(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),Nn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")di(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,di(l);for(var i=l.firstChild;i;){var c=i.nextSibling,d=i.nodeName;i[zn]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=c}}else l==="body"&&di(e.ownerDocument.body);l=n}while(l);Nn(t)}function $d(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Zc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Zc(l),Fs(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function s0(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[zn])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=ll(e.nextSibling),e===null)break}return null}function u0(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=ll(e.nextSibling),e===null))return null;return e}function Wd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ll(e.nextSibling),e===null))return null;return e}function Kc(e){return e.data==="$?"||e.data==="$~"}function Jc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function c0(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function ll(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 $c=null;function Fd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return ll(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Id(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Pd(e,t,l){switch(t=Ts(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function di(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Fs(e)}var al=new Map,eh=new Set;function _s(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Hl=$.d;$.d={f:r0,r:o0,D:f0,C:d0,L:h0,m:p0,X:x0,S:m0,M:y0};function r0(){var e=Hl.f(),t=bs();return e||t}function o0(e){var t=Va(e);t!==null&&t.tag===5&&t.type==="form"?yf(t):Hl.r(e)}var wn=typeof document>"u"?null:document;function th(e,t,l){var a=wn;if(a&&typeof t=="string"&&t){var n=$t(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),eh.has(n)||(eh.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Nt(t,"link",e),gt(t),a.head.appendChild(t)))}}function f0(e){Hl.D(e),th("dns-prefetch",e,null)}function d0(e,t){Hl.C(e,t),th("preconnect",e,t)}function h0(e,t,l){Hl.L(e,t,l);var a=wn;if(a&&e&&t){var n='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+$t(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+$t(l.imageSizes)+'"]')):n+='[href="'+$t(e)+'"]';var i=n;switch(t){case"style":i=Sn(e);break;case"script":i=jn(e)}al.has(i)||(e=v({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),al.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(hi(i))||t==="script"&&a.querySelector(pi(i))||(t=a.createElement("link"),Nt(t,"link",e),gt(t),a.head.appendChild(t)))}}function p0(e,t){Hl.m(e,t);var l=wn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+$t(a)+'"][href="'+$t(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=jn(e)}if(!al.has(i)&&(e=v({rel:"modulepreload",href:e},t),al.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pi(i)))return}a=l.createElement("link"),Nt(a,"link",e),gt(a),l.head.appendChild(a)}}}function m0(e,t,l){Hl.S(e,t,l);var a=wn;if(a&&e){var n=Ga(a).hoistableStyles,i=Sn(e);t=t||"default";var c=n.get(i);if(!c){var d={loading:0,preload:null};if(c=a.querySelector(hi(i)))d.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},l),(l=al.get(i))&&Wc(e,l);var g=c=a.createElement("link");gt(g),Nt(g,"link",e),g._p=new Promise(function(_,L){g.onload=_,g.onerror=L}),g.addEventListener("load",function(){d.loading|=1}),g.addEventListener("error",function(){d.loading|=2}),d.loading|=4,zs(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:d},n.set(i,c)}}}function x0(e,t){Hl.X(e,t);var l=wn;if(l&&e){var a=Ga(l).hoistableScripts,n=jn(e),i=a.get(n);i||(i=l.querySelector(pi(n)),i||(e=v({src:e,async:!0},t),(t=al.get(n))&&Fc(e,t),i=l.createElement("script"),gt(i),Nt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function y0(e,t){Hl.M(e,t);var l=wn;if(l&&e){var a=Ga(l).hoistableScripts,n=jn(e),i=a.get(n);i||(i=l.querySelector(pi(n)),i||(e=v({src:e,async:!0,type:"module"},t),(t=al.get(n))&&Fc(e,t),i=l.createElement("script"),gt(i),Nt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function lh(e,t,l,a){var n=(n=pe.current)?_s(n):null;if(!n)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Sn(l.href),l=Ga(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Sn(l.href);var i=Ga(n).hoistableStyles,c=i.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=n.querySelector(hi(e)))&&!i._p&&(c.instance=i,c.state.loading=5),al.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},al.set(e,l),i||g0(n,e,l,c.state))),t&&a===null)throw Error(o(528,""));return c}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=jn(l),l=Ga(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Sn(e){return'href="'+$t(e)+'"'}function hi(e){return'link[rel="stylesheet"]['+e+"]"}function ah(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function g0(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Nt(t,"link",l),gt(t),e.head.appendChild(t))}function jn(e){return'[src="'+$t(e)+'"]'}function pi(e){return"script[async]"+e}function nh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+$t(l.href)+'"]');if(a)return t.instance=a,gt(a),a;var n=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),gt(a),Nt(a,"style",n),zs(a,l.precedence,e),t.instance=a;case"stylesheet":n=Sn(l.href);var i=e.querySelector(hi(n));if(i)return t.state.loading|=4,t.instance=i,gt(i),i;a=ah(l),(n=al.get(n))&&Wc(a,n),i=(e.ownerDocument||e).createElement("link"),gt(i);var c=i;return c._p=new Promise(function(d,g){c.onload=d,c.onerror=g}),Nt(i,"link",a),t.state.loading|=4,zs(i,l.precedence,e),t.instance=i;case"script":return i=jn(l.src),(n=e.querySelector(pi(i)))?(t.instance=n,gt(n),n):(a=l,(n=al.get(i))&&(a=v({},l),Fc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),gt(n),Nt(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,zs(a,l.precedence,e));return t.instance}function zs(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,c=0;c<a.length;c++){var d=a[c];if(d.dataset.precedence===t)i=d;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Rs=null;function ih(e,t,l){if(Rs===null){var a=new Map,n=Rs=new Map;n.set(l,a)}else n=Rs,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[zn]||i[ht]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var d=a.get(c);d?d.push(i):a.set(c,[i])}}return a}function sh(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function v0(e,t,l){if(l===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 uh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function b0(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Sn(a.href),i=t.querySelector(hi(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ms.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,gt(i);return}i=t.ownerDocument||t,a=ah(a),(n=al.get(n))&&Wc(a,n),i=i.createElement("link"),gt(i);var c=i;c._p=new Promise(function(d,g){c.onload=d,c.onerror=g}),Nt(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ms.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ic=0;function w0(e,t){return e.stylesheets&&e.count===0&&Ds(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Ds(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Ic===0&&(Ic=62500*t0());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ds(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Ic?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ms(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ds(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Os=null;function Ds(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Os=new Map,t.forEach(S0,e),Os=null,Ms.call(e))}function S0(e,t){if(!(t.state.loading&4)){var l=Os.get(e);if(l)var a=l.get(null);else{l=new Map,Os.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var c=n[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(l.set(c.dataset.precedence,c),a=c)}a&&l.set(null,a)}n=t.instance,c=n.getAttribute("data-precedence"),i=l.get(c)||a,i===a&&l.set(null,n),l.set(c,n),this.count++,a=Ms.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var mi={$$typeof:P,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function j0(e,t,l,a,n,i,c,d,g){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=ke(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ke(0),this.hiddenUpdates=ke(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function ch(e,t,l,a,n,i,c,d,g,_,L,B){return e=new j0(e,t,l,c,g,_,L,B,d),t=1,i===!0&&(t|=24),i=qt(3,null,null,t),e.current=i,i.stateNode=e,t=Ru(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},ku(i),e}function rh(e){return e?(e=Pa,e):Pa}function oh(e,t,l,a,n,i){n=rh(n),a.context===null?a.context=n:a.pendingContext=n,a=ta(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=la(e,a,t),l!==null&&(Ht(l,e,t),Kn(l,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Pc(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function dh(e){if(e.tag===13||e.tag===31){var t=Ca(e,67108864);t!==null&&Ht(t,e,67108864),Pc(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Qt();t=F(t);var l=Ca(e,t);l!==null&&Ht(l,e,t),Pc(e,t)}}var ks=!0;function N0(e,t,l,a){var n=U.T;U.T=null;var i=$.p;try{$.p=2,er(e,t,l,a)}finally{$.p=i,U.T=n}}function E0(e,t,l,a){var n=U.T;U.T=null;var i=$.p;try{$.p=8,er(e,t,l,a)}finally{$.p=i,U.T=n}}function er(e,t,l,a){if(ks){var n=tr(a);if(n===null)qc(e,t,a,Us,l),mh(e,a);else if(A0(n,e,t,l,a))a.stopPropagation();else if(mh(e,a),t&4&&-1<C0.indexOf(e)){for(;n!==null;){var i=Va(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=Kt(i.pendingLanes);if(c!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;c;){var g=1<<31-lt(c);d.entanglements[1]|=g,c&=~g}xl(i),(He&6)===0&&(gs=xt()+500,ri(0))}}break;case 31:case 13:d=Ca(i,2),d!==null&&Ht(d,i,2),bs(),Pc(i,2)}if(i=tr(a),i===null&&qc(e,t,a,Us,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else qc(e,t,a,null,l)}}function tr(e){return e=au(e),lr(e)}var Us=null;function lr(e){if(Us=null,e=Ya(e),e!==null){var t=p(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=j(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Us=e,null}function ph(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(Kl()){case bl:return 2;case K:return 8;case ee:case le:return 32;case I:return 268435456;default:return 32}default:return 32}}var ar=!1,ha=null,pa=null,ma=null,xi=new Map,yi=new Map,xa=[],C0="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 mh(e,t){switch(e){case"focusin":case"focusout":ha=null;break;case"dragenter":case"dragleave":pa=null;break;case"mouseover":case"mouseout":ma=null;break;case"pointerover":case"pointerout":xi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yi.delete(t.pointerId)}}function gi(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=Va(t),t!==null&&dh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function A0(e,t,l,a,n){switch(t){case"focusin":return ha=gi(ha,e,t,l,a,n),!0;case"dragenter":return pa=gi(pa,e,t,l,a,n),!0;case"mouseover":return ma=gi(ma,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return xi.set(i,gi(xi.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,yi.set(i,gi(yi.get(i)||null,e,t,l,a,n)),!0}return!1}function xh(e){var t=Ya(e.target);if(t!==null){var l=p(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,Jl(e.priority,function(){hh(l)});return}}else if(t===31){if(t=j(l),t!==null){e.blockedOn=t,Jl(e.priority,function(){hh(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ls(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=tr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);lu=a,l.target.dispatchEvent(a),lu=null}else return t=Va(l),t!==null&&dh(t),e.blockedOn=l,!1;t.shift()}return!0}function yh(e,t,l){Ls(e)&&l.delete(t)}function T0(){ar=!1,ha!==null&&Ls(ha)&&(ha=null),pa!==null&&Ls(pa)&&(pa=null),ma!==null&&Ls(ma)&&(ma=null),xi.forEach(yh),yi.forEach(yh)}function Hs(e,t){e.blockedOn===t&&(e.blockedOn=null,ar||(ar=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,T0)))}var Bs=null;function gh(e){Bs!==e&&(Bs=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Bs===e&&(Bs=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(lr(a||l)===null)continue;break}var i=Va(l);i!==null&&(e.splice(t,3),t-=3,tc(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function Nn(e){function t(g){return Hs(g,e)}ha!==null&&Hs(ha,e),pa!==null&&Hs(pa,e),ma!==null&&Hs(ma,e),xi.forEach(t),yi.forEach(t);for(var l=0;l<xa.length;l++){var a=xa[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<xa.length&&(l=xa[0],l.blockedOn===null);)xh(l),l.blockedOn===null&&xa.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],c=n[Be]||null;if(typeof i=="function")c||gh(l);else if(c){var d=null;if(i&&i.hasAttribute("formAction")){if(n=i,c=i[Be]||null)d=c.formAction;else if(lr(n)!==null)continue}else d=c.action;typeof d=="function"?l[a+1]=d:(l.splice(a,3),a-=3),gh(l)}}}function vh(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return n=c})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!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 a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function nr(e){this._internalRoot=e}qs.prototype.render=nr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,a=Qt();oh(l,a,e,t,null,null)},qs.prototype.unmount=nr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;oh(e.current,2,null,e,null,null),bs(),t[dl]=null}};function qs(e){this._internalRoot=e}qs.prototype.unstable_scheduleHydration=function(e){if(e){var t=qa();e={blockedOn:null,target:e,priority:t};for(var l=0;l<xa.length&&t!==0&&t<xa[l].priority;l++);xa.splice(l,0,e),l===0&&xh(e)}};var bh=r.version;if(bh!=="19.2.3")throw Error(o(527,bh,"19.2.3"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?N(e):null,e=e===null?null:e.stateNode,e};var _0={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ys=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ys.isDisabled&&Ys.supportsFiber)try{Pe=Ys.inject(_0),Me=Ys}catch{}}return bi.createRoot=function(e,t){if(!h(e))throw Error(o(299));var l=!1,a="",n=Af,i=Tf,c=_f;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ch(e,1,!1,null,null,l,a,null,n,i,c,vh),e[dl]=t.current,Bc(e),new nr(t)},bi.hydrateRoot=function(e,t,l){if(!h(e))throw Error(o(299));var a=!1,n="",i=Af,c=Tf,d=_f,g=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(d=l.onRecoverableError),l.formState!==void 0&&(g=l.formState)),t=ch(e,1,!0,t,l??null,a,n,g,i,c,d,vh),t.context=rh(null),l=t.current,a=Qt(),a=F(a),n=ta(a),n.callback=null,la(l,n,a),l=a,t.current.lanes=l,Je(t,l),xl(t),e[dl]=t.current,Bc(e),new qs(t)},bi.version="19.2.3",bi}var zh;function q0(){if(zh)return ur.exports;zh=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(r){console.error(r)}}return s(),ur.exports=B0(),ur.exports}var Y0=q0();const V0=Vh(Y0);var Rh="popstate";function G0(s={}){function r(o,h){let{pathname:p,search:m,hash:j}=o.location;return yr("",{pathname:p,search:m,hash:j},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function f(o,h){return typeof h=="string"?h:ji(h)}return Q0(r,f,null,s)}function tt(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function ol(s,r){if(!s){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function X0(){return Math.random().toString(36).substring(2,10)}function Mh(s,r){return{usr:s.state,key:s.key,idx:r}}function yr(s,r,f=null,o){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof r=="string"?Cn(r):r,state:f,key:r&&r.key||o||X0()}}function ji({pathname:s="/",search:r="",hash:f=""}){return r&&r!=="?"&&(s+=r.charAt(0)==="?"?r:"?"+r),f&&f!=="#"&&(s+=f.charAt(0)==="#"?f:"#"+f),s}function Cn(s){let r={};if(s){let f=s.indexOf("#");f>=0&&(r.hash=s.substring(f),s=s.substring(0,f));let o=s.indexOf("?");o>=0&&(r.search=s.substring(o),s=s.substring(0,o)),s&&(r.pathname=s)}return r}function Q0(s,r,f,o={}){let{window:h=document.defaultView,v5Compat:p=!1}=o,m=h.history,j="POP",b=null,x=N();x==null&&(x=0,m.replaceState({...m.state,idx:x},""));function N(){return(m.state||{idx:null}).idx}function v(){j="POP";let V=N(),J=V==null?null:V-x;x=V,b&&b({action:j,location:Y.location,delta:J})}function k(V,J){j="PUSH";let q=yr(Y.location,V,J);x=N()+1;let P=Mh(q,x),xe=Y.createHref(q);try{m.pushState(P,"",xe)}catch(ye){if(ye instanceof DOMException&&ye.name==="DataCloneError")throw ye;h.location.assign(xe)}p&&b&&b({action:j,location:Y.location,delta:1})}function D(V,J){j="REPLACE";let q=yr(Y.location,V,J);x=N();let P=Mh(q,x),xe=Y.createHref(q);m.replaceState(P,"",xe),p&&b&&b({action:j,location:Y.location,delta:0})}function O(V){return Z0(V)}let Y={get action(){return j},get location(){return s(h,m)},listen(V){if(b)throw new Error("A history only accepts one active listener");return h.addEventListener(Rh,v),b=V,()=>{h.removeEventListener(Rh,v),b=null}},createHref(V){return r(h,V)},createURL:O,encodeLocation(V){let J=O(V);return{pathname:J.pathname,search:J.search,hash:J.hash}},push:k,replace:D,go(V){return m.go(V)}};return Y}function Z0(s,r=!1){let f="http://localhost";typeof window<"u"&&(f=window.location.origin!=="null"?window.location.origin:window.location.href),tt(f,"No window.location.(origin|href) available to create URL");let o=typeof s=="string"?s:ji(s);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=f+o),new URL(o,f)}function Gh(s,r,f="/"){return K0(s,r,f,!1)}function K0(s,r,f,o){let h=typeof r=="string"?Cn(r):r,p=Yl(h.pathname||"/",f);if(p==null)return null;let m=Xh(s);J0(m);let j=null;for(let b=0;j==null&&b<m.length;++b){let x=ix(p);j=ax(m[b],x,o)}return j}function Xh(s,r=[],f=[],o="",h=!1){let p=(m,j,b=h,x)=>{let N={relativePath:x===void 0?m.path||"":x,caseSensitive:m.caseSensitive===!0,childrenIndex:j,route:m};if(N.relativePath.startsWith("/")){if(!N.relativePath.startsWith(o)&&b)return;tt(N.relativePath.startsWith(o),`Absolute route path "${N.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),N.relativePath=N.relativePath.slice(o.length)}let v=ql([o,N.relativePath]),k=f.concat(N);m.children&&m.children.length>0&&(tt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Xh(m.children,r,k,v,b)),!(m.path==null&&!m.index)&&r.push({path:v,score:tx(v,m.index),routesMeta:k})};return s.forEach((m,j)=>{if(m.path===""||!m.path?.includes("?"))p(m,j);else for(let b of Qh(m.path))p(m,j,!0,b)}),r}function Qh(s){let r=s.split("/");if(r.length===0)return[];let[f,...o]=r,h=f.endsWith("?"),p=f.replace(/\?$/,"");if(o.length===0)return h?[p,""]:[p];let m=Qh(o.join("/")),j=[];return j.push(...m.map(b=>b===""?p:[p,b].join("/"))),h&&j.push(...m),j.map(b=>s.startsWith("/")&&b===""?"/":b)}function J0(s){s.sort((r,f)=>r.score!==f.score?f.score-r.score:lx(r.routesMeta.map(o=>o.childrenIndex),f.routesMeta.map(o=>o.childrenIndex)))}var $0=/^:[\w-]+$/,W0=3,F0=2,I0=1,P0=10,ex=-2,Oh=s=>s==="*";function tx(s,r){let f=s.split("/"),o=f.length;return f.some(Oh)&&(o+=ex),r&&(o+=F0),f.filter(h=>!Oh(h)).reduce((h,p)=>h+($0.test(p)?W0:p===""?I0:P0),o)}function lx(s,r){return s.length===r.length&&s.slice(0,-1).every((o,h)=>o===r[h])?s[s.length-1]-r[r.length-1]:0}function ax(s,r,f=!1){let{routesMeta:o}=s,h={},p="/",m=[];for(let j=0;j<o.length;++j){let b=o[j],x=j===o.length-1,N=p==="/"?r:r.slice(p.length)||"/",v=Js({path:b.relativePath,caseSensitive:b.caseSensitive,end:x},N),k=b.route;if(!v&&x&&f&&!o[o.length-1].route.index&&(v=Js({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},N)),!v)return null;Object.assign(h,v.params),m.push({params:h,pathname:ql([p,v.pathname]),pathnameBase:rx(ql([p,v.pathnameBase])),route:k}),v.pathnameBase!=="/"&&(p=ql([p,v.pathnameBase]))}return m}function Js(s,r){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[f,o]=nx(s.path,s.caseSensitive,s.end),h=r.match(f);if(!h)return null;let p=h[0],m=p.replace(/(.)\/+$/,"$1"),j=h.slice(1);return{params:o.reduce((x,{paramName:N,isOptional:v},k)=>{if(N==="*"){let O=j[k]||"";m=p.slice(0,p.length-O.length).replace(/(.)\/+$/,"$1")}const D=j[k];return v&&!D?x[N]=void 0:x[N]=(D||"").replace(/%2F/g,"/"),x},{}),pathname:p,pathnameBase:m,pattern:s}}function nx(s,r=!1,f=!0){ol(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 o=[],h="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,j,b)=>(o.push({paramName:j,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(o.push({paramName:"*"}),h+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):f?h+="\\/*$":s!==""&&s!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,r?void 0:"i"),o]}function ix(s){try{return s.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return ol(!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 (${r}).`),s}}function Yl(s,r){if(r==="/")return s;if(!s.toLowerCase().startsWith(r.toLowerCase()))return null;let f=r.endsWith("/")?r.length-1:r.length,o=s.charAt(f);return o&&o!=="/"?null:s.slice(f)||"/"}var Zh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sx=s=>Zh.test(s);function ux(s,r="/"){let{pathname:f,search:o="",hash:h=""}=typeof s=="string"?Cn(s):s,p;if(f)if(sx(f))p=f;else{if(f.includes("//")){let m=f;f=f.replace(/\/\/+/g,"/"),ol(!1,`Pathnames cannot have embedded double slashes - normalizing ${m} -> ${f}`)}f.startsWith("/")?p=Dh(f.substring(1),"/"):p=Dh(f,r)}else p=r;return{pathname:p,search:ox(o),hash:fx(h)}}function Dh(s,r){let f=r.replace(/\/+$/,"").split("/");return s.split("/").forEach(h=>{h===".."?f.length>1&&f.pop():h!=="."&&f.push(h)}),f.length>1?f.join("/"):"/"}function fr(s,r,f,o){return`Cannot include a '${s}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${f}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function cx(s){return s.filter((r,f)=>f===0||r.route.path&&r.route.path.length>0)}function Kh(s){let r=cx(s);return r.map((f,o)=>o===r.length-1?f.pathname:f.pathnameBase)}function Jh(s,r,f,o=!1){let h;typeof s=="string"?h=Cn(s):(h={...s},tt(!h.pathname||!h.pathname.includes("?"),fr("?","pathname","search",h)),tt(!h.pathname||!h.pathname.includes("#"),fr("#","pathname","hash",h)),tt(!h.search||!h.search.includes("#"),fr("#","search","hash",h)));let p=s===""||h.pathname==="",m=p?"/":h.pathname,j;if(m==null)j=f;else{let v=r.length-1;if(!o&&m.startsWith("..")){let k=m.split("/");for(;k[0]==="..";)k.shift(),v-=1;h.pathname=k.join("/")}j=v>=0?r[v]:"/"}let b=ux(h,j),x=m&&m!=="/"&&m.endsWith("/"),N=(p||m===".")&&f.endsWith("/");return!b.pathname.endsWith("/")&&(x||N)&&(b.pathname+="/"),b}var ql=s=>s.join("/").replace(/\/\/+/g,"/"),rx=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),ox=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,fx=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,dx=class{constructor(s,r,f,o=!1){this.status=s,this.statusText=r||"",this.internal=o,f instanceof Error?(this.data=f.toString(),this.error=f):this.data=f}};function hx(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function px(s){return s.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var $h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wh(s,r){let f=s;if(typeof f!="string"||!Zh.test(f))return{absoluteURL:void 0,isExternal:!1,to:f};let o=f,h=!1;if($h)try{let p=new URL(window.location.href),m=f.startsWith("//")?new URL(p.protocol+f):new URL(f),j=Yl(m.pathname,r);m.origin===p.origin&&j!=null?f=j+m.search+m.hash:h=!0}catch{ol(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:h,to:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Fh=["POST","PUT","PATCH","DELETE"];new Set(Fh);var mx=["GET",...Fh];new Set(mx);var An=y.createContext(null);An.displayName="DataRouter";var $s=y.createContext(null);$s.displayName="DataRouterState";var xx=y.createContext(!1),Ih=y.createContext({isTransitioning:!1});Ih.displayName="ViewTransition";var yx=y.createContext(new Map);yx.displayName="Fetchers";var gx=y.createContext(null);gx.displayName="Await";var nl=y.createContext(null);nl.displayName="Navigation";var Ci=y.createContext(null);Ci.displayName="Location";var yl=y.createContext({outlet:null,matches:[],isDataRoute:!1});yl.displayName="Route";var Sr=y.createContext(null);Sr.displayName="RouteError";var Ph="REACT_ROUTER_ERROR",vx="REDIRECT",bx="ROUTE_ERROR_RESPONSE";function wx(s){if(s.startsWith(`${Ph}:${vx}:{`))try{let r=JSON.parse(s.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Sx(s){if(s.startsWith(`${Ph}:${bx}:{`))try{let r=JSON.parse(s.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new dx(r.status,r.statusText,r.data)}catch{}}function jx(s,{relative:r}={}){tt(Ai(),"useHref() may be used only in the context of a <Router> component.");let{basename:f,navigator:o}=y.useContext(nl),{hash:h,pathname:p,search:m}=_i(s,{relative:r}),j=p;return f!=="/"&&(j=p==="/"?f:ql([f,p])),o.createHref({pathname:j,search:m,hash:h})}function Ai(){return y.useContext(Ci)!=null}function ga(){return tt(Ai(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Ci).location}var ep="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function tp(s){y.useContext(nl).static||y.useLayoutEffect(s)}function Ti(){let{isDataRoute:s}=y.useContext(yl);return s?Ux():Nx()}function Nx(){tt(Ai(),"useNavigate() may be used only in the context of a <Router> component.");let s=y.useContext(An),{basename:r,navigator:f}=y.useContext(nl),{matches:o}=y.useContext(yl),{pathname:h}=ga(),p=JSON.stringify(Kh(o)),m=y.useRef(!1);return tp(()=>{m.current=!0}),y.useCallback((b,x={})=>{if(ol(m.current,ep),!m.current)return;if(typeof b=="number"){f.go(b);return}let N=Jh(b,JSON.parse(p),h,x.relative==="path");s==null&&r!=="/"&&(N.pathname=N.pathname==="/"?r:ql([r,N.pathname])),(x.replace?f.replace:f.push)(N,x.state,x)},[r,f,p,h,s])}y.createContext(null);function lp(){let{matches:s}=y.useContext(yl),r=s[s.length-1];return r?r.params:{}}function _i(s,{relative:r}={}){let{matches:f}=y.useContext(yl),{pathname:o}=ga(),h=JSON.stringify(Kh(f));return y.useMemo(()=>Jh(s,JSON.parse(h),o,r==="path"),[s,h,o,r])}function Ex(s,r){return ap(s,r)}function ap(s,r,f,o,h){tt(Ai(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:p}=y.useContext(nl),{matches:m}=y.useContext(yl),j=m[m.length-1],b=j?j.params:{},x=j?j.pathname:"/",N=j?j.pathnameBase:"/",v=j&&j.route;{let q=v&&v.path||"";ip(x,!v||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${q}">) 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="${q}"> to <Route path="${q==="/"?"*":`${q}/*`}">.`)}let k=ga(),D;if(r){let q=typeof r=="string"?Cn(r):r;tt(N==="/"||q.pathname?.startsWith(N),`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 "${N}" but pathname "${q.pathname}" was given in the \`location\` prop.`),D=q}else D=k;let O=D.pathname||"/",Y=O;if(N!=="/"){let q=N.replace(/^\//,"").split("/");Y="/"+O.replace(/^\//,"").split("/").slice(q.length).join("/")}let V=Gh(s,{pathname:Y});ol(v||V!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),ol(V==null||V[V.length-1].route.element!==void 0||V[V.length-1].route.Component!==void 0||V[V.length-1].route.lazy!==void 0,`Matched leaf route at location "${D.pathname}${D.search}${D.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 J=zx(V&&V.map(q=>Object.assign({},q,{params:Object.assign({},b,q.params),pathname:ql([N,p.encodeLocation?p.encodeLocation(q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?N:ql([N,p.encodeLocation?p.encodeLocation(q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),m,f,o,h);return r&&J?y.createElement(Ci.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},J):J}function Cx(){let s=kx(),r=hx(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),f=s instanceof Error?s.stack:null,o="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:o},p={padding:"2px 4px",backgroundColor:o},m=null;return console.error("Error handled by React Router default ErrorBoundary:",s),m=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:p},"ErrorBoundary")," or"," ",y.createElement("code",{style:p},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},r),f?y.createElement("pre",{style:h},f):null,m)}var Ax=y.createElement(Cx,null),np=class extends y.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,r){return r.location!==s.location||r.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:r.error,location:r.location,revalidation:s.revalidation||r.revalidation}}componentDidCatch(s,r){this.props.onError?this.props.onError(s,r):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 f=Sx(s.digest);f&&(s=f)}let r=s!==void 0?y.createElement(yl.Provider,{value:this.props.routeContext},y.createElement(Sr.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?y.createElement(Tx,{error:s},r):r}};np.contextType=xx;var dr=new WeakMap;function Tx({children:s,error:r}){let{basename:f}=y.useContext(nl);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=wx(r.digest);if(o){let h=dr.get(r);if(h)throw h;let p=Wh(o.location,f);if($h&&!dr.get(r))if(p.isExternal||o.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:o.replace}));throw dr.set(r,m),m}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return s}function _x({routeContext:s,match:r,children:f}){let o=y.useContext(An);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(yl.Provider,{value:s},f)}function zx(s,r=[],f=null,o=null,h=null){if(s==null){if(!f)return null;if(f.errors)s=f.matches;else if(r.length===0&&!f.initialized&&f.matches.length>0)s=f.matches;else return null}let p=s,m=f?.errors;if(m!=null){let N=p.findIndex(v=>v.route.id&&m?.[v.route.id]!==void 0);tt(N>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),p=p.slice(0,Math.min(p.length,N+1))}let j=!1,b=-1;if(f)for(let N=0;N<p.length;N++){let v=p[N];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(b=N),v.route.id){let{loaderData:k,errors:D}=f,O=v.route.loader&&!k.hasOwnProperty(v.route.id)&&(!D||D[v.route.id]===void 0);if(v.route.lazy||O){j=!0,b>=0?p=p.slice(0,b+1):p=[p[0]];break}}}let x=f&&o?(N,v)=>{o(N,{location:f.location,params:f.matches?.[0]?.params??{},unstable_pattern:px(f.matches),errorInfo:v})}:void 0;return p.reduceRight((N,v,k)=>{let D,O=!1,Y=null,V=null;f&&(D=m&&v.route.id?m[v.route.id]:void 0,Y=v.route.errorElement||Ax,j&&(b<0&&k===0?(ip("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,V=null):b===k&&(O=!0,V=v.route.hydrateFallbackElement||null)));let J=r.concat(p.slice(0,k+1)),q=()=>{let P;return D?P=Y:O?P=V:v.route.Component?P=y.createElement(v.route.Component,null):v.route.element?P=v.route.element:P=N,y.createElement(_x,{match:v,routeContext:{outlet:N,matches:J,isDataRoute:f!=null},children:P})};return f&&(v.route.ErrorBoundary||v.route.errorElement||k===0)?y.createElement(np,{location:f.location,revalidation:f.revalidation,component:Y,error:D,children:q(),routeContext:{outlet:null,matches:J,isDataRoute:!0},onError:x}):q()},null)}function jr(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rx(s){let r=y.useContext(An);return tt(r,jr(s)),r}function Mx(s){let r=y.useContext($s);return tt(r,jr(s)),r}function Ox(s){let r=y.useContext(yl);return tt(r,jr(s)),r}function Nr(s){let r=Ox(s),f=r.matches[r.matches.length-1];return tt(f.route.id,`${s} can only be used on routes that contain a unique "id"`),f.route.id}function Dx(){return Nr("useRouteId")}function kx(){let s=y.useContext(Sr),r=Mx("useRouteError"),f=Nr("useRouteError");return s!==void 0?s:r.errors?.[f]}function Ux(){let{router:s}=Rx("useNavigate"),r=Nr("useNavigate"),f=y.useRef(!1);return tp(()=>{f.current=!0}),y.useCallback(async(h,p={})=>{ol(f.current,ep),f.current&&(typeof h=="number"?await s.navigate(h):await s.navigate(h,{fromRouteId:r,...p}))},[s,r])}var kh={};function ip(s,r,f){!r&&!kh[s]&&(kh[s]=!0,ol(!1,f))}y.memo(Lx);function Lx({routes:s,future:r,state:f,onError:o}){return ap(s,void 0,f,o,r)}function Bl(s){tt(!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 Hx({basename:s="/",children:r=null,location:f,navigationType:o="POP",navigator:h,static:p=!1,unstable_useTransitions:m}){tt(!Ai(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=s.replace(/^\/*/,"/"),b=y.useMemo(()=>({basename:j,navigator:h,static:p,unstable_useTransitions:m,future:{}}),[j,h,p,m]);typeof f=="string"&&(f=Cn(f));let{pathname:x="/",search:N="",hash:v="",state:k=null,key:D="default"}=f,O=y.useMemo(()=>{let Y=Yl(x,j);return Y==null?null:{location:{pathname:Y,search:N,hash:v,state:k,key:D},navigationType:o}},[j,x,N,v,k,D,o]);return ol(O!=null,`<Router basename="${j}"> is not able to match the URL "${x}${N}${v}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:y.createElement(nl.Provider,{value:b},y.createElement(Ci.Provider,{children:r,value:O}))}function Bx({children:s,location:r}){return Ex(gr(s),r)}function gr(s,r=[]){let f=[];return y.Children.forEach(s,(o,h)=>{if(!y.isValidElement(o))return;let p=[...r,h];if(o.type===y.Fragment){f.push.apply(f,gr(o.props.children,p));return}tt(o.type===Bl,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),tt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let m={id:o.props.id||p.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(m.children=gr(o.props.children,p)),f.push(m)}),f}var Zs="get",Ks="application/x-www-form-urlencoded";function Ws(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function qx(s){return Ws(s)&&s.tagName.toLowerCase()==="button"}function Yx(s){return Ws(s)&&s.tagName.toLowerCase()==="form"}function Vx(s){return Ws(s)&&s.tagName.toLowerCase()==="input"}function Gx(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Xx(s,r){return s.button===0&&(!r||r==="_self")&&!Gx(s)}var Vs=null;function Qx(){if(Vs===null)try{new FormData(document.createElement("form"),0),Vs=!1}catch{Vs=!0}return Vs}var Zx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hr(s){return s!=null&&!Zx.has(s)?(ol(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ks}"`),null):s}function Kx(s,r){let f,o,h,p,m;if(Yx(s)){let j=s.getAttribute("action");o=j?Yl(j,r):null,f=s.getAttribute("method")||Zs,h=hr(s.getAttribute("enctype"))||Ks,p=new FormData(s)}else if(qx(s)||Vx(s)&&(s.type==="submit"||s.type==="image")){let j=s.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=s.getAttribute("formaction")||j.getAttribute("action");if(o=b?Yl(b,r):null,f=s.getAttribute("formmethod")||j.getAttribute("method")||Zs,h=hr(s.getAttribute("formenctype"))||hr(j.getAttribute("enctype"))||Ks,p=new FormData(j,s),!Qx()){let{name:x,type:N,value:v}=s;if(N==="image"){let k=x?`${x}.`:"";p.append(`${k}x`,"0"),p.append(`${k}y`,"0")}else x&&p.append(x,v)}}else{if(Ws(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');f=Zs,o=null,h=Ks,m=s}return p&&h==="text/plain"&&(m=p,p=void 0),{action:o,method:f.toLowerCase(),encType:h,formData:p,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Er(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function Jx(s,r,f){let o=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return o.pathname==="/"?o.pathname=`_root.${f}`:r&&Yl(o.pathname,r)==="/"?o.pathname=`${r.replace(/\/$/,"")}/_root.${f}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${f}`,o}async function $x(s,r){if(s.id in r)return r[s.id];try{let f=await import(s.module);return r[s.id]=f,f}catch(f){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(f),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Wx(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 Fx(s,r,f){let o=await Promise.all(s.map(async h=>{let p=r.routes[h.route.id];if(p){let m=await $x(p,f);return m.links?m.links():[]}return[]}));return ty(o.flat(1).filter(Wx).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function Uh(s,r,f,o,h,p){let m=(b,x)=>f[x]?b.route.id!==f[x].route.id:!0,j=(b,x)=>f[x].pathname!==b.pathname||f[x].route.path?.endsWith("*")&&f[x].params["*"]!==b.params["*"];return p==="assets"?r.filter((b,x)=>m(b,x)||j(b,x)):p==="data"?r.filter((b,x)=>{let N=o.routes[b.route.id];if(!N||!N.hasLoader)return!1;if(m(b,x)||j(b,x))return!0;if(b.route.shouldRevalidate){let v=b.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:f[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function Ix(s,r,{includeHydrateFallback:f}={}){return Px(s.map(o=>{let h=r.routes[o.route.id];if(!h)return[];let p=[h.module];return h.clientActionModule&&(p=p.concat(h.clientActionModule)),h.clientLoaderModule&&(p=p.concat(h.clientLoaderModule)),f&&h.hydrateFallbackModule&&(p=p.concat(h.hydrateFallbackModule)),h.imports&&(p=p.concat(h.imports)),p}).flat(1))}function Px(s){return[...new Set(s)]}function ey(s){let r={},f=Object.keys(s).sort();for(let o of f)r[o]=s[o];return r}function ty(s,r){let f=new Set;return new Set(r),s.reduce((o,h)=>{let p=JSON.stringify(ey(h));return f.has(p)||(f.add(p),o.push({key:p,link:h})),o},[])}function sp(){let s=y.useContext(An);return Er(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function ly(){let s=y.useContext($s);return Er(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Cr=y.createContext(void 0);Cr.displayName="FrameworkContext";function up(){let s=y.useContext(Cr);return Er(s,"You must render this element inside a <HydratedRouter> element"),s}function ay(s,r){let f=y.useContext(Cr),[o,h]=y.useState(!1),[p,m]=y.useState(!1),{onFocus:j,onBlur:b,onMouseEnter:x,onMouseLeave:N,onTouchStart:v}=r,k=y.useRef(null);y.useEffect(()=>{if(s==="render"&&m(!0),s==="viewport"){let Y=J=>{J.forEach(q=>{m(q.isIntersecting)})},V=new IntersectionObserver(Y,{threshold:.5});return k.current&&V.observe(k.current),()=>{V.disconnect()}}},[s]),y.useEffect(()=>{if(o){let Y=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(Y)}}},[o]);let D=()=>{h(!0)},O=()=>{h(!1),m(!1)};return f?s!=="intent"?[p,k,{}]:[p,k,{onFocus:wi(j,D),onBlur:wi(b,O),onMouseEnter:wi(x,D),onMouseLeave:wi(N,O),onTouchStart:wi(v,D)}]:[!1,k,{}]}function wi(s,r){return f=>{s&&s(f),f.defaultPrevented||r(f)}}function ny({page:s,...r}){let{router:f}=sp(),o=y.useMemo(()=>Gh(f.routes,s,f.basename),[f.routes,s,f.basename]);return o?y.createElement(sy,{page:s,matches:o,...r}):null}function iy(s){let{manifest:r,routeModules:f}=up(),[o,h]=y.useState([]);return y.useEffect(()=>{let p=!1;return Fx(s,r,f).then(m=>{p||h(m)}),()=>{p=!0}},[s,r,f]),o}function sy({page:s,matches:r,...f}){let o=ga(),{manifest:h,routeModules:p}=up(),{basename:m}=sp(),{loaderData:j,matches:b}=ly(),x=y.useMemo(()=>Uh(s,r,b,h,o,"data"),[s,r,b,h,o]),N=y.useMemo(()=>Uh(s,r,b,h,o,"assets"),[s,r,b,h,o]),v=y.useMemo(()=>{if(s===o.pathname+o.search+o.hash)return[];let O=new Set,Y=!1;if(r.forEach(J=>{let q=h.routes[J.route.id];!q||!q.hasLoader||(!x.some(P=>P.route.id===J.route.id)&&J.route.id in j&&p[J.route.id]?.shouldRevalidate||q.hasClientLoader?Y=!0:O.add(J.route.id))}),O.size===0)return[];let V=Jx(s,m,"data");return Y&&O.size>0&&V.searchParams.set("_routes",r.filter(J=>O.has(J.route.id)).map(J=>J.route.id).join(",")),[V.pathname+V.search]},[m,j,o,h,x,r,s,p]),k=y.useMemo(()=>Ix(N,h),[N,h]),D=iy(N);return y.createElement(y.Fragment,null,v.map(O=>y.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...f})),k.map(O=>y.createElement("link",{key:O,rel:"modulepreload",href:O,...f})),D.map(({key:O,link:Y})=>y.createElement("link",{key:O,nonce:f.nonce,...Y})))}function uy(...s){return r=>{s.forEach(f=>{typeof f=="function"?f(r):f!=null&&(f.current=r)})}}var cy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cy&&(window.__reactRouterVersion="7.11.0")}catch{}function ry({basename:s,children:r,unstable_useTransitions:f,window:o}){let h=y.useRef();h.current==null&&(h.current=G0({window:o,v5Compat:!0}));let p=h.current,[m,j]=y.useState({action:p.action,location:p.location}),b=y.useCallback(x=>{f===!1?j(x):y.startTransition(()=>j(x))},[f]);return y.useLayoutEffect(()=>p.listen(b),[p,b]),y.createElement(Hx,{basename:s,children:r,location:m.location,navigationType:m.action,navigator:p,unstable_useTransitions:f})}var cp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rp=y.forwardRef(function({onClick:r,discover:f="render",prefetch:o="none",relative:h,reloadDocument:p,replace:m,state:j,target:b,to:x,preventScrollReset:N,viewTransition:v,unstable_defaultShouldRevalidate:k,...D},O){let{basename:Y,unstable_useTransitions:V}=y.useContext(nl),J=typeof x=="string"&&cp.test(x),q=Wh(x,Y);x=q.to;let P=jx(x,{relative:h}),[xe,ye,me]=ay(o,D),ue=hy(x,{replace:m,state:j,target:b,preventScrollReset:N,relative:h,viewTransition:v,unstable_defaultShouldRevalidate:k,unstable_useTransitions:V});function ve(fe){r&&r(fe),fe.defaultPrevented||ue(fe)}let Q=y.createElement("a",{...D,...me,href:q.absoluteURL||P,onClick:q.isExternal||p?r:ve,ref:uy(O,ye),target:b,"data-discover":!J&&f==="render"?"true":void 0});return xe&&!J?y.createElement(y.Fragment,null,Q,y.createElement(ny,{page:P})):Q});rp.displayName="Link";var oy=y.forwardRef(function({"aria-current":r="page",caseSensitive:f=!1,className:o="",end:h=!1,style:p,to:m,viewTransition:j,children:b,...x},N){let v=_i(m,{relative:x.relative}),k=ga(),D=y.useContext($s),{navigator:O,basename:Y}=y.useContext(nl),V=D!=null&&gy(v)&&j===!0,J=O.encodeLocation?O.encodeLocation(v).pathname:v.pathname,q=k.pathname,P=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;f||(q=q.toLowerCase(),P=P?P.toLowerCase():null,J=J.toLowerCase()),P&&Y&&(P=Yl(P,Y)||P);const xe=J!=="/"&&J.endsWith("/")?J.length-1:J.length;let ye=q===J||!h&&q.startsWith(J)&&q.charAt(xe)==="/",me=P!=null&&(P===J||!h&&P.startsWith(J)&&P.charAt(J.length)==="/"),ue={isActive:ye,isPending:me,isTransitioning:V},ve=ye?r:void 0,Q;typeof o=="function"?Q=o(ue):Q=[o,ye?"active":null,me?"pending":null,V?"transitioning":null].filter(Boolean).join(" ");let fe=typeof p=="function"?p(ue):p;return y.createElement(rp,{...x,"aria-current":ve,className:Q,ref:N,style:fe,to:m,viewTransition:j},typeof b=="function"?b(ue):b)});oy.displayName="NavLink";var fy=y.forwardRef(({discover:s="render",fetcherKey:r,navigate:f,reloadDocument:o,replace:h,state:p,method:m=Zs,action:j,onSubmit:b,relative:x,preventScrollReset:N,viewTransition:v,unstable_defaultShouldRevalidate:k,...D},O)=>{let{unstable_useTransitions:Y}=y.useContext(nl),V=xy(),J=yy(j,{relative:x}),q=m.toLowerCase()==="get"?"get":"post",P=typeof j=="string"&&cp.test(j),xe=ye=>{if(b&&b(ye),ye.defaultPrevented)return;ye.preventDefault();let me=ye.nativeEvent.submitter,ue=me?.getAttribute("formmethod")||m,ve=()=>V(me||ye.currentTarget,{fetcherKey:r,method:ue,navigate:f,replace:h,state:p,relative:x,preventScrollReset:N,viewTransition:v,unstable_defaultShouldRevalidate:k});Y&&f!==!1?y.startTransition(()=>ve()):ve()};return y.createElement("form",{ref:O,method:q,action:J,onSubmit:o?b:xe,...D,"data-discover":!P&&s==="render"?"true":void 0})});fy.displayName="Form";function dy(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function op(s){let r=y.useContext(An);return tt(r,dy(s)),r}function hy(s,{target:r,replace:f,state:o,preventScrollReset:h,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:j,unstable_useTransitions:b}={}){let x=Ti(),N=ga(),v=_i(s,{relative:p});return y.useCallback(k=>{if(Xx(k,r)){k.preventDefault();let D=f!==void 0?f:ji(N)===ji(v),O=()=>x(s,{replace:D,state:o,preventScrollReset:h,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:j});b?y.startTransition(()=>O()):O()}},[N,x,v,f,o,r,s,h,p,m,j,b])}var py=0,my=()=>`__${String(++py)}__`;function xy(){let{router:s}=op("useSubmit"),{basename:r}=y.useContext(nl),f=Dx(),o=s.fetch,h=s.navigate;return y.useCallback(async(p,m={})=>{let{action:j,method:b,encType:x,formData:N,body:v}=Kx(p,r);if(m.navigate===!1){let k=m.fetcherKey||my();await o(k,f,m.action||j,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:N,body:v,formMethod:m.method||b,formEncType:m.encType||x,flushSync:m.flushSync})}else await h(m.action||j,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:N,body:v,formMethod:m.method||b,formEncType:m.encType||x,replace:m.replace,state:m.state,fromRouteId:f,flushSync:m.flushSync,viewTransition:m.viewTransition})},[o,h,r,f])}function yy(s,{relative:r}={}){let{basename:f}=y.useContext(nl),o=y.useContext(yl);tt(o,"useFormAction must be used inside a RouteContext");let[h]=o.matches.slice(-1),p={..._i(s||".",{relative:r})},m=ga();if(s==null){p.search=m.search;let j=new URLSearchParams(p.search),b=j.getAll("index");if(b.some(N=>N==="")){j.delete("index"),b.filter(v=>v).forEach(v=>j.append("index",v));let N=j.toString();p.search=N?`?${N}`:""}}return(!s||s===".")&&h.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),f!=="/"&&(p.pathname=p.pathname==="/"?f:ql([f,p.pathname])),ji(p)}function gy(s,{relative:r}={}){let f=y.useContext(Ih);tt(f!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=op("useViewTransitionState"),h=_i(s,{relative:r});if(!f.isTransitioning)return!1;let p=Yl(f.currentLocation.pathname,o)||f.currentLocation.pathname,m=Yl(f.nextLocation.pathname,o)||f.nextLocation.pathname;return Js(h.pathname,m)!=null||Js(h.pathname,p)!=null}const vy=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),by=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,f,o)=>o?o.toUpperCase():f.toLowerCase()),Lh=s=>{const r=by(s);return r.charAt(0).toUpperCase()+r.slice(1)},fp=(...s)=>s.filter((r,f,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===f).join(" ").trim(),wy=s=>{for(const r in s)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var Sy={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 jy=y.forwardRef(({color:s="currentColor",size:r=24,strokeWidth:f=2,absoluteStrokeWidth:o,className:h="",children:p,iconNode:m,...j},b)=>y.createElement("svg",{ref:b,...Sy,width:r,height:r,stroke:s,strokeWidth:o?Number(f)*24/Number(r):f,className:fp("lucide",h),...!p&&!wy(j)&&{"aria-hidden":"true"},...j},[...m.map(([x,N])=>y.createElement(x,N)),...Array.isArray(p)?p:[p]]));const Se=(s,r)=>{const f=y.forwardRef(({className:o,...h},p)=>y.createElement(jy,{ref:p,iconNode:r,className:fp(`lucide-${vy(Lh(s))}`,`lucide-${s}`,o),...h}));return f.displayName=Lh(s),f};const Ny=[["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"}]],Ey=Se("arrow-down-up",Ny);const Cy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ni=Se("check",Cy);const Ay=[["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"}]],Ty=Se("circle-play",Ay);const _y=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zy=Se("clock",_y);const Ry=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],My=Se("cloud",Ry);const Oy=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Dy=Se("code",Oy);const ky=[["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"}]],Ei=Se("copy",ky);const Uy=[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]],Ly=Se("corner-right-down",Uy);const Hy=[["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"}]],dp=Se("database",Hy);const By=[["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"}]],qy=Se("download",By);const Yy=[["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"}]],Vy=Se("eye-off",Yy);const Gy=[["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"}]],Xy=Se("eye",Gy);const Qy=[["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"}]],Zy=Se("globe",Qy);const Ky=[["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"}]],Jy=Se("history",Ky);const $y=[["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"}]],Wy=Se("house",$y);const Fy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Iy=Se("image",Fy);const Py=[["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"}]],eg=Se("keyboard",Py);const tg=[["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"}]],lg=Se("layers",tg);const ag=[["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"}]],hp=Se("list",ag);const ng=[["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"}]],ig=Se("log-out",ng);const sg=[["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"}]],ug=Se("monitor",sg);const cg=[["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"}]],rg=Se("mouse-pointer-2",cg);const og=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],fg=Se("move-left",og);const dg=[["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"}]],hg=Se("play",dg);const pg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],mg=Se("plus",pg);const xg=[["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"}]],pp=Se("refresh-cw",xg);const yg=[["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"}]],gg=Se("repeat",yg);const vg=[["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"}]],bg=Se("settings",vg);const wg=[["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"}]],Sg=Se("shield-check",wg);const jg=[["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"}]],Ng=Se("split",jg);const Eg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Hh=Se("square",Eg);const Cg=[["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"}]],Ag=Se("star-off",Cg);const Tg=[["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"}]],_g=Se("star",Tg);const zg=[["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"}]],Rg=Se("table",zg);const Mg=[["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"}]],Og=Se("target",Mg);const Dg=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],kg=Se("terminal",Dg);const Ug=[["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"}]],Ar=Se("trash-2",Ug);const Lg=[["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"}]],Hg=Se("triangle-alert",Lg);const Bg=[["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"}]],qg=Se("type",Bg);const Yg=[["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"}]],Vg=Se("upload",Yg);const Gg=[["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"}]],Xg=Se("variable",Gg);const Qg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Tr=Se("x",Qg),Zg=({onNavigate:s,onNewTask:r,onLogout:f,currentScreen:o})=>u.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:[u.jsx("button",{onClick:()=>s("dashboard"),className:"mb-12 hover:opacity-80 transition-opacity",children:u.jsx("img",{src:"/icon.png",alt:"Logo",className:"w-10 h-10",onError:h=>{h.currentTarget.src="/icon.png"}})}),u.jsxs("div",{className:"flex-1 flex flex-col gap-6",children:[u.jsx("button",{onClick:r,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:u.jsx(mg,{className:"w-6 h-6"})}),u.jsx("button",{onClick:()=>s("dashboard"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${o==="dashboard"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Dashboard",children:u.jsx(Wy,{className:"w-6 h-6"})}),u.jsx("button",{onClick:()=>s("settings"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${o==="settings"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Settings",children:u.jsx(bg,{className:"w-6 h-6"})}),u.jsx("button",{onClick:()=>s("executions"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${o==="executions"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Executions",children:u.jsx(hp,{className:"w-6 h-6"})})]}),u.jsx("button",{onClick:f,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:u.jsx(ig,{className:"w-6 h-6"})})]}),Kg=({status:s,onSubmit:r,error:f})=>{const[o,h]=y.useState(""),[p,m]=y.useState(""),[j,b]=y.useState(""),[x,N]=y.useState(""),v=()=>{r(p,j,o,x)};return u.jsxs("div",{className:"fixed inset-0 z-[100] bg-[#020202] flex items-center justify-center",children:[u.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),u.jsxs("div",{className:"w-[400px] glass-card p-10 rounded-[48px] space-y-8 relative",children:[u.jsxs("div",{className:"text-center space-y-2",children:[u.jsx("h1",{className:"text-2xl font-bold tracking-tighter text-white uppercase",children:"Doppelganger"}),u.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:s==="setup"?"Initializing System":"Access Restricted"})]}),u.jsxs("div",{className:"space-y-4",children:[s==="setup"&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Name"}),u.jsx("input",{type:"text",value:o,onChange:k=>h(k.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"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Email"}),u.jsx("input",{type:"email",value:p,onChange:k=>m(k.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"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Password"}),u.jsx("input",{type:"password",value:j,onChange:k=>b(k.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"&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Confirm Password"}),u.jsx("input",{type:"password",value:x,onChange:k=>N(k.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"})]})]}),u.jsx("button",{onClick:v,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"}),f&&u.jsx("div",{className:"text-[9px] font-bold text-red-500 text-center uppercase tracking-widest",children:f})]})]})},Bh=({tasks:s,onNewTask:r,onEditTask:f,onDeleteTask:o,onExportTasks:h,onImportTasks:p})=>{const m=y.useRef(null),j=N=>{try{return N?`https://www.google.com/s2/favicons?domain=${new URL(N).hostname}&sz=64`:null}catch{return null}},b=()=>{m.current?.click()},x=N=>{const v=N.target.files?.[0];v&&p(v),N.target.value=""};return u.jsx("div",{className:"flex-1 overflow-hidden animate-in fade-in duration-500",children:u.jsxs("div",{className:"h-full flex flex-col px-12 py-12 max-w-7xl mx-auto space-y-12 w-full",children:[u.jsxs("div",{className:"flex items-end justify-between",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-[10px] font-bold text-blue-500 uppercase tracking-[0.4em]",children:"Status"}),u.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Dashboard"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("button",{onClick:h,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:[u.jsx(qy,{className:"w-4 h-4 inline-block mr-2"}),"Export"]}),u.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:[u.jsx(Vg,{className:"w-4 h-4 inline-block mr-2"}),"Import"]}),u.jsx("button",{onClick:r,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"}),u.jsx("input",{ref:m,type:"file",accept:"application/json",className:"hidden",onChange:x})]})]}),u.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",children:s.map(N=>{const v=j(N.url);return u.jsxs("div",{className:"glass-card p-8 rounded-[40px] flex flex-col gap-6 group hover:-translate-y-1",children:[u.jsxs("div",{className:"flex justify-between items-start",children:[u.jsx("div",{className:"w-12 h-12 rounded-2xl bg-white/5 border border-white/10 flex items-center justify-center overflow-hidden",children:v?u.jsx("img",{src:v,alt:"",className:"w-6 h-6 object-contain",onError:k=>{k.target.style.display="none"}}):u.jsx(Zy,{className:"w-5 h-5 text-gray-500"})}),u.jsx("div",{className:"px-3 py-1 rounded-full bg-white/5 text-[7px] font-bold uppercase tracking-widest text-gray-500",children:N.mode})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-bold text-white truncate",children:N.name||"Untitled"}),u.jsx("p",{className:"text-[10px] text-gray-600 font-mono truncate mt-1",children:N.url||"Target undefined"})]}),u.jsxs("div",{className:"flex gap-3 pt-4 border-t border-white/5",children:[u.jsx("button",{onClick:()=>f(N),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"}),u.jsx("button",{onClick:()=>o(N.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:u.jsx(Tr,{className:"w-4 h-4"})})]})]},N.id)})}),s.length===0&&u.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center space-y-6 opacity-20",children:[u.jsx("div",{className:"w-20 h-20 border-2 border-dashed border-white rounded-[40px] flex items-center justify-center text-3xl",children:"🚀"}),u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.3em]",children:"No Tasks Found"})]})]})})},mt=s=>s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Jg=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"]),mp=(s,r)=>{const f=/\{\$(\w+)\}/g;let o="",h=0,p;const m=b=>!!r&&(b in r||b==="now"),j=b=>{if(b==="now")return!0;const x=r?r[b]:void 0;return x&&x.value!==""&&x.value!==void 0&&x.value!==null};for(;(p=f.exec(s))!==null;){p.index>h&&(o+=mt(s.substring(h,p.index)));const b=p[1],x=m(b),N=j(b);o+=`<span class="${x?N?"var-highlight-default":"var-highlight":"var-highlight-undefined"}">${mt(p[0])}</span>`,h=f.lastIndex}return o+=mt(s.substring(h)),o},$g=s=>{const r=/("(?:\\.|[^"\\])*")|(-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|\b(true|false|null)\b/g;let f="",o=0,h;for(;(h=r.exec(s))!==null;){h.index>o&&(f+=mt(s.substring(o,h.index)));const p=h[0];if(h[1]){let m=!1,j=h.index+p.length;for(;j<s.length&&/\s/.test(s[j]);)j+=1;s[j]===":"&&(m=!0),f+=`<span class="${m?"code-token-key":"code-token-string"}">${mt(p)}</span>`}else h[2]?f+=`<span class="code-token-number">${mt(p)}</span>`:f+=`<span class="code-token-boolean">${mt(p)}</span>`;o=r.lastIndex}return f+=mt(s.substring(o)),f},Wg=(s,r)=>{const f=/(\{\$\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 o="",h=0,p;for(;(p=f.exec(s))!==null;){p.index>h&&(o+=mt(s.substring(h,p.index)));const m=p[0];if(p[1])o+=mp(m,r);else if(p[2])o+=`<span class="code-token-comment">${mt(m)}</span>`;else if(p[3])o+=`<span class="code-token-string">${mt(m)}</span>`;else if(p[4])o+=`<span class="code-token-number">${mt(m)}</span>`;else if(p[5])o+=`<span class="code-token-boolean">${mt(m)}</span>`;else if(p[6]){const j=Jg.has(m)?"code-token-keyword":"code-token-identifier";o+=`<span class="${j}">${mt(m)}</span>`}else o+=mt(m);h=f.lastIndex}return o+=mt(s.substring(h)),o},Fg=s=>{const r=/<\/?[^>]+>/g;let f="",o=0,h;for(;(h=r.exec(s))!==null;){h.index>o&&(f+=mt(s.substring(o,h.index)));const p=h[0];let m=mt(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>'),f+=`<span class="code-token-punct">${m}</span>`,o=r.lastIndex}return f+=mt(s.substring(o)),f},xp=(s,r,f)=>r==="javascript"?Wg(s,f):r==="json"?$g(s):r==="html"?Fg(s):mp(s,f),_t=({value:s,onChange:r,placeholder:f,variables:o,className:h,syntax:p="plain"})=>{const m=y.useRef(null);return y.useEffect(()=>{if(m.current){const j=m.current.innerHTML,b=xp(s,p,o);if(j!==b){const x=window.getSelection();let N=0;if(x&&x.rangeCount>0){const v=x.getRangeAt(0),k=v.cloneRange();k.selectNodeContents(m.current),k.setEnd(v.endContainer,v.endOffset),N=k.toString().length}if(m.current.innerHTML=b,N>0){const v=document.createTreeWalker(m.current,NodeFilter.SHOW_TEXT);let k=0,D=v.nextNode();for(;D;){const O=D.textContent?.length||0;if(k+O>=N){const Y=document.createRange();Y.setStart(D,N-k),Y.collapse(!0),x?.removeAllRanges(),x?.addRange(Y);break}k+=O,D=v.nextNode()}}}}},[s,o]),u.jsx("div",{ref:m,contentEditable:!0,className:`rich-input-content w-full bg-transparent focus:outline-none text-white min-h-[1.5rem] ${h}`,"data-placeholder":f,onInput:j=>r(j.currentTarget.textContent||""),onBlur:j=>r(j.currentTarget.textContent||"")})},En=({value:s,onChange:r,language:f,placeholder:o,className:h,readOnly:p,variables:m})=>{const j=y.useRef(null),b=y.useRef(null),x=s||o||"",N=!s&&!!o,v=y.useMemo(()=>xp(x,f,m),[x,f,m]);return y.useEffect(()=>{const k=j.current,D=b.current;if(!k||!D)return;const O=()=>{D.scrollTop=k.scrollTop,D.scrollLeft=k.scrollLeft};return k.addEventListener("scroll",O),()=>{k.removeEventListener("scroll",O)}},[]),u.jsxs("div",{className:`code-editor ${h||""}`,onWheel:k=>{const D=j.current;D&&(D.scrollHeight<=D.clientHeight||(D.scrollTop+=k.deltaY,D.scrollLeft+=k.deltaX,D.focus(),k.preventDefault()))},children:[u.jsx("pre",{ref:b,className:`code-editor-pre ${N?"code-editor-placeholder":""}`,"aria-hidden":!0,dangerouslySetInnerHTML:{__html:v}}),u.jsx("textarea",{ref:j,value:s,onChange:k=>r?.(k.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})]})},vr=[{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:"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"}],Ig=({open:s,query:r,onQueryChange:f,onClose:o,onSelect:h})=>{const p=y.useRef(null),m=y.useMemo(()=>{const j=r.trim().toLowerCase();return j?vr.filter(b=>b.label.toLowerCase().includes(j)||b.description.toLowerCase().includes(j)):vr},[r]);return s?u.jsx("div",{className:"fixed inset-0 z-[190] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",onClick:o,children:u.jsxs("div",{className:"glass-card w-full max-w-xl rounded-[28px] border border-white/10 p-6 shadow-2xl",onClick:j=>j.stopPropagation(),children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"Add Block"}),u.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Search actions and control flow blocks."})]}),u.jsx("button",{onClick:o,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:u.jsx(Tr,{className:"w-4 h-4"})})]}),u.jsx("input",{ref:j=>{p.current=j,j&&j.focus()},value:r,onChange:j=>f(j.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"}),u.jsxs("div",{className:"mt-4 max-h-[320px] overflow-y-auto custom-scrollbar space-y-2",children:[m.map(j=>u.jsxs("button",{onClick:()=>h(j.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:[u.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-white",children:j.label}),u.jsx("div",{className:"text-[9px] text-gray-500 mt-1",children:j.description})]},j.type)),m.length===0&&u.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No matches."})]})]})}):null},Pg=({task:s,onChange:r,onCopy:f,copiedId:o})=>{const[h,p]=y.useState(()=>JSON.stringify(s,null,2)),[m,j]=y.useState(!1),b=x=>{const N=s,v={...N,...x&&typeof x=="object"?x:{}};return(!v.name||typeof v.name!="string")&&(v.name=N.name||"Task"),(!v.mode||!["scrape","agent","headful"].includes(v.mode))&&(v.mode=N.mode||"agent"),typeof v.wait!="number"&&(v.wait=typeof N.wait=="number"?N.wait:3),v.stealth||(v.stealth=N.stealth),(!v.variables||Array.isArray(v.variables))&&(v.variables=N.variables||{}),Array.isArray(v.actions)||(v.actions=N.actions||[]),v.extractionFormat||(v.extractionFormat=N.extractionFormat||"json"),v.includeShadowDom===void 0&&(v.includeShadowDom=N.includeShadowDom??!0),N.id&&v.id!==N.id&&(v.id=N.id),delete v.versions,delete v.last_opened,v};return y.useEffect(()=>{m||p(JSON.stringify(s,null,2))},[s,m]),u.jsxs("div",{className:"h-full flex flex-col min-h-0",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Protocol JSON"}),u.jsxs("button",{onClick:()=>{f(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 ${o==="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:[o==="json"?u.jsx(Ni,{className:"w-3 h-3"}):u.jsx(Ei,{className:"w-3 h-3"}),o==="json"?"Copied":"Copy"]})]}),u.jsx(En,{value:h,onChange:x=>{p(x);try{const N=JSON.parse(x),v=b(N);r(v),j(!1)}catch{j(!0)}},language:"json",className:"flex-1 min-h-0"})]})},Gs=6e4,pr=200,qh=200,Si=1e6,mr=2e3,xr=2e3,ev=s=>`${(s/(1024*1024)).toFixed(2)} MB`,tv=s=>{if(typeof s=="boolean")return s;if(typeof s=="string"){const r=s.trim().toLowerCase();if(r==="true")return!0;if(r==="false")return!1}return null},Xs=(s,r)=>s.length<=r?{text:s,truncated:!1}:{text:s.slice(0,r),truncated:!0},lv=s=>!s||s.data===void 0||s.data===null?{reason:"No data to copy."}:{raw:s.data},Qs=(s,r,f)=>s.length<=r?s:(f.push(`first ${r.toLocaleString()} chars`),s.slice(0,r)),av=s=>{const r=[];if(typeof s=="string")return{text:Qs(s,Si,r),truncated:r.length>0,reason:r.join(", ")};if(Array.isArray(s)){let o=s;s.length>mr&&(o=s.slice(0,mr),r.push(`first ${mr.toLocaleString()} items`));let h="";try{h=JSON.stringify(o,null,2)}catch{h=String(o)}return h=Qs(h,Si,r),{text:h,truncated:r.length>0,reason:r.join(", ")}}if(s&&typeof s=="object"){let o=s;const h=Object.keys(s);h.length>xr&&(o=h.slice(0,xr).reduce((m,j)=>(m[j]=s[j],m),{}),r.push(`first ${xr.toLocaleString()} keys`));let p="";try{p=JSON.stringify(o,null,2)}catch{p=String(o)}return p=Qs(p,Si,r),{text:p,truncated:r.length>0,reason:r.join(", ")}}return{text:Qs(String(s),Si,r),truncated:r.length>0,reason:r.join(", ")}},nv=s=>{if(typeof s=="string")return s;try{return JSON.stringify(s,null,2)}catch{return String(s)}},Yh=s=>{if(!s||s.data===void 0||s.data===null||s.data==="")return{text:"",truncated:!1,language:"plain"};const r=s.data;if(typeof r=="string"){const o=r.trim(),h=o.startsWith("<")&&o.includes(">")?"html":o.startsWith("{")||o.startsWith("[")?"json":"plain",p=Xs(r,Gs);return{text:p.text,truncated:p.truncated,language:h}}if(Array.isArray(r)){const o=r.length>pr?r.slice(0,pr):r,h=JSON.stringify(o,null,2),p=Xs(h,Gs);return{text:p.text,truncated:p.truncated||r.length>pr,language:"json"}}if(r&&typeof r=="object"){const o=Object.keys(r);let h=r,p=!1;o.length>qh&&(p=!0,h=o.slice(0,qh).reduce((b,x)=>(b[x]=r[x],b),{}));const m=JSON.stringify(h,null,2),j=Xs(m,Gs);return{text:j.text,truncated:j.truncated||p,language:"json"}}const f=Xs(String(r),Gs);return{text:f.text,truncated:f.truncated,language:"plain"}},iv=s=>{const r=[];let f=[],o="",h=!1;for(let p=0;p<s.length;p+=1){const m=s[p];h?m==='"'?s[p+1]==='"'?(o+='"',p+=1):h=!1:o+=m:m==='"'?h=!0:m===","?(f.push(o),o=""):m===`
12
- `?(f.push(o),r.push(f),f=[],o=""):m==="\r"||(o+=m)}return f.push(o),(f.length>1||f[0]!==""||r.length>0)&&r.push(f),r},sv=s=>{if(!s)return null;if(typeof s=="string"){const r=s.trim();if(!r.includes(",")||!r.includes(`
13
- `))return null;const f=iv(r).filter(p=>p.some(m=>String(m||"").trim()!==""));if(f.length<2)return null;const o=f[0].map((p,m)=>String(p||"").trim()||`column_${m+1}`),h=f.slice(1);return o.length<2?null:{headers:o,rows:h}}if(Array.isArray(s)){if(s.length===0)return null;if(s.every(r=>r&&typeof r=="object"&&!Array.isArray(r))){const r=[];if(s.forEach(o=>{Object.keys(o).forEach(h=>{r.includes(h)||r.push(h)})}),r.length===0)return null;const f=s.map(o=>r.map(h=>o[h]??""));return{headers:r,rows:f}}if(s.every(r=>Array.isArray(r))){const r=Math.max(...s.map(o=>o.length));return{headers:Array.from({length:r},(o,h)=>`column_${h+1}`),rows:s}}return null}if(s&&typeof s=="object"){const r=Object.keys(s);return r.length===0?null:{headers:r,rows:[r.map(f=>s[f]??"")]}}return null},uv=(s,r)=>s==null?null:typeof s=="string"?r?{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"},cv=(s,r,f)=>{const o=new Blob([r],{type:f}),h=URL.createObjectURL(o),p=document.createElement("a");p.href=h,p.download=s,document.body.appendChild(p),p.click(),p.remove(),URL.revokeObjectURL(h)},yp=({results:s,pinnedResults:r,isExecuting:f,isHeadful:o,onConfirm:h,onNotify:p,onPin:m,onUnpin:j,fullWidth:b})=>{const[x,N]=y.useState(null),[v,k]=y.useState("raw"),[D,O]=y.useState(()=>r&&!s?"pinned":"latest"),[Y,V]=y.useState("checking"),J=y.useRef(null),q=D==="pinned"&&r?r:s,P=sv(q?.data),xe=q&&q.data!==void 0&&q.data!==null&&q.data!==""?Yh(q):null,ye=q?.screenshotUrl?`${q.screenshotUrl}${D==="latest"?`?t=${Date.now()}`:""}`:null,me=Q=>{const fe=tv(Q);return fe!==null?fe?u.jsx(Ni,{className:"w-3 h-3 text-blue-400"}):"":Q??""};y.useEffect(()=>{k(P?"table":"raw")},[q]),y.useEffect(()=>{if(s){O("latest");return}r&&O("pinned")},[s,r]),y.useEffect(()=>{!r&&D==="pinned"&&O("latest")},[r,D]),y.useEffect(()=>{if(!o||D!=="latest")return;let Q=!1;return(async()=>{try{const Ne=await fetch("/novnc/core/rfb.js",{method:"HEAD",cache:"no-store"});Q||V(Ne.ok?"novnc":"native")}catch{Q||V("native")}})(),()=>{Q=!0}},[o,D]);const ue=async(Q,fe,Ne)=>{if(!Q){p("Nothing to copy.","error");return}let ce=Q;try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(ce);else{const de=document.createElement("textarea");de.value=ce,de.style.position="fixed",de.style.left="-999999px",de.style.top="-999999px",document.body.appendChild(de),de.focus(),de.select(),document.execCommand("copy"),de.remove()}N(fe),setTimeout(()=>N(null),2e3),Ne?.truncatedNotice?p("Copied truncated data.","success"):ce.length!==Q.length&&p("Copied a truncated preview.","success")}catch(de){console.error("Copy failed:",de),p("Copy failed.","error")}};if(o&&D==="latest"){const{origin:Q,hostname:fe}=window.location,Ne=`${Q}/novnc.html?host=${fe}&path=websockify`,ce=()=>{const de=J.current;if(de){if(document.fullscreenElement){document.exitFullscreen().catch(()=>{});return}de.requestFullscreen?.().catch(()=>{})}};return Y==="native"?u.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:u.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Headful session running in a native browser window."})}):Y==="checking"?u.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:u.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Checking headful viewer..."})}):u.jsxs("div",{ref:J,className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative",children:[u.jsx("button",{type:"button",onClick:ce,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"}),u.jsx("iframe",{src:Ne,className:"absolute inset-0 w-full h-full",title:"Headful Browser"})]})}if(!q&&!(f&&D==="latest"))return u.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center space-y-4 opacity-20",children:[u.jsx("div",{className:"w-16 h-16 border border-white/10 rounded-full flex items-center justify-center",children:u.jsx(kg,{className:"w-6 h-6 text-white"})}),u.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.3em]",children:"Ready"})]});const ve=b?"space-y-12 relative z-10 w-full":"space-y-12 relative z-10 max-w-5xl mx-auto";return u.jsxs("div",{className:ve,children:[u.jsxs("div",{className:"flex items-end justify-between border-b border-white/5 pb-10",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsx("p",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Preview"}),u.jsx("h2",{className:"text-xl font-mono text-white truncate max-w-xl tracking-tight italic",children:q?.finalUrl||q?.url||""})]}),u.jsx("div",{className:`px-4 py-2 rounded-xl text-[9px] font-bold uppercase tracking-[0.2em] ${D==="pinned"?"bg-amber-500/10 text-amber-300":f?"bg-blue-500/10 text-blue-400 animate-pulse":"bg-green-500/10 text-green-400"}`,children:D==="pinned"?"Pinned":f?"Running":"Finished"})]}),u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[u.jsxs("div",{className:"glass-card rounded-[32px] overflow-hidden flex flex-col min-h-[400px]",children:[u.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:[u.jsx("span",{children:"Screenshot"}),u.jsx("span",{className:"text-white/20",children:q?.timestamp||"--:--:--"})]}),u.jsx("div",{className:"relative bg-black flex-1 flex items-center justify-center overflow-hidden",children:ye?u.jsx("img",{src:ye,className:"absolute inset-0 w-full h-full object-contain transition-opacity duration-1000"}):u.jsx("div",{className:"text-[8px] font-bold text-white/5 uppercase tracking-widest",children:"Waiting for Frame..."})})]}),u.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col h-[400px]",children:[u.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"}),u.jsxs("div",{className:"flex-1 font-mono text-[10px] text-gray-400 space-y-2 overflow-y-auto custom-scrollbar pr-2",children:[q?.logs?.map((Q,fe)=>u.jsxs("div",{className:"flex gap-2",children:[u.jsx("span",{className:"text-white/10 shrink-0",children:"›"})," ",u.jsx("span",{children:Q})]},fe)),f&&D==="latest"&&(!q?.logs||q?.logs.length===0)&&u.jsx("div",{className:"animate-pulse",children:"Connecting to kernel..."})]})]})]}),u.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col relative",children:[u.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[u.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Data"}),u.jsxs("div",{className:"flex items-center gap-2",children:[r&&u.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["latest","pinned"].map(Q=>u.jsx("button",{onClick:()=>O(Q),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${D===Q?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:Q},Q))}),P&&u.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["table","raw"].map(Q=>u.jsx("button",{onClick:()=>k(Q),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${v===Q?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:Q},Q))}),D==="pinned"?u.jsx("button",{onClick:()=>{j?.(),O("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"}):u.jsx("button",{onClick:()=>{if(!q){p("No data to pin.","error");return}m?.(q),O("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:r?"Update Pin":"Pin"}),u.jsx("button",{onClick:()=>{const Q=uv(q?.data,P);if(!Q){p("No data to export.","error");return}const fe=`doppelganger-data-${new Date().toISOString().replace(/[:.]/g,"-")}.${Q.ext}`;cv(fe,Q.content,Q.mime),p(`Exported ${Q.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"}),u.jsxs("button",{onClick:async()=>{const Q=lv(q);if(Q.reason){p(Q.reason||"Data too large to copy safely.","error");return}const fe=Yh(q);let ce=nv(Q.raw),de=!1;fe.truncated&&(await h({message:"Preview is truncated for performance.",confirmLabel:"Copy full",cancelLabel:"Copy preview"})||(ce=fe.text||"",de=!0)),ce.length>Si&&(await h({message:`Copying ${ev(ce.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:de?"Copy preview":"Copy truncated"})||(ce=av(Q.raw).text,de=!0)),ue(ce,"data",{skipSizeConfirm:!0,truncatedNotice:de})},className:`px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${x==="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:[x==="data"?u.jsx(Ni,{className:"w-3 h-3"}):u.jsx(Ei,{className:"w-3 h-3"}),x==="data"?"Copied":"Copy"]})]})]}),xe?.truncated&&u.jsx("button",{type:"button",onClick:()=>p("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"}),u.jsx("div",{className:"max-h-[70vh] overflow-y-auto custom-scrollbar pr-2 relative",children:f&&D==="latest"&&(!q||q.data===void 0)?u.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"Buffering data stream..."}):!q||q.data===void 0||q.data===null||q.data===""?u.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"No data available."}):u.jsx("div",{children:P&&v==="table"?u.jsx("div",{className:"overflow-auto custom-scrollbar rounded-2xl border border-white/10",children:u.jsxs("table",{className:"min-w-full table-auto text-[10px] text-left text-white/80 font-mono",children:[u.jsx("thead",{className:"bg-white/5 text-[9px] uppercase tracking-widest text-white/50",children:u.jsx("tr",{children:P.headers.map(Q=>u.jsx("th",{className:"px-3 py-2 border-b border-white/10 whitespace-nowrap",children:Q},Q))})}),u.jsx("tbody",{children:P.rows.map((Q,fe)=>u.jsx("tr",{className:"odd:bg-white/[0.02]",children:P.headers.map((Ne,ce)=>u.jsx("td",{className:"px-3 py-2 border-b border-white/5 align-top whitespace-normal break-words",children:me(Q[ce])},`${fe}-${ce}`))},fe))})]})}):u.jsx(En,{readOnly:!0,value:xe?.text||"",language:xe?.language||"plain"})})})]})]})},rv=({name:s,def:r,updateVariable:f,removeVariable:o})=>{const[h,p]=y.useState(s);return y.useEffect(()=>{p(s)},[s]),u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx("input",{type:"text",value:h,onChange:m=>p(m.target.value),onBlur:()=>{h!==s&&f(s,h,r.type,r.value)},className:"var-name flex-1 bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),u.jsxs("select",{value:r.type,onChange:m=>f(s,s,m.target.value,r.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:[u.jsx("option",{value:"string",children:"STR"}),u.jsx("option",{value:"number",children:"NUM"}),u.jsx("option",{value:"boolean",children:"BOOL"})]}),u.jsx("div",{className:"flex-1",children:r.type==="boolean"?u.jsxs("select",{value:String(r.value),onChange:m=>f(s,s,r.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:[u.jsx("option",{value:"true",children:"True"}),u.jsx("option",{value:"false",children:"False"})]}):u.jsx("input",{type:r.type==="number"?"number":"text",value:r.value,onChange:m=>f(s,s,r.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"})}),u.jsx("button",{onClick:()=>o(s),className:"p-2 text-red-500 hover:text-red-400",children:"×"})]})},gp=({currentTask:s,setCurrentTask:r,tasks:f=[],editorView:o,setEditorView:h,isExecuting:p,onSave:m,onRun:j,results:b,pinnedResults:x,saveMsg:N,onConfirm:v,onNotify:k,onPinResults:D,onUnpinResults:O,onRunSnapshot:Y,runId:V,onStop:J})=>{const[q,P]=y.useState(null),[xe,ye]=y.useState(null),me=y.useRef(null),ue=y.useRef(null),[,ve]=y.useState(null),[Q,fe]=y.useState(null),[Ne,ce]=y.useState(null),[de,De]=y.useState([]),[Fe,U]=y.useState(!1),[$,ie]=y.useState(!1),[Re,Ce]=y.useState(""),[w,R]=y.useState(null),[G,W]=y.useState(null),[ae,pe]=y.useState(!1),[X,re]=y.useState({}),[ne,ge]=y.useState([]),[ut,il]=y.useState(!1),Vl=()=>{try{const A=localStorage.getItem("doppelganger.layout.leftWidthPct");if(!A)return .3;const C=parseFloat(A);return Number.isNaN(C)?.3:Math.min(.75,Math.max(.25,C))}catch{return .3}},zt=A=>{const Z=Math.floor(window.innerWidth*.8);return Math.max(320,Math.min(Z,A))},[Gl,gl]=y.useState(()=>{if(typeof window>"u")return 360;const A=Vl();return zt(Math.round(window.innerWidth*A))}),Xl=y.useRef(!1),Ql=f.filter(A=>String(A.id||"")!==String(s.id||"")),Rt=ut&&ne.length===1&&ne[0]?.id==="host",vl=1e6,va=A=>`${(A/(1024*1024)).toFixed(2)} MB`,Zl=async(A,C,Z)=>{if(!A){k("Nothing to copy.","error");return}let Ee=A;A.length>vl&&(await v({message:`Copying ${va(A.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:"Copy segment"})||(Ee=A.slice(0,vl)));try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(Ee);else{const ke=document.createElement("textarea");ke.value=Ee,ke.style.position="fixed",ke.style.left="-999999px",ke.style.top="-999999px",document.body.appendChild(ke),ke.focus(),ke.select(),document.execCommand("copy"),ke.remove()}P(C),setTimeout(()=>P(null),2e3),Z?.truncatedNotice||Ee.length!==A.length&&k("Copied a truncated preview.","success")}catch(ke){console.error("Copy failed:",ke),k("Copy failed.","error")}};y.useEffect(()=>{let A=!1;return(async()=>{try{const Z=await fetch("/api/settings/proxies",{credentials:"include"});if(!Z.ok)throw new Error("Failed to load proxies");const Ee=await Z.json();if(A)return;ge(Array.isArray(Ee.proxies)?Ee.proxies:[])}catch{A||ge([])}finally{A||il(!0)}})(),()=>{A=!0}},[]),y.useEffect(()=>{Rt&&s.rotateProxies&&r({...s,rotateProxies:!1})},[Rt,s,r]);const Tn=new Set(["if","while","repeat","foreach","on_error"]),xt=A=>{const C=(A||"").trim(),Z=C.match(/^\{\$([\w.]+)\}$/);return Z?Z[1]:C},Kl={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"}]},bl=A=>{let C=0;return A.map(Z=>{(Z.type==="else"||Z.type==="end")&&(C=Math.max(0,C-1));const Ee=C;return(Z.type==="else"||Tn.has(Z.type))&&(C+=1),Ee})},K=A=>{const C={id:"act_"+Date.now(),type:A,selector:"",value:""};A==="set"&&(C.varName=""),A==="merge"&&(C.varName=""),A==="start"&&(C.value=""),A==="if"&&(C.conditionVar="",C.conditionVarType="string",C.conditionOp="equals",C.conditionValue=""),r({...s,actions:[...s.actions,C]})},ee=A=>{ie(!0),Ce(""),R(A||null)},le=A=>{r({...s,actions:s.actions.filter(C=>C.id!==A)})},I=(A,C)=>{r({...s,actions:s.actions.map(Z=>Z.id===A?{...Z,...C}:Z)})},Ke=(A,C)=>{if(A===C)return;const Z=[...s.actions],Ee=Z.findIndex(Ct=>Ct.id===A),ke=Z.findIndex(Ct=>Ct.id===C);if(Ee===-1||ke===-1)return;const[Je]=Z.splice(Ee,1);Z.splice(ke,0,Je),r({...s,actions:Z})},Ie=A=>!A||!(A instanceof HTMLElement)?!1:!!A.closest('input, textarea, select, button, a, [contenteditable="true"], [data-no-drag="true"]'),Pe=(A,C,Z,Ee)=>{if(Z!==void 0&&Ee!==void 0&&Math.abs(A-Ee)<14)return Z;const ke=s.actions;let Je=ke.length-1;for(let Ct=0;Ct<ke.length;Ct++){if(ke[Ct].id===C)continue;const fl=document.getElementById(`action-${ke[Ct].id}`);if(!fl)continue;const wa=fl.getBoundingClientRect(),Ba=wa.top+wa.height*.4;if(A<Ba){Je=Ct;break}}return Je},Me=()=>{if(Q){if(Ne!==null&&Ne!==Q.index){const A=s.actions[Ne]?.id;A&&Ke(Q.id,A)}fe(null),ce(null),me.current=null}};y.useEffect(()=>{if(!Q)return;const A=Z=>{if(me.current!==null&&Z.pointerId!==me.current)return;if(ue.current){const Je=ue.current.getBoundingClientRect();Z.clientY<Je.top+28&&(ue.current.scrollTop-=14),Z.clientY>Je.bottom-28&&(ue.current.scrollTop+=14)}const Ee=Q.originTop+Q.height/2,ke=Pe(Z.clientY,Q.id,Q.index,Ee);fe(Je=>Je&&{...Je,currentY:Z.clientY}),ce(ke)},C=Z=>{me.current!==null&&Z.pointerId!==me.current||Me()};return window.addEventListener("pointermove",A),window.addEventListener("pointerup",C),window.addEventListener("pointercancel",C),()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",C),window.removeEventListener("pointercancel",C)}},[Q,Ne,s.actions]);const dt=()=>{const A="var_"+Date.now().toString().slice(-4);r({...s,variables:{...s.variables,[A]:{type:"string",value:""}}})},lt=A=>({...A,id:"act_"+Date.now()+"_"+Math.floor(Math.random()*1e3)}),ba=(A,C)=>{A.preventDefault();const Z=8,Ee=200,ke=190,Je=Math.min(Math.max(A.clientX+12,Z),window.innerWidth-Ee-Z),Ct=Math.min(Math.max(A.clientY+12,Z),window.innerHeight-ke-Z);ye({id:C,x:Je,y:Ct})},Mt=()=>ye(null);y.useEffect(()=>{if(!xe)return;const A=Z=>{Z.target?.closest(".action-context-menu")||ye(null)},C=Z=>{Z.key==="Escape"&&ye(null)};return window.addEventListener("mousedown",A),window.addEventListener("keydown",C),window.addEventListener("scroll",A,!0),()=>{window.removeEventListener("mousedown",A),window.removeEventListener("keydown",C),window.removeEventListener("scroll",A,!0)}},[xe]),y.useEffect(()=>{if(!V||s.mode!=="agent")return;re({});const A=new EventSource(`/api/executions/stream?runId=${encodeURIComponent(V)}`,{withCredentials:!0});return A.onmessage=C=>{if(C.data)try{const Z=JSON.parse(C.data);Z&&Z.actionId&&Z.status&&re(Ee=>({...Ee,[Z.actionId]:Z.status}))}catch{}},A.addEventListener("ready",()=>{}),A.onopen=()=>{},A.onerror=()=>{A.close()},()=>{A.close()}},[V,s.mode]),y.useEffect(()=>{if(typeof window>"u")return;const A=Vl();gl(zt(Math.round(window.innerWidth*A)))},[]),y.useEffect(()=>{const A=Z=>{if(!Xl.current)return;const Ee=zt(Z.clientX);gl(Ee)},C=()=>{Xl.current=!1,document.body.style.cursor="",document.body.style.userSelect=""};return window.addEventListener("pointermove",A),window.addEventListener("pointerup",C),window.addEventListener("pointercancel",C),()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",C),window.removeEventListener("pointercancel",C)}},[]);const yt=A=>{const C={...s.variables};delete C[A],r({...s,variables:C})},Zt=(A,C,Z,Ee)=>{const ke={...s.variables};delete ke[A];let Je=Ee;Z==="number"&&(Je=parseFloat(Ee)||0),Z==="boolean"&&(Je=Ee==="true"||Ee===!0),ke[C]={type:Z,value:Je},r({...s,variables:ke})},Et=async()=>{if(s.id){U(!0);try{const A=await fetch(`/api/tasks/${s.id}/versions`);if(!A.ok)throw new Error("Failed to load versions");const C=await A.json();De(Array.isArray(C.versions)?C.versions:[])}catch{De([])}finally{U(!1)}}},bt=async A=>{if(!(!s.id||!await v("Rollback to this version? Current changes will be saved as a new version.")))try{const Z=await fetch(`/api/tasks/${s.id}/rollback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({versionId:A})});if(!Z.ok)throw new Error("Rollback failed");const Ee=await Z.json();r(Ee),k("Rolled back to selected version.","success"),Et()}catch{k("Rollback failed.","error")}},Kt=async A=>{if(s.id){pe(!0);try{const C=await fetch(`/api/tasks/${s.id}/versions/${A}`);if(!C.ok)throw new Error("Failed to load version");const Z=await C.json();if(!Z?.snapshot)throw new Error("Missing snapshot");W({id:Z.metadata?.id||A,timestamp:Z.metadata?.timestamp||Date.now(),snapshot:Z.snapshot})}catch{k("Failed to load version snapshot.","error")}finally{pe(!1)}}};return y.useEffect(()=>{o==="history"&&Et()},[o,s.id]),u.jsxs("div",{className:"flex-1 flex overflow-hidden animate-in fade-in slide-in-from-bottom-4 duration-500",children:[u.jsxs("aside",{className:"glass border-r border-white/10 flex flex-col shrink-0 overflow-hidden",style:{width:Gl},children:[u.jsxs("div",{className:"p-8 border-b border-white/10 space-y-6 shrink-0",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("input",{type:"text",value:s.name,onChange:A=>r({...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"}),u.jsxs("div",{className:"flex items-center gap-6",children:[u.jsx("button",{onClick:()=>h("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:u.jsx(Jy,{className:"w-3.5 h-3.5"})}),u.jsx("button",{onClick:m,className:`px-4 py-2 text-[9px] font-bold rounded-full uppercase tracking-widest transition-all ${N==="SAVED"?"text-green-400 border border-green-400/20":"bg-blue-500/10 border border-blue-500/20 text-blue-400 hover:bg-blue-500/20"}`,children:N==="SAVED"?"SAVED":"SAVE"})]})]}),u.jsx("div",{className:"bg-white/5 p-1 rounded-xl flex gap-1 border border-white/5",children:["scrape","agent","headful"].map(A=>u.jsx("button",{onClick:()=>r({...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))}),u.jsxs("div",{className:"flex items-center justify-between px-2",children:[u.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Interface Mode"}),u.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/5",children:["visual","json","api"].map(A=>u.jsx("button",{onClick:()=>h(A),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${o===A?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:A},A))})]})]}),u.jsxs("div",{className:`flex-1 p-8 min-h-0 relative ${o==="json"?"overflow-hidden":"overflow-y-auto custom-scrollbar"} ${o==="visual"?"space-y-8":""}`,children:[o==="visual"&&u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Target URL"}),u.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:u.jsx(_t,{value:s.url,onChange:A=>r({...s,url:A}),variables:s.variables,placeholder:"https://..."})})]}),u.jsx("div",{className:"grid grid-cols-2 gap-4",children:u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Wait (Sec)"}),u.jsx("input",{type:"number",value:s.wait,onChange:A=>r({...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"&&u.jsxs("div",{className:"space-y-6 order-1",children:[u.jsxs("div",{className:"space-y-3",ref:ue,children:[(()=>{const A=bl(s.actions);return s.actions.map((C,Z)=>{const Ee=Q?.id===C.id,Je=Q&&Ne!==null&&Q.index!==Ne&&C.id!==Q.id&&(Q.index<Ne&&Z>Q.index&&Z<=Ne||Q.index>Ne&&Z<Q.index&&Z>=Ne)?(Q?.height||0)*(Q.index<(Ne??0)?-1:1):0,Ct=A[Z]||0,fl=C.disabled?"skipped":X[C.id],wa=fl==="running"?"border-yellow-400/60":fl==="success"?"border-green-400/60":fl==="error"?"border-red-400/70":fl==="skipped"?"border-gray-500/40":"",Ba=F=>{const Ve="w-3 h-3";return F==="if"||F==="else"?u.jsx(Ng,{className:`${Ve} text-blue-400`}):F==="end"?u.jsx(Ly,{className:`${Ve} text-gray-500`}):F==="while"||F==="repeat"?u.jsx(gg,{className:`${Ve} text-amber-400`}):F==="foreach"?u.jsx(hp,{className:`${Ve} text-amber-300`}):F==="on_error"?u.jsx(Hg,{className:`${Ve} text-red-400`}):F==="set"?u.jsx(Xg,{className:`${Ve} text-green-400`}):F==="stop"?u.jsx(Hh,{className:`${Ve} text-red-400`}):F==="click"?u.jsx(rg,{className:`${Ve} text-blue-300`}):F==="type"?u.jsx(qg,{className:`${Ve} text-green-300`}):F==="hover"?u.jsx(Og,{className:`${Ve} text-purple-300`}):F==="press"?u.jsx(eg,{className:`${Ve} text-amber-300`}):F==="wait"?u.jsx(zy,{className:`${Ve} text-slate-300`}):F==="scroll"?u.jsx(Ey,{className:`${Ve} text-cyan-300`}):F==="javascript"?u.jsx(Dy,{className:`${Ve} text-yellow-300`}):F==="csv"?u.jsx(Rg,{className:`${Ve} text-emerald-300`}):F==="merge"?u.jsx(lg,{className:`${Ve} text-emerald-200`}):F==="start"?u.jsx(Ty,{className:`${Ve} text-emerald-300`}):u.jsx("span",{className:"text-[9px] text-white/20",children:"|"})};return u.jsxs("div",{id:`action-${C.id}`,onPointerDown:F=>{if(Ie(F.target)||F.button!==0)return;F.preventDefault();const Ve=F.currentTarget.getBoundingClientRect(),qa=F.clientY-Ve.top;me.current=F.pointerId,F.currentTarget.setPointerCapture(F.pointerId),fe({id:C.id,startY:F.clientY,currentY:F.clientY,height:Ve.height,index:Z,originTop:Ve.top,pointerOffset:qa}),ce(Z)},onPointerUp:F=>{me.current!==null&&F.pointerId!==me.current||Me()},onContextMenu:F=>ba(F,C.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 ${wa} ${Ee?"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":""} ${Ne===Z&&!Ee?"ring-2 ring-blue-400/60 bg-blue-500/5":""} ${C.disabled?"opacity-40 grayscale":""}`,style:{transform:Ee?`translateY(${(Q?.currentY||0)-(Q?.pointerOffset||0)-(Q?.originTop||0)}px)`:Je?`translateY(${Je}px)`:void 0,marginLeft:Ct?Ct*12:void 0},children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"text-[8px] font-bold text-white/20 font-mono tracking-tighter",children:(Z+1).toString().padStart(2,"0")}),u.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:Ba(C.type)}),u.jsx("button",{onClick:()=>ee(C.id),className:"action-type-select text-[10px] font-bold uppercase tracking-[0.2em] text-blue-400 focus:outline-none cursor-pointer",children:vr.find(F=>F.type===C.type)?.label||C.type})]}),u.jsx("button",{"data-no-drag":"true",onClick:()=>le(C.id),className:"text-gray-600 hover:text-red-500 transition-colors opacity-0 group-hover/item:opacity-100",children:u.jsx(Tr,{className:"w-4 h-4"})})]}),(C.type==="click"||C.type==="type"||C.type==="hover")&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector"}),u.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:u.jsx(_t,{value:C.selector||"",onChange:F=>I(C.id,{selector:F}),variables:s.variables,placeholder:".btn-primary"})})]}),C.type==="scroll"&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),u.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:u.jsx(_t,{value:C.selector||"",onChange:F=>I(C.id,{selector:F}),variables:s.variables,placeholder:".scroll-container or leave empty"})})]}),(C.type==="type"||C.type==="wait"||C.type==="scroll"||C.type==="javascript"||C.type==="csv")&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:C.type==="type"?"Content":C.type==="wait"?"Seconds":C.type==="scroll"?"Pixels":C.type==="csv"?"CSV Input":"Script"}),u.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:C.type==="javascript"?u.jsx(En,{value:C.value||"",onChange:F=>I(C.id,{value:F}),language:"javascript",variables:s.variables,className:"min-h-[120px]",placeholder:"return document.title"}):C.type==="csv"?u.jsx(En,{value:C.value||"",onChange:F=>I(C.id,{value:F}),language:"plain",variables:s.variables,className:"min-h-[120px]",placeholder:"name,age\\nAda,31"}):u.jsx(_t,{value:C.value||"",onChange:F=>I(C.id,{value:F}),variables:s.variables,placeholder:C.type==="type"?"Search keywords":C.type==="wait"?"3":"400"})})]}),C.type==="press"&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Key"}),u.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:u.jsx(_t,{value:C.key||"",onChange:F=>I(C.id,{key:F}),variables:s.variables,placeholder:"Enter"})})]}),C.type==="if"&&(()=>{const F=Object.keys(s.variables||{}),Ve=xt(C.conditionVar||""),qa=Ve&&s.variables?.[Ve]?.type,Jl=C.conditionVarType||qa||"string",sl=Kl[Jl]||Kl.string,ht=C.conditionOp||sl[0].value;return u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),u.jsx("input",{type:"text",list:`if-var-${C.id}`,value:C.conditionVar||"",onChange:Be=>I(C.id,{conditionVar:Be.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"}),F.length>0&&u.jsx("datalist",{id:`if-var-${C.id}`,children:F.map(Be=>u.jsx("option",{value:Be},Be))})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),u.jsxs("select",{value:Jl,onChange:Be=>{const dl=Be.target.value,_n=Kl[dl]||Kl.string;I(C.id,{conditionVarType:dl,conditionOp:_n[0].value,conditionValue:dl==="boolean"?"":C.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:[u.jsx("option",{value:"string",children:"String"}),u.jsx("option",{value:"number",children:"Number"}),u.jsx("option",{value:"boolean",children:"Boolean"})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),u.jsx("select",{value:ht,onChange:Be=>I(C.id,{conditionOp:Be.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:sl.map(Be=>u.jsx("option",{value:Be.value,children:Be.label},Be.value))})]})]}),Jl!=="boolean"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),u.jsx("input",{type:Jl==="number"?"number":"text",value:C.conditionValue||"",onChange:Be=>I(C.id,{conditionValue:Be.target.value}),placeholder:Jl==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),C.type==="while"&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition (JS)"}),u.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:u.jsx(_t,{value:C.value||"",onChange:F=>I(C.id,{value:F}),variables:s.variables,placeholder:"exists('.login') && text('h1').includes('Welcome')"})})]}),C.type==="repeat"&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Times"}),u.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:u.jsx(_t,{value:C.value||"",onChange:F=>I(C.id,{value:F}),variables:s.variables,placeholder:"3"})})]}),C.type==="foreach"&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),u.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:u.jsx(_t,{value:C.selector||"",onChange:F=>I(C.id,{selector:F}),variables:s.variables,placeholder:".list-item"})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable (Array Name)"}),u.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:u.jsx(_t,{value:C.varName||"",onChange:F=>I(C.id,{varName:F}),variables:s.variables,placeholder:"items"})})]})]}),C.type==="set"&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable Name"}),u.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:u.jsx(_t,{value:C.varName||"",onChange:F=>I(C.id,{varName:F}),variables:s.variables,placeholder:"status"})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Value"}),u.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:u.jsx(_t,{value:C.value||"",onChange:F=>I(C.id,{value:F}),variables:s.variables,placeholder:"ready"})})]})]}),C.type==="merge"&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Sources"}),u.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:u.jsx(_t,{value:C.value||"",onChange:F=>I(C.id,{value:F}),variables:s.variables,placeholder:"items, extraItems, {$block.output}"})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Target Variable (Optional)"}),u.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:u.jsx(_t,{value:C.varName||"",onChange:F=>I(C.id,{varName:F}),variables:s.variables,placeholder:"allItems"})})]})]}),C.type==="stop"&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Outcome"}),u.jsxs("select",{value:C.value||"success",onChange:F=>I(C.id,{value:F.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:[u.jsx("option",{value:"success",children:"Success"}),u.jsx("option",{value:"error",children:"Error"})]})]}),C.type==="on_error"&&u.jsx("div",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Runs if any action fails."}),C.type==="start"&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Task"}),u.jsxs("select",{value:C.value||"",onChange:F=>I(C.id,{value:F.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:[u.jsx("option",{value:"",disabled:!0,children:"Select task"}),Ql.length===0&&u.jsx("option",{value:"",disabled:!0,children:"No other tasks"}),Ql.map(F=>u.jsx("option",{value:F.id,children:F.name||F.id},F.id))]})]})]},C.id)})})(),xe&&(()=>{const A=s.actions.findIndex(Z=>Z.id===xe.id),C=s.actions[A];return C?u.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:xe.x,top:xe.y},children:[u.jsx("button",{onClick:()=>{I(C.id,{disabled:!C.disabled}),Mt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:C.disabled?"Enable":"Disable"}),u.jsx("button",{onClick:()=>{le(C.id),Mt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors text-red-400",children:"Delete"}),u.jsx("button",{onClick:()=>{ve(lt(C)),le(C.id),Mt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Cut"}),u.jsx("button",{onClick:()=>{ve(lt(C)),Mt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Copy"}),u.jsx("button",{onClick:()=>{const Z=lt(C),Ee=[...s.actions];Ee.splice(A+1,0,Z),r({...s,actions:Ee}),Mt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Duplicate"})]}):null})(),u.jsx("button",{onClick:()=>ee(),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"})]}),u.jsxs("div",{className:"bg-white/5 rounded-xl p-4 border border-white/5 space-y-4",children:[u.jsx("h4",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest border-b border-white/5 pb-2",children:"Behavior Config"}),u.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(s.stealth).map(([A,C])=>u.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[u.jsx("input",{type:"checkbox",checked:C,onChange:Z=>r({...s,stealth:{...s.stealth,[A]:Z.target.checked},humanTyping:A==="naturalTyping"?Z.target.checked:s.humanTyping}),className:"w-3 h-3 rounded bg-transparent border-white/20"}),u.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))})]})]}),u.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[u.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)"}),u.jsxs("div",{className:"space-y-3 mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{className:"text-[8px] text-gray-600",children:"Dynamic Params"}),u.jsx("button",{onClick:dt,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"})]}),u.jsx("div",{className:"space-y-2",children:Object.entries(s.variables).map(([A,C])=>u.jsx(rv,{name:A,def:C,updateVariable:Zt,removeVariable:yt},A))})]})]}),u.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[u.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"}),u.jsxs("div",{className:"space-y-3 mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Output format"}),u.jsxs("select",{value:s.extractionFormat||"json",onChange:A=>r({...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:[u.jsx("option",{value:"json",children:"JSON"}),u.jsx("option",{value:"csv",children:"CSV"})]})]}),u.jsxs("p",{className:"text-[8px] text-gray-600",children:["Process scraped HTML with JavaScript. Use ",u.jsx("code",{className:"text-blue-400 bg-white/5 px-1 py-0.5 rounded",children:"$$data.html()"})," to access the raw HTML."]}),u.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:u.jsx(_t,{value:s.extractionScript||"",onChange:A=>r({...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"&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Selector Filter"}),u.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:u.jsx(_t,{value:s.selector||"",onChange:A=>r({...s,selector:A}),variables:s.variables,placeholder:".main-content"})})]}),u.jsxs("div",{className:"pt-4 border-t border-white/10 space-y-3",children:[u.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:[u.jsx("input",{type:"checkbox",checked:s.rotateUserAgents,onChange:A=>r({...s,rotateUserAgents:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),u.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate UA"})]}),u.jsxs("label",{className:`flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 transition-all ${Rt?"opacity-50 cursor-not-allowed":"hover:bg-white/[0.05] cursor-pointer group"}`,title:Rt?"Add a proxy to enable rotation.":"Rotate proxies per task.",children:[u.jsx("input",{type:"checkbox",checked:s.rotateProxies,onChange:A=>r({...s,rotateProxies:A.target.checked}),disabled:Rt,className:"w-4 h-4 rounded border-white/20 bg-transparent"}),u.jsx("span",{className:`text-[10px] font-bold text-gray-500 uppercase tracking-widest ${Rt?"":"group-hover:text-white"}`,children:"Rotate Proxies"})]}),u.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:[u.jsx("input",{type:"checkbox",checked:s.includeShadowDom!==!1,onChange:A=>r({...s,includeShadowDom:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),u.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include Shadow DOM in HTML"})]})]})]}),o==="json"&&u.jsx(Pg,{task:s,onChange:r,onCopy:(A,C)=>{Zl(A,C)},copiedId:q}),o==="api"&&u.jsxs("div",{className:"h-full flex flex-col",children:[u.jsxs("div",{className:"space-y-6 flex-1 flex flex-col min-h-0",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Deployment Endpoint"}),u.jsxs("div",{className:"flex gap-2 items-center",children:[u.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"}),u.jsxs("button",{onClick:()=>{const A=s.id?`${window.location.origin}/tasks/${s.id}/api`:"";A&&Zl(A,"endpoint")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${q==="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:[q==="endpoint"?u.jsx(Ni,{className:"w-3 h-3"}):u.jsx(Ei,{className:"w-3 h-3"}),q==="endpoint"?"Copied":"Copy"]})]})]}),u.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Override Variables (JSON)"}),u.jsxs("button",{onClick:()=>{const A={};Object.entries(s.variables).forEach(([C,Z])=>A[C]=Z.value),Zl(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 ${q==="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:[q==="vars"?u.jsx(Ni,{className:"w-3 h-3"}):u.jsx(Ei,{className:"w-3 h-3"}),q==="vars"?"Copied":"Copy"]})]}),u.jsx(En,{readOnly:!0,value:(()=>{const A={};return Object.entries(s.variables).forEach(([C,Z])=>A[C]=Z.value),JSON.stringify({variables:A},null,2)})(),language:"json",className:"flex-1"})]})]}),u.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."})]}),o==="history"&&u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Task Versions"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:Et,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"}),u.jsx("button",{onClick:async()=>{if(!s.id||!await v("Clear all task versions?"))return;(await fetch(`/api/tasks/${s.id}/versions/clear`,{method:"POST"})).ok?(k("Version history cleared.","success"),Et()):k("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"})]})]}),Fe&&u.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading versions..."}),!Fe&&de.length===0&&u.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No versions yet. Save changes to create history."}),u.jsx("div",{className:"space-y-3",children:de.map(A=>u.jsxs("div",{className:"glass-card p-4 rounded-2xl flex items-center justify-between",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:A.name}),u.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(A.timestamp).toLocaleString()," | ",A.mode]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:()=>Kt(A.id),disabled:ae,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:ae?"Loading...":"View"}),u.jsx("button",{onClick:()=>bt(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))})]})]}),u.jsx(Ig,{open:$,query:Re,onQueryChange:Ce,onClose:()=>ie(!1),onSelect:A=>{w?A==="if"?I(w,{type:A,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""}):I(w,{type:A}):K(A),ie(!1)}}),u.jsx("div",{className:"p-8 border-t border-white/10 backdrop-blur-xl shrink-0",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("button",{onClick:j,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"?u.jsx("div",{className:"w-3 h-3 border-2 border-black/20 border-t-black rounded-full animate-spin"}):u.jsx(hg,{className:"w-3 h-3 fill-black"}),u.jsx("span",{children:p&&s.mode==="headful"?"Stop Headful":p?"Running...":"Run Task"})]}),p&&u.jsx("button",{onClick:()=>J?.(),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:u.jsx(Hh,{className:"w-4 h-4"})})]})})]}),u.jsx("div",{className:"w-2 cursor-col-resize bg-white/5 hover:bg-white/10 transition-colors",onPointerDown:A=>{A.preventDefault(),Xl.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}),u.jsxs("main",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#020202] p-12 relative",children:[u.jsx("div",{className:"absolute inset-0 opacity-[0.02] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),u.jsx(yp,{results:b,pinnedResults:x,isExecuting:p,isHeadful:s.mode==="headful",onConfirm:v,onNotify:k,onPin:D,onUnpin:O,fullWidth:s.mode==="headful"}),G&&u.jsx("div",{className:"fixed inset-0 z-[210] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:u.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:[u.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Task Snapshot"}),u.jsx("div",{className:"text-lg font-bold text-white",children:G.snapshot.name}),u.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(G.timestamp).toLocaleString()," | ",G.snapshot.mode]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:()=>W(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"}),u.jsx("button",{onClick:()=>{Y&&Y(G.snapshot),W(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"})]})]}),u.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:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Snapshot JSON"}),u.jsx(En,{readOnly:!0,value:JSON.stringify(G.snapshot,null,2),language:"json",className:"min-h-[320px]"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"}),u.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."})]})]})]})})]})]})},ov=({apiKey:s,loading:r,saving:f,onRegenerate:o,onCopy:h})=>{const[p,m]=y.useState(!1);return u.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[u.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.jsx(dp,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"API Key"}),u.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage task API access"})]})]}),u.jsxs("div",{className:"flex flex-col gap-4",children:[u.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:[u.jsx("span",{className:s&&!p?"text-[14px] leading-none":void 0,children:r?"Loading...":s?p?s:"••••••••••••••••••••••••••••••••••••••••":"No API key set"}),u.jsx("button",{onClick:()=>m(j=>!j),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?u.jsx(Vy,{className:"w-4 h-4"}):u.jsx(Xy,{className:"w-4 h-4"})})]}),u.jsxs("div",{className:"flex gap-3",children:[u.jsx("button",{onClick:o,disabled:f,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"}),u.jsxs("button",{onClick:h,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:[u.jsx(Ei,{className:"w-4 h-4"}),"Copy Key"]})]}),u.jsx("p",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Use this key in `key`, `x-api-key`, or `Authorization: Bearer` headers."})]})]})},fv=({onClearStorage:s})=>u.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[u.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.jsx(Ar,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Storage"}),u.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage stored data"})]})]}),u.jsxs("div",{className:"flex gap-4",children:[u.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 Screenshots"}),u.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"})]})]}),dv=({screenshots:s,loading:r,onRefresh:f,onDelete:o})=>u.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.jsx(Iy,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Screenshots"}),u.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Stored captures"})]})]}),u.jsx("button",{onClick:f,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&&u.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading data..."}),!r&&s.length===0&&u.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No screenshots found."}),u.jsx("div",{className:"space-y-3",children:s.map(h=>u.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-4 flex items-center gap-4",children:[u.jsx("div",{className:"w-16 h-16 bg-black rounded-xl overflow-hidden shrink-0 border border-white/10",children:u.jsx("img",{src:h.url,className:"w-full h-full object-cover"})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:h.name}),u.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(h.modified).toLocaleString()," | ",(h.size/1024).toFixed(1)," KB"]})]}),u.jsx("button",{onClick:()=>o(h.name),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"})]},h.name))})]}),hv=({cookies:s,originsCount:r,loading:f,onClear:o,onDelete:h})=>{const[p,m]=y.useState({}),[j,b]=y.useState({}),x=O=>`${O.name}|${O.domain||""}|${O.path||""}|${O.expires||""}`,N=O=>{if(!O)return!1;let Y=0;for(let V=0;V<O.length;V+=1){const J=O.charCodeAt(V);(J===9||J===10||J===13||J>=32&&J<=126)&&(Y+=1)}return Y/O.length>=.85},v=O=>{if(!O)return null;if(/%[0-9A-Fa-f]{2}/.test(O))try{const Y=decodeURIComponent(O);if(Y!==O&&N(Y))return{value:Y,kind:"URL"}}catch{}if(/^[A-Za-z0-9+/=]+$/.test(O)&&O.length>=12&&O.length%4===0)try{const Y=atob(O);if(Y&&N(Y))return{value:Y,kind:"Base64"}}catch{}return null},k=O=>{const Y=x(O);m(V=>({...V,[Y]:!V[Y]}))},D=O=>{const Y=x(O);b(V=>({...V,[Y]:!V[Y]}))};return u.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.jsx(dp,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Cookies"}),u.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Browser storage state"})]})]}),u.jsx("button",{onClick:o,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"})]}),f&&u.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading data..."}),!f&&s.length===0&&u.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No cookies found."}),u.jsx("div",{className:"space-y-3",children:s.map(O=>{const Y=x(O),V=!!p[Y],J=O.value||"",q=v(J),P=!!q&&!!j[Y],xe=P&&q?q.value:J,ye=V||xe.length<=120?xe:`${xe.slice(0,120)}...`;return u.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-4 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between gap-4",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:O.name}),u.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()}`:""]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[q&&u.jsx("button",{onClick:()=>D(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:P?"Show Raw":`Decode ${q.kind}`}),u.jsx("button",{onClick:()=>h(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"})]})]}),u.jsx("div",{onClick:()=>k(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:ye||"(empty)"})]},Y)})}),!f&&r>0&&u.jsxs("div",{className:"pt-2 text-[8px] text-gray-600 uppercase tracking-widest",children:["Origins stored: ",r]})]})},pv=({tab:s,onTabChange:r})=>u.jsxs("div",{className:"flex items-end justify-between mb-8",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-[10px] font-bold text-purple-500 uppercase tracking-[0.4em]",children:"System"}),u.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Settings"})]}),u.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["system","data","proxies"].map(f=>u.jsx("button",{onClick:()=>r(f),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${s===f?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:f},f))})]}),mv=({splitPercent:s,onChange:r,onReset:f})=>{const o=Number.isFinite(s)?Math.min(75,Math.max(25,s)):30;return u.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Layout"}),u.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default editor split"})]}),u.jsx("button",{onClick:f,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"})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[u.jsx("span",{children:"Editor"}),u.jsxs("span",{children:[o,"%"]})]}),u.jsx("input",{type:"range",min:25,max:75,step:5,value:o,onChange:h=>r(Math.min(75,Math.max(25,Number(h.target.value)))),className:"w-full accent-white"}),u.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[u.jsx("span",{children:"Preview"}),u.jsxs("span",{children:[100-o,"%"]})]})]})]})},xv=({proxies:s,defaultProxyId:r,includeDefaultInRotation:f,loading:o,onRefresh:h,onAdd:p,onImport:m,onUpdate:j,onDelete:b,onSetDefault:x,onToggleIncludeDefault:N})=>{const[v,k]=y.useState(""),[D,O]=y.useState(""),[Y,V]=y.useState(""),[J,q]=y.useState(""),[P,xe]=y.useState(null),[ye,me]=y.useState(""),[ue,ve]=y.useState(""),[Q,fe]=y.useState(""),[Ne,ce]=y.useState(""),[de,De]=y.useState(""),Fe=y.useRef(null),U=()=>{v.trim()&&(p({server:v.trim(),username:D.trim()||void 0,password:Y.trim()||void 0,label:J.trim()||void 0}),k(""),O(""),V(""),q(""))},$=R=>{xe(R.id),me(R.server),ve(R.username||""),fe(""),ce(R.label||"")},ie=()=>{xe(null),me(""),ve(""),fe(""),ce("")},Re=()=>{!P||!ye.trim()||(j(P,{server:ye.trim(),username:ue.trim()||void 0,password:Q.trim()||void 0,label:Ne.trim()||void 0}),ie())},Ce=R=>{const G=R.trim();if(!G)return null;if(G.includes("://"))return{server:G};const W=G.split(":");if(W.length<2)return null;const ae=W[0]?.trim(),pe=W[1]?.trim();if(!ae||!pe)return null;const X=W[2]?W[2].trim():"",re=W.length>3?W.slice(3).join(":").trim():"";return{server:`${ae}:${pe}`,username:X||void 0,password:re||void 0}},w=async R=>{const G=Array.from(R.target.files||[]);if(G.length)try{const pe=(await Promise.all(G.map(X=>X.text()))).join(`
19
- `).split(/\r?\n/).flatMap(X=>X.split(/[,;]+/)).map(Ce).filter(Boolean);if(pe.length===0){De("No valid proxies found in file.");return}De(""),m(pe)}catch{De("Failed to read file.")}finally{Fe.current&&(Fe.current.value="")}};return u.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[u.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.jsx(Sg,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Proxies"}),u.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Set defaults and rotate per task"})]}),u.jsx("div",{className:"ml-auto",children:u.jsxs("button",{onClick:h,disabled:o,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:[u.jsx(pp,{className:`w-3 h-3 ${o?"animate-spin":""}`}),"Refresh"]})})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsx("input",{type:"text",placeholder:"Proxy server (host:port or scheme://host:port)",value:v,onChange:R=>k(R.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),u.jsx("input",{type:"text",placeholder:"Label (optional)",value:J,onChange:R=>q(R.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),u.jsx("input",{type:"text",placeholder:"Username (optional)",value:D,onChange:R=>O(R.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),u.jsx("input",{type:"password",placeholder:"Password (optional)",value:Y,onChange:R=>V(R.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("button",{onClick:U,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"}),u.jsx("button",{onClick:()=>Fe.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"}),u.jsx("button",{onClick:()=>x("host"),className:`px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 transition-all ${r?"text-white hover:bg-white/5":"bg-white/10 text-white"}`,children:"Use Host IP"})]}),u.jsx("input",{ref:Fe,type:"file",accept:".txt,text/plain",onChange:w,className:"hidden"}),de&&u.jsx("div",{className:"text-[9px] text-red-400 uppercase tracking-widest",children:de}),u.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:[u.jsx("input",{type:"checkbox",checked:f,onChange:R=>N(R.target.checked),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),u.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include default IP in rotation pool"})]}),u.jsxs("div",{className:"space-y-3",children:[o&&u.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading proxies..."}),!o&&s.length===0&&u.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No proxies saved yet."}),!o&&s.map(R=>{const G=R.id===r,W=R.id===P;return u.jsx("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:W?u.jsxs("div",{className:"w-full space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[u.jsx("input",{type:"text",value:ye,onChange:ae=>me(ae.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),u.jsx("input",{type:"text",value:Ne,onChange:ae=>ce(ae.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),u.jsx("input",{type:"text",value:ue,onChange:ae=>ve(ae.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),u.jsx("input",{type:"password",value:Q,onChange:ae=>fe(ae.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"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:Re,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"}),u.jsx("button",{onClick:ie,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"})]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:R.label||R.server}),u.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:R.server})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("button",{onClick:()=>x(R.id),className:`px-3 py-2 rounded-xl border text-[9px] font-bold uppercase tracking-widest transition-all inline-flex items-center gap-2 ${G?"bg-white text-black border-white":"border-white/10 text-white hover:bg-white/5"}`,children:[G?u.jsx(_g,{className:"w-3 h-3"}):u.jsx(Ag,{className:"w-3 h-3"}),G?"Default":"Set Default"]}),R.id!=="host"&&u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>$(R),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"}),u.jsxs("button",{onClick:()=>b(R.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:[u.jsx(Ar,{className:"w-3 h-3"}),"Delete"]})]})]})]})},R.id)})]})]})},yv=({onClearStorage:s,onConfirm:r,onNotify:f})=>{const[o,h]=y.useState("system"),[p,m]=y.useState([]),[j,b]=y.useState([]),[x,N]=y.useState([]),[v,k]=y.useState(!1),[D,O]=y.useState(null),[Y,V]=y.useState(!1),[J,q]=y.useState(!1),[P,xe]=y.useState(30),[ye,me]=y.useState([]),[ue,ve]=y.useState(null),[Q,fe]=y.useState(!1),[Ne,ce]=y.useState(!1),de="doppelganger.layout.leftWidthPct";y.useEffect(()=>{try{const X=localStorage.getItem(de);if(X){const re=Math.min(75,Math.max(25,Math.round(parseFloat(X)*100)));Number.isNaN(re)||xe(re)}}catch{}},[]);const De=async()=>{k(!0);try{const[X,re]=await Promise.all([fetch("/api/data/screenshots"),fetch("/api/data/cookies")]),ne=X.ok?await X.json():{screenshots:[]},ge=re.ok?await re.json():{cookies:[],origins:[]};m(Array.isArray(ne.screenshots)?ne.screenshots:[]),b(Array.isArray(ge.cookies)?ge.cookies:[]),N(Array.isArray(ge.origins)?ge.origins:[])}catch{m([]),b([]),N([])}finally{k(!1)}},Fe=async X=>{if(!await r(`Delete screenshot ${X}?`))return;(await fetch(`/api/data/screenshots/${encodeURIComponent(X)}`,{method:"DELETE"})).ok?(f("Screenshot deleted.","success"),De()):f("Delete failed.","error")},U=async X=>{if(!await r(`Delete cookie ${X.name}?`))return;(await fetch("/api/data/cookies/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:X.name,domain:X.domain,path:X.path})})).ok?(f("Cookie deleted.","success"),De()):f("Delete failed.","error")},$=async()=>{V(!0);try{const X=await fetch("/api/settings/api-key",{credentials:"include"});if(!X.ok){X.status===401&&f("Session expired. Please log in again.","error"),O(null);return}const re=await X.json();O(re.apiKey||null)}catch{O(null)}finally{V(!1)}},ie=async()=>{ce(!0);try{const X=await fetch("/api/settings/proxies",{credentials:"include"});if(!X.ok){X.status===401&&f("Session expired. Please log in again.","error"),me([]),ve(null);return}const re=await X.json();me(Array.isArray(re.proxies)?re.proxies:[]),ve(re.defaultProxyId||null),fe(!!re.includeDefaultInRotation)}catch{me([]),ve(null),fe(!1)}finally{ce(!1)}},Re=async X=>{ce(!0);try{const re=await fetch("/api/settings/proxies",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(X)});if(!re.ok){let ge="";try{const ut=await re.json();ge=ut?.error||ut?.message||""}catch{ge=""}f(`Failed to add proxy${ge?`: ${ge}`:""}.`,"error");return}const ne=await re.json();me(Array.isArray(ne.proxies)?ne.proxies:[]),ve(ne.defaultProxyId||null),fe(!!ne.includeDefaultInRotation),f("Proxy added.","success")}catch{f("Failed to add proxy.","error")}finally{ce(!1)}},Ce=async X=>{if(!X.length){f("No valid proxies found in file.","error");return}ce(!0);try{const re=await fetch("/api/settings/proxies/import",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({proxies:X})});if(!re.ok){let ge="";try{const ut=await re.json();ge=ut?.error||ut?.message||""}catch{ge=""}f(`Failed to import proxies${ge?`: ${ge}`:""}.`,"error");return}const ne=await re.json();me(Array.isArray(ne.proxies)?ne.proxies:[]),ve(ne.defaultProxyId||null),fe(!!ne.includeDefaultInRotation),f("Proxies imported.","success")}catch{f("Failed to import proxies.","error")}finally{ce(!1)}},w=async(X,re)=>{ce(!0);try{const ne=await fetch(`/api/settings/proxies/${encodeURIComponent(X)}`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(re)});if(!ne.ok){let ut="";try{const il=await ne.json();ut=il?.error||il?.message||""}catch{ut=""}f(`Failed to update proxy${ut?`: ${ut}`:""}.`,"error");return}const ge=await ne.json();me(Array.isArray(ge.proxies)?ge.proxies:[]),ve(ge.defaultProxyId||null),fe(!!ge.includeDefaultInRotation),f("Proxy updated.","success")}catch{f("Failed to update proxy.","error")}finally{ce(!1)}},R=async X=>{if(!(X==="host"||!await r("Delete this proxy?"))){ce(!0);try{const ne=await fetch(`/api/settings/proxies/${encodeURIComponent(X)}`,{method:"DELETE",credentials:"include"});if(!ne.ok){f("Delete failed.","error");return}const ge=await ne.json();me(Array.isArray(ge.proxies)?ge.proxies:[]),ve(ge.defaultProxyId||null),fe(!!ge.includeDefaultInRotation),f("Proxy deleted.","success")}catch{f("Delete failed.","error")}finally{ce(!1)}}},G=async X=>{const re=X==="host"?null:X;ce(!0);try{const ne=await fetch("/api/settings/proxies/default",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({id:re})});if(!ne.ok){f("Failed to set default.","error");return}const ge=await ne.json();me(Array.isArray(ge.proxies)?ge.proxies:[]),ve(ge.defaultProxyId||null),fe(!!ge.includeDefaultInRotation),f("Default proxy updated.","success")}catch{f("Failed to set default.","error")}finally{ce(!1)}},W=async X=>{ce(!0);try{const re=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({includeDefaultInRotation:X})});if(!re.ok){f("Failed to update rotation setting.","error");return}const ne=await re.json();me(Array.isArray(ne.proxies)?ne.proxies:[]),ve(ne.defaultProxyId||null),fe(!!ne.includeDefaultInRotation),f("Rotation setting updated.","success")}catch{f("Failed to update rotation setting.","error")}finally{ce(!1)}},ae=async()=>{q(!0);try{const X=await fetch("/api/settings/api-key",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"});if(!X.ok){let ne="";try{const ge=await X.json();ne=ge?.error||ge?.message||""}catch{ne=""}X.status===401?f("Session expired. Please log in again.","error"):f(`Failed to generate API key${ne?`: ${ne}`:""}.`,"error");return}const re=await X.json();O(re.apiKey||null),f("API key generated.","success")}catch{f("Failed to generate API key.","error")}finally{q(!1)}},pe=async()=>{if(D)try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(D);else{const X=document.createElement("textarea");X.value=D,X.style.position="fixed",X.style.opacity="0",document.body.appendChild(X),X.select();const re=document.execCommand("copy");if(document.body.removeChild(X),!re)throw new Error("Copy failed")}f("API key copied.","success")}catch{f("Copy failed.","error")}};return y.useEffect(()=>{o==="data"&&De(),o==="system"&&$(),o==="proxies"&&ie()},[o]),y.useEffect(()=>{try{localStorage.setItem(de,String(P/100))}catch{}},[P]),u.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:u.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[u.jsx(pv,{tab:o,onTabChange:h}),o==="system"&&u.jsxs(u.Fragment,{children:[u.jsx(ov,{apiKey:D,loading:Y,saving:J,onRegenerate:ae,onCopy:pe}),u.jsx(mv,{splitPercent:P,onChange:xe,onReset:()=>xe(30)}),u.jsx(fv,{onClearStorage:s})]}),o==="data"&&u.jsxs(u.Fragment,{children:[u.jsx(dv,{screenshots:p,loading:v,onRefresh:De,onDelete:Fe}),u.jsx(hv,{cookies:j,originsCount:x.length,loading:v,onClear:()=>s("cookies"),onDelete:U})]}),o==="proxies"&&u.jsx(xv,{proxies:ye,defaultProxyId:ue,includeDefaultInRotation:Q,loading:Ne,onRefresh:ie,onAdd:Re,onImport:Ce,onUpdate:w,onDelete:R,onSetDefault:G,onToggleIncludeDefault:W})]})})},br=({title:s="Loading",subtitle:r})=>u.jsxs("div",{className:"fixed inset-0 z-[80] bg-[#020202] flex items-center justify-center",children:[u.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),u.jsxs("div",{className:"glass-card p-10 rounded-[40px] text-center space-y-4",children:[u.jsx("div",{className:"w-12 h-12 mx-auto rounded-full border border-white/10 flex items-center justify-center",children:u.jsx("div",{className:"w-5 h-5 border-2 border-white/20 border-t-white rounded-full animate-spin"})}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:s}),r&&u.jsx("p",{className:"text-xs font-mono text-white/80",children:r})]})]})]}),gv=({onConfirm:s,onNotify:r})=>{const f=Ti(),[o,h]=y.useState([]),[p,m]=y.useState("all"),[j,b]=y.useState(!1),x=async()=>{b(!0);try{const D=await fetch("/api/executions");if(!D.ok)throw new Error("Failed to load");const O=await D.json();h(Array.isArray(O.executions)?O.executions:[])}catch{h([])}finally{b(!1)}},N=async()=>{if(!await s("Clear all executions?"))return;(await fetch("/api/executions/clear",{method:"POST"})).ok?(r("Executions cleared.","success"),x()):r("Clear failed.","error")},v=async D=>{if(!await s("Delete this execution?"))return;(await fetch(`/api/executions/${D}`,{method:"DELETE"})).ok?(r("Execution deleted.","success"),h(V=>V.filter(J=>J.id!==D))):r("Delete failed.","error")};y.useEffect(()=>{x()},[]);const k=o.filter(D=>p==="all"?!0:D.source===p);return u.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:u.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[u.jsxs("div",{className:"flex items-end justify-between",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Executions"}),u.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Run History"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["all","editor","api"].map(D=>u.jsx("button",{onClick:()=>m(D),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${p===D?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:D},D))}),u.jsx("button",{onClick:x,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:u.jsx(pp,{className:"w-4 h-4"})}),u.jsx("button",{onClick:N,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:u.jsx(Ar,{className:"w-4 h-4"})})]})]}),j&&u.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading executions..."}),!j&&k.length===0&&u.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No executions found."}),u.jsx("div",{className:"space-y-3",children:k.map(D=>u.jsxs("div",{onClick:()=>f(`/executions/${D.id}`),onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),f(`/executions/${D.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:[u.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:D.source==="api"?u.jsx(My,{className:"w-5 h-5"}):u.jsx(ug,{className:"w-5 h-5"})}),u.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[u.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:D.taskName||D.mode}),u.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(D.timestamp).toLocaleString()," | ",D.source," | ",D.mode," | ",D.status," | ",D.durationMs,"ms"]}),D.url&&u.jsx("div",{className:"text-[9px] text-white/50 truncate font-mono",children:D.url})]}),u.jsx("button",{onClick:O=>{O.stopPropagation(),v(D.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"})]},D.id))})]})})},vv=s=>{if(!s.result)return null;const r=s.result||{};return{url:s.url||r.url||"",finalUrl:r.final_url||r.finalUrl,html:r.html,data:r.data??r.html??"",screenshotUrl:r.screenshot_url||r.screenshotUrl,logs:r.logs||[],timestamp:new Date(s.timestamp).toLocaleTimeString()}},bv=({onConfirm:s,onNotify:r})=>{const{id:f}=lp(),o=Ti(),[h,p]=y.useState(null),[m,j]=y.useState(!1);if(y.useEffect(()=>{(async()=>{if(f){j(!0);try{const N=await fetch(`/api/executions/${f}`);if(!N.ok)throw new Error("Failed to load execution");const v=await N.json();p(v.execution||null)}catch{p(null)}finally{j(!1)}}})()},[f]),m)return u.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:u.jsx("div",{className:"max-w-6xl mx-auto text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading execution..."})});if(!h)return u.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:u.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[u.jsx("button",{onClick:()=>o("/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"}),u.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Execution not found."})]})});const b=vv(h);return u.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:u.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[u.jsxs("div",{className:"flex items-end justify-between",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Execution"}),u.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:h.taskName||h.mode}),u.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(h.timestamp).toLocaleString()," | ",h.source," | ",h.mode," | ",h.status," | ",h.durationMs,"ms"]})]}),u.jsx("button",{onClick:()=>o("/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"})]}),u.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col min-h-[420px]",children:[u.jsx("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:u.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"})}),b?u.jsx(yp,{results:b,isExecuting:!1,onConfirm:s,onNotify:r,fullWidth:!0}):u.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"No output captured."})]})]})})},vp=({title:s="Not Found",subtitle:r="The page you requested does not exist.",onBack:f})=>u.jsx("div",{className:"h-full flex items-center justify-center px-10",children:u.jsxs("div",{className:"glass-card w-full max-w-2xl rounded-[40px] border border-white/10 p-10 text-center space-y-6",children:[u.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"404"}),u.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:s}),u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.25em] text-gray-500",children:r}),f&&u.jsxs("button",{onClick:f,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:[u.jsx(fg,{className:"w-4 h-4"}),"Back"]})]})}),wv=({message:s,tone:r,onClose:f})=>{const[o,h]=y.useState(!1);return y.useEffect(()=>{const p=setTimeout(()=>{h(!0)},2500);return()=>clearTimeout(p)},[]),y.useEffect(()=>{if(!o)return;const p=setTimeout(()=>f(),240);return()=>clearTimeout(p)},[o,f]),u.jsx("div",{className:`fixed bottom-6 right-6 z-[220] max-w-sm w-full ${o?"animate-out fade-out slide-out-to-bottom-3 duration-200":"animate-in fade-in slide-in-from-bottom-3 duration-300"}`,children:u.jsxs("div",{className:`glass-card rounded-2xl border border-white/10 p-4 shadow-2xl flex items-start gap-3 ${o?"animate-out fade-out zoom-out-95 duration-200":"animate-in fade-in zoom-in-95 duration-300"}`,children:[u.jsx("div",{className:`mt-1 h-2.5 w-2.5 rounded-full ${r==="error"?"bg-red-400":"bg-emerald-400"}`}),u.jsxs("div",{className:"flex-1",children:[u.jsx("p",{className:"text-[8px] font-bold uppercase tracking-[0.35em] text-gray-500",children:"Notification"}),u.jsx("p",{className:"mt-2 font-mono text-[11px] text-white leading-relaxed",children:s})]}),u.jsx("button",{onClick:()=>h(!0),className:"px-2 py-1 text-[8px] font-bold uppercase tracking-[0.2em] text-white/60 hover:text-white",children:"Close"})]})})},Sv=({request:s,onResolve:r})=>u.jsx("div",{className:"fixed inset-0 z-[201] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:u.jsxs("div",{className:"glass-card w-full max-w-md rounded-[32px] border border-white/10 p-8 text-center shadow-2xl",children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:s.title??"Confirm"}),u.jsx("p",{className:"mt-4 font-mono text-sm text-white",children:s.message}),u.jsxs("div",{className:"mt-6 flex gap-4",children:[u.jsx("button",{onClick:()=>r(!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"}),u.jsx("button",{onClick:()=>r(!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"})]})]})}),jv=({tasks:s,loadTasks:r,touchTask:f,currentTask:o,setCurrentTask:h,...p})=>{const{id:m}=lp(),j=Ti(),[b,x]=y.useState(!1),[N,v]=y.useState(!1);return y.useEffect(()=>{(async()=>{if(o?.id===m)return;x(!0),v(!1);let D=s;s.length===0&&(D=await r());const O=D.find(Y=>String(Y.id)===String(m));if(O){const Y={...O};(!Y.variables||Array.isArray(Y.variables))&&(Y.variables={}),Y.stealth||(Y.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),Array.isArray(Y.actions)&&(Y.actions=Y.actions.map((V,J)=>V&&V.id?V:{...V,id:`act_${Date.now()}_${J}_${Math.floor(Math.random()*1e3)}`})),Y.includeShadowDom===void 0&&(Y.includeShadowDom=!0),h(Y),m&&f(m)}else v(!0);x(!1)})()},[m,s]),N?u.jsx(vp,{title:"Task Not Found",subtitle:"This task does not exist or was deleted.",onBack:()=>j("/dashboard")}):b||!o||String(o.id)!==String(m)?u.jsx(br,{title:"Loading Mission Data",subtitle:"Syncing task payload"}):u.jsx(gp,{currentTask:o,setCurrentTask:h,tasks:s,...p})};function Nv(){const s=Ti(),r=ga(),[,f]=y.useState(null),[o,h]=y.useState("checking"),[p,m]=y.useState(""),[j,b]=y.useState([]),[x,N]=y.useState(null),[v,k]=y.useState("visual"),[D,O]=y.useState(!1),[Y,V]=y.useState(null),[J,q]=y.useState({}),[P,xe]=y.useState(""),[ye,me]=y.useState(null),[ue,ve]=y.useState(null),[Q,fe]=y.useState(null),Ne=y.useRef(null),ce=y.useRef(null),de=(K,ee="success")=>{ve({message:K,tone:ee}),ee==="success"&&setTimeout(()=>{ve(le=>le&&le.message===K?null:le)},2e3)},De=K=>new Promise(ee=>{Ne.current=ee,fe(typeof K=="string"?{message:K}:K)}),Fe=K=>{const ee=Ne.current;Ne.current=null,fe(null),ee&&ee(K)},U=K=>K&&K[0].toUpperCase()+K.slice(1),$=K=>{if(!K.actions||!Array.isArray(K.actions))return K;let ee=!1;const le=K.actions.map((I,Ke)=>I.id?I:(ee=!0,{...I,id:`act_${Date.now()}_${Ke}_${Math.floor(Math.random()*1e3)}`}));return ee?{...K,actions:le}:K},ie="doppelganger.pinnedResults",Ce=(K=>K?.id?String(K.id):"new")(x),w=x&&J[Ce]||null,R=(K,ee)=>{const le=String(K||"").trim();if(!le)return"Execution failed.";const I=le.toLowerCase();if(ee==="headful"){if(I.includes("missing x server")||I.includes("$display"))return"Headful browser could not start because no display server is available.";if(I.includes("failed to connect to the bus"))return"Headful browser could not start due to missing system services."}let Ke=le;const Ie=Ke.indexOf("--disable-");return Ie>0&&(Ke=Ke.slice(0,Ie).trim()),Ke.length>240&&(Ke=`${Ke.slice(0,240)}...`),Ke||"Execution failed."},G=K=>{const ee=String(K||"").toLowerCase();return ee.includes("missing x server")||ee.includes("$display")||ee.includes("platform failed to initialize")||ee.includes("no display server")},W=()=>({name:"Imported Task",url:"",mode:"scrape",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},includeShadowDom:!0});y.useEffect(()=>{ae()},[]),y.useEffect(()=>{try{const K=localStorage.getItem(ie);if(K){const ee=JSON.parse(K);ee&&typeof ee=="object"&&q(ee)}}catch{}},[]),y.useEffect(()=>{try{localStorage.setItem(ie,JSON.stringify(J))}catch{}},[J]),y.useEffect(()=>{!r.pathname.startsWith("/tasks")&&v==="history"&&k("visual")},[r.pathname,v]),y.useEffect(()=>{if(r.pathname==="/tasks/new"&&!x){const K=ne();N(K),V(null)}},[r.pathname,x]);const ae=async()=>{try{const ee=await(await fetch("/api/auth/me")).json();if(ee.authenticated)f(ee.user),h("authenticated"),X();else{const I=await(await fetch("/api/auth/check-setup")).json();h(I.setupRequired?"setup":"login")}}catch{h("login")}},pe=async(K,ee,le,I)=>{if(!K||!ee)return;if(o==="setup"&&(!le||ee!==I)){m(le?"Passwords do not match":"Name required");return}const Ke=o==="setup"?"/api/auth/setup":"/api/auth/login",Ie=o==="setup"?{name:le,email:K,password:ee}:{email:K,password:ee};try{(await fetch(Ke,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ie)})).ok?(m(""),await ae(),s("/")):m(o==="setup"?"Setup failed":"Invalid credentials")}catch{m("Network error")}},X=async()=>{try{const le=[...await(await fetch("/api/tasks")).json()].sort((I,Ke)=>(Ke.last_opened||0)-(I.last_opened||0));return b(le),le}catch(K){return console.error("Failed to load tasks",K),[]}},re=async()=>{await De("Are you sure you want to log out?")&&(await fetch("/api/auth/logout",{method:"POST"}),f(null),h("login"),s("/"),de("Logged out.","success"))};function ne(){return{name:"Task "+Math.floor(Math.random()*100),url:"",mode:"agent",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},extractionFormat:"json",includeShadowDom:!0}}const ge=()=>{const K=ne();N(K),V(null),s("/tasks/new")},ut=K=>{x&&q(ee=>({...ee,[Ce]:K}))},il=()=>{x&&q(K=>{const ee={...K};return delete ee[Ce],ee})},Vl=async K=>{try{await fetch(`/api/tasks/${K}/touch`,{method:"POST"}),X()}catch(ee){console.error("Failed to touch task",ee)}},zt=K=>{const ee={...K};(!ee.variables||Array.isArray(ee.variables))&&(ee.variables={}),ee.stealth||(ee.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),ee.rotateProxies===void 0&&(ee.rotateProxies=!1),ee.extractionFormat||(ee.extractionFormat="json"),ee.includeShadowDom===void 0&&(ee.includeShadowDom=!0);const le=$(ee);N(le),V(null),s(`/tasks/${K.id}`),K.id&&Vl(K.id)},Gl=async K=>{await De("Are you sure you want to delete this task?")&&(await fetch(`/api/tasks/${K}`,{method:"DELETE"}),X(),r.pathname.includes(K)&&s("/dashboard"))},gl=async()=>{if(!x)return;const K={...x,last_opened:Date.now()},le=await(await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K)})).json();N(le),xe("SAVED"),setTimeout(()=>xe(""),2e3),X(),r.pathname.includes("new")&&s(`/tasks/${le.id}`,{replace:!0})},Xl=async()=>{try{await fetch("/headful/stop",{method:"POST"})}catch(K){console.error("Failed to stop headful session",K)}finally{O(!1)}},Ql=async()=>{if(x?.mode==="headful"){await Xl();return}if(ye)try{await fetch("/api/executions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:ye})})}catch(K){console.error("Failed to request stop",K)}ce.current&&ce.current.abort(),O(!1)},Rt=async K=>{const ee=K||x;if(!ee||!ee.url)return;const le=$(ee);x&&le!==x&&N(le);const I=`run_${Date.now()}_${Math.floor(Math.random()*1e3)}`;if(me(I),D&&le.mode==="headful"){await Xl();return}O(!0),V({url:le.url,logs:[],timestamp:"Running..."});let Ke=null;try{const Ie={};Object.entries(le.variables).forEach(([yt,Zt])=>{Ie[yt]=Zt.value});const Pe=yt=>yt.replace(/\{\$(\w+)\}/g,(Zt,Et)=>{if(Et==="now")return new Date().toISOString();const bt=Ie[Et];return bt==null||bt===""?"":String(bt)}),Me=yt=>typeof yt!="string"?yt:Pe(yt),dt=le.mode!=="agent";Ke={...{...le,url:dt?Pe(le.url||""):le.url||"",selector:dt?Me(le.selector):le.selector,actions:dt?le.actions.map(yt=>({...yt,selector:Me(yt.selector),value:Me(yt.value),key:Me(yt.key)})):le.actions},taskVariables:Ie,variables:Ie,runSource:"editor",taskId:le.id,taskName:le.name,taskSnapshot:le,runId:I};const Mt=await(async yt=>{const Zt=new AbortController;ce.current=Zt;const Et=await fetch(`/${yt}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ke),signal:Zt.signal});if(!Et.ok){let bt=null;try{bt=await Et.json()}catch{bt=null}const Kt=new Error(bt?.details||bt?.error||"Request failed");throw Kt.code=bt?.error,Kt}return Et.json()})(le.mode);V({url:le.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(Ie){if(Ie?.name==="AbortError"){de("Execution stopped.","success"),O(!1);return}if(le?.mode==="headful"&&Ke&&(Ie?.code==="HEADFUL_DISPLAY_UNAVAILABLE"||G(Ie?.message||String(Ie))))try{const Me=await(async()=>{const dt=new AbortController;ce.current=dt;const lt=await fetch("/scrape",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ke),signal:dt.signal});if(!lt.ok){const ba=await lt.json();throw new Error(ba.details||ba.error||"Request failed")}return lt.json()})();Me.logs=["Headful display unavailable; ran headless instead.",...Me.logs||[]],V({url:le.url,finalUrl:Me.final_url,html:Me.html,data:Me.data??Me.html??"No data captured.",screenshotUrl:Me.screenshot_url,logs:Me.logs||[],timestamp:new Date().toLocaleTimeString()}),O(!1);return}catch(Me){const dt=R(Me?.message||String(Me),le?.mode);de(`Execution crash: ${dt}`,"error"),O(!1);return}const Pe=R(Ie?.message||String(Ie),le?.mode);de(`Execution crash: ${Pe}`,"error"),le?.mode==="headful"&&O(!1)}finally{ce.current=null,le.mode!=="headful"&&O(!1)}},vl=async()=>{await Rt()},va=async K=>{if(!await De(`Delete all ${K}?`))return;await fetch(K==="screenshots"?"/api/clear-screenshots":"/api/clear-cookies",{method:"POST"}),de(`${U(K)} cleared.`,"success")},Zl=()=>{const K={exportedAt:new Date().toISOString(),tasks:j},ee=new Blob([JSON.stringify(K,null,2)],{type:"application/json"}),le=URL.createObjectURL(ee),I=document.createElement("a"),Ke=new Date().toISOString().slice(0,10);I.href=le,I.download=`doppelganger-tasks-${Ke}.json`,document.body.appendChild(I),I.click(),I.remove(),URL.revokeObjectURL(le),de("Tasks exported.","success")},Tn=(K,ee)=>{if(!K||typeof K!="object")return null;const le=W(),I={...le,...K};return(!I.name||typeof I.name!="string")&&(I.name=`Imported Task ${ee+1}`),(!I.mode||!["scrape","agent","headful"].includes(I.mode))&&(I.mode="scrape"),typeof I.wait!="number"&&(I.wait=3),I.stealth||(I.stealth=le.stealth),(!I.variables||Array.isArray(I.variables))&&(I.variables={}),Array.isArray(I.actions)||(I.actions=[]),I.rotateProxies===void 0&&(I.rotateProxies=!1),delete I.versions,delete I.last_opened,I},xt=async K=>{try{const ee=await K.text(),le=JSON.parse(ee),I=Array.isArray(le)?le:le?.tasks;if(!Array.isArray(I)){de("Invalid import file.","error");return}const Ke=Date.now(),Ie=I.map((Pe,Me)=>Tn(Pe,Me)).filter(Pe=>!!Pe).map(Pe=>Pe.id?Pe:{...Pe,id:`task_${Ke}`});if(Ie.length===0){de("No tasks to import.","error");return}await Promise.all(Ie.map(Pe=>fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)}))),await X(),de(`Imported ${Ie.length} task(s).`,"success")}catch(ee){de(`Import failed: ${ee.message||"Unknown error"}`,"error")}},Kl=()=>r.pathname.startsWith("/tasks")?"editor":r.pathname==="/settings"?"settings":r.pathname==="/executions"?"executions":"dashboard";let bl;return o==="login"||o==="setup"?bl=u.jsx(Kg,{status:o,onSubmit:pe,error:p}):o==="checking"?bl=u.jsx(br,{title:"Authenticating",subtitle:"Verifying session state"}):bl=u.jsxs("div",{className:"h-full flex flex-row overflow-hidden bg-[#020202]",children:[u.jsx(Zg,{onNavigate:K=>{K==="dashboard"?s("/dashboard"):K==="settings"?s("/settings"):K==="executions"&&s("/executions")},onNewTask:ge,onLogout:re,currentScreen:Kl()}),u.jsxs(Bx,{children:[u.jsx(Bl,{path:"/",element:u.jsx(Bh,{tasks:j,onNewTask:ge,onEditTask:zt,onDeleteTask:Gl,onExportTasks:Zl,onImportTasks:xt})}),u.jsx(Bl,{path:"/dashboard",element:u.jsx(Bh,{tasks:j,onNewTask:ge,onEditTask:zt,onDeleteTask:Gl,onExportTasks:Zl,onImportTasks:xt})}),u.jsx(Bl,{path:"/tasks/new",element:x?u.jsx(gp,{currentTask:x,setCurrentTask:N,tasks:j,editorView:v,setEditorView:k,isExecuting:D,onSave:gl,onRun:vl,onRunSnapshot:Rt,results:Y,pinnedResults:w,saveMsg:P,onConfirm:De,onNotify:de,onPinResults:ut,onUnpinResults:il,runId:ye,onStop:Ql}):u.jsx(br,{title:"Initializing",subtitle:"Preparing task workspace"})}),u.jsx(Bl,{path:"/tasks/:id",element:u.jsx(jv,{tasks:j,loadTasks:X,touchTask:Vl,currentTask:x,setCurrentTask:N,editorView:v,setEditorView:k,isExecuting:D,onSave:gl,onRun:vl,onRunSnapshot:Rt,results:Y,pinnedResults:w,saveMsg:P,onConfirm:De,onNotify:de,onPinResults:ut,onUnpinResults:il,runId:ye,onStop:Ql})}),u.jsx(Bl,{path:"/settings",element:u.jsx(yv,{onClearStorage:va,onConfirm:De,onNotify:de})}),u.jsx(Bl,{path:"/executions",element:u.jsx(gv,{onConfirm:De,onNotify:de})}),u.jsx(Bl,{path:"/executions/:id",element:u.jsx(bv,{onConfirm:De,onNotify:de})}),u.jsx(Bl,{path:"*",element:u.jsx(vp,{onBack:()=>s("/dashboard")})})]})]}),u.jsxs("div",{className:"h-full",children:[ue&&u.jsx(wv,{message:ue.message,tone:ue.tone,onClose:()=>ve(null)}),Q&&u.jsx(Sv,{request:Q,onResolve:Fe}),bl]})}V0.createRoot(document.getElementById("root")).render(u.jsx(D0.StrictMode,{children:u.jsx(ry,{children:u.jsx(Nv,{})})}));