@doppelgangerdev/doppelganger 0.7.0 → 0.7.3
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.
- package/README.md +24 -12
- package/dist/assets/index-B2jzrEJv.js +20 -0
- package/dist/assets/{index-Czr1v-Mh.css → index-B_oudlXg.css} +1 -1
- package/dist/index.html +2 -2
- package/package.json +2 -1
- package/proxy-rotation.js +10 -0
- package/server.js +79 -2
- package/dist/assets/index-kRgisfoW.js +0 -20
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&u(h)}).observe(document,{childList:!0,subtree:!0});function o(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(f){if(f.ep)return;f.ep=!0;const d=o(f);fetch(f.href,d)}})();var Ur=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ou(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var fu={exports:{}},mi={};var Dh;function P0(){if(Dh)return mi;Dh=1;var l=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function o(u,f,d){var h=null;if(d!==void 0&&(h=""+d),f.key!==void 0&&(h=""+f.key),"key"in f){d={};for(var m in f)m!=="key"&&(d[m]=f[m])}else d=f;return f=d.ref,{$$typeof:l,type:u,key:h,ref:f!==void 0?f:null,props:d}}return mi.Fragment=c,mi.jsx=o,mi.jsxs=o,mi}var Mh;function ex(){return Mh||(Mh=1,fu.exports=P0()),fu.exports}var s=ex(),hu={exports:{}},De={};var Uh;function tx(){if(Uh)return De;Uh=1;var l=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),T=Symbol.iterator;function N(A){return A===null||typeof A!="object"?null:(A=T&&A[T]||A["@@iterator"],typeof A=="function"?A:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,y={};function w(A,D,te){this.props=A,this.context=D,this.refs=y,this.updater=te||S}w.prototype.isReactComponent={},w.prototype.setState=function(A,D){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,D,"setState")},w.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function k(){}k.prototype=w.prototype;function j(A,D,te){this.props=A,this.context=D,this.refs=y,this.updater=te||S}var M=j.prototype=new k;M.constructor=j,p(M,w.prototype),M.isPureReactComponent=!0;var U=Array.isArray;function V(){}var Y={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function G(A,D,te){var F=te.ref;return{$$typeof:l,type:A,key:D,ref:F!==void 0?F:null,props:te}}function le(A,D){return G(A.type,D,A.props)}function de(A){return typeof A=="object"&&A!==null&&A.$$typeof===l}function L(A){var D={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(te){return D[te]})}var se=/\/+/g;function E(A,D){return typeof A=="object"&&A!==null&&A.key!=null?L(""+A.key):D.toString(36)}function ce(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(V,V):(A.status="pending",A.then(function(D){A.status==="pending"&&(A.status="fulfilled",A.value=D)},function(D){A.status==="pending"&&(A.status="rejected",A.reason=D)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function $(A,D,te,F,re){var _e=typeof A;(_e==="undefined"||_e==="boolean")&&(A=null);var Ne=!1;if(A===null)Ne=!0;else switch(_e){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(A.$$typeof){case l:case c:Ne=!0;break;case C:return Ne=A._init,$(Ne(A._payload),D,te,F,re)}}if(Ne)return re=re(A),Ne=F===""?"."+E(A,0):F,U(re)?(te="",Ne!=null&&(te=Ne.replace(se,"$&/")+"/"),$(re,D,te,"",function(Qe){return Qe})):re!=null&&(de(re)&&(re=le(re,te+(re.key==null||A&&A.key===re.key?"":(""+re.key).replace(se,"$&/")+"/")+Ne)),D.push(re)),1;Ne=0;var ke=F===""?".":F+":";if(U(A))for(var Ee=0;Ee<A.length;Ee++)F=A[Ee],_e=ke+E(F,Ee),Ne+=$(F,D,te,_e,re);else if(Ee=N(A),typeof Ee=="function")for(A=Ee.call(A),Ee=0;!(F=A.next()).done;)F=F.value,_e=ke+E(F,Ee++),Ne+=$(F,D,te,_e,re);else if(_e==="object"){if(typeof A.then=="function")return $(ce(A),D,te,F,re);throw D=String(A),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function K(A,D,te){if(A==null)return A;var F=[],re=0;return $(A,F,"","",function(_e){return D.call(te,_e,re++)}),F}function be(A){if(A._status===-1){var D=A._result;D=D(),D.then(function(te){(A._status===0||A._status===-1)&&(A._status=1,A._result=te)},function(te){(A._status===0||A._status===-1)&&(A._status=2,A._result=te)}),A._status===-1&&(A._status=0,A._result=D)}if(A._status===1)return A._result.default;throw A._result}var J=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},me={map:K,forEach:function(A,D,te){K(A,function(){D.apply(this,arguments)},te)},count:function(A){var D=0;return K(A,function(){D++}),D},toArray:function(A){return K(A,function(D){return D})||[]},only:function(A){if(!de(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return De.Activity=_,De.Children=me,De.Component=w,De.Fragment=o,De.Profiler=f,De.PureComponent=j,De.StrictMode=u,De.Suspense=x,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,De.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Y.H.useMemoCache(A)}},De.cache=function(A){return function(){return A.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(A,D,te){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var F=p({},A.props),re=A.key;if(D!=null)for(_e in D.key!==void 0&&(re=""+D.key),D)!Q.call(D,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&D.ref===void 0||(F[_e]=D[_e]);var _e=arguments.length-2;if(_e===1)F.children=te;else if(1<_e){for(var Ne=Array(_e),ke=0;ke<_e;ke++)Ne[ke]=arguments[ke+2];F.children=Ne}return G(A.type,re,F)},De.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},De.createElement=function(A,D,te){var F,re={},_e=null;if(D!=null)for(F in D.key!==void 0&&(_e=""+D.key),D)Q.call(D,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(re[F]=D[F]);var Ne=arguments.length-2;if(Ne===1)re.children=te;else if(1<Ne){for(var ke=Array(Ne),Ee=0;Ee<Ne;Ee++)ke[Ee]=arguments[Ee+2];re.children=ke}if(A&&A.defaultProps)for(F in Ne=A.defaultProps,Ne)re[F]===void 0&&(re[F]=Ne[F]);return G(A,_e,re)},De.createRef=function(){return{current:null}},De.forwardRef=function(A){return{$$typeof:m,render:A}},De.isValidElement=de,De.lazy=function(A){return{$$typeof:C,_payload:{_status:-1,_result:A},_init:be}},De.memo=function(A,D){return{$$typeof:b,type:A,compare:D===void 0?null:D}},De.startTransition=function(A){var D=Y.T,te={};Y.T=te;try{var F=A(),re=Y.S;re!==null&&re(te,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(V,J)}catch(_e){J(_e)}finally{D!==null&&te.types!==null&&(D.types=te.types),Y.T=D}},De.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},De.use=function(A){return Y.H.use(A)},De.useActionState=function(A,D,te){return Y.H.useActionState(A,D,te)},De.useCallback=function(A,D){return Y.H.useCallback(A,D)},De.useContext=function(A){return Y.H.useContext(A)},De.useDebugValue=function(){},De.useDeferredValue=function(A,D){return Y.H.useDeferredValue(A,D)},De.useEffect=function(A,D){return Y.H.useEffect(A,D)},De.useEffectEvent=function(A){return Y.H.useEffectEvent(A)},De.useId=function(){return Y.H.useId()},De.useImperativeHandle=function(A,D,te){return Y.H.useImperativeHandle(A,D,te)},De.useInsertionEffect=function(A,D){return Y.H.useInsertionEffect(A,D)},De.useLayoutEffect=function(A,D){return Y.H.useLayoutEffect(A,D)},De.useMemo=function(A,D){return Y.H.useMemo(A,D)},De.useOptimistic=function(A,D){return Y.H.useOptimistic(A,D)},De.useReducer=function(A,D,te){return Y.H.useReducer(A,D,te)},De.useRef=function(A){return Y.H.useRef(A)},De.useState=function(A){return Y.H.useState(A)},De.useSyncExternalStore=function(A,D,te){return Y.H.useSyncExternalStore(A,D,te)},De.useTransition=function(){return Y.H.useTransition()},De.version="19.2.3",De}var Bh;function Du(){return Bh||(Bh=1,hu.exports=tx()),hu.exports}var O=Du();const Jr=Ou(O);var pu={exports:{}},xi={},mu={exports:{}},xu={};var Lh;function ax(){return Lh||(Lh=1,(function(l){function c($,K){var be=$.length;$.push(K);e:for(;0<be;){var J=be-1>>>1,me=$[J];if(0<f(me,K))$[J]=K,$[be]=me,be=J;else break e}}function o($){return $.length===0?null:$[0]}function u($){if($.length===0)return null;var K=$[0],be=$.pop();if(be!==K){$[0]=be;e:for(var J=0,me=$.length,A=me>>>1;J<A;){var D=2*(J+1)-1,te=$[D],F=D+1,re=$[F];if(0>f(te,be))F<me&&0>f(re,te)?($[J]=re,$[F]=be,J=F):($[J]=te,$[D]=be,J=D);else if(F<me&&0>f(re,be))$[J]=re,$[F]=be,J=F;else break e}}return K}function f($,K){var be=$.sortIndex-K.sortIndex;return be!==0?be:$.id-K.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();l.unstable_now=function(){return h.now()-m}}var x=[],b=[],C=1,_=null,T=3,N=!1,S=!1,p=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function M($){for(var K=o(b);K!==null;){if(K.callback===null)u(b);else if(K.startTime<=$)u(b),K.sortIndex=K.expirationTime,c(x,K);else break;K=o(b)}}function U($){if(p=!1,M($),!S)if(o(x)!==null)S=!0,V||(V=!0,L());else{var K=o(b);K!==null&&ce(U,K.startTime-$)}}var V=!1,Y=-1,Q=5,G=-1;function le(){return y?!0:!(l.unstable_now()-G<Q)}function de(){if(y=!1,V){var $=l.unstable_now();G=$;var K=!0;try{e:{S=!1,p&&(p=!1,k(Y),Y=-1),N=!0;var be=T;try{t:{for(M($),_=o(x);_!==null&&!(_.expirationTime>$&&le());){var J=_.callback;if(typeof J=="function"){_.callback=null,T=_.priorityLevel;var me=J(_.expirationTime<=$);if($=l.unstable_now(),typeof me=="function"){_.callback=me,M($),K=!0;break t}_===o(x)&&u(x),M($)}else u(x);_=o(x)}if(_!==null)K=!0;else{var A=o(b);A!==null&&ce(U,A.startTime-$),K=!1}}break e}finally{_=null,T=be,N=!1}K=void 0}}finally{K?L():V=!1}}}var L;if(typeof j=="function")L=function(){j(de)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,E=se.port2;se.port1.onmessage=de,L=function(){E.postMessage(null)}}else L=function(){w(de,0)};function ce($,K){Y=w(function(){$(l.unstable_now())},K)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function($){$.callback=null},l.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<$?Math.floor(1e3/$):5},l.unstable_getCurrentPriorityLevel=function(){return T},l.unstable_next=function($){switch(T){case 1:case 2:case 3:var K=3;break;default:K=T}var be=T;T=K;try{return $()}finally{T=be}},l.unstable_requestPaint=function(){y=!0},l.unstable_runWithPriority=function($,K){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var be=T;T=$;try{return K()}finally{T=be}},l.unstable_scheduleCallback=function($,K,be){var J=l.unstable_now();switch(typeof be=="object"&&be!==null?(be=be.delay,be=typeof be=="number"&&0<be?J+be:J):be=J,$){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=be+me,$={id:C++,callback:K,priorityLevel:$,startTime:be,expirationTime:me,sortIndex:-1},be>J?($.sortIndex=be,c(b,$),o(x)===null&&$===o(b)&&(p?(k(Y),Y=-1):p=!0,ce(U,be-J))):($.sortIndex=me,c(x,$),S||N||(S=!0,V||(V=!0,L()))),$},l.unstable_shouldYield=le,l.unstable_wrapCallback=function($){var K=T;return function(){var be=T;T=K;try{return $.apply(this,arguments)}finally{T=be}}}})(xu)),xu}var Hh;function nx(){return Hh||(Hh=1,mu.exports=ax()),mu.exports}var gu={exports:{}},Tt={};var qh;function lx(){if(qh)return Tt;qh=1;var l=Du();function c(x){var b="https://react.dev/errors/"+x;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var C=2;C<arguments.length;C++)b+="&args[]="+encodeURIComponent(arguments[C])}return"Minified React error #"+x+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var u={d:{f:o,r:function(){throw Error(c(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(x,b,C){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:_==null?null:""+_,children:x,containerInfo:b,implementation:C}}var h=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(x,b){if(x==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Tt.createPortal=function(x,b){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(c(299));return d(x,b,null,C)},Tt.flushSync=function(x){var b=h.T,C=u.p;try{if(h.T=null,u.p=2,x)return x()}finally{h.T=b,u.p=C,u.d.f()}},Tt.preconnect=function(x,b){typeof x=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,u.d.C(x,b))},Tt.prefetchDNS=function(x){typeof x=="string"&&u.d.D(x)},Tt.preinit=function(x,b){if(typeof x=="string"&&b&&typeof b.as=="string"){var C=b.as,_=m(C,b.crossOrigin),T=typeof b.integrity=="string"?b.integrity:void 0,N=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;C==="style"?u.d.S(x,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:_,integrity:T,fetchPriority:N}):C==="script"&&u.d.X(x,{crossOrigin:_,integrity:T,fetchPriority:N,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},Tt.preinitModule=function(x,b){if(typeof x=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var C=m(b.as,b.crossOrigin);u.d.M(x,{crossOrigin:C,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&u.d.M(x)},Tt.preload=function(x,b){if(typeof x=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var C=b.as,_=m(C,b.crossOrigin);u.d.L(x,C,{crossOrigin:_,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},Tt.preloadModule=function(x,b){if(typeof x=="string")if(b){var C=m(b.as,b.crossOrigin);u.d.m(x,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:C,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else u.d.m(x)},Tt.requestFormReset=function(x){u.d.r(x)},Tt.unstable_batchedUpdates=function(x,b){return x(b)},Tt.useFormState=function(x,b,C){return h.H.useFormState(x,b,C)},Tt.useFormStatus=function(){return h.H.useHostTransitionStatus()},Tt.version="19.2.3",Tt}var Yh;function ix(){if(Yh)return gu.exports;Yh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(c){console.error(c)}}return l(),gu.exports=lx(),gu.exports}var Vh;function rx(){if(Vh)return xi;Vh=1;var l=nx(),c=Du(),o=ix();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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 m(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 x(e){if(d(e)!==e)throw Error(u(188))}function b(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var r=i.alternate;if(r===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===a)return x(i),e;if(r===n)return x(i),t;r=r.sibling}throw Error(u(188))}if(a.return!==n.return)a=i,n=r;else{for(var g=!1,z=i.child;z;){if(z===a){g=!0,a=i,n=r;break}if(z===n){g=!0,n=i,a=r;break}z=z.sibling}if(!g){for(z=r.child;z;){if(z===a){g=!0,a=r,n=i;break}if(z===n){g=!0,n=r,a=i;break}z=z.sibling}if(!g)throw Error(u(189))}}if(a.alternate!==n)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function C(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C(e),t!==null)return t;e=e.sibling}return null}var _=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),j=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function L(e){return e===null||typeof e!="object"?null:(e=de&&e[de]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function E(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case w:return"Profiler";case y:return"StrictMode";case U:return"Suspense";case V:return"SuspenseList";case G:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case j:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case M:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:E(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return E(e(t))}catch{}}return null}var ce=Array.isArray,$=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},J=[],me=-1;function A(e){return{current:e}}function D(e){0>me||(e.current=J[me],J[me]=null,me--)}function te(e,t){me++,J[me]=e.current,e.current=t}var F=A(null),re=A(null),_e=A(null),Ne=A(null);function ke(e,t){switch(te(_e,t),te(re,e),te(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?nh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=nh(t),e=lh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D(F),te(F,e)}function Ee(){D(F),D(re),D(_e)}function Qe(e){e.memoizedState!==null&&te(Ne,e);var t=F.current,a=lh(t,e.type);t!==a&&(te(re,e),te(F,a))}function Xe(e){re.current===e&&(D(F),D(re)),Ne.current===e&&(D(Ne),di._currentValue=be)}var ot,Be;function v(e){if(ot===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ot=t&&t[1]||"",Be=-1<a.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+ot+e+Be}var he=!1;function I(e,t){if(!e||he)return"";he=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ue){var ie=ue}Reflect.construct(e,[],ge)}else{try{ge.call()}catch(ue){ie=ue}e.call(ge.prototype)}}else{try{throw Error()}catch(ue){ie=ue}(ge=e())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ue){if(ue&&ie&&typeof ue.stack=="string")return[ue.stack,ie.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=n.DetermineComponentFrameRoot(),g=r[0],z=r[1];if(g&&z){var q=g.split(`
|
|
4
|
-
`),ne=z.split(`
|
|
5
|
-
`);for(i=n=0;n<q.length&&!q[n].includes("DetermineComponentFrameRoot");)n++;for(;i<ne.length&&!ne[i].includes("DetermineComponentFrameRoot");)i++;if(n===q.length||i===ne.length)for(n=q.length-1,i=ne.length-1;1<=n&&0<=i&&q[n]!==ne[i];)i--;for(;1<=n&&0<=i;n--,i--)if(q[n]!==ne[i]){if(n!==1||i!==1)do if(n--,i--,0>i||q[n]!==ne[i]){var pe=`
|
|
6
|
-
`+q[n].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),pe}while(1<=n&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?v(a):""}function B(e,t){switch(e.tag){case 26:case 27:case 5:return v(e.type);case 16:return v("Lazy");case 13:return e.child!==t&&t!==null?v("Suspense Fallback"):v("Suspense");case 19:return v("SuspenseList");case 0:case 15:return I(e.type,!1);case 11:return I(e.type.render,!1);case 1:return I(e.type,!0);case 31:return v("Activity");default:return""}}function R(e){try{var t="",a=null;do t+=B(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
|
-
Error generating stack: `+n.message+`
|
|
8
|
-
`+n.stack}}var H=Object.prototype.hasOwnProperty,ee=l.unstable_scheduleCallback,oe=l.unstable_cancelCallback,P=l.unstable_shouldYield,ve=l.unstable_requestPaint,Se=l.unstable_now,we=l.unstable_getCurrentPriorityLevel,ze=l.unstable_ImmediatePriority,Ke=l.unstable_UserBlockingPriority,Me=l.unstable_NormalPriority,gt=l.unstable_LowPriority,da=l.unstable_IdlePriority,Dt=l.log,va=l.unstable_setDisableYieldValue,Ie=null,dt=null;function Mt(e){if(typeof Dt=="function"&&va(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Ie,e)}catch{}}var We=Math.clz32?Math.clz32:wa,Mn=Math.log,jl=Math.LN2;function wa(e){return e>>>=0,e===0?32:31-(Mn(e)/jl|0)|0}var Za=256,Sa=262144,Ft=4194304;function X(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 fe(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,r=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var z=n&134217727;return z!==0?(n=z&~r,n!==0?i=X(n):(g&=z,g!==0?i=X(g):a||(a=z&~e,a!==0&&(i=X(a))))):(z=n&~r,z!==0?i=X(z):g!==0?i=X(g):a||(a=n&~e,a!==0&&(i=X(a)))),i===0?0:t!==0&&t!==i&&(t&r)===0&&(r=i&-i,a=t&-t,r>=a||r===32&&(a&4194048)!==0)?t:i}function ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Re(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 He(){var e=Ft;return Ft<<=1,(Ft&62914560)===0&&(Ft=4194304),e}function lt(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function pt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fa(e,t,a,n,i,r){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var z=e.entanglements,q=e.expirationTimes,ne=e.hiddenUpdates;for(a=g&~a;0<a;){var pe=31-We(a),ge=1<<pe;z[pe]=0,q[pe]=-1;var ie=ne[pe];if(ie!==null)for(ne[pe]=null,pe=0;pe<ie.length;pe++){var ue=ie[pe];ue!==null&&(ue.lane&=-536870913)}a&=~ge}n!==0&&Nl(e,n,0),r!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=r&~(g&~t))}function Nl(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-We(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function _i(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-We(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function qu(e,t){var a=t&-t;return a=(a&42)!==0?1:es(a),(a&(e.suspendedLanes|t))!==0?0:a}function es(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 ts(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yu(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Ch(e.type))}function Vu(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var Ga=Math.random().toString(36).slice(2),Et="__reactFiber$"+Ga,Ut="__reactProps$"+Ga,Un="__reactContainer$"+Ga,as="__reactEvents$"+Ga,Vp="__reactListeners$"+Ga,Zp="__reactHandles$"+Ga,Zu="__reactResources$"+Ga,El="__reactMarker$"+Ga;function ns(e){delete e[Et],delete e[Ut],delete e[as],delete e[Vp],delete e[Zp]}function Bn(e){var t=e[Et];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Un]||a[Et]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=dh(e);e!==null;){if(a=e[Et])return a;e=dh(e)}return t}e=a,a=e.parentNode}return null}function Ln(e){if(e=e[Et]||e[Un]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Cl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Hn(e){var t=e[Zu];return t||(t=e[Zu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[El]=!0}var Gu=new Set,Xu={};function gn(e,t){qn(e,t),qn(e+"Capture",t)}function qn(e,t){for(Xu[e]=t,e=0;e<t.length;e++)Gu.add(t[e])}var Gp=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]*$"),Qu={},Ku={};function Xp(e){return H.call(Ku,e)?!0:H.call(Qu,e)?!1:Gp.test(e)?Ku[e]=!0:(Qu[e]=!0,!1)}function ji(e,t,a){if(Xp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ni(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function _a(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function It(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ju(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qp(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(g){a=""+g,r.call(this,g)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ls(e){if(!e._valueTracker){var t=Ju(e)?"checked":"value";e._valueTracker=Qp(e,t,""+e[t])}}function $u(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Ju(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Ei(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Kp=/[\n"\\]/g;function Wt(e){return e.replace(Kp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function is(e,t,a,n,i,r,g,z){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+It(t)):e.value!==""+It(t)&&(e.value=""+It(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?rs(e,g,It(t)):a!=null?rs(e,g,It(a)):n!=null&&e.removeAttribute("value"),i==null&&r!=null&&(e.defaultChecked=!!r),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?e.name=""+It(z):e.removeAttribute("name")}function Fu(e,t,a,n,i,r,g,z){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||a!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){ls(e);return}a=a!=null?""+It(a):"",t=t!=null?""+It(t):a,z||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=z?e.checked:!!n,e.defaultChecked=!!n,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ls(e)}function rs(e,t,a){t==="number"&&Ei(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Yn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+It(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Iu(e,t,a){if(t!=null&&(t=""+It(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+It(a):""}function Wu(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(u(92));if(ce(n)){if(1<n.length)throw Error(u(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=It(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),ls(e)}function Vn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Jp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Pu(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Jp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function ec(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&Pu(e,i,n)}else for(var r in t)t.hasOwnProperty(r)&&Pu(e,r,t[r])}function ss(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 $p=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Fp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ci(e){return Fp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ja(){}var os=null;function us(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zn=null,Gn=null;function tc(e){var t=Ln(e);if(t&&(e=t.stateNode)){var a=e[Ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(is(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Wt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[Ut]||null;if(!i)throw Error(u(90));is(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&$u(n)}break e;case"textarea":Iu(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Yn(e,!!a.multiple,t,!1)}}}var cs=!1;function ac(e,t,a){if(cs)return e(t,a);cs=!0;try{var n=e(t);return n}finally{if(cs=!1,(Zn!==null||Gn!==null)&&(pr(),Zn&&(t=Zn,e=Gn,Gn=Zn=null,tc(t),e)))for(t=0;t<e.length;t++)tc(e[t])}}function kl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Ut]||null;if(n===null)return null;a=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Na=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ds=!1;if(Na)try{var Al={};Object.defineProperty(Al,"passive",{get:function(){ds=!0}}),window.addEventListener("test",Al,Al),window.removeEventListener("test",Al,Al)}catch{ds=!1}var Xa=null,fs=null,ki=null;function nc(){if(ki)return ki;var e,t=fs,a=t.length,n,i="value"in Xa?Xa.value:Xa.textContent,r=i.length;for(e=0;e<a&&t[e]===i[e];e++);var g=a-e;for(n=1;n<=g&&t[a-n]===i[r-n];n++);return ki=i.slice(e,1<n?1-n:void 0)}function Ai(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 zi(){return!0}function lc(){return!1}function Bt(e){function t(a,n,i,r,g){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=g,this.currentTarget=null;for(var z in e)e.hasOwnProperty(z)&&(a=e[z],this[z]=a?a(r):r[z]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?zi:lc,this.isPropagationStopped=lc,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=zi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=zi)},persist:function(){},isPersistent:zi}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ti=Bt(bn),zl=_({},bn,{view:0,detail:0}),Ip=Bt(zl),hs,ps,Tl,Ri=_({},zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xs,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!==Tl&&(Tl&&e.type==="mousemove"?(hs=e.screenX-Tl.screenX,ps=e.screenY-Tl.screenY):ps=hs=0,Tl=e),hs)},movementY:function(e){return"movementY"in e?e.movementY:ps}}),ic=Bt(Ri),Wp=_({},Ri,{dataTransfer:0}),Pp=Bt(Wp),em=_({},zl,{relatedTarget:0}),ms=Bt(em),tm=_({},bn,{animationName:0,elapsedTime:0,pseudoElement:0}),am=Bt(tm),nm=_({},bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lm=Bt(nm),im=_({},bn,{data:0}),rc=Bt(im),rm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sm={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"},om={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function um(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=om[e])?!!t[e]:!1}function xs(){return um}var cm=_({},zl,{key:function(e){if(e.key){var t=rm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ai(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xs,charCode:function(e){return e.type==="keypress"?Ai(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ai(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dm=Bt(cm),fm=_({},Ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sc=Bt(fm),hm=_({},zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xs}),pm=Bt(hm),mm=_({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),xm=Bt(mm),gm=_({},Ri,{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}),bm=Bt(gm),ym=_({},bn,{newState:0,oldState:0}),vm=Bt(ym),wm=[9,13,27,32],gs=Na&&"CompositionEvent"in window,Rl=null;Na&&"documentMode"in document&&(Rl=document.documentMode);var Sm=Na&&"TextEvent"in window&&!Rl,oc=Na&&(!gs||Rl&&8<Rl&&11>=Rl),uc=" ",cc=!1;function dc(e,t){switch(e){case"keyup":return wm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function _m(e,t){switch(e){case"compositionend":return fc(t);case"keypress":return t.which!==32?null:(cc=!0,uc);case"textInput":return e=t.data,e===uc&&cc?null:e;default:return null}}function jm(e,t){if(Xn)return e==="compositionend"||!gs&&dc(e,t)?(e=nc(),ki=fs=Xa=null,Xn=!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 oc&&t.locale!=="ko"?null:t.data;default:return null}}var Nm={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 hc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Nm[e.type]:t==="textarea"}function pc(e,t,a,n){Zn?Gn?Gn.push(n):Gn=[n]:Zn=n,t=wr(t,"onChange"),0<t.length&&(a=new Ti("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Ol=null,Dl=null;function Em(e){If(e,0)}function Oi(e){var t=Cl(e);if($u(t))return e}function mc(e,t){if(e==="change")return t}var xc=!1;if(Na){var bs;if(Na){var ys="oninput"in document;if(!ys){var gc=document.createElement("div");gc.setAttribute("oninput","return;"),ys=typeof gc.oninput=="function"}bs=ys}else bs=!1;xc=bs&&(!document.documentMode||9<document.documentMode)}function bc(){Ol&&(Ol.detachEvent("onpropertychange",yc),Dl=Ol=null)}function yc(e){if(e.propertyName==="value"&&Oi(Dl)){var t=[];pc(t,Dl,e,us(e)),ac(Em,t)}}function Cm(e,t,a){e==="focusin"?(bc(),Ol=t,Dl=a,Ol.attachEvent("onpropertychange",yc)):e==="focusout"&&bc()}function km(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Oi(Dl)}function Am(e,t){if(e==="click")return Oi(t)}function zm(e,t){if(e==="input"||e==="change")return Oi(t)}function Tm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:Tm;function Ml(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var i=a[n];if(!H.call(t,i)||!Zt(e[i],t[i]))return!1}return!0}function vc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wc(e,t){var a=vc(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=vc(a)}}function Sc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _c(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ei(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Ei(e.document)}return t}function vs(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 Rm=Na&&"documentMode"in document&&11>=document.documentMode,Qn=null,ws=null,Ul=null,Ss=!1;function jc(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ss||Qn==null||Qn!==Ei(n)||(n=Qn,"selectionStart"in n&&vs(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ul&&Ml(Ul,n)||(Ul=n,n=wr(ws,"onSelect"),0<n.length&&(t=new Ti("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Qn)))}function yn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Kn={animationend:yn("Animation","AnimationEnd"),animationiteration:yn("Animation","AnimationIteration"),animationstart:yn("Animation","AnimationStart"),transitionrun:yn("Transition","TransitionRun"),transitionstart:yn("Transition","TransitionStart"),transitioncancel:yn("Transition","TransitionCancel"),transitionend:yn("Transition","TransitionEnd")},_s={},Nc={};Na&&(Nc=document.createElement("div").style,"AnimationEvent"in window||(delete Kn.animationend.animation,delete Kn.animationiteration.animation,delete Kn.animationstart.animation),"TransitionEvent"in window||delete Kn.transitionend.transition);function vn(e){if(_s[e])return _s[e];if(!Kn[e])return e;var t=Kn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Nc)return _s[e]=t[a];return e}var Ec=vn("animationend"),Cc=vn("animationiteration"),kc=vn("animationstart"),Om=vn("transitionrun"),Dm=vn("transitionstart"),Mm=vn("transitioncancel"),Ac=vn("transitionend"),zc=new Map,js="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(" ");js.push("scrollEnd");function oa(e,t){zc.set(e,t),gn(t,[e])}var Di=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)},Pt=[],Jn=0,Ns=0;function Mi(){for(var e=Jn,t=Ns=Jn=0;t<e;){var a=Pt[t];Pt[t++]=null;var n=Pt[t];Pt[t++]=null;var i=Pt[t];Pt[t++]=null;var r=Pt[t];if(Pt[t++]=null,n!==null&&i!==null){var g=n.pending;g===null?i.next=i:(i.next=g.next,g.next=i),n.pending=i}r!==0&&Tc(a,i,r)}}function Ui(e,t,a,n){Pt[Jn++]=e,Pt[Jn++]=t,Pt[Jn++]=a,Pt[Jn++]=n,Ns|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Es(e,t,a,n){return Ui(e,t,a,n),Bi(e)}function wn(e,t){return Ui(e,null,null,t),Bi(e)}function Tc(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,r=e.return;r!==null;)r.childLanes|=a,n=r.alternate,n!==null&&(n.childLanes|=a),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(i=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,i&&t!==null&&(i=31-We(a),e=r.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),r):null}function Bi(e){if(50<li)throw li=0,Uo=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $n={};function Um(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,a,n){return new Um(e,t,a,n)}function Cs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ea(e,t){var a=e.alternate;return a===null?(a=Gt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Rc(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Li(e,t,a,n,i,r){var g=0;if(n=e,typeof e=="function")Cs(e)&&(g=1);else if(typeof e=="string")g=Y0(e,a,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case G:return e=Gt(31,a,t,i),e.elementType=G,e.lanes=r,e;case p:return Sn(a.children,i,r,t);case y:g=8,i|=24;break;case w:return e=Gt(12,a,t,i|2),e.elementType=w,e.lanes=r,e;case U:return e=Gt(13,a,t,i),e.elementType=U,e.lanes=r,e;case V:return e=Gt(19,a,t,i),e.elementType=V,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:g=10;break e;case k:g=9;break e;case M:g=11;break e;case Y:g=14;break e;case Q:g=16,n=null;break e}g=29,a=Error(u(130,e===null?"null":typeof e,"")),n=null}return t=Gt(g,a,t,i),t.elementType=e,t.type=n,t.lanes=r,t}function Sn(e,t,a,n){return e=Gt(7,e,n,t),e.lanes=a,e}function ks(e,t,a){return e=Gt(6,e,null,t),e.lanes=a,e}function Oc(e){var t=Gt(18,null,null,0);return t.stateNode=e,t}function As(e,t,a){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Dc=new WeakMap;function ea(e,t){if(typeof e=="object"&&e!==null){var a=Dc.get(e);return a!==void 0?a:(t={value:e,source:t,stack:R(t)},Dc.set(e,t),t)}return{value:e,source:t,stack:R(t)}}var Fn=[],In=0,Hi=null,Bl=0,ta=[],aa=0,Qa=null,ha=1,pa="";function Ca(e,t){Fn[In++]=Bl,Fn[In++]=Hi,Hi=e,Bl=t}function Mc(e,t,a){ta[aa++]=ha,ta[aa++]=pa,ta[aa++]=Qa,Qa=e;var n=ha;e=pa;var i=32-We(n)-1;n&=~(1<<i),a+=1;var r=32-We(t)+i;if(30<r){var g=i-i%5;r=(n&(1<<g)-1).toString(32),n>>=g,i-=g,ha=1<<32-We(t)+i|a<<i|n,pa=r+e}else ha=1<<r|a<<i|n,pa=e}function zs(e){e.return!==null&&(Ca(e,1),Mc(e,1,0))}function Ts(e){for(;e===Hi;)Hi=Fn[--In],Fn[In]=null,Bl=Fn[--In],Fn[In]=null;for(;e===Qa;)Qa=ta[--aa],ta[aa]=null,pa=ta[--aa],ta[aa]=null,ha=ta[--aa],ta[aa]=null}function Uc(e,t){ta[aa++]=ha,ta[aa++]=pa,ta[aa++]=Qa,ha=t.id,pa=t.overflow,Qa=e}var Ct=null,rt=null,Ge=!1,Ka=null,na=!1,Rs=Error(u(519));function Ja(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ll(ea(t,e)),Rs}function Bc(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Et]=e,t[Ut]=n,a){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(a=0;a<ri.length;a++)Ye(ri[a],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),Fu(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),Wu(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||th(t.textContent,a)?(n.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),n.onScroll!=null&&Ye("scroll",t),n.onScrollEnd!=null&&Ye("scrollend",t),n.onClick!=null&&(t.onclick=ja),t=!0):t=!1,t||Ja(e,!0)}function Lc(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:na=!1;return;case 27:case 3:na=!0;return;default:Ct=Ct.return}}function Wn(e){if(e!==Ct)return!1;if(!Ge)return Lc(e),Ge=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Io(e.type,e.memoizedProps)),a=!a),a&&rt&&Ja(e),Lc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));rt=ch(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));rt=ch(e)}else t===27?(t=rt,un(e.type)?(e=au,au=null,rt=e):rt=t):rt=Ct?ia(e.stateNode.nextSibling):null;return!0}function _n(){rt=Ct=null,Ge=!1}function Os(){var e=Ka;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),Ka=null),e}function Ll(e){Ka===null?Ka=[e]:Ka.push(e)}var Ds=A(null),jn=null,ka=null;function $a(e,t,a){te(Ds,t._currentValue),t._currentValue=a}function Aa(e){e._currentValue=Ds.current,D(Ds)}function Ms(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Us(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var r=i.dependencies;if(r!==null){var g=i.child;r=r.firstContext;e:for(;r!==null;){var z=r;r=i;for(var q=0;q<t.length;q++)if(z.context===t[q]){r.lanes|=a,z=r.alternate,z!==null&&(z.lanes|=a),Ms(r.return,a,e),n||(g=null);break e}r=z.next}}else if(i.tag===18){if(g=i.return,g===null)throw Error(u(341));g.lanes|=a,r=g.alternate,r!==null&&(r.lanes|=a),Ms(g,a,e),g=null}else g=i.child;if(g!==null)g.return=i;else for(g=i;g!==null;){if(g===e){g=null;break}if(i=g.sibling,i!==null){i.return=g.return,g=i;break}g=g.return}i=g}}function Pn(e,t,a,n){e=null;for(var i=t,r=!1;i!==null;){if(!r){if((i.flags&524288)!==0)r=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var g=i.alternate;if(g===null)throw Error(u(387));if(g=g.memoizedProps,g!==null){var z=i.type;Zt(i.pendingProps.value,g.value)||(e!==null?e.push(z):e=[z])}}else if(i===Ne.current){if(g=i.alternate,g===null)throw Error(u(387));g.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(di):e=[di])}i=i.return}e!==null&&Us(t,e,a,n),t.flags|=262144}function qi(e){for(e=e.firstContext;e!==null;){if(!Zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Nn(e){jn=e,ka=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kt(e){return Hc(jn,e)}function Yi(e,t){return jn===null&&Nn(e),Hc(e,t)}function Hc(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ka===null){if(e===null)throw Error(u(308));ka=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ka=ka.next=t;return a}var Bm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Lm=l.unstable_scheduleCallback,Hm=l.unstable_NormalPriority,bt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bs(){return{controller:new Bm,data:new Map,refCount:0}}function Hl(e){e.refCount--,e.refCount===0&&Lm(Hm,function(){e.controller.abort()})}var ql=null,Ls=0,el=0,tl=null;function qm(e,t){if(ql===null){var a=ql=[];Ls=0,el=Vo(),tl={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ls++,t.then(qc,qc),t}function qc(){if(--Ls===0&&ql!==null){tl!==null&&(tl.status="fulfilled");var e=ql;ql=null,el=0,tl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ym(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var Yc=$.S;$.S=function(e,t){Nf=Se(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&qm(e,t),Yc!==null&&Yc(e,t)};var En=A(null);function Hs(){var e=En.current;return e!==null?e:it.pooledCache}function Vi(e,t){t===null?te(En,En.current):te(En,t.pool)}function Vc(){var e=Hs();return e===null?null:{parent:bt._currentValue,pool:e}}var al=Error(u(460)),qs=Error(u(474)),Zi=Error(u(542)),Gi={then:function(){}};function Zc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Gc(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ja,ja),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qc(e),e;default:if(typeof t.status=="string")t.then(ja,ja);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qc(e),e}throw kn=t,al}}function Cn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(kn=a,al):a}}var kn=null;function Xc(){if(kn===null)throw Error(u(459));var e=kn;return kn=null,e}function Qc(e){if(e===al||e===Zi)throw Error(u(483))}var nl=null,Yl=0;function Xi(e){var t=Yl;return Yl+=1,nl===null&&(nl=[]),Gc(nl,e,t)}function Vl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Qi(e,t){throw t.$$typeof===T?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kc(e){function t(W,Z){if(e){var ae=W.deletions;ae===null?(W.deletions=[Z],W.flags|=16):ae.push(Z)}}function a(W,Z){if(!e)return null;for(;Z!==null;)t(W,Z),Z=Z.sibling;return null}function n(W){for(var Z=new Map;W!==null;)W.key!==null?Z.set(W.key,W):Z.set(W.index,W),W=W.sibling;return Z}function i(W,Z){return W=Ea(W,Z),W.index=0,W.sibling=null,W}function r(W,Z,ae){return W.index=ae,e?(ae=W.alternate,ae!==null?(ae=ae.index,ae<Z?(W.flags|=67108866,Z):ae):(W.flags|=67108866,Z)):(W.flags|=1048576,Z)}function g(W){return e&&W.alternate===null&&(W.flags|=67108866),W}function z(W,Z,ae,xe){return Z===null||Z.tag!==6?(Z=ks(ae,W.mode,xe),Z.return=W,Z):(Z=i(Z,ae),Z.return=W,Z)}function q(W,Z,ae,xe){var Te=ae.type;return Te===p?pe(W,Z,ae.props.children,xe,ae.key):Z!==null&&(Z.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Q&&Cn(Te)===Z.type)?(Z=i(Z,ae.props),Vl(Z,ae),Z.return=W,Z):(Z=Li(ae.type,ae.key,ae.props,null,W.mode,xe),Vl(Z,ae),Z.return=W,Z)}function ne(W,Z,ae,xe){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ae.containerInfo||Z.stateNode.implementation!==ae.implementation?(Z=As(ae,W.mode,xe),Z.return=W,Z):(Z=i(Z,ae.children||[]),Z.return=W,Z)}function pe(W,Z,ae,xe,Te){return Z===null||Z.tag!==7?(Z=Sn(ae,W.mode,xe,Te),Z.return=W,Z):(Z=i(Z,ae),Z.return=W,Z)}function ge(W,Z,ae){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=ks(""+Z,W.mode,ae),Z.return=W,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case N:return ae=Li(Z.type,Z.key,Z.props,null,W.mode,ae),Vl(ae,Z),ae.return=W,ae;case S:return Z=As(Z,W.mode,ae),Z.return=W,Z;case Q:return Z=Cn(Z),ge(W,Z,ae)}if(ce(Z)||L(Z))return Z=Sn(Z,W.mode,ae,null),Z.return=W,Z;if(typeof Z.then=="function")return ge(W,Xi(Z),ae);if(Z.$$typeof===j)return ge(W,Yi(W,Z),ae);Qi(W,Z)}return null}function ie(W,Z,ae,xe){var Te=Z!==null?Z.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Te!==null?null:z(W,Z,""+ae,xe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case N:return ae.key===Te?q(W,Z,ae,xe):null;case S:return ae.key===Te?ne(W,Z,ae,xe):null;case Q:return ae=Cn(ae),ie(W,Z,ae,xe)}if(ce(ae)||L(ae))return Te!==null?null:pe(W,Z,ae,xe,null);if(typeof ae.then=="function")return ie(W,Z,Xi(ae),xe);if(ae.$$typeof===j)return ie(W,Z,Yi(W,ae),xe);Qi(W,ae)}return null}function ue(W,Z,ae,xe,Te){if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return W=W.get(ae)||null,z(Z,W,""+xe,Te);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case N:return W=W.get(xe.key===null?ae:xe.key)||null,q(Z,W,xe,Te);case S:return W=W.get(xe.key===null?ae:xe.key)||null,ne(Z,W,xe,Te);case Q:return xe=Cn(xe),ue(W,Z,ae,xe,Te)}if(ce(xe)||L(xe))return W=W.get(ae)||null,pe(Z,W,xe,Te,null);if(typeof xe.then=="function")return ue(W,Z,ae,Xi(xe),Te);if(xe.$$typeof===j)return ue(W,Z,ae,Yi(Z,xe),Te);Qi(Z,xe)}return null}function Ce(W,Z,ae,xe){for(var Te=null,Je=null,Ae=Z,Le=Z=0,Ze=null;Ae!==null&&Le<ae.length;Le++){Ae.index>Le?(Ze=Ae,Ae=null):Ze=Ae.sibling;var $e=ie(W,Ae,ae[Le],xe);if($e===null){Ae===null&&(Ae=Ze);break}e&&Ae&&$e.alternate===null&&t(W,Ae),Z=r($e,Z,Le),Je===null?Te=$e:Je.sibling=$e,Je=$e,Ae=Ze}if(Le===ae.length)return a(W,Ae),Ge&&Ca(W,Le),Te;if(Ae===null){for(;Le<ae.length;Le++)Ae=ge(W,ae[Le],xe),Ae!==null&&(Z=r(Ae,Z,Le),Je===null?Te=Ae:Je.sibling=Ae,Je=Ae);return Ge&&Ca(W,Le),Te}for(Ae=n(Ae);Le<ae.length;Le++)Ze=ue(Ae,W,Le,ae[Le],xe),Ze!==null&&(e&&Ze.alternate!==null&&Ae.delete(Ze.key===null?Le:Ze.key),Z=r(Ze,Z,Le),Je===null?Te=Ze:Je.sibling=Ze,Je=Ze);return e&&Ae.forEach(function(pn){return t(W,pn)}),Ge&&Ca(W,Le),Te}function Oe(W,Z,ae,xe){if(ae==null)throw Error(u(151));for(var Te=null,Je=null,Ae=Z,Le=Z=0,Ze=null,$e=ae.next();Ae!==null&&!$e.done;Le++,$e=ae.next()){Ae.index>Le?(Ze=Ae,Ae=null):Ze=Ae.sibling;var pn=ie(W,Ae,$e.value,xe);if(pn===null){Ae===null&&(Ae=Ze);break}e&&Ae&&pn.alternate===null&&t(W,Ae),Z=r(pn,Z,Le),Je===null?Te=pn:Je.sibling=pn,Je=pn,Ae=Ze}if($e.done)return a(W,Ae),Ge&&Ca(W,Le),Te;if(Ae===null){for(;!$e.done;Le++,$e=ae.next())$e=ge(W,$e.value,xe),$e!==null&&(Z=r($e,Z,Le),Je===null?Te=$e:Je.sibling=$e,Je=$e);return Ge&&Ca(W,Le),Te}for(Ae=n(Ae);!$e.done;Le++,$e=ae.next())$e=ue(Ae,W,Le,$e.value,xe),$e!==null&&(e&&$e.alternate!==null&&Ae.delete($e.key===null?Le:$e.key),Z=r($e,Z,Le),Je===null?Te=$e:Je.sibling=$e,Je=$e);return e&&Ae.forEach(function(W0){return t(W,W0)}),Ge&&Ca(W,Le),Te}function nt(W,Z,ae,xe){if(typeof ae=="object"&&ae!==null&&ae.type===p&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case N:e:{for(var Te=ae.key;Z!==null;){if(Z.key===Te){if(Te=ae.type,Te===p){if(Z.tag===7){a(W,Z.sibling),xe=i(Z,ae.props.children),xe.return=W,W=xe;break e}}else if(Z.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Q&&Cn(Te)===Z.type){a(W,Z.sibling),xe=i(Z,ae.props),Vl(xe,ae),xe.return=W,W=xe;break e}a(W,Z);break}else t(W,Z);Z=Z.sibling}ae.type===p?(xe=Sn(ae.props.children,W.mode,xe,ae.key),xe.return=W,W=xe):(xe=Li(ae.type,ae.key,ae.props,null,W.mode,xe),Vl(xe,ae),xe.return=W,W=xe)}return g(W);case S:e:{for(Te=ae.key;Z!==null;){if(Z.key===Te)if(Z.tag===4&&Z.stateNode.containerInfo===ae.containerInfo&&Z.stateNode.implementation===ae.implementation){a(W,Z.sibling),xe=i(Z,ae.children||[]),xe.return=W,W=xe;break e}else{a(W,Z);break}else t(W,Z);Z=Z.sibling}xe=As(ae,W.mode,xe),xe.return=W,W=xe}return g(W);case Q:return ae=Cn(ae),nt(W,Z,ae,xe)}if(ce(ae))return Ce(W,Z,ae,xe);if(L(ae)){if(Te=L(ae),typeof Te!="function")throw Error(u(150));return ae=Te.call(ae),Oe(W,Z,ae,xe)}if(typeof ae.then=="function")return nt(W,Z,Xi(ae),xe);if(ae.$$typeof===j)return nt(W,Z,Yi(W,ae),xe);Qi(W,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,Z!==null&&Z.tag===6?(a(W,Z.sibling),xe=i(Z,ae),xe.return=W,W=xe):(a(W,Z),xe=ks(ae,W.mode,xe),xe.return=W,W=xe),g(W)):a(W,Z)}return function(W,Z,ae,xe){try{Yl=0;var Te=nt(W,Z,ae,xe);return nl=null,Te}catch(Ae){if(Ae===al||Ae===Zi)throw Ae;var Je=Gt(29,Ae,null,W.mode);return Je.lanes=xe,Je.return=W,Je}}}var An=Kc(!0),Jc=Kc(!1),Fa=!1;function Ys(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vs(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 Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Fe&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Bi(e),Tc(e,null,a),t}return Ui(e,n,t,a),Bi(e)}function Zl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,_i(e,a)}}function Zs(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,r=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};r===null?i=r=g:r=r.next=g,a=a.next}while(a!==null);r===null?i=r=t:r=r.next=t}else i=r=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Gs=!1;function Gl(){if(Gs){var e=tl;if(e!==null)throw e}}function Xl(e,t,a,n){Gs=!1;var i=e.updateQueue;Fa=!1;var r=i.firstBaseUpdate,g=i.lastBaseUpdate,z=i.shared.pending;if(z!==null){i.shared.pending=null;var q=z,ne=q.next;q.next=null,g===null?r=ne:g.next=ne,g=q;var pe=e.alternate;pe!==null&&(pe=pe.updateQueue,z=pe.lastBaseUpdate,z!==g&&(z===null?pe.firstBaseUpdate=ne:z.next=ne,pe.lastBaseUpdate=q))}if(r!==null){var ge=i.baseState;g=0,pe=ne=q=null,z=r;do{var ie=z.lane&-536870913,ue=ie!==z.lane;if(ue?(Ve&ie)===ie:(n&ie)===ie){ie!==0&&ie===el&&(Gs=!0),pe!==null&&(pe=pe.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Ce=e,Oe=z;ie=t;var nt=a;switch(Oe.tag){case 1:if(Ce=Oe.payload,typeof Ce=="function"){ge=Ce.call(nt,ge,ie);break e}ge=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Oe.payload,ie=typeof Ce=="function"?Ce.call(nt,ge,ie):Ce,ie==null)break e;ge=_({},ge,ie);break e;case 2:Fa=!0}}ie=z.callback,ie!==null&&(e.flags|=64,ue&&(e.flags|=8192),ue=i.callbacks,ue===null?i.callbacks=[ie]:ue.push(ie))}else ue={lane:ie,tag:z.tag,payload:z.payload,callback:z.callback,next:null},pe===null?(ne=pe=ue,q=ge):pe=pe.next=ue,g|=ie;if(z=z.next,z===null){if(z=i.shared.pending,z===null)break;ue=z,z=ue.next,ue.next=null,i.lastBaseUpdate=ue,i.shared.pending=null}}while(!0);pe===null&&(q=ge),i.baseState=q,i.firstBaseUpdate=ne,i.lastBaseUpdate=pe,r===null&&(i.shared.lanes=0),nn|=g,e.lanes=g,e.memoizedState=ge}}function $c(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Fc(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)$c(a[e],t)}var ll=A(null),Ki=A(0);function Ic(e,t){e=La,te(Ki,e),te(ll,t),La=e|t.baseLanes}function Xs(){te(Ki,La),te(ll,ll.current)}function Qs(){La=Ki.current,D(ll),D(Ki)}var Xt=A(null),la=null;function Pa(e){var t=e.alternate;te(mt,mt.current&1),te(Xt,e),la===null&&(t===null||ll.current!==null||t.memoizedState!==null)&&(la=e)}function Ks(e){te(mt,mt.current),te(Xt,e),la===null&&(la=e)}function Wc(e){e.tag===22?(te(mt,mt.current),te(Xt,e),la===null&&(la=e)):en()}function en(){te(mt,mt.current),te(Xt,Xt.current)}function Qt(e){D(Xt),la===e&&(la=null),D(mt)}var mt=A(0);function Ji(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||eu(a)||tu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var za=0,Ue=null,tt=null,yt=null,$i=!1,il=!1,zn=!1,Fi=0,Ql=0,rl=null,Vm=0;function ft(){throw Error(u(321))}function Js(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Zt(e[a],t[a]))return!1;return!0}function $s(e,t,a,n,i,r){return za=r,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?Md:co,zn=!1,r=a(n,i),zn=!1,il&&(r=ed(t,a,n,i)),Pc(e),r}function Pc(e){$.H=$l;var t=tt!==null&&tt.next!==null;if(za=0,yt=tt=Ue=null,$i=!1,Ql=0,rl=null,t)throw Error(u(300));e===null||vt||(e=e.dependencies,e!==null&&qi(e)&&(vt=!0))}function ed(e,t,a,n){Ue=e;var i=0;do{if(il&&(rl=null),Ql=0,il=!1,25<=i)throw Error(u(301));if(i+=1,yt=tt=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}$.H=Ud,r=t(a,n)}while(il);return r}function Zm(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?Kl(t):t,e=e.useState()[0],(tt!==null?tt.memoizedState:null)!==e&&(Ue.flags|=1024),t}function Fs(){var e=Fi!==0;return Fi=0,e}function Is(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ws(e){if($i){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$i=!1}za=0,yt=tt=Ue=null,il=!1,Ql=Fi=0,rl=null}function Rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Ue.memoizedState=yt=e:yt=yt.next=e,yt}function xt(){if(tt===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=yt===null?Ue.memoizedState:yt.next;if(t!==null)yt=t,tt=e;else{if(e===null)throw Ue.alternate===null?Error(u(467)):Error(u(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},yt===null?Ue.memoizedState=yt=e:yt=yt.next=e}return yt}function Ii(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kl(e){var t=Ql;return Ql+=1,rl===null&&(rl=[]),e=Gc(rl,e,t),t=Ue,(yt===null?t.memoizedState:yt.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?Md:co),e}function Wi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Kl(e);if(e.$$typeof===j)return kt(e)}throw Error(u(438,String(e)))}function Ps(e){var t=null,a=Ue.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ue.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ii(),Ue.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=le;return t.index++,a}function Ta(e,t){return typeof t=="function"?t(e):t}function Pi(e){var t=xt();return eo(t,tt,e)}function eo(e,t,a){var n=e.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=a;var i=e.baseQueue,r=n.pending;if(r!==null){if(i!==null){var g=i.next;i.next=r.next,r.next=g}t.baseQueue=i=r,n.pending=null}if(r=e.baseState,i===null)e.memoizedState=r;else{t=i.next;var z=g=null,q=null,ne=t,pe=!1;do{var ge=ne.lane&-536870913;if(ge!==ne.lane?(Ve&ge)===ge:(za&ge)===ge){var ie=ne.revertLane;if(ie===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),ge===el&&(pe=!0);else if((za&ie)===ie){ne=ne.next,ie===el&&(pe=!0);continue}else ge={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},q===null?(z=q=ge,g=r):q=q.next=ge,Ue.lanes|=ie,nn|=ie;ge=ne.action,zn&&a(r,ge),r=ne.hasEagerState?ne.eagerState:a(r,ge)}else ie={lane:ge,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},q===null?(z=q=ie,g=r):q=q.next=ie,Ue.lanes|=ge,nn|=ge;ne=ne.next}while(ne!==null&&ne!==t);if(q===null?g=r:q.next=z,!Zt(r,e.memoizedState)&&(vt=!0,pe&&(a=tl,a!==null)))throw a;e.memoizedState=r,e.baseState=g,e.baseQueue=q,n.lastRenderedState=r}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function to(e){var t=xt(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,r=t.memoizedState;if(i!==null){a.pending=null;var g=i=i.next;do r=e(r,g.action),g=g.next;while(g!==i);Zt(r,t.memoizedState)||(vt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),a.lastRenderedState=r}return[r,n]}function td(e,t,a){var n=Ue,i=xt(),r=Ge;if(r){if(a===void 0)throw Error(u(407));a=a()}else a=t();var g=!Zt((tt||i).memoizedState,a);if(g&&(i.memoizedState=a,vt=!0),i=i.queue,lo(ld.bind(null,n,i,e),[e]),i.getSnapshot!==t||g||yt!==null&&yt.memoizedState.tag&1){if(n.flags|=2048,sl(9,{destroy:void 0},nd.bind(null,n,i,a,t),null),it===null)throw Error(u(349));r||(za&127)!==0||ad(n,t,a)}return a}function ad(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ue.updateQueue,t===null?(t=Ii(),Ue.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function nd(e,t,a,n){t.value=a,t.getSnapshot=n,id(t)&&rd(e)}function ld(e,t,a){return a(function(){id(t)&&rd(e)})}function id(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Zt(e,a)}catch{return!0}}function rd(e){var t=wn(e,2);t!==null&&Vt(t,e,2)}function ao(e){var t=Rt();if(typeof e=="function"){var a=e;if(e=a(),zn){Mt(!0);try{a()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t}function sd(e,t,a,n){return e.baseState=a,eo(e,tt,typeof n=="function"?n:Ta)}function Gm(e,t,a,n,i){if(ar(e))throw Error(u(485));if(e=t.action,e!==null){var r={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){r.listeners.push(g)}};$.T!==null?a(!0):r.isTransition=!1,n(r),a=t.pending,a===null?(r.next=t.pending=r,od(t,r)):(r.next=a.next,t.pending=a.next=r)}}function od(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var r=$.T,g={};$.T=g;try{var z=a(i,n),q=$.S;q!==null&&q(g,z),ud(e,t,z)}catch(ne){no(e,t,ne)}finally{r!==null&&g.types!==null&&(r.types=g.types),$.T=r}}else try{r=a(i,n),ud(e,t,r)}catch(ne){no(e,t,ne)}}function ud(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){cd(e,t,n)},function(n){return no(e,t,n)}):cd(e,t,a)}function cd(e,t,a){t.status="fulfilled",t.value=a,dd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,od(e,a)))}function no(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,dd(t),t=t.next;while(t!==n)}e.action=null}function dd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function fd(e,t){return t}function hd(e,t){if(Ge){var a=it.formState;if(a!==null){e:{var n=Ue;if(Ge){if(rt){t:{for(var i=rt,r=na;i.nodeType!==8;){if(!r){i=null;break t}if(i=ia(i.nextSibling),i===null){i=null;break t}}r=i.data,i=r==="F!"||r==="F"?i:null}if(i){rt=ia(i.nextSibling),n=i.data==="F!";break e}}Ja(n)}n=!1}n&&(t=a[0])}}return a=Rt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fd,lastRenderedState:t},a.queue=n,a=Rd.bind(null,Ue,n),n.dispatch=a,n=ao(!1),r=uo.bind(null,Ue,!1,n.queue),n=Rt(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=Gm.bind(null,Ue,i,r,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function pd(e){var t=xt();return md(t,tt,e)}function md(e,t,a){if(t=eo(e,t,fd)[0],e=Pi(Ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Kl(t)}catch(g){throw g===al?Zi:g}else n=t;t=xt();var i=t.queue,r=i.dispatch;return a!==t.memoizedState&&(Ue.flags|=2048,sl(9,{destroy:void 0},Xm.bind(null,i,a),null)),[n,r,e]}function Xm(e,t){e.action=t}function xd(e){var t=xt(),a=tt;if(a!==null)return md(t,a,e);xt(),t=t.memoizedState,a=xt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function sl(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=Ii(),Ue.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function gd(){return xt().memoizedState}function er(e,t,a,n){var i=Rt();Ue.flags|=e,i.memoizedState=sl(1|t,{destroy:void 0},a,n===void 0?null:n)}function tr(e,t,a,n){var i=xt();n=n===void 0?null:n;var r=i.memoizedState.inst;tt!==null&&n!==null&&Js(n,tt.memoizedState.deps)?i.memoizedState=sl(t,r,a,n):(Ue.flags|=e,i.memoizedState=sl(1|t,r,a,n))}function bd(e,t){er(8390656,8,e,t)}function lo(e,t){tr(2048,8,e,t)}function Qm(e){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=Ii(),Ue.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function yd(e){var t=xt().memoizedState;return Qm({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function vd(e,t){return tr(4,2,e,t)}function wd(e,t){return tr(4,4,e,t)}function Sd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _d(e,t,a){a=a!=null?a.concat([e]):null,tr(4,4,Sd.bind(null,t,e),a)}function io(){}function jd(e,t){var a=xt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Js(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Nd(e,t){var a=xt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Js(t,n[1]))return n[0];if(n=e(),zn){Mt(!0);try{e()}finally{Mt(!1)}}return a.memoizedState=[n,t],n}function ro(e,t,a){return a===void 0||(za&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Cf(),Ue.lanes|=e,nn|=e,a)}function Ed(e,t,a,n){return Zt(a,t)?a:ll.current!==null?(e=ro(e,a,n),Zt(e,t)||(vt=!0),e):(za&42)===0||(za&1073741824)!==0&&(Ve&261930)===0?(vt=!0,e.memoizedState=a):(e=Cf(),Ue.lanes|=e,nn|=e,t)}function Cd(e,t,a,n,i){var r=K.p;K.p=r!==0&&8>r?r:8;var g=$.T,z={};$.T=z,uo(e,!1,t,a);try{var q=i(),ne=$.S;if(ne!==null&&ne(z,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var pe=Ym(q,n);Jl(e,t,pe,$t(e))}else Jl(e,t,n,$t(e))}catch(ge){Jl(e,t,{then:function(){},status:"rejected",reason:ge},$t())}finally{K.p=r,g!==null&&z.types!==null&&(g.types=z.types),$.T=g}}function Km(){}function so(e,t,a,n){if(e.tag!==5)throw Error(u(476));var i=kd(e).queue;Cd(e,i,t,be,a===null?Km:function(){return Ad(e),a(n)})}function kd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:be},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ad(e){var t=kd(e);t.next===null&&(t=e.alternate.memoizedState),Jl(e,t.next.queue,{},$t())}function oo(){return kt(di)}function zd(){return xt().memoizedState}function Td(){return xt().memoizedState}function Jm(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=$t();e=Ia(a);var n=Wa(t,e,a);n!==null&&(Vt(n,t,a),Zl(n,t,a)),t={cache:Bs()},e.payload=t;return}t=t.return}}function $m(e,t,a){var n=$t();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ar(e)?Od(t,a):(a=Es(e,t,a,n),a!==null&&(Vt(a,e,n),Dd(a,t,n)))}function Rd(e,t,a){var n=$t();Jl(e,t,a,n)}function Jl(e,t,a,n){var i={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ar(e))Od(t,i);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var g=t.lastRenderedState,z=r(g,a);if(i.hasEagerState=!0,i.eagerState=z,Zt(z,g))return Ui(e,t,i,0),it===null&&Mi(),!1}catch{}if(a=Es(e,t,i,n),a!==null)return Vt(a,e,n),Dd(a,t,n),!0}return!1}function uo(e,t,a,n){if(n={lane:2,revertLane:Vo(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ar(e)){if(t)throw Error(u(479))}else t=Es(e,a,n,2),t!==null&&Vt(t,e,2)}function ar(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Od(e,t){il=$i=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Dd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,_i(e,a)}}var $l={readContext:kt,use:Wi,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};$l.useEffectEvent=ft;var Md={readContext:kt,use:Wi,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:bd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,er(4194308,4,Sd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return er(4194308,4,e,t)},useInsertionEffect:function(e,t){er(4,2,e,t)},useMemo:function(e,t){var a=Rt();t=t===void 0?null:t;var n=e();if(zn){Mt(!0);try{e()}finally{Mt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=Rt();if(a!==void 0){var i=a(t);if(zn){Mt(!0);try{a(t)}finally{Mt(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=$m.bind(null,Ue,e),[n.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:function(e){e=ao(e);var t=e.queue,a=Rd.bind(null,Ue,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:io,useDeferredValue:function(e,t){var a=Rt();return ro(a,e,t)},useTransition:function(){var e=ao(!1);return e=Cd.bind(null,Ue,e.queue,!0,!1),Rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ue,i=Rt();if(Ge){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),it===null)throw Error(u(349));(Ve&127)!==0||ad(n,t,a)}i.memoizedState=a;var r={value:a,getSnapshot:t};return i.queue=r,bd(ld.bind(null,n,r,e),[e]),n.flags|=2048,sl(9,{destroy:void 0},nd.bind(null,n,r,a,t),null),a},useId:function(){var e=Rt(),t=it.identifierPrefix;if(Ge){var a=pa,n=ha;a=(n&~(1<<32-We(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Fi++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Vm++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:oo,useFormState:hd,useActionState:hd,useOptimistic:function(e){var t=Rt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=uo.bind(null,Ue,!0,a),a.dispatch=t,[e,t]},useMemoCache:Ps,useCacheRefresh:function(){return Rt().memoizedState=Jm.bind(null,Ue)},useEffectEvent:function(e){var t=Rt(),a={impl:e};return t.memoizedState=a,function(){if((Fe&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},co={readContext:kt,use:Wi,useCallback:jd,useContext:kt,useEffect:lo,useImperativeHandle:_d,useInsertionEffect:vd,useLayoutEffect:wd,useMemo:Nd,useReducer:Pi,useRef:gd,useState:function(){return Pi(Ta)},useDebugValue:io,useDeferredValue:function(e,t){var a=xt();return Ed(a,tt.memoizedState,e,t)},useTransition:function(){var e=Pi(Ta)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:Kl(e),t]},useSyncExternalStore:td,useId:zd,useHostTransitionStatus:oo,useFormState:pd,useActionState:pd,useOptimistic:function(e,t){var a=xt();return sd(a,tt,e,t)},useMemoCache:Ps,useCacheRefresh:Td};co.useEffectEvent=yd;var Ud={readContext:kt,use:Wi,useCallback:jd,useContext:kt,useEffect:lo,useImperativeHandle:_d,useInsertionEffect:vd,useLayoutEffect:wd,useMemo:Nd,useReducer:to,useRef:gd,useState:function(){return to(Ta)},useDebugValue:io,useDeferredValue:function(e,t){var a=xt();return tt===null?ro(a,e,t):Ed(a,tt.memoizedState,e,t)},useTransition:function(){var e=to(Ta)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:Kl(e),t]},useSyncExternalStore:td,useId:zd,useHostTransitionStatus:oo,useFormState:xd,useActionState:xd,useOptimistic:function(e,t){var a=xt();return tt!==null?sd(a,tt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Ps,useCacheRefresh:Td};Ud.useEffectEvent=yd;function fo(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:_({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ho={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=$t(),i=Ia(n);i.payload=t,a!=null&&(i.callback=a),t=Wa(e,i,n),t!==null&&(Vt(t,e,n),Zl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=$t(),i=Ia(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Wa(e,i,n),t!==null&&(Vt(t,e,n),Zl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=$t(),n=Ia(a);n.tag=2,t!=null&&(n.callback=t),t=Wa(e,n,a),t!==null&&(Vt(t,e,a),Zl(t,e,a))}};function Bd(e,t,a,n,i,r,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,r,g):t.prototype&&t.prototype.isPureReactComponent?!Ml(a,n)||!Ml(i,r):!0}function Ld(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&ho.enqueueReplaceState(t,t.state,null)}function Tn(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=_({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Hd(e){Di(e)}function qd(e){console.error(e)}function Yd(e){Di(e)}function nr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Vd(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function po(e,t,a){return a=Ia(a),a.tag=3,a.payload={element:null},a.callback=function(){nr(e,t)},a}function Zd(e){return e=Ia(e),e.tag=3,e}function Gd(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var r=n.value;e.payload=function(){return i(r)},e.callback=function(){Vd(t,a,n)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Vd(t,a,n),typeof i!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var z=n.stack;this.componentDidCatch(n.value,{componentStack:z!==null?z:""})})}function Fm(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Pn(t,a,i,!0),a=Xt.current,a!==null){switch(a.tag){case 31:case 13:return la===null?mr():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Gi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ho(e,n,i)),!1;case 22:return a.flags|=65536,n===Gi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Ho(e,n,i)),!1}throw Error(u(435,a.tag))}return Ho(e,n,i),mr(),!1}if(Ge)return t=Xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Rs&&(e=Error(u(422),{cause:n}),Ll(ea(e,a)))):(n!==Rs&&(t=Error(u(423),{cause:n}),Ll(ea(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=ea(n,a),i=po(e.stateNode,n,i),Zs(e,i),ht!==4&&(ht=2)),!1;var r=Error(u(520),{cause:n});if(r=ea(r,a),ni===null?ni=[r]:ni.push(r),ht!==4&&(ht=2),t===null)return!0;n=ea(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=po(a.stateNode,n,e),Zs(a,e),!1;case 1:if(t=a.type,r=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(ln===null||!ln.has(r))))return a.flags|=65536,i&=-i,a.lanes|=i,i=Zd(i),Gd(i,e,a,n),Zs(a,i),!1}a=a.return}while(a!==null);return!1}var mo=Error(u(461)),vt=!1;function At(e,t,a,n){t.child=e===null?Jc(t,null,a,n):An(t,e.child,a,n)}function Xd(e,t,a,n,i){a=a.render;var r=t.ref;if("ref"in n){var g={};for(var z in n)z!=="ref"&&(g[z]=n[z])}else g=n;return Nn(t),n=$s(e,t,a,g,r,i),z=Fs(),e!==null&&!vt?(Is(e,t,i),Ra(e,t,i)):(Ge&&z&&zs(t),t.flags|=1,At(e,t,n,i),t.child)}function Qd(e,t,a,n,i){if(e===null){var r=a.type;return typeof r=="function"&&!Cs(r)&&r.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=r,Kd(e,t,r,n,i)):(e=Li(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!_o(e,i)){var g=r.memoizedProps;if(a=a.compare,a=a!==null?a:Ml,a(g,n)&&e.ref===t.ref)return Ra(e,t,i)}return t.flags|=1,e=Ea(r,n),e.ref=t.ref,e.return=t,t.child=e}function Kd(e,t,a,n,i){if(e!==null){var r=e.memoizedProps;if(Ml(r,n)&&e.ref===t.ref)if(vt=!1,t.pendingProps=n=r,_o(e,i))(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,Ra(e,t,i)}return xo(e,t,a,n,i)}function Jd(e,t,a,n){var i=n.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|a:a,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~r}else n=0,t.child=null;return $d(e,t,r,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vi(t,r!==null?r.cachePool:null),r!==null?Ic(t,r):Xs(),Wc(t);else return n=t.lanes=536870912,$d(e,t,r!==null?r.baseLanes|a:a,a,n)}else r!==null?(Vi(t,r.cachePool),Ic(t,r),en(),t.memoizedState=null):(e!==null&&Vi(t,null),Xs(),en());return At(e,t,i,a),t.child}function Fl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $d(e,t,a,n,i){var r=Hs();return r=r===null?null:{parent:bt._currentValue,pool:r},t.memoizedState={baseLanes:a,cachePool:r},e!==null&&Vi(t,null),Xs(),Wc(t),e!==null&&Pn(e,t,n,!0),t.childLanes=i,null}function lr(e,t){return t=rr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fd(e,t,a){return An(t,e.child,null,a),e=lr(t,t.pendingProps),e.flags|=2,Qt(t),t.memoizedState=null,e}function Im(e,t,a){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(n.mode==="hidden")return e=lr(t,n),t.lanes=536870912,Fl(null,e);if(Ks(t),(e=rt)?(e=uh(e,na),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qa!==null?{id:ha,overflow:pa}:null,retryLane:536870912,hydrationErrors:null},a=Oc(e),a.return=t,t.child=a,Ct=t,rt=null)):e=null,e===null)throw Ja(t);return t.lanes=536870912,null}return lr(t,n)}var r=e.memoizedState;if(r!==null){var g=r.dehydrated;if(Ks(t),i)if(t.flags&256)t.flags&=-257,t=Fd(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(vt||Pn(e,t,a,!1),i=(a&e.childLanes)!==0,vt||i){if(n=it,n!==null&&(g=qu(n,a),g!==0&&g!==r.retryLane))throw r.retryLane=g,wn(e,g),Vt(n,e,g),mo;mr(),t=Fd(e,t,a)}else e=r.treeContext,rt=ia(g.nextSibling),Ct=t,Ge=!0,Ka=null,na=!1,e!==null&&Uc(t,e),t=lr(t,n),t.flags|=4096;return t}return e=Ea(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ir(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function xo(e,t,a,n,i){return Nn(t),a=$s(e,t,a,n,void 0,i),n=Fs(),e!==null&&!vt?(Is(e,t,i),Ra(e,t,i)):(Ge&&n&&zs(t),t.flags|=1,At(e,t,a,i),t.child)}function Id(e,t,a,n,i,r){return Nn(t),t.updateQueue=null,a=ed(t,n,a,i),Pc(e),n=Fs(),e!==null&&!vt?(Is(e,t,r),Ra(e,t,r)):(Ge&&n&&zs(t),t.flags|=1,At(e,t,a,r),t.child)}function Wd(e,t,a,n,i){if(Nn(t),t.stateNode===null){var r=$n,g=a.contextType;typeof g=="object"&&g!==null&&(r=kt(g)),r=new a(n,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=ho,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=n,r.state=t.memoizedState,r.refs={},Ys(t),g=a.contextType,r.context=typeof g=="object"&&g!==null?kt(g):$n,r.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(fo(t,a,g,n),r.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(g=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),g!==r.state&&ho.enqueueReplaceState(r,r.state,null),Xl(t,n,r,i),Gl(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){r=t.stateNode;var z=t.memoizedProps,q=Tn(a,z);r.props=q;var ne=r.context,pe=a.contextType;g=$n,typeof pe=="object"&&pe!==null&&(g=kt(pe));var ge=a.getDerivedStateFromProps;pe=typeof ge=="function"||typeof r.getSnapshotBeforeUpdate=="function",z=t.pendingProps!==z,pe||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(z||ne!==g)&&Ld(t,r,n,g),Fa=!1;var ie=t.memoizedState;r.state=ie,Xl(t,n,r,i),Gl(),ne=t.memoizedState,z||ie!==ne||Fa?(typeof ge=="function"&&(fo(t,a,ge,n),ne=t.memoizedState),(q=Fa||Bd(t,a,q,n,ie,ne,g))?(pe||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=ne),r.props=n,r.state=ne,r.context=g,n=q):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{r=t.stateNode,Vs(e,t),g=t.memoizedProps,pe=Tn(a,g),r.props=pe,ge=t.pendingProps,ie=r.context,ne=a.contextType,q=$n,typeof ne=="object"&&ne!==null&&(q=kt(ne)),z=a.getDerivedStateFromProps,(ne=typeof z=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(g!==ge||ie!==q)&&Ld(t,r,n,q),Fa=!1,ie=t.memoizedState,r.state=ie,Xl(t,n,r,i),Gl();var ue=t.memoizedState;g!==ge||ie!==ue||Fa||e!==null&&e.dependencies!==null&&qi(e.dependencies)?(typeof z=="function"&&(fo(t,a,z,n),ue=t.memoizedState),(pe=Fa||Bd(t,a,pe,n,ie,ue,q)||e!==null&&e.dependencies!==null&&qi(e.dependencies))?(ne||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(n,ue,q),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(n,ue,q)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||g===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ue),r.props=n,r.state=ue,r.context=q,n=pe):(typeof r.componentDidUpdate!="function"||g===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),n=!1)}return r=n,ir(e,t),n=(t.flags&128)!==0,r||n?(r=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&n?(t.child=An(t,e.child,null,i),t.child=An(t,null,a,i)):At(e,t,a,i),t.memoizedState=r.state,e=t.child):e=Ra(e,t,i),e}function Pd(e,t,a,n){return _n(),t.flags|=256,At(e,t,a,n),t.child}var go={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bo(e){return{baseLanes:e,cachePool:Vc()}}function yo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Jt),e}function ef(e,t,a){var n=t.pendingProps,i=!1,r=(t.flags&128)!==0,g;if((g=r)||(g=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),g&&(i=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(i?Pa(t):en(),(e=rt)?(e=uh(e,na),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qa!==null?{id:ha,overflow:pa}:null,retryLane:536870912,hydrationErrors:null},a=Oc(e),a.return=t,t.child=a,Ct=t,rt=null)):e=null,e===null)throw Ja(t);return tu(e)?t.lanes=32:t.lanes=536870912,null}var z=n.children;return n=n.fallback,i?(en(),i=t.mode,z=rr({mode:"hidden",children:z},i),n=Sn(n,i,a,null),z.return=t,n.return=t,z.sibling=n,t.child=z,n=t.child,n.memoizedState=bo(a),n.childLanes=yo(e,g,a),t.memoizedState=go,Fl(null,n)):(Pa(t),vo(t,z))}var q=e.memoizedState;if(q!==null&&(z=q.dehydrated,z!==null)){if(r)t.flags&256?(Pa(t),t.flags&=-257,t=wo(e,t,a)):t.memoizedState!==null?(en(),t.child=e.child,t.flags|=128,t=null):(en(),z=n.fallback,i=t.mode,n=rr({mode:"visible",children:n.children},i),z=Sn(z,i,a,null),z.flags|=2,n.return=t,z.return=t,n.sibling=z,t.child=n,An(t,e.child,null,a),n=t.child,n.memoizedState=bo(a),n.childLanes=yo(e,g,a),t.memoizedState=go,t=Fl(null,n));else if(Pa(t),tu(z)){if(g=z.nextSibling&&z.nextSibling.dataset,g)var ne=g.dgst;g=ne,n=Error(u(419)),n.stack="",n.digest=g,Ll({value:n,source:null,stack:null}),t=wo(e,t,a)}else if(vt||Pn(e,t,a,!1),g=(a&e.childLanes)!==0,vt||g){if(g=it,g!==null&&(n=qu(g,a),n!==0&&n!==q.retryLane))throw q.retryLane=n,wn(e,n),Vt(g,e,n),mo;eu(z)||mr(),t=wo(e,t,a)}else eu(z)?(t.flags|=192,t.child=e.child,t=null):(e=q.treeContext,rt=ia(z.nextSibling),Ct=t,Ge=!0,Ka=null,na=!1,e!==null&&Uc(t,e),t=vo(t,n.children),t.flags|=4096);return t}return i?(en(),z=n.fallback,i=t.mode,q=e.child,ne=q.sibling,n=Ea(q,{mode:"hidden",children:n.children}),n.subtreeFlags=q.subtreeFlags&65011712,ne!==null?z=Ea(ne,z):(z=Sn(z,i,a,null),z.flags|=2),z.return=t,n.return=t,n.sibling=z,t.child=n,Fl(null,n),n=t.child,z=e.child.memoizedState,z===null?z=bo(a):(i=z.cachePool,i!==null?(q=bt._currentValue,i=i.parent!==q?{parent:q,pool:q}:i):i=Vc(),z={baseLanes:z.baseLanes|a,cachePool:i}),n.memoizedState=z,n.childLanes=yo(e,g,a),t.memoizedState=go,Fl(e.child,n)):(Pa(t),a=e.child,e=a.sibling,a=Ea(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function vo(e,t){return t=rr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rr(e,t){return e=Gt(22,e,null,t),e.lanes=0,e}function wo(e,t,a){return An(t,e.child,null,a),e=vo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tf(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ms(e.return,t,a)}function So(e,t,a,n,i,r){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:r}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=n,g.tail=a,g.tailMode=i,g.treeForkCount=r)}function af(e,t,a){var n=t.pendingProps,i=n.revealOrder,r=n.tail;n=n.children;var g=mt.current,z=(g&2)!==0;if(z?(g=g&1|2,t.flags|=128):g&=1,te(mt,g),At(e,t,n,a),n=Ge?Bl:0,!z&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tf(e,a,t);else if(e.tag===19)tf(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Ji(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),So(t,!1,i,a,r,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ji(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}So(t,!0,a,null,r,n);break;case"together":So(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Ra(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),nn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Pn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Ea(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ea(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function _o(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&qi(e)))}function Wm(e,t,a){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),$a(t,bt,e.memoizedState.cache),_n();break;case 27:case 5:Qe(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:$a(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ks(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Pa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?ef(e,t,a):(Pa(t),e=Ra(e,t,a),e!==null?e.sibling:null);Pa(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Pn(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return af(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),te(mt,mt.current),n)break;return null;case 22:return t.lanes=0,Jd(e,t,a,t.pendingProps);case 24:$a(t,bt,e.memoizedState.cache)}return Ra(e,t,a)}function nf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!_o(e,a)&&(t.flags&128)===0)return vt=!1,Wm(e,t,a);vt=(e.flags&131072)!==0}else vt=!1,Ge&&(t.flags&1048576)!==0&&Mc(t,Bl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Cn(t.elementType),t.type=e,typeof e=="function")Cs(e)?(n=Tn(e,n),t.tag=1,t=Wd(null,t,e,n,a)):(t.tag=0,t=xo(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===M){t.tag=11,t=Xd(null,t,e,n,a);break e}else if(i===Y){t.tag=14,t=Qd(null,t,e,n,a);break e}}throw t=E(e)||e,Error(u(306,t,""))}}return t;case 0:return xo(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Tn(n,t.pendingProps),Wd(e,t,n,i,a);case 3:e:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(u(387));n=t.pendingProps;var r=t.memoizedState;i=r.element,Vs(e,t),Xl(t,n,null,a);var g=t.memoizedState;if(n=g.cache,$a(t,bt,n),n!==r.cache&&Us(t,[bt],a,!0),Gl(),n=g.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Pd(e,t,n,a);break e}else if(n!==i){i=ea(Error(u(424)),t),Ll(i),t=Pd(e,t,n,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,rt=ia(e.firstChild),Ct=t,Ge=!0,Ka=null,na=!0,a=Jc(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(_n(),n===i){t=Ra(e,t,a);break e}At(e,t,n,a)}t=t.child}return t;case 26:return ir(e,t),e===null?(a=mh(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ge||(a=t.type,e=t.pendingProps,n=Sr(_e.current).createElement(a),n[Et]=t,n[Ut]=e,zt(n,a,e),jt(n),t.stateNode=n):t.memoizedState=mh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qe(t),e===null&&Ge&&(n=t.stateNode=fh(t.type,t.pendingProps,_e.current),Ct=t,na=!0,i=rt,un(t.type)?(au=i,rt=ia(n.firstChild)):rt=i),At(e,t,t.pendingProps.children,a),ir(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((i=n=rt)&&(n=k0(n,t.type,t.pendingProps,na),n!==null?(t.stateNode=n,Ct=t,rt=ia(n.firstChild),na=!1,i=!0):i=!1),i||Ja(t)),Qe(t),i=t.type,r=t.pendingProps,g=e!==null?e.memoizedProps:null,n=r.children,Io(i,r)?n=null:g!==null&&Io(i,g)&&(t.flags|=32),t.memoizedState!==null&&(i=$s(e,t,Zm,null,null,a),di._currentValue=i),ir(e,t),At(e,t,n,a),t.child;case 6:return e===null&&Ge&&((e=a=rt)&&(a=A0(a,t.pendingProps,na),a!==null?(t.stateNode=a,Ct=t,rt=null,e=!0):e=!1),e||Ja(t)),null;case 13:return ef(e,t,a);case 4:return ke(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=An(t,null,n,a):At(e,t,n,a),t.child;case 11:return Xd(e,t,t.type,t.pendingProps,a);case 7:return At(e,t,t.pendingProps,a),t.child;case 8:return At(e,t,t.pendingProps.children,a),t.child;case 12:return At(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,$a(t,t.type,n.value),At(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,Nn(t),i=kt(i),n=n(i),t.flags|=1,At(e,t,n,a),t.child;case 14:return Qd(e,t,t.type,t.pendingProps,a);case 15:return Kd(e,t,t.type,t.pendingProps,a);case 19:return af(e,t,a);case 31:return Im(e,t,a);case 22:return Jd(e,t,a,t.pendingProps);case 24:return Nn(t),n=kt(bt),e===null?(i=Hs(),i===null&&(i=it,r=Bs(),i.pooledCache=r,r.refCount++,r!==null&&(i.pooledCacheLanes|=a),i=r),t.memoizedState={parent:n,cache:i},Ys(t),$a(t,bt,i)):((e.lanes&a)!==0&&(Vs(e,t),Xl(t,null,null,a),Gl()),i=e.memoizedState,r=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),$a(t,bt,n)):(n=r.cache,$a(t,bt,n),n!==i.cache&&Us(t,[bt],a,!0))),At(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Oa(e){e.flags|=4}function jo(e,t,a,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tf())e.flags|=8192;else throw kn=Gi,qs}else e.flags&=-16777217}function lf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!vh(t))if(Tf())e.flags|=8192;else throw kn=Gi,qs}function sr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?He():536870912,e.lanes|=t,dl|=t)}function Il(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Pm(e,t,a){var n=t.pendingProps;switch(Ts(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Aa(bt),Ee(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Wn(t)?Oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Os())),st(t),null;case 26:var i=t.type,r=t.memoizedState;return e===null?(Oa(t),r!==null?(st(t),lf(t,r)):(st(t),jo(t,i,null,n,a))):r?r!==e.memoizedState?(Oa(t),st(t),lf(t,r)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Oa(t),st(t),jo(t,i,e,n,a)),null;case 27:if(Xe(t),a=_e.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Oa(t);else{if(!n){if(t.stateNode===null)throw Error(u(166));return st(t),null}e=F.current,Wn(t)?Bc(t):(e=fh(i,n,a),t.stateNode=e,Oa(t))}return st(t),null;case 5:if(Xe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Oa(t);else{if(!n){if(t.stateNode===null)throw Error(u(166));return st(t),null}if(r=F.current,Wn(t))Bc(t);else{var g=Sr(_e.current);switch(r){case 1:r=g.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:r=g.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":r=g.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":r=g.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":r=g.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof n.is=="string"?g.createElement("select",{is:n.is}):g.createElement("select"),n.multiple?r.multiple=!0:n.size&&(r.size=n.size);break;default:r=typeof n.is=="string"?g.createElement(i,{is:n.is}):g.createElement(i)}}r[Et]=t,r[Ut]=n;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)r.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=r;e:switch(zt(r,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Oa(t)}}return st(t),jo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Oa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(u(166));if(e=_e.current,Wn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=Ct,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[Et]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||th(e.nodeValue,a)),e||Ja(t,!0)}else e=Sr(e).createTextNode(n),e[Et]=t,t.stateNode=e}return st(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Wn(t),a!==null){if(e===null){if(!n)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Et]=t}else _n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else a=Os(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Qt(t),t):(Qt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return st(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Wn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[Et]=t}else _n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),i=!1}else i=Os(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Qt(t),t):(Qt(t),null)}return Qt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==i&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),sr(t,t.updateQueue),st(t),null);case 4:return Ee(),e===null&&Qo(t.stateNode.containerInfo),st(t),null;case 10:return Aa(t.type),st(t),null;case 19:if(D(mt),n=t.memoizedState,n===null)return st(t),null;if(i=(t.flags&128)!==0,r=n.rendering,r===null)if(i)Il(n,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Ji(e),r!==null){for(t.flags|=128,Il(n,!1),e=r.updateQueue,t.updateQueue=e,sr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Rc(a,e),a=a.sibling;return te(mt,mt.current&1|2),Ge&&Ca(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Se()>fr&&(t.flags|=128,i=!0,Il(n,!1),t.lanes=4194304)}else{if(!i)if(e=Ji(r),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,sr(t,e),Il(n,!0),n.tail===null&&n.tailMode==="hidden"&&!r.alternate&&!Ge)return st(t),null}else 2*Se()-n.renderingStartTime>fr&&a!==536870912&&(t.flags|=128,i=!0,Il(n,!1),t.lanes=4194304);n.isBackwards?(r.sibling=t.child,t.child=r):(e=n.last,e!==null?e.sibling=r:t.child=r,n.last=r)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Se(),e.sibling=null,a=mt.current,te(mt,i?a&1|2:a&1),Ge&&Ca(t,n.treeForkCount),e):(st(t),null);case 22:case 23:return Qt(t),Qs(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),a=t.updateQueue,a!==null&&sr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&D(En),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Aa(bt),st(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function e0(e,t){switch(Ts(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(bt),Ee(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xe(t),null;case 31:if(t.memoizedState!==null){if(Qt(t),t.alternate===null)throw Error(u(340));_n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));_n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return D(mt),null;case 4:return Ee(),null;case 10:return Aa(t.type),null;case 22:case 23:return Qt(t),Qs(),e!==null&&D(En),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Aa(bt),null;case 25:return null;default:return null}}function rf(e,t){switch(Ts(t),t.tag){case 3:Aa(bt),Ee();break;case 26:case 27:case 5:Xe(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&Qt(t);break;case 13:Qt(t);break;case 19:D(mt);break;case 10:Aa(t.type);break;case 22:case 23:Qt(t),Qs(),e!==null&&D(En);break;case 24:Aa(bt)}}function Wl(e,t){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){n=void 0;var r=a.create,g=a.inst;n=r(),g.destroy=n}a=a.next}while(a!==i)}}catch(z){et(t,t.return,z)}}function tn(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var r=i.next;n=r;do{if((n.tag&e)===e){var g=n.inst,z=g.destroy;if(z!==void 0){g.destroy=void 0,i=t;var q=a,ne=z;try{ne()}catch(pe){et(i,q,pe)}}}n=n.next}while(n!==r)}}catch(pe){et(t,t.return,pe)}}function sf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Fc(t,a)}catch(n){et(e,e.return,n)}}}function of(e,t,a){a.props=Tn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){et(e,t,n)}}function Pl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(i){et(e,t,i)}}function ma(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){et(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){et(e,t,i)}else a.current=null}function uf(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(i){et(e,e.return,i)}}function No(e,t,a){try{var n=e.stateNode;S0(n,e.type,a,t),n[Ut]=t}catch(i){et(e,e.return,i)}}function cf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&un(e.type)||e.tag===4}function Eo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&un(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 Co(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ja));else if(n!==4&&(n===27&&un(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Co(e,t,a),e=e.sibling;e!==null;)Co(e,t,a),e=e.sibling}function or(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&un(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(or(e,t,a),e=e.sibling;e!==null;)or(e,t,a),e=e.sibling}function df(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zt(t,n,a),t[Et]=e,t[Ut]=a}catch(r){et(e,e.return,r)}}var Da=!1,wt=!1,ko=!1,ff=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function t0(e,t){if(e=e.containerInfo,$o=Ar,e=_c(e),vs(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var i=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{a.nodeType,r.nodeType}catch{a=null;break e}var g=0,z=-1,q=-1,ne=0,pe=0,ge=e,ie=null;t:for(;;){for(var ue;ge!==a||i!==0&&ge.nodeType!==3||(z=g+i),ge!==r||n!==0&&ge.nodeType!==3||(q=g+n),ge.nodeType===3&&(g+=ge.nodeValue.length),(ue=ge.firstChild)!==null;)ie=ge,ge=ue;for(;;){if(ge===e)break t;if(ie===a&&++ne===i&&(z=g),ie===r&&++pe===n&&(q=g),(ue=ge.nextSibling)!==null)break;ge=ie,ie=ge.parentNode}ge=ue}a=z===-1||q===-1?null:{start:z,end:q}}else a=null}a=a||{start:0,end:0}}else a=null;for(Fo={focusedElem:e,selectionRange:a},Ar=!1,Nt=t;Nt!==null;)if(t=Nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Nt=e;else for(;Nt!==null;){switch(t=Nt,r=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,a=t,i=r.memoizedProps,r=r.memoizedState,n=a.stateNode;try{var Ce=Tn(a.type,i);e=n.getSnapshotBeforeUpdate(Ce,r),n.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){et(a,a.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Po(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Po(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,Nt=e;break}Nt=t.return}}function hf(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ua(e,a),n&4&&Wl(5,a);break;case 1:if(Ua(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){et(a,a.return,g)}else{var i=Tn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){et(a,a.return,g)}}n&64&&sf(a),n&512&&Pl(a,a.return);break;case 3:if(Ua(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Fc(e,t)}catch(g){et(a,a.return,g)}}break;case 27:t===null&&n&4&&df(a);case 26:case 5:Ua(e,a),t===null&&n&4&&uf(a),n&512&&Pl(a,a.return);break;case 12:Ua(e,a);break;case 31:Ua(e,a),n&4&&xf(e,a);break;case 13:Ua(e,a),n&4&&gf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=c0.bind(null,a),z0(e,a))));break;case 22:if(n=a.memoizedState!==null||Da,!n){t=t!==null&&t.memoizedState!==null||wt,i=Da;var r=wt;Da=n,(wt=t)&&!r?Ba(e,a,(a.subtreeFlags&8772)!==0):Ua(e,a),Da=i,wt=r}break;case 30:break;default:Ua(e,a)}}function pf(e){var t=e.alternate;t!==null&&(e.alternate=null,pf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ns(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 ut=null,Lt=!1;function Ma(e,t,a){for(a=a.child;a!==null;)mf(e,t,a),a=a.sibling}function mf(e,t,a){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Ie,a)}catch{}switch(a.tag){case 26:wt||ma(a,t),Ma(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:wt||ma(a,t);var n=ut,i=Lt;un(a.type)&&(ut=a.stateNode,Lt=!1),Ma(e,t,a),oi(a.stateNode),ut=n,Lt=i;break;case 5:wt||ma(a,t);case 6:if(n=ut,i=Lt,ut=null,Ma(e,t,a),ut=n,Lt=i,ut!==null)if(Lt)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(a.stateNode)}catch(r){et(a,t,r)}else try{ut.removeChild(a.stateNode)}catch(r){et(a,t,r)}break;case 18:ut!==null&&(Lt?(e=ut,sh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),yl(e)):sh(ut,a.stateNode));break;case 4:n=ut,i=Lt,ut=a.stateNode.containerInfo,Lt=!0,Ma(e,t,a),ut=n,Lt=i;break;case 0:case 11:case 14:case 15:tn(2,a,t),wt||tn(4,a,t),Ma(e,t,a);break;case 1:wt||(ma(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&of(a,t,n)),Ma(e,t,a);break;case 21:Ma(e,t,a);break;case 22:wt=(n=wt)||a.memoizedState!==null,Ma(e,t,a),wt=n;break;default:Ma(e,t,a)}}function xf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yl(e)}catch(a){et(t,t.return,a)}}}function gf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yl(e)}catch(a){et(t,t.return,a)}}function a0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ff),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ff),t;default:throw Error(u(435,e.tag))}}function ur(e,t){var a=a0(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=d0.bind(null,e,n);n.then(i,i)}})}function Ht(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],r=e,g=t,z=g;e:for(;z!==null;){switch(z.tag){case 27:if(un(z.type)){ut=z.stateNode,Lt=!1;break e}break;case 5:ut=z.stateNode,Lt=!1;break e;case 3:case 4:ut=z.stateNode.containerInfo,Lt=!0;break e}z=z.return}if(ut===null)throw Error(u(160));mf(r,g,i),ut=null,Lt=!1,r=i.alternate,r!==null&&(r.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bf(t,e),t=t.sibling}var ua=null;function bf(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),qt(e),n&4&&(tn(3,e,e.return),Wl(3,e),tn(5,e,e.return));break;case 1:Ht(t,e),qt(e),n&512&&(wt||a===null||ma(a,a.return)),n&64&&Da&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var i=ua;if(Ht(t,e),qt(e),n&512&&(wt||a===null||ma(a,a.return)),n&4){var r=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":r=i.getElementsByTagName("title")[0],(!r||r[El]||r[Et]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(n),i.head.insertBefore(r,i.querySelector("head > title"))),zt(r,n,a),r[Et]=e,jt(r),n=r;break e;case"link":var g=bh("link","href",i).get(n+(a.href||""));if(g){for(var z=0;z<g.length;z++)if(r=g[z],r.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&r.getAttribute("rel")===(a.rel==null?null:a.rel)&&r.getAttribute("title")===(a.title==null?null:a.title)&&r.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(z,1);break t}}r=i.createElement(n),zt(r,n,a),i.head.appendChild(r);break;case"meta":if(g=bh("meta","content",i).get(n+(a.content||""))){for(z=0;z<g.length;z++)if(r=g[z],r.getAttribute("content")===(a.content==null?null:""+a.content)&&r.getAttribute("name")===(a.name==null?null:a.name)&&r.getAttribute("property")===(a.property==null?null:a.property)&&r.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&r.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(z,1);break t}}r=i.createElement(n),zt(r,n,a),i.head.appendChild(r);break;default:throw Error(u(468,n))}r[Et]=e,jt(r),n=r}e.stateNode=n}else yh(i,e.type,e.stateNode);else e.stateNode=gh(i,n,e.memoizedProps);else r!==n?(r===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):r.count--,n===null?yh(i,e.type,e.stateNode):gh(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&No(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ht(t,e),qt(e),n&512&&(wt||a===null||ma(a,a.return)),a!==null&&n&4&&No(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ht(t,e),qt(e),n&512&&(wt||a===null||ma(a,a.return)),e.flags&32){i=e.stateNode;try{Vn(i,"")}catch(Ce){et(e,e.return,Ce)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,No(e,i,a!==null?a.memoizedProps:i)),n&1024&&(ko=!0);break;case 6:if(Ht(t,e),qt(e),n&4){if(e.stateNode===null)throw Error(u(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(Ce){et(e,e.return,Ce)}}break;case 3:if(Nr=null,i=ua,ua=_r(t.containerInfo),Ht(t,e),ua=i,qt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{yl(t.containerInfo)}catch(Ce){et(e,e.return,Ce)}ko&&(ko=!1,yf(e));break;case 4:n=ua,ua=_r(e.stateNode.containerInfo),Ht(t,e),qt(e),ua=n;break;case 12:Ht(t,e),qt(e);break;case 31:Ht(t,e),qt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ur(e,n)));break;case 13:Ht(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(dr=Se()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ur(e,n)));break;case 22:i=e.memoizedState!==null;var q=a!==null&&a.memoizedState!==null,ne=Da,pe=wt;if(Da=ne||i,wt=pe||q,Ht(t,e),wt=pe,Da=ne,qt(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||q||Da||wt||Rn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){q=a=t;try{if(r=q.stateNode,i)g=r.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{z=q.stateNode;var ge=q.memoizedProps.style,ie=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;z.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(Ce){et(q,q.return,Ce)}}}else if(t.tag===6){if(a===null){q=t;try{q.stateNode.nodeValue=i?"":q.memoizedProps}catch(Ce){et(q,q.return,Ce)}}}else if(t.tag===18){if(a===null){q=t;try{var ue=q.stateNode;i?oh(ue,!0):oh(q.stateNode,!1)}catch(Ce){et(q,q.return,Ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,ur(e,a))));break;case 19:Ht(t,e),qt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ur(e,n)));break;case 30:break;case 21:break;default:Ht(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(cf(n)){a=n;break}n=n.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var i=a.stateNode,r=Eo(e);or(e,r,i);break;case 5:var g=a.stateNode;a.flags&32&&(Vn(g,""),a.flags&=-33);var z=Eo(e);or(e,z,g);break;case 3:case 4:var q=a.stateNode.containerInfo,ne=Eo(e);Co(e,ne,q);break;default:throw Error(u(161))}}catch(pe){et(e,e.return,pe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ua(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hf(e,t.alternate,t),t=t.sibling}function Rn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:tn(4,t,t.return),Rn(t);break;case 1:ma(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&of(t,t.return,a),Rn(t);break;case 27:oi(t.stateNode);case 26:case 5:ma(t,t.return),Rn(t);break;case 22:t.memoizedState===null&&Rn(t);break;case 30:Rn(t);break;default:Rn(t)}e=e.sibling}}function Ba(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,r=t,g=r.flags;switch(r.tag){case 0:case 11:case 15:Ba(i,r,a),Wl(4,r);break;case 1:if(Ba(i,r,a),n=r,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(ne){et(n,n.return,ne)}if(n=r,i=n.updateQueue,i!==null){var z=n.stateNode;try{var q=i.shared.hiddenCallbacks;if(q!==null)for(i.shared.hiddenCallbacks=null,i=0;i<q.length;i++)$c(q[i],z)}catch(ne){et(n,n.return,ne)}}a&&g&64&&sf(r),Pl(r,r.return);break;case 27:df(r);case 26:case 5:Ba(i,r,a),a&&n===null&&g&4&&uf(r),Pl(r,r.return);break;case 12:Ba(i,r,a);break;case 31:Ba(i,r,a),a&&g&4&&xf(i,r);break;case 13:Ba(i,r,a),a&&g&4&&gf(i,r);break;case 22:r.memoizedState===null&&Ba(i,r,a),Pl(r,r.return);break;case 30:break;default:Ba(i,r,a)}t=t.sibling}}function Ao(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Hl(a))}function zo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Hl(e))}function ca(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vf(e,t,a,n),t=t.sibling}function vf(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:ca(e,t,a,n),i&2048&&Wl(9,t);break;case 1:ca(e,t,a,n);break;case 3:ca(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Hl(e)));break;case 12:if(i&2048){ca(e,t,a,n),e=t.stateNode;try{var r=t.memoizedProps,g=r.id,z=r.onPostCommit;typeof z=="function"&&z(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(q){et(t,t.return,q)}}else ca(e,t,a,n);break;case 31:ca(e,t,a,n);break;case 13:ca(e,t,a,n);break;case 23:break;case 22:r=t.stateNode,g=t.alternate,t.memoizedState!==null?r._visibility&2?ca(e,t,a,n):ei(e,t):r._visibility&2?ca(e,t,a,n):(r._visibility|=2,ol(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Ao(g,t);break;case 24:ca(e,t,a,n),i&2048&&zo(t.alternate,t);break;default:ca(e,t,a,n)}}function ol(e,t,a,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,g=t,z=a,q=n,ne=g.flags;switch(g.tag){case 0:case 11:case 15:ol(r,g,z,q,i),Wl(8,g);break;case 23:break;case 22:var pe=g.stateNode;g.memoizedState!==null?pe._visibility&2?ol(r,g,z,q,i):ei(r,g):(pe._visibility|=2,ol(r,g,z,q,i)),i&&ne&2048&&Ao(g.alternate,g);break;case 24:ol(r,g,z,q,i),i&&ne&2048&&zo(g.alternate,g);break;default:ol(r,g,z,q,i)}t=t.sibling}}function ei(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:ei(a,n),i&2048&&Ao(n.alternate,n);break;case 24:ei(a,n),i&2048&&zo(n.alternate,n);break;default:ei(a,n)}t=t.sibling}}var ti=8192;function ul(e,t,a){if(e.subtreeFlags&ti)for(e=e.child;e!==null;)wf(e,t,a),e=e.sibling}function wf(e,t,a){switch(e.tag){case 26:ul(e,t,a),e.flags&ti&&e.memoizedState!==null&&V0(a,ua,e.memoizedState,e.memoizedProps);break;case 5:ul(e,t,a);break;case 3:case 4:var n=ua;ua=_r(e.stateNode.containerInfo),ul(e,t,a),ua=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=ti,ti=16777216,ul(e,t,a),ti=n):ul(e,t,a));break;default:ul(e,t,a)}}function Sf(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 ai(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Nt=n,jf(n,e)}Sf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_f(e),e=e.sibling}function _f(e){switch(e.tag){case 0:case 11:case 15:ai(e),e.flags&2048&&tn(9,e,e.return);break;case 3:ai(e);break;case 12:ai(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cr(e)):ai(e);break;default:ai(e)}}function cr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Nt=n,jf(n,e)}Sf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:tn(8,t,t.return),cr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,cr(t));break;default:cr(t)}e=e.sibling}}function jf(e,t){for(;Nt!==null;){var a=Nt;switch(a.tag){case 0:case 11:case 15:tn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Hl(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Nt=n;else e:for(a=e;Nt!==null;){n=Nt;var i=n.sibling,r=n.return;if(pf(n),n===a){Nt=null;break e}if(i!==null){i.return=r,Nt=i;break e}Nt=r}}}var n0={getCacheForType:function(e){var t=kt(bt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return kt(bt).controller.signal}},l0=typeof WeakMap=="function"?WeakMap:Map,Fe=0,it=null,qe=null,Ve=0,Pe=0,Kt=null,an=!1,cl=!1,To=!1,La=0,ht=0,nn=0,On=0,Ro=0,Jt=0,dl=0,ni=null,Yt=null,Oo=!1,dr=0,Nf=0,fr=1/0,hr=null,ln=null,St=0,rn=null,fl=null,Ha=0,Do=0,Mo=null,Ef=null,li=0,Uo=null;function $t(){return(Fe&2)!==0&&Ve!==0?Ve&-Ve:$.T!==null?Vo():Yu()}function Cf(){if(Jt===0)if((Ve&536870912)===0||Ge){var e=Sa;Sa<<=1,(Sa&3932160)===0&&(Sa=262144),Jt=e}else Jt=536870912;return e=Xt.current,e!==null&&(e.flags|=32),Jt}function Vt(e,t,a){(e===it&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)&&(hl(e,0),sn(e,Ve,Jt,!1)),pt(e,a),((Fe&2)===0||e!==it)&&(e===it&&((Fe&2)===0&&(On|=a),ht===4&&sn(e,Ve,Jt,!1)),xa(e))}function kf(e,t,a){if((Fe&6)!==0)throw Error(u(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ye(e,t),i=n?s0(e,t):Lo(e,t,!0),r=n;do{if(i===0){cl&&!n&&sn(e,t,0,!1);break}else{if(a=e.current.alternate,r&&!i0(a)){i=Lo(e,t,!1),r=!1;continue}if(i===2){if(r=t,e.errorRecoveryDisabledLanes&r)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var z=e;i=ni;var q=z.current.memoizedState.isDehydrated;if(q&&(hl(z,g).flags|=256),g=Lo(z,g,!1),g!==2){if(To&&!q){z.errorRecoveryDisabledLanes|=r,On|=r,i=4;break e}r=Yt,Yt=i,r!==null&&(Yt===null?Yt=r:Yt.push.apply(Yt,r))}i=g}if(r=!1,i!==2)continue}}if(i===1){hl(e,0),sn(e,t,0,!0);break}e:{switch(n=e,r=i,r){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:sn(n,t,Jt,!an);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(i=dr+300-Se(),10<i)){if(sn(n,t,Jt,!an),fe(n,0,!0)!==0)break e;Ha=t,n.timeoutHandle=ih(Af.bind(null,n,a,Yt,hr,Oo,t,Jt,On,dl,an,r,"Throttled",-0,0),i);break e}Af(n,a,Yt,hr,Oo,t,Jt,On,dl,an,r,null,-0,0)}}break}while(!0);xa(e)}function Af(e,t,a,n,i,r,g,z,q,ne,pe,ge,ie,ue){if(e.timeoutHandle=-1,ge=t.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ja},wf(t,r,ge);var Ce=(r&62914560)===r?dr-Se():(r&4194048)===r?Nf-Se():0;if(Ce=Z0(ge,Ce),Ce!==null){Ha=r,e.cancelPendingCommit=Ce(Bf.bind(null,e,t,r,a,n,i,g,z,q,pe,ge,null,ie,ue)),sn(e,r,g,!ne);return}}Bf(e,t,r,a,n,i,g,z,q)}function i0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var i=a[n],r=i.getSnapshot;i=i.value;try{if(!Zt(r(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function sn(e,t,a,n){t&=~Ro,t&=~On,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var r=31-We(i),g=1<<r;n[r]=-1,i&=~g}a!==0&&Nl(e,a,t)}function pr(){return(Fe&6)===0?(ii(0),!1):!0}function Bo(){if(qe!==null){if(Pe===0)var e=qe.return;else e=qe,ka=jn=null,Ws(e),nl=null,Yl=0,e=qe;for(;e!==null;)rf(e.alternate,e),e=e.return;qe=null}}function hl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,N0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ha=0,Bo(),it=e,qe=a=Ea(e.current,null),Ve=t,Pe=0,Kt=null,an=!1,cl=ye(e,t),To=!1,dl=Jt=Ro=On=nn=ht=0,Yt=ni=null,Oo=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-We(n),r=1<<i;t|=e[i],n&=~r}return La=t,Mi(),a}function zf(e,t){Ue=null,$.H=$l,t===al||t===Zi?(t=Xc(),Pe=3):t===qs?(t=Xc(),Pe=4):Pe=t===mo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,qe===null&&(ht=1,nr(e,ea(t,e.current)))}function Tf(){var e=Xt.current;return e===null?!0:(Ve&4194048)===Ve?la===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===la:!1}function Rf(){var e=$.H;return $.H=$l,e===null?$l:e}function Of(){var e=$.A;return $.A=n0,e}function mr(){ht=4,an||(Ve&4194048)!==Ve&&Xt.current!==null||(cl=!0),(nn&134217727)===0&&(On&134217727)===0||it===null||sn(it,Ve,Jt,!1)}function Lo(e,t,a){var n=Fe;Fe|=2;var i=Rf(),r=Of();(it!==e||Ve!==t)&&(hr=null,hl(e,t)),t=!1;var g=ht;e:do try{if(Pe!==0&&qe!==null){var z=qe,q=Kt;switch(Pe){case 8:Bo(),g=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(t=!0);var ne=Pe;if(Pe=0,Kt=null,pl(e,z,q,ne),a&&cl){g=0;break e}break;default:ne=Pe,Pe=0,Kt=null,pl(e,z,q,ne)}}r0(),g=ht;break}catch(pe){zf(e,pe)}while(!0);return t&&e.shellSuspendCounter++,ka=jn=null,Fe=n,$.H=i,$.A=r,qe===null&&(it=null,Ve=0,Mi()),g}function r0(){for(;qe!==null;)Df(qe)}function s0(e,t){var a=Fe;Fe|=2;var n=Rf(),i=Of();it!==e||Ve!==t?(hr=null,fr=Se()+500,hl(e,t)):cl=ye(e,t);e:do try{if(Pe!==0&&qe!==null){t=qe;var r=Kt;t:switch(Pe){case 1:Pe=0,Kt=null,pl(e,t,r,1);break;case 2:case 9:if(Zc(r)){Pe=0,Kt=null,Mf(t);break}t=function(){Pe!==2&&Pe!==9||it!==e||(Pe=7),xa(e)},r.then(t,t);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:Zc(r)?(Pe=0,Kt=null,Mf(t)):(Pe=0,Kt=null,pl(e,t,r,7));break;case 5:var g=null;switch(qe.tag){case 26:g=qe.memoizedState;case 5:case 27:var z=qe;if(g?vh(g):z.stateNode.complete){Pe=0,Kt=null;var q=z.sibling;if(q!==null)qe=q;else{var ne=z.return;ne!==null?(qe=ne,xr(ne)):qe=null}break t}}Pe=0,Kt=null,pl(e,t,r,5);break;case 6:Pe=0,Kt=null,pl(e,t,r,6);break;case 8:Bo(),ht=6;break e;default:throw Error(u(462))}}o0();break}catch(pe){zf(e,pe)}while(!0);return ka=jn=null,$.H=n,$.A=i,Fe=a,qe!==null?0:(it=null,Ve=0,Mi(),ht)}function o0(){for(;qe!==null&&!P();)Df(qe)}function Df(e){var t=nf(e.alternate,e,La);e.memoizedProps=e.pendingProps,t===null?xr(e):qe=t}function Mf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Id(a,t,t.pendingProps,t.type,void 0,Ve);break;case 11:t=Id(a,t,t.pendingProps,t.type.render,t.ref,Ve);break;case 5:Ws(t);default:rf(a,t),t=qe=Rc(t,La),t=nf(a,t,La)}e.memoizedProps=e.pendingProps,t===null?xr(e):qe=t}function pl(e,t,a,n){ka=jn=null,Ws(t),nl=null,Yl=0;var i=t.return;try{if(Fm(e,i,t,a,Ve)){ht=1,nr(e,ea(a,e.current)),qe=null;return}}catch(r){if(i!==null)throw qe=i,r;ht=1,nr(e,ea(a,e.current)),qe=null;return}t.flags&32768?(Ge||n===1?e=!0:cl||(Ve&536870912)!==0?e=!1:(an=e=!0,(n===2||n===9||n===3||n===6)&&(n=Xt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Uf(t,e)):xr(t)}function xr(e){var t=e;do{if((t.flags&32768)!==0){Uf(t,an);return}e=t.return;var a=Pm(t.alternate,t,La);if(a!==null){qe=a;return}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);ht===0&&(ht=5)}function Uf(e,t){do{var a=e0(e.alternate,e);if(a!==null){a.flags&=32767,qe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){qe=e;return}qe=e=a}while(e!==null);ht=6,qe=null}function Bf(e,t,a,n,i,r,g,z,q){e.cancelPendingCommit=null;do gr();while(St!==0);if((Fe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(r=t.lanes|t.childLanes,r|=Ns,fa(e,a,r,g,z,q),e===it&&(qe=it=null,Ve=0),fl=t,rn=e,Ha=a,Do=r,Mo=i,Ef=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,f0(Me,function(){return Vf(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=$.T,$.T=null,i=K.p,K.p=2,g=Fe,Fe|=4;try{t0(e,t,a)}finally{Fe=g,K.p=i,$.T=n}}St=1,Lf(),Hf(),qf()}}function Lf(){if(St===1){St=0;var e=rn,t=fl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=$.T,$.T=null;var n=K.p;K.p=2;var i=Fe;Fe|=4;try{bf(t,e);var r=Fo,g=_c(e.containerInfo),z=r.focusedElem,q=r.selectionRange;if(g!==z&&z&&z.ownerDocument&&Sc(z.ownerDocument.documentElement,z)){if(q!==null&&vs(z)){var ne=q.start,pe=q.end;if(pe===void 0&&(pe=ne),"selectionStart"in z)z.selectionStart=ne,z.selectionEnd=Math.min(pe,z.value.length);else{var ge=z.ownerDocument||document,ie=ge&&ge.defaultView||window;if(ie.getSelection){var ue=ie.getSelection(),Ce=z.textContent.length,Oe=Math.min(q.start,Ce),nt=q.end===void 0?Oe:Math.min(q.end,Ce);!ue.extend&&Oe>nt&&(g=nt,nt=Oe,Oe=g);var W=wc(z,Oe),Z=wc(z,nt);if(W&&Z&&(ue.rangeCount!==1||ue.anchorNode!==W.node||ue.anchorOffset!==W.offset||ue.focusNode!==Z.node||ue.focusOffset!==Z.offset)){var ae=ge.createRange();ae.setStart(W.node,W.offset),ue.removeAllRanges(),Oe>nt?(ue.addRange(ae),ue.extend(Z.node,Z.offset)):(ae.setEnd(Z.node,Z.offset),ue.addRange(ae))}}}}for(ge=[],ue=z;ue=ue.parentNode;)ue.nodeType===1&&ge.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ge.length;z++){var xe=ge[z];xe.element.scrollLeft=xe.left,xe.element.scrollTop=xe.top}}Ar=!!$o,Fo=$o=null}finally{Fe=i,K.p=n,$.T=a}}e.current=t,St=2}}function Hf(){if(St===2){St=0;var e=rn,t=fl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=$.T,$.T=null;var n=K.p;K.p=2;var i=Fe;Fe|=4;try{hf(e,t.alternate,t)}finally{Fe=i,K.p=n,$.T=a}}St=3}}function qf(){if(St===4||St===3){St=0,ve();var e=rn,t=fl,a=Ha,n=Ef;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?St=5:(St=0,fl=rn=null,Yf(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ln=null),ts(a),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=$.T,i=K.p,K.p=2,$.T=null;try{for(var r=e.onRecoverableError,g=0;g<n.length;g++){var z=n[g];r(z.value,{componentStack:z.stack})}}finally{$.T=t,K.p=i}}(Ha&3)!==0&&gr(),xa(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===Uo?li++:(li=0,Uo=e):li=0,ii(0)}}function Yf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Hl(t)))}function gr(){return Lf(),Hf(),qf(),Vf()}function Vf(){if(St!==5)return!1;var e=rn,t=Do;Do=0;var a=ts(Ha),n=$.T,i=K.p;try{K.p=32>a?32:a,$.T=null,a=Mo,Mo=null;var r=rn,g=Ha;if(St=0,fl=rn=null,Ha=0,(Fe&6)!==0)throw Error(u(331));var z=Fe;if(Fe|=4,_f(r.current),vf(r,r.current,g,a),Fe=z,ii(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Ie,r)}catch{}return!0}finally{K.p=i,$.T=n,Yf(e,t)}}function Zf(e,t,a){t=ea(a,t),t=po(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(pt(e,2),xa(e))}function et(e,t,a){if(e.tag===3)Zf(e,e,a);else for(;t!==null;){if(t.tag===3){Zf(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ln===null||!ln.has(n))){e=ea(a,e),a=Zd(2),n=Wa(t,a,2),n!==null&&(Gd(a,n,t,e),pt(n,2),xa(n));break}}t=t.return}}function Ho(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new l0;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(To=!0,i.add(a),e=u0.bind(null,e,t,a),t.then(e,e))}function u0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,it===e&&(Ve&a)===a&&(ht===4||ht===3&&(Ve&62914560)===Ve&&300>Se()-dr?(Fe&2)===0&&hl(e,0):Ro|=a,dl===Ve&&(dl=0)),xa(e)}function Gf(e,t){t===0&&(t=He()),e=wn(e,t),e!==null&&(pt(e,t),xa(e))}function c0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Gf(e,a)}function d0(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(u(314))}n!==null&&n.delete(t),Gf(e,a)}function f0(e,t){return ee(e,t)}var br=null,ml=null,qo=!1,yr=!1,Yo=!1,on=0;function xa(e){e!==ml&&e.next===null&&(ml===null?br=ml=e:ml=ml.next=e),yr=!0,qo||(qo=!0,p0())}function ii(e,t){if(!Yo&&yr){Yo=!0;do for(var a=!1,n=br;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var r=0;else{var g=n.suspendedLanes,z=n.pingedLanes;r=(1<<31-We(42|e)+1)-1,r&=i&~(g&~z),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(a=!0,Jf(n,r))}else r=Ve,r=fe(n,n===it?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(r&3)===0||ye(n,r)||(a=!0,Jf(n,r));n=n.next}while(a);Yo=!1}}function h0(){Xf()}function Xf(){yr=qo=!1;var e=0;on!==0&&j0()&&(e=on);for(var t=Se(),a=null,n=br;n!==null;){var i=n.next,r=Qf(n,t);r===0?(n.next=null,a===null?br=i:a.next=i,i===null&&(ml=a)):(a=n,(e!==0||(r&3)!==0)&&(yr=!0)),n=i}St!==0&&St!==5||ii(e),on!==0&&(on=0)}function Qf(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var g=31-We(r),z=1<<g,q=i[g];q===-1?((z&a)===0||(z&n)!==0)&&(i[g]=Re(z,t)):q<=t&&(e.expiredLanes|=z),r&=~z}if(t=it,a=Ve,a=fe(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&oe(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ye(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&oe(n),ts(a)){case 2:case 8:a=Ke;break;case 32:a=Me;break;case 268435456:a=da;break;default:a=Me}return n=Kf.bind(null,e),a=ee(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&oe(n),e.callbackPriority=2,e.callbackNode=null,2}function Kf(e,t){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(gr()&&e.callbackNode!==a)return null;var n=Ve;return n=fe(e,e===it?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(kf(e,n,t),Qf(e,Se()),e.callbackNode!=null&&e.callbackNode===a?Kf.bind(null,e):null)}function Jf(e,t){if(gr())return null;kf(e,t,!0)}function p0(){E0(function(){(Fe&6)!==0?ee(ze,h0):Xf()})}function Vo(){if(on===0){var e=el;e===0&&(e=Za,Za<<=1,(Za&261888)===0&&(Za=256)),on=e}return on}function $f(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ci(""+e)}function Ff(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function m0(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var r=$f((i[Ut]||null).action),g=n.submitter;g&&(t=(t=g[Ut]||null)?$f(t.formAction):g.getAttribute("formAction"),t!==null&&(r=t,g=null));var z=new Ti("action","action",null,n,i);e.push({event:z,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(on!==0){var q=g?Ff(i,g):new FormData(i);so(a,{pending:!0,data:q,method:i.method,action:r},null,q)}}else typeof r=="function"&&(z.preventDefault(),q=g?Ff(i,g):new FormData(i),so(a,{pending:!0,data:q,method:i.method,action:r},r,q))},currentTarget:i}]})}}for(var Zo=0;Zo<js.length;Zo++){var Go=js[Zo],x0=Go.toLowerCase(),g0=Go[0].toUpperCase()+Go.slice(1);oa(x0,"on"+g0)}oa(Ec,"onAnimationEnd"),oa(Cc,"onAnimationIteration"),oa(kc,"onAnimationStart"),oa("dblclick","onDoubleClick"),oa("focusin","onFocus"),oa("focusout","onBlur"),oa(Om,"onTransitionRun"),oa(Dm,"onTransitionStart"),oa(Mm,"onTransitionCancel"),oa(Ac,"onTransitionEnd"),qn("onMouseEnter",["mouseout","mouseover"]),qn("onMouseLeave",["mouseout","mouseover"]),qn("onPointerEnter",["pointerout","pointerover"]),qn("onPointerLeave",["pointerout","pointerover"]),gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),gn("onBeforeInput",["compositionend","keypress","textInput","paste"]),gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ri="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(" "),b0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ri));function If(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var r=void 0;if(t)for(var g=n.length-1;0<=g;g--){var z=n[g],q=z.instance,ne=z.currentTarget;if(z=z.listener,q!==r&&i.isPropagationStopped())break e;r=z,i.currentTarget=ne;try{r(i)}catch(pe){Di(pe)}i.currentTarget=null,r=q}else for(g=0;g<n.length;g++){if(z=n[g],q=z.instance,ne=z.currentTarget,z=z.listener,q!==r&&i.isPropagationStopped())break e;r=z,i.currentTarget=ne;try{r(i)}catch(pe){Di(pe)}i.currentTarget=null,r=q}}}}function Ye(e,t){var a=t[as];a===void 0&&(a=t[as]=new Set);var n=e+"__bubble";a.has(n)||(Wf(t,e,2,!1),a.add(n))}function Xo(e,t,a){var n=0;t&&(n|=4),Wf(a,e,n,t)}var vr="_reactListening"+Math.random().toString(36).slice(2);function Qo(e){if(!e[vr]){e[vr]=!0,Gu.forEach(function(a){a!=="selectionchange"&&(b0.has(a)||Xo(a,!1,e),Xo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vr]||(t[vr]=!0,Xo("selectionchange",!1,t))}}function Wf(e,t,a,n){switch(Ch(t)){case 2:var i=Q0;break;case 8:i=K0;break;default:i=su}a=i.bind(null,t,a,e),i=void 0,!ds||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Ko(e,t,a,n,i){var r=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var g=n.tag;if(g===3||g===4){var z=n.stateNode.containerInfo;if(z===i)break;if(g===4)for(g=n.return;g!==null;){var q=g.tag;if((q===3||q===4)&&g.stateNode.containerInfo===i)return;g=g.return}for(;z!==null;){if(g=Bn(z),g===null)return;if(q=g.tag,q===5||q===6||q===26||q===27){n=r=g;continue e}z=z.parentNode}}n=n.return}ac(function(){var ne=r,pe=us(a),ge=[];e:{var ie=zc.get(e);if(ie!==void 0){var ue=Ti,Ce=e;switch(e){case"keypress":if(Ai(a)===0)break e;case"keydown":case"keyup":ue=dm;break;case"focusin":Ce="focus",ue=ms;break;case"focusout":Ce="blur",ue=ms;break;case"beforeblur":case"afterblur":ue=ms;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=ic;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=Pp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=pm;break;case Ec:case Cc:case kc:ue=am;break;case Ac:ue=xm;break;case"scroll":case"scrollend":ue=Ip;break;case"wheel":ue=bm;break;case"copy":case"cut":case"paste":ue=lm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=sc;break;case"toggle":case"beforetoggle":ue=vm}var Oe=(t&4)!==0,nt=!Oe&&(e==="scroll"||e==="scrollend"),W=Oe?ie!==null?ie+"Capture":null:ie;Oe=[];for(var Z=ne,ae;Z!==null;){var xe=Z;if(ae=xe.stateNode,xe=xe.tag,xe!==5&&xe!==26&&xe!==27||ae===null||W===null||(xe=kl(Z,W),xe!=null&&Oe.push(si(Z,xe,ae))),nt)break;Z=Z.return}0<Oe.length&&(ie=new ue(ie,Ce,null,a,pe),ge.push({event:ie,listeners:Oe}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",ue=e==="mouseout"||e==="pointerout",ie&&a!==os&&(Ce=a.relatedTarget||a.fromElement)&&(Bn(Ce)||Ce[Un]))break e;if((ue||ie)&&(ie=pe.window===pe?pe:(ie=pe.ownerDocument)?ie.defaultView||ie.parentWindow:window,ue?(Ce=a.relatedTarget||a.toElement,ue=ne,Ce=Ce?Bn(Ce):null,Ce!==null&&(nt=d(Ce),Oe=Ce.tag,Ce!==nt||Oe!==5&&Oe!==27&&Oe!==6)&&(Ce=null)):(ue=null,Ce=ne),ue!==Ce)){if(Oe=ic,xe="onMouseLeave",W="onMouseEnter",Z="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=sc,xe="onPointerLeave",W="onPointerEnter",Z="pointer"),nt=ue==null?ie:Cl(ue),ae=Ce==null?ie:Cl(Ce),ie=new Oe(xe,Z+"leave",ue,a,pe),ie.target=nt,ie.relatedTarget=ae,xe=null,Bn(pe)===ne&&(Oe=new Oe(W,Z+"enter",Ce,a,pe),Oe.target=ae,Oe.relatedTarget=nt,xe=Oe),nt=xe,ue&&Ce)t:{for(Oe=y0,W=ue,Z=Ce,ae=0,xe=W;xe;xe=Oe(xe))ae++;xe=0;for(var Te=Z;Te;Te=Oe(Te))xe++;for(;0<ae-xe;)W=Oe(W),ae--;for(;0<xe-ae;)Z=Oe(Z),xe--;for(;ae--;){if(W===Z||Z!==null&&W===Z.alternate){Oe=W;break t}W=Oe(W),Z=Oe(Z)}Oe=null}else Oe=null;ue!==null&&Pf(ge,ie,ue,Oe,!1),Ce!==null&&nt!==null&&Pf(ge,nt,Ce,Oe,!0)}}e:{if(ie=ne?Cl(ne):window,ue=ie.nodeName&&ie.nodeName.toLowerCase(),ue==="select"||ue==="input"&&ie.type==="file")var Je=mc;else if(hc(ie))if(xc)Je=zm;else{Je=km;var Ae=Cm}else ue=ie.nodeName,!ue||ue.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?ne&&ss(ne.elementType)&&(Je=mc):Je=Am;if(Je&&(Je=Je(e,ne))){pc(ge,Je,a,pe);break e}Ae&&Ae(e,ie,ne),e==="focusout"&&ne&&ie.type==="number"&&ne.memoizedProps.value!=null&&rs(ie,"number",ie.value)}switch(Ae=ne?Cl(ne):window,e){case"focusin":(hc(Ae)||Ae.contentEditable==="true")&&(Qn=Ae,ws=ne,Ul=null);break;case"focusout":Ul=ws=Qn=null;break;case"mousedown":Ss=!0;break;case"contextmenu":case"mouseup":case"dragend":Ss=!1,jc(ge,a,pe);break;case"selectionchange":if(Rm)break;case"keydown":case"keyup":jc(ge,a,pe)}var Le;if(gs)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 Xn?dc(e,a)&&(Ze="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ze="onCompositionStart");Ze&&(oc&&a.locale!=="ko"&&(Xn||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&Xn&&(Le=nc()):(Xa=pe,fs="value"in Xa?Xa.value:Xa.textContent,Xn=!0)),Ae=wr(ne,Ze),0<Ae.length&&(Ze=new rc(Ze,e,null,a,pe),ge.push({event:Ze,listeners:Ae}),Le?Ze.data=Le:(Le=fc(a),Le!==null&&(Ze.data=Le)))),(Le=Sm?_m(e,a):jm(e,a))&&(Ze=wr(ne,"onBeforeInput"),0<Ze.length&&(Ae=new rc("onBeforeInput","beforeinput",null,a,pe),ge.push({event:Ae,listeners:Ze}),Ae.data=Le)),m0(ge,e,ne,a,pe)}If(ge,t)})}function si(e,t,a){return{instance:e,listener:t,currentTarget:a}}function wr(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,r=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||r===null||(i=kl(e,a),i!=null&&n.unshift(si(e,i,r)),i=kl(e,t),i!=null&&n.push(si(e,i,r))),e.tag===3)return n;e=e.return}return[]}function y0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Pf(e,t,a,n,i){for(var r=t._reactName,g=[];a!==null&&a!==n;){var z=a,q=z.alternate,ne=z.stateNode;if(z=z.tag,q!==null&&q===n)break;z!==5&&z!==26&&z!==27||ne===null||(q=ne,i?(ne=kl(a,r),ne!=null&&g.unshift(si(a,ne,q))):i||(ne=kl(a,r),ne!=null&&g.push(si(a,ne,q)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var v0=/\r\n?/g,w0=/\u0000|\uFFFD/g;function eh(e){return(typeof e=="string"?e:""+e).replace(v0,`
|
|
9
|
-
`).replace(w0,"")}function th(e,t){return t=eh(t),eh(e)===t}function at(e,t,a,n,i,r){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Vn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Vn(e,""+n);break;case"className":Ni(e,"class",n);break;case"tabIndex":Ni(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ni(e,a,n);break;case"style":ec(e,n,r);break;case"data":if(t!=="object"){Ni(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Ci(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof r=="function"&&(a==="formAction"?(t!=="input"&&at(e,t,"name",i.name,i,null),at(e,t,"formEncType",i.formEncType,i,null),at(e,t,"formMethod",i.formMethod,i,null),at(e,t,"formTarget",i.formTarget,i,null)):(at(e,t,"encType",i.encType,i,null),at(e,t,"method",i.method,i,null),at(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Ci(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=ja);break;case"onScroll":n!=null&&Ye("scroll",e);break;case"onScrollEnd":n!=null&&Ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(u(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=Ci(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),ji(e,"popover",n);break;case"xlinkActuate":_a(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":_a(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":_a(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":_a(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":_a(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":_a(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":_a(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":_a(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":_a(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":ji(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=$p.get(a)||a,ji(e,a,n))}}function Jo(e,t,a,n,i,r){switch(a){case"style":ec(e,n,r);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(u(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof n=="string"?Vn(e,n):(typeof n=="number"||typeof n=="bigint")&&Vn(e,""+n);break;case"onScroll":n!=null&&Ye("scroll",e);break;case"onScrollEnd":n!=null&&Ye("scrollend",e);break;case"onClick":n!=null&&(e.onclick=ja);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),r=e[Ut]||null,r=r!=null?r[a]:null,typeof r=="function"&&e.removeEventListener(t,r,i),typeof n=="function")){typeof r!="function"&&r!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):ji(e,a,n)}}}function zt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var n=!1,i=!1,r;for(r in a)if(a.hasOwnProperty(r)){var g=a[r];if(g!=null)switch(r){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:at(e,t,r,g,a,null)}}i&&at(e,t,"srcSet",a.srcSet,a,null),n&&at(e,t,"src",a.src,a,null);return;case"input":Ye("invalid",e);var z=r=g=i=null,q=null,ne=null;for(n in a)if(a.hasOwnProperty(n)){var pe=a[n];if(pe!=null)switch(n){case"name":i=pe;break;case"type":g=pe;break;case"checked":q=pe;break;case"defaultChecked":ne=pe;break;case"value":r=pe;break;case"defaultValue":z=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(u(137,t));break;default:at(e,t,n,pe,a,null)}}Fu(e,r,z,q,ne,g,i,!1);return;case"select":Ye("invalid",e),n=g=r=null;for(i in a)if(a.hasOwnProperty(i)&&(z=a[i],z!=null))switch(i){case"value":r=z;break;case"defaultValue":g=z;break;case"multiple":n=z;default:at(e,t,i,z,a,null)}t=r,a=g,e.multiple=!!n,t!=null?Yn(e,!!n,t,!1):a!=null&&Yn(e,!!n,a,!0);return;case"textarea":Ye("invalid",e),r=i=n=null;for(g in a)if(a.hasOwnProperty(g)&&(z=a[g],z!=null))switch(g){case"value":n=z;break;case"defaultValue":i=z;break;case"children":r=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(91));break;default:at(e,t,g,z,a,null)}Wu(e,n,i,r);return;case"option":for(q in a)a.hasOwnProperty(q)&&(n=a[q],n!=null)&&(q==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":at(e,t,q,n,a,null));return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(n=0;n<ri.length;n++)Ye(ri[n],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("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(ne in a)if(a.hasOwnProperty(ne)&&(n=a[ne],n!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:at(e,t,ne,n,a,null)}return;default:if(ss(t)){for(pe in a)a.hasOwnProperty(pe)&&(n=a[pe],n!==void 0&&Jo(e,t,pe,n,a,void 0));return}}for(z in a)a.hasOwnProperty(z)&&(n=a[z],n!=null&&at(e,t,z,n,a,null))}function S0(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,r=null,g=null,z=null,q=null,ne=null,pe=null;for(ue in a){var ge=a[ue];if(a.hasOwnProperty(ue)&&ge!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":q=ge;default:n.hasOwnProperty(ue)||at(e,t,ue,null,n,ge)}}for(var ie in n){var ue=n[ie];if(ge=a[ie],n.hasOwnProperty(ie)&&(ue!=null||ge!=null))switch(ie){case"type":r=ue;break;case"name":i=ue;break;case"checked":ne=ue;break;case"defaultChecked":pe=ue;break;case"value":g=ue;break;case"defaultValue":z=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(u(137,t));break;default:ue!==ge&&at(e,t,ie,ue,n,ge)}}is(e,g,z,q,ne,pe,r,i);return;case"select":ue=g=z=ie=null;for(r in a)if(q=a[r],a.hasOwnProperty(r)&&q!=null)switch(r){case"value":break;case"multiple":ue=q;default:n.hasOwnProperty(r)||at(e,t,r,null,n,q)}for(i in n)if(r=n[i],q=a[i],n.hasOwnProperty(i)&&(r!=null||q!=null))switch(i){case"value":ie=r;break;case"defaultValue":z=r;break;case"multiple":g=r;default:r!==q&&at(e,t,i,r,n,q)}t=z,a=g,n=ue,ie!=null?Yn(e,!!a,ie,!1):!!n!=!!a&&(t!=null?Yn(e,!!a,t,!0):Yn(e,!!a,a?[]:"",!1));return;case"textarea":ue=ie=null;for(z in a)if(i=a[z],a.hasOwnProperty(z)&&i!=null&&!n.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:at(e,t,z,null,n,i)}for(g in n)if(i=n[g],r=a[g],n.hasOwnProperty(g)&&(i!=null||r!=null))switch(g){case"value":ie=i;break;case"defaultValue":ue=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(u(91));break;default:i!==r&&at(e,t,g,i,n,r)}Iu(e,ie,ue);return;case"option":for(var Ce in a)ie=a[Ce],a.hasOwnProperty(Ce)&&ie!=null&&!n.hasOwnProperty(Ce)&&(Ce==="selected"?e.selected=!1:at(e,t,Ce,null,n,ie));for(q in n)ie=n[q],ue=a[q],n.hasOwnProperty(q)&&ie!==ue&&(ie!=null||ue!=null)&&(q==="selected"?e.selected=ie&&typeof ie!="function"&&typeof ie!="symbol":at(e,t,q,ie,n,ue));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 Oe in a)ie=a[Oe],a.hasOwnProperty(Oe)&&ie!=null&&!n.hasOwnProperty(Oe)&&at(e,t,Oe,null,n,ie);for(ne in n)if(ie=n[ne],ue=a[ne],n.hasOwnProperty(ne)&&ie!==ue&&(ie!=null||ue!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(u(137,t));break;default:at(e,t,ne,ie,n,ue)}return;default:if(ss(t)){for(var nt in a)ie=a[nt],a.hasOwnProperty(nt)&&ie!==void 0&&!n.hasOwnProperty(nt)&&Jo(e,t,nt,void 0,n,ie);for(pe in n)ie=n[pe],ue=a[pe],!n.hasOwnProperty(pe)||ie===ue||ie===void 0&&ue===void 0||Jo(e,t,pe,ie,n,ue);return}}for(var W in a)ie=a[W],a.hasOwnProperty(W)&&ie!=null&&!n.hasOwnProperty(W)&&at(e,t,W,null,n,ie);for(ge in n)ie=n[ge],ue=a[ge],!n.hasOwnProperty(ge)||ie===ue||ie==null&&ue==null||at(e,t,ge,ie,n,ue)}function ah(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var i=a[n],r=i.transferSize,g=i.initiatorType,z=i.duration;if(r&&z&&ah(g)){for(g=0,z=i.responseEnd,n+=1;n<a.length;n++){var q=a[n],ne=q.startTime;if(ne>z)break;var pe=q.transferSize,ge=q.initiatorType;pe&&ah(ge)&&(q=q.responseEnd,g+=pe*(q<z?1:(z-ne)/(q-ne)))}if(--n,t+=8*(r+g)/(i.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 $o=null,Fo=null;function Sr(e){return e.nodeType===9?e:e.ownerDocument}function nh(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 lh(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 Io(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 Wo=null;function j0(){var e=window.event;return e&&e.type==="popstate"?e===Wo?!1:(Wo=e,!0):(Wo=null,!1)}var ih=typeof setTimeout=="function"?setTimeout:void 0,N0=typeof clearTimeout=="function"?clearTimeout:void 0,rh=typeof Promise=="function"?Promise:void 0,E0=typeof queueMicrotask=="function"?queueMicrotask:typeof rh<"u"?function(e){return rh.resolve(null).then(e).catch(C0)}:ih;function C0(e){setTimeout(function(){throw e})}function un(e){return e==="head"}function sh(e,t){var a=t,n=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(i),yl(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")oi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,oi(a);for(var r=a.firstChild;r;){var g=r.nextSibling,z=r.nodeName;r[El]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&r.rel.toLowerCase()==="stylesheet"||a.removeChild(r),r=g}}else a==="body"&&oi(e.ownerDocument.body);a=i}while(a);yl(t)}function oh(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Po(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Po(a),ns(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function k0(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[El])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=ia(e.nextSibling),e===null)break}return null}function A0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ia(e.nextSibling),e===null))return null;return e}function uh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ia(e.nextSibling),e===null))return null;return e}function eu(e){return e.data==="$?"||e.data==="$~"}function tu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function z0(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function ia(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var au=null;function ch(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ia(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function dh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function fh(e,t,a){switch(t=Sr(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function oi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ns(e)}var ra=new Map,hh=new Set;function _r(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qa=K.d;K.d={f:T0,r:R0,D:O0,C:D0,L:M0,m:U0,X:L0,S:B0,M:H0};function T0(){var e=qa.f(),t=pr();return e||t}function R0(e){var t=Ln(e);t!==null&&t.tag===5&&t.type==="form"?Ad(t):qa.r(e)}var xl=typeof document>"u"?null:document;function ph(e,t,a){var n=xl;if(n&&typeof t=="string"&&t){var i=Wt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),hh.has(i)||(hh.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),zt(t,"link",e),jt(t),n.head.appendChild(t)))}}function O0(e){qa.D(e),ph("dns-prefetch",e,null)}function D0(e,t){qa.C(e,t),ph("preconnect",e,t)}function M0(e,t,a){qa.L(e,t,a);var n=xl;if(n&&e&&t){var i='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Wt(a.imageSizes)+'"]')):i+='[href="'+Wt(e)+'"]';var r=i;switch(t){case"style":r=gl(e);break;case"script":r=bl(e)}ra.has(r)||(e=_({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ra.set(r,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(ui(r))||t==="script"&&n.querySelector(ci(r))||(t=n.createElement("link"),zt(t,"link",e),jt(t),n.head.appendChild(t)))}}function U0(e,t){qa.m(e,t);var a=xl;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Wt(n)+'"][href="'+Wt(e)+'"]',r=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=bl(e)}if(!ra.has(r)&&(e=_({rel:"modulepreload",href:e},t),ra.set(r,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ci(r)))return}n=a.createElement("link"),zt(n,"link",e),jt(n),a.head.appendChild(n)}}}function B0(e,t,a){qa.S(e,t,a);var n=xl;if(n&&e){var i=Hn(n).hoistableStyles,r=gl(e);t=t||"default";var g=i.get(r);if(!g){var z={loading:0,preload:null};if(g=n.querySelector(ui(r)))z.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ra.get(r))&&nu(e,a);var q=g=n.createElement("link");jt(q),zt(q,"link",e),q._p=new Promise(function(ne,pe){q.onload=ne,q.onerror=pe}),q.addEventListener("load",function(){z.loading|=1}),q.addEventListener("error",function(){z.loading|=2}),z.loading|=4,jr(g,t,n)}g={type:"stylesheet",instance:g,count:1,state:z},i.set(r,g)}}}function L0(e,t){qa.X(e,t);var a=xl;if(a&&e){var n=Hn(a).hoistableScripts,i=bl(e),r=n.get(i);r||(r=a.querySelector(ci(i)),r||(e=_({src:e,async:!0},t),(t=ra.get(i))&&lu(e,t),r=a.createElement("script"),jt(r),zt(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(i,r))}}function H0(e,t){qa.M(e,t);var a=xl;if(a&&e){var n=Hn(a).hoistableScripts,i=bl(e),r=n.get(i);r||(r=a.querySelector(ci(i)),r||(e=_({src:e,async:!0,type:"module"},t),(t=ra.get(i))&&lu(e,t),r=a.createElement("script"),jt(r),zt(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(i,r))}}function mh(e,t,a,n){var i=(i=_e.current)?_r(i):null;if(!i)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=gl(a.href),a=Hn(i).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=gl(a.href);var r=Hn(i).hoistableStyles,g=r.get(e);if(g||(i=i.ownerDocument||i,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,g),(r=i.querySelector(ui(e)))&&!r._p&&(g.instance=r,g.state.loading=5),ra.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ra.set(e,a),r||q0(i,e,a,g.state))),t&&n===null)throw Error(u(528,""));return g}if(t&&n!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=bl(a),a=Hn(i).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function gl(e){return'href="'+Wt(e)+'"'}function ui(e){return'link[rel="stylesheet"]['+e+"]"}function xh(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function q0(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),zt(t,"link",a),jt(t),e.head.appendChild(t))}function bl(e){return'[src="'+Wt(e)+'"]'}function ci(e){return"script[async]"+e}function gh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Wt(a.href)+'"]');if(n)return t.instance=n,jt(n),n;var i=_({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),jt(n),zt(n,"style",i),jr(n,a.precedence,e),t.instance=n;case"stylesheet":i=gl(a.href);var r=e.querySelector(ui(i));if(r)return t.state.loading|=4,t.instance=r,jt(r),r;n=xh(a),(i=ra.get(i))&&nu(n,i),r=(e.ownerDocument||e).createElement("link"),jt(r);var g=r;return g._p=new Promise(function(z,q){g.onload=z,g.onerror=q}),zt(r,"link",n),t.state.loading|=4,jr(r,a.precedence,e),t.instance=r;case"script":return r=bl(a.src),(i=e.querySelector(ci(r)))?(t.instance=i,jt(i),i):(n=a,(i=ra.get(r))&&(n=_({},a),lu(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),jt(i),zt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,jr(n,a.precedence,e));return t.instance}function jr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,r=i,g=0;g<n.length;g++){var z=n[g];if(z.dataset.precedence===t)r=z;else if(r!==i)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function nu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Nr=null;function bh(e,t,a){if(Nr===null){var n=new Map,i=Nr=new Map;i.set(a,n)}else i=Nr,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var r=a[i];if(!(r[El]||r[Et]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var g=r.getAttribute(t)||"";g=e+g;var z=n.get(g);z?z.push(r):n.set(g,[r])}}return n}function yh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Y0(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function vh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function V0(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=gl(n.href),r=t.querySelector(ui(i));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Er.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=r,jt(r);return}r=t.ownerDocument||t,n=xh(n),(i=ra.get(i))&&nu(n,i),r=r.createElement("link"),jt(r);var g=r;g._p=new Promise(function(z,q){g.onload=z,g.onerror=q}),zt(r,"link",n),a.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Er.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var iu=0;function Z0(e,t){return e.stylesheets&&e.count===0&&kr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&kr(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&iu===0&&(iu=62500*_0());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&kr(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>iu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Er(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cr=null;function kr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cr=new Map,t.forEach(G0,e),Cr=null,Er.call(e))}function G0(e,t){if(!(t.state.loading&4)){var a=Cr.get(e);if(a)var n=a.get(null);else{a=new Map,Cr.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<i.length;r++){var g=i[r];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),n=g)}n&&a.set(null,n)}i=t.instance,g=i.getAttribute("data-precedence"),r=a.get(g)||n,r===n&&a.set(null,i),a.set(g,i),this.count++,n=Er.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),r?r.parentNode.insertBefore(i,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var di={$$typeof:j,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function X0(e,t,a,n,i,r,g,z,q){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=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=r,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function wh(e,t,a,n,i,r,g,z,q,ne,pe,ge){return e=new X0(e,t,a,g,q,ne,pe,ge,z),t=1,r===!0&&(t|=24),r=Gt(3,null,null,t),e.current=r,r.stateNode=e,t=Bs(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:n,isDehydrated:a,cache:t},Ys(r),e}function Sh(e){return e?(e=$n,e):$n}function _h(e,t,a,n,i,r){i=Sh(i),n.context===null?n.context=i:n.pendingContext=i,n=Ia(t),n.payload={element:a},r=r===void 0?null:r,r!==null&&(n.callback=r),a=Wa(e,n,t),a!==null&&(Vt(a,e,t),Zl(a,e,t))}function jh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ru(e,t){jh(e,t),(e=e.alternate)&&jh(e,t)}function Nh(e){if(e.tag===13||e.tag===31){var t=wn(e,67108864);t!==null&&Vt(t,e,67108864),ru(e,67108864)}}function Eh(e){if(e.tag===13||e.tag===31){var t=$t();t=es(t);var a=wn(e,t);a!==null&&Vt(a,e,t),ru(e,t)}}var Ar=!0;function Q0(e,t,a,n){var i=$.T;$.T=null;var r=K.p;try{K.p=2,su(e,t,a,n)}finally{K.p=r,$.T=i}}function K0(e,t,a,n){var i=$.T;$.T=null;var r=K.p;try{K.p=8,su(e,t,a,n)}finally{K.p=r,$.T=i}}function su(e,t,a,n){if(Ar){var i=ou(n);if(i===null)Ko(e,t,n,zr,a),kh(e,n);else if($0(i,e,t,a,n))n.stopPropagation();else if(kh(e,n),t&4&&-1<J0.indexOf(e)){for(;i!==null;){var r=Ln(i);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var g=X(r.pendingLanes);if(g!==0){var z=r;for(z.pendingLanes|=2,z.entangledLanes|=2;g;){var q=1<<31-We(g);z.entanglements[1]|=q,g&=~q}xa(r),(Fe&6)===0&&(fr=Se()+500,ii(0))}}break;case 31:case 13:z=wn(r,2),z!==null&&Vt(z,r,2),pr(),ru(r,2)}if(r=ou(n),r===null&&Ko(e,t,n,zr,a),r===i)break;i=r}i!==null&&n.stopPropagation()}else Ko(e,t,n,null,a)}}function ou(e){return e=us(e),uu(e)}var zr=null;function uu(e){if(zr=null,e=Bn(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zr=e,null}function Ch(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(we()){case ze:return 2;case Ke:return 8;case Me:case gt:return 32;case da:return 268435456;default:return 32}default:return 32}}var cu=!1,cn=null,dn=null,fn=null,fi=new Map,hi=new Map,hn=[],J0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function kh(e,t){switch(e){case"focusin":case"focusout":cn=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":fi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hi.delete(t.pointerId)}}function pi(e,t,a,n,i,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:r,targetContainers:[i]},t!==null&&(t=Ln(t),t!==null&&Nh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function $0(e,t,a,n,i){switch(t){case"focusin":return cn=pi(cn,e,t,a,n,i),!0;case"dragenter":return dn=pi(dn,e,t,a,n,i),!0;case"mouseover":return fn=pi(fn,e,t,a,n,i),!0;case"pointerover":var r=i.pointerId;return fi.set(r,pi(fi.get(r)||null,e,t,a,n,i)),!0;case"gotpointercapture":return r=i.pointerId,hi.set(r,pi(hi.get(r)||null,e,t,a,n,i)),!0}return!1}function Ah(e){var t=Bn(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Vu(e.priority,function(){Eh(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,Vu(e.priority,function(){Eh(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Tr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ou(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);os=n,a.target.dispatchEvent(n),os=null}else return t=Ln(a),t!==null&&Nh(t),e.blockedOn=a,!1;t.shift()}return!0}function zh(e,t,a){Tr(e)&&a.delete(t)}function F0(){cu=!1,cn!==null&&Tr(cn)&&(cn=null),dn!==null&&Tr(dn)&&(dn=null),fn!==null&&Tr(fn)&&(fn=null),fi.forEach(zh),hi.forEach(zh)}function Rr(e,t){e.blockedOn===t&&(e.blockedOn=null,cu||(cu=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,F0)))}var Or=null;function Th(e){Or!==e&&(Or=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Or===e&&(Or=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(uu(n||a)===null)continue;break}var r=Ln(a);r!==null&&(e.splice(t,3),t-=3,so(r,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function yl(e){function t(q){return Rr(q,e)}cn!==null&&Rr(cn,e),dn!==null&&Rr(dn,e),fn!==null&&Rr(fn,e),fi.forEach(t),hi.forEach(t);for(var a=0;a<hn.length;a++){var n=hn[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<hn.length&&(a=hn[0],a.blockedOn===null);)Ah(a),a.blockedOn===null&&hn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],r=a[n+1],g=i[Ut]||null;if(typeof r=="function")g||Th(a);else if(g){var z=null;if(r&&r.hasAttribute("formAction")){if(i=r,g=r[Ut]||null)z=g.formAction;else if(uu(i)!==null)continue}else z=g.action;typeof z=="function"?a[n+1]=z:(a.splice(n,3),n-=3),Th(a)}}}function Rh(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(g){return i=g})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function du(e){this._internalRoot=e}Dr.prototype.render=du.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,n=$t();_h(a,n,e,t,null,null)},Dr.prototype.unmount=du.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_h(e.current,2,null,e,null,null),pr(),t[Un]=null}};function Dr(e){this._internalRoot=e}Dr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yu();e={blockedOn:null,target:e,priority:t};for(var a=0;a<hn.length&&t!==0&&t<hn[a].priority;a++);hn.splice(a,0,e),a===0&&Ah(e)}};var Oh=c.version;if(Oh!=="19.2.3")throw Error(u(527,Oh,"19.2.3"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=b(t),e=e!==null?C(e):null,e=e===null?null:e.stateNode,e};var I0={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mr.isDisabled&&Mr.supportsFiber)try{Ie=Mr.inject(I0),dt=Mr}catch{}}return xi.createRoot=function(e,t){if(!f(e))throw Error(u(299));var a=!1,n="",i=Hd,r=qd,g=Yd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=wh(e,1,!1,null,null,a,n,null,i,r,g,Rh),e[Un]=t.current,Qo(e),new du(t)},xi.hydrateRoot=function(e,t,a){if(!f(e))throw Error(u(299));var n=!1,i="",r=Hd,g=qd,z=Yd,q=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(r=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(z=a.onRecoverableError),a.formState!==void 0&&(q=a.formState)),t=wh(e,1,!0,t,a??null,n,i,q,r,g,z,Rh),t.context=Sh(null),a=t.current,n=$t(),n=es(n),i=Ia(n),i.callback=null,Wa(a,i,n),a=n,t.current.lanes=a,pt(t,a),xa(t),e[Un]=t.current,Qo(e),new Dr(t)},xi.version="19.2.3",xi}var Zh;function sx(){if(Zh)return pu.exports;Zh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(c){console.error(c)}}return l(),pu.exports=rx(),pu.exports}var ox=sx();const ux=Ou(ox);var Gh="popstate";function cx(l={}){function c(u,f){let{pathname:d,search:h,hash:m}=u.location;return Cu("",{pathname:d,search:h,hash:m},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function o(u,f){return typeof f=="string"?f:yi(f)}return fx(c,o,null,l)}function ct(l,c){if(l===!1||l===null||typeof l>"u")throw new Error(c)}function ba(l,c){if(!l){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function dx(){return Math.random().toString(36).substring(2,10)}function Xh(l,c){return{usr:l.state,key:l.key,idx:c}}function Cu(l,c,o=null,u){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof c=="string"?Sl(c):c,state:o,key:c&&c.key||u||dx()}}function yi({pathname:l="/",search:c="",hash:o=""}){return c&&c!=="?"&&(l+=c.charAt(0)==="?"?c:"?"+c),o&&o!=="#"&&(l+=o.charAt(0)==="#"?o:"#"+o),l}function Sl(l){let c={};if(l){let o=l.indexOf("#");o>=0&&(c.hash=l.substring(o),l=l.substring(0,o));let u=l.indexOf("?");u>=0&&(c.search=l.substring(u),l=l.substring(0,u)),l&&(c.pathname=l)}return c}function fx(l,c,o,u={}){let{window:f=document.defaultView,v5Compat:d=!1}=u,h=f.history,m="POP",x=null,b=C();b==null&&(b=0,h.replaceState({...h.state,idx:b},""));function C(){return(h.state||{idx:null}).idx}function _(){m="POP";let y=C(),w=y==null?null:y-b;b=y,x&&x({action:m,location:p.location,delta:w})}function T(y,w){m="PUSH";let k=Cu(p.location,y,w);b=C()+1;let j=Xh(k,b),M=p.createHref(k);try{h.pushState(j,"",M)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;f.location.assign(M)}d&&x&&x({action:m,location:p.location,delta:1})}function N(y,w){m="REPLACE";let k=Cu(p.location,y,w);b=C();let j=Xh(k,b),M=p.createHref(k);h.replaceState(j,"",M),d&&x&&x({action:m,location:p.location,delta:0})}function S(y){return hx(y)}let p={get action(){return m},get location(){return l(f,h)},listen(y){if(x)throw new Error("A history only accepts one active listener");return f.addEventListener(Gh,_),x=y,()=>{f.removeEventListener(Gh,_),x=null}},createHref(y){return c(f,y)},createURL:S,encodeLocation(y){let w=S(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:T,replace:N,go(y){return h.go(y)}};return p}function hx(l,c=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),ct(o,"No window.location.(origin|href) available to create URL");let u=typeof l=="string"?l:yi(l);return u=u.replace(/ $/,"%20"),!c&&u.startsWith("//")&&(u=o+u),new URL(u,o)}function cp(l,c,o="/"){return px(l,c,o,!1)}function px(l,c,o,u){let f=typeof c=="string"?Sl(c):c,d=Va(f.pathname||"/",o);if(d==null)return null;let h=dp(l);mx(h);let m=null;for(let x=0;m==null&&x<h.length;++x){let b=Ex(d);m=jx(h[x],b,u)}return m}function dp(l,c=[],o=[],u="",f=!1){let d=(h,m,x=f,b)=>{let C={relativePath:b===void 0?h.path||"":b,caseSensitive:h.caseSensitive===!0,childrenIndex:m,route:h};if(C.relativePath.startsWith("/")){if(!C.relativePath.startsWith(u)&&x)return;ct(C.relativePath.startsWith(u),`Absolute route path "${C.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),C.relativePath=C.relativePath.slice(u.length)}let _=Ya([u,C.relativePath]),T=o.concat(C);h.children&&h.children.length>0&&(ct(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${_}".`),dp(h.children,c,T,_,x)),!(h.path==null&&!h.index)&&c.push({path:_,score:Sx(_,h.index),routesMeta:T})};return l.forEach((h,m)=>{if(h.path===""||!h.path?.includes("?"))d(h,m);else for(let x of fp(h.path))d(h,m,!0,x)}),c}function fp(l){let c=l.split("/");if(c.length===0)return[];let[o,...u]=c,f=o.endsWith("?"),d=o.replace(/\?$/,"");if(u.length===0)return f?[d,""]:[d];let h=fp(u.join("/")),m=[];return m.push(...h.map(x=>x===""?d:[d,x].join("/"))),f&&m.push(...h),m.map(x=>l.startsWith("/")&&x===""?"/":x)}function mx(l){l.sort((c,o)=>c.score!==o.score?o.score-c.score:_x(c.routesMeta.map(u=>u.childrenIndex),o.routesMeta.map(u=>u.childrenIndex)))}var xx=/^:[\w-]+$/,gx=3,bx=2,yx=1,vx=10,wx=-2,Qh=l=>l==="*";function Sx(l,c){let o=l.split("/"),u=o.length;return o.some(Qh)&&(u+=wx),c&&(u+=bx),o.filter(f=>!Qh(f)).reduce((f,d)=>f+(xx.test(d)?gx:d===""?yx:vx),u)}function _x(l,c){return l.length===c.length&&l.slice(0,-1).every((u,f)=>u===c[f])?l[l.length-1]-c[c.length-1]:0}function jx(l,c,o=!1){let{routesMeta:u}=l,f={},d="/",h=[];for(let m=0;m<u.length;++m){let x=u[m],b=m===u.length-1,C=d==="/"?c:c.slice(d.length)||"/",_=$r({path:x.relativePath,caseSensitive:x.caseSensitive,end:b},C),T=x.route;if(!_&&b&&o&&!u[u.length-1].route.index&&(_=$r({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},C)),!_)return null;Object.assign(f,_.params),h.push({params:f,pathname:Ya([d,_.pathname]),pathnameBase:zx(Ya([d,_.pathnameBase])),route:T}),_.pathnameBase!=="/"&&(d=Ya([d,_.pathnameBase]))}return h}function $r(l,c){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[o,u]=Nx(l.path,l.caseSensitive,l.end),f=c.match(o);if(!f)return null;let d=f[0],h=d.replace(/(.)\/+$/,"$1"),m=f.slice(1);return{params:u.reduce((b,{paramName:C,isOptional:_},T)=>{if(C==="*"){let S=m[T]||"";h=d.slice(0,d.length-S.length).replace(/(.)\/+$/,"$1")}const N=m[T];return _&&!N?b[C]=void 0:b[C]=(N||"").replace(/%2F/g,"/"),b},{}),pathname:d,pathnameBase:h,pattern:l}}function Nx(l,c=!1,o=!0){ba(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let u=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,x)=>(u.push({paramName:m,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(u.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),u]}function Ex(l){try{return l.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return ba(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),l}}function Va(l,c){if(c==="/")return l;if(!l.toLowerCase().startsWith(c.toLowerCase()))return null;let o=c.endsWith("/")?c.length-1:c.length,u=l.charAt(o);return u&&u!=="/"?null:l.slice(o)||"/"}var Cx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function kx(l,c="/"){let{pathname:o,search:u="",hash:f=""}=typeof l=="string"?Sl(l):l,d;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?d=Kh(o.substring(1),"/"):d=Kh(o,c)):d=c,{pathname:d,search:Tx(u),hash:Rx(f)}}function Kh(l,c){let o=c.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?o.length>1&&o.pop():f!=="."&&o.push(f)}),o.length>1?o.join("/"):"/"}function bu(l,c,o,u){return`Cannot include a '${l}' character in a manually specified \`to.${c}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ax(l){return l.filter((c,o)=>o===0||c.route.path&&c.route.path.length>0)}function hp(l){let c=Ax(l);return c.map((o,u)=>u===c.length-1?o.pathname:o.pathnameBase)}function pp(l,c,o,u=!1){let f;typeof l=="string"?f=Sl(l):(f={...l},ct(!f.pathname||!f.pathname.includes("?"),bu("?","pathname","search",f)),ct(!f.pathname||!f.pathname.includes("#"),bu("#","pathname","hash",f)),ct(!f.search||!f.search.includes("#"),bu("#","search","hash",f)));let d=l===""||f.pathname==="",h=d?"/":f.pathname,m;if(h==null)m=o;else{let _=c.length-1;if(!u&&h.startsWith("..")){let T=h.split("/");for(;T[0]==="..";)T.shift(),_-=1;f.pathname=T.join("/")}m=_>=0?c[_]:"/"}let x=kx(f,m),b=h&&h!=="/"&&h.endsWith("/"),C=(d||h===".")&&o.endsWith("/");return!x.pathname.endsWith("/")&&(b||C)&&(x.pathname+="/"),x}var Ya=l=>l.join("/").replace(/\/\/+/g,"/"),zx=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Rx=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Ox=class{constructor(l,c,o,u=!1){this.status=l,this.statusText=c||"",this.internal=u,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Dx(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Mx(l){return l.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var mp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xp(l,c){let o=l;if(typeof o!="string"||!Cx.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let u=o,f=!1;if(mp)try{let d=new URL(window.location.href),h=o.startsWith("//")?new URL(d.protocol+o):new URL(o),m=Va(h.pathname,c);h.origin===d.origin&&m!=null?o=m+h.search+h.hash:f=!0}catch{ba(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:f,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var gp=["POST","PUT","PATCH","DELETE"];new Set(gp);var Ux=["GET",...gp];new Set(Ux);var _l=O.createContext(null);_l.displayName="DataRouter";var Ir=O.createContext(null);Ir.displayName="DataRouterState";var Bx=O.createContext(!1),bp=O.createContext({isTransitioning:!1});bp.displayName="ViewTransition";var Lx=O.createContext(new Map);Lx.displayName="Fetchers";var Hx=O.createContext(null);Hx.displayName="Await";var sa=O.createContext(null);sa.displayName="Navigation";var vi=O.createContext(null);vi.displayName="Location";var ya=O.createContext({outlet:null,matches:[],isDataRoute:!1});ya.displayName="Route";var Mu=O.createContext(null);Mu.displayName="RouteError";var yp="REACT_ROUTER_ERROR",qx="REDIRECT",Yx="ROUTE_ERROR_RESPONSE";function Vx(l){if(l.startsWith(`${yp}:${qx}:{`))try{let c=JSON.parse(l.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function Zx(l){if(l.startsWith(`${yp}:${Yx}:{`))try{let c=JSON.parse(l.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new Ox(c.status,c.statusText,c.data)}catch{}}function Gx(l,{relative:c}={}){ct(wi(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:u}=O.useContext(sa),{hash:f,pathname:d,search:h}=Si(l,{relative:c}),m=d;return o!=="/"&&(m=d==="/"?o:Ya([o,d])),u.createHref({pathname:m,search:h,hash:f})}function wi(){return O.useContext(vi)!=null}function xn(){return ct(wi(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(vi).location}var vp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wp(l){O.useContext(sa).static||O.useLayoutEffect(l)}function Dn(){let{isDataRoute:l}=O.useContext(ya);return l?ng():Xx()}function Xx(){ct(wi(),"useNavigate() may be used only in the context of a <Router> component.");let l=O.useContext(_l),{basename:c,navigator:o}=O.useContext(sa),{matches:u}=O.useContext(ya),{pathname:f}=xn(),d=JSON.stringify(hp(u)),h=O.useRef(!1);return wp(()=>{h.current=!0}),O.useCallback((x,b={})=>{if(ba(h.current,vp),!h.current)return;if(typeof x=="number"){o.go(x);return}let C=pp(x,JSON.parse(d),f,b.relative==="path");l==null&&c!=="/"&&(C.pathname=C.pathname==="/"?c:Ya([c,C.pathname])),(b.replace?o.replace:o.push)(C,b.state,b)},[c,o,d,f,l])}O.createContext(null);function Sp(){let{matches:l}=O.useContext(ya),c=l[l.length-1];return c?c.params:{}}function Si(l,{relative:c}={}){let{matches:o}=O.useContext(ya),{pathname:u}=xn(),f=JSON.stringify(hp(o));return O.useMemo(()=>pp(l,JSON.parse(f),u,c==="path"),[l,f,u,c])}function Qx(l,c){return _p(l,c)}function _p(l,c,o,u,f){ct(wi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=O.useContext(sa),{matches:h}=O.useContext(ya),m=h[h.length-1],x=m?m.params:{},b=m?m.pathname:"/",C=m?m.pathnameBase:"/",_=m&&m.route;{let k=_&&_.path||"";Np(b,!_||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${b}" (under <Route path="${k}">) 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="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let T=xn(),N;if(c){let k=typeof c=="string"?Sl(c):c;ct(C==="/"||k.pathname?.startsWith(C),`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 "${C}" but pathname "${k.pathname}" was given in the \`location\` prop.`),N=k}else N=T;let S=N.pathname||"/",p=S;if(C!=="/"){let k=C.replace(/^\//,"").split("/");p="/"+S.replace(/^\//,"").split("/").slice(k.length).join("/")}let y=cp(l,{pathname:p});ba(_||y!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),ba(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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 w=Ix(y&&y.map(k=>Object.assign({},k,{params:Object.assign({},x,k.params),pathname:Ya([C,d.encodeLocation?d.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?C:Ya([C,d.encodeLocation?d.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),h,o,u,f);return c&&w?O.createElement(vi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...N},navigationType:"POP"}},w):w}function Kx(){let l=ag(),c=Dx(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),o=l instanceof Error?l.stack:null,u="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:u},d={padding:"2px 4px",backgroundColor:u},h=null;return console.error("Error handled by React Router default ErrorBoundary:",l),h=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:d},"ErrorBoundary")," or"," ",O.createElement("code",{style:d},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},c),o?O.createElement("pre",{style:f},o):null,h)}var Jx=O.createElement(Kx,null),jp=class extends O.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,c){return c.location!==l.location||c.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:c.error,location:c.location,revalidation:l.revalidation||c.revalidation}}componentDidCatch(l,c){this.props.onError?this.props.onError(l,c):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const o=Zx(l.digest);o&&(l=o)}let c=l!==void 0?O.createElement(ya.Provider,{value:this.props.routeContext},O.createElement(Mu.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?O.createElement($x,{error:l},c):c}};jp.contextType=Bx;var yu=new WeakMap;function $x({children:l,error:c}){let{basename:o}=O.useContext(sa);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let u=Vx(c.digest);if(u){let f=yu.get(c);if(f)throw f;let d=xp(u.location,o);if(mp&&!yu.get(c))if(d.isExternal||u.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:u.replace}));throw yu.set(c,h),h}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return l}function Fx({routeContext:l,match:c,children:o}){let u=O.useContext(_l);return u&&u.static&&u.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=c.route.id),O.createElement(ya.Provider,{value:l},o)}function Ix(l,c=[],o=null,u=null,f=null){if(l==null){if(!o)return null;if(o.errors)l=o.matches;else if(c.length===0&&!o.initialized&&o.matches.length>0)l=o.matches;else return null}let d=l,h=o?.errors;if(h!=null){let C=d.findIndex(_=>_.route.id&&h?.[_.route.id]!==void 0);ct(C>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),d=d.slice(0,Math.min(d.length,C+1))}let m=!1,x=-1;if(o)for(let C=0;C<d.length;C++){let _=d[C];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(x=C),_.route.id){let{loaderData:T,errors:N}=o,S=_.route.loader&&!T.hasOwnProperty(_.route.id)&&(!N||N[_.route.id]===void 0);if(_.route.lazy||S){m=!0,x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}let b=o&&u?(C,_)=>{u(C,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:Mx(o.matches),errorInfo:_})}:void 0;return d.reduceRight((C,_,T)=>{let N,S=!1,p=null,y=null;o&&(N=h&&_.route.id?h[_.route.id]:void 0,p=_.route.errorElement||Jx,m&&(x<0&&T===0?(Np("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,y=null):x===T&&(S=!0,y=_.route.hydrateFallbackElement||null)));let w=c.concat(d.slice(0,T+1)),k=()=>{let j;return N?j=p:S?j=y:_.route.Component?j=O.createElement(_.route.Component,null):_.route.element?j=_.route.element:j=C,O.createElement(Fx,{match:_,routeContext:{outlet:C,matches:w,isDataRoute:o!=null},children:j})};return o&&(_.route.ErrorBoundary||_.route.errorElement||T===0)?O.createElement(jp,{location:o.location,revalidation:o.revalidation,component:p,error:N,children:k(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:b}):k()},null)}function Uu(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wx(l){let c=O.useContext(_l);return ct(c,Uu(l)),c}function Px(l){let c=O.useContext(Ir);return ct(c,Uu(l)),c}function eg(l){let c=O.useContext(ya);return ct(c,Uu(l)),c}function Bu(l){let c=eg(l),o=c.matches[c.matches.length-1];return ct(o.route.id,`${l} can only be used on routes that contain a unique "id"`),o.route.id}function tg(){return Bu("useRouteId")}function ag(){let l=O.useContext(Mu),c=Px("useRouteError"),o=Bu("useRouteError");return l!==void 0?l:c.errors?.[o]}function ng(){let{router:l}=Wx("useNavigate"),c=Bu("useNavigate"),o=O.useRef(!1);return wp(()=>{o.current=!0}),O.useCallback(async(f,d={})=>{ba(o.current,vp),o.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:c,...d}))},[l,c])}var Jh={};function Np(l,c,o){!c&&!Jh[l]&&(Jh[l]=!0,ba(!1,o))}O.memo(lg);function lg({routes:l,future:c,state:o,onError:u}){return _p(l,void 0,o,u,c)}function ga(l){ct(!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 ig({basename:l="/",children:c=null,location:o,navigationType:u="POP",navigator:f,static:d=!1,unstable_useTransitions:h}){ct(!wi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=l.replace(/^\/*/,"/"),x=O.useMemo(()=>({basename:m,navigator:f,static:d,unstable_useTransitions:h,future:{}}),[m,f,d,h]);typeof o=="string"&&(o=Sl(o));let{pathname:b="/",search:C="",hash:_="",state:T=null,key:N="default"}=o,S=O.useMemo(()=>{let p=Va(b,m);return p==null?null:{location:{pathname:p,search:C,hash:_,state:T,key:N},navigationType:u}},[m,b,C,_,T,N,u]);return ba(S!=null,`<Router basename="${m}"> is not able to match the URL "${b}${C}${_}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:O.createElement(sa.Provider,{value:x},O.createElement(vi.Provider,{children:c,value:S}))}function rg({children:l,location:c}){return Qx(ku(l),c)}function ku(l,c=[]){let o=[];return O.Children.forEach(l,(u,f)=>{if(!O.isValidElement(u))return;let d=[...c,f];if(u.type===O.Fragment){o.push.apply(o,ku(u.props.children,d));return}ct(u.type===ga,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ct(!u.props.index||!u.props.children,"An index route cannot have child routes.");let h={id:u.props.id||d.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(h.children=ku(u.props.children,d)),o.push(h)}),o}var Qr="get",Kr="application/x-www-form-urlencoded";function Wr(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function sg(l){return Wr(l)&&l.tagName.toLowerCase()==="button"}function og(l){return Wr(l)&&l.tagName.toLowerCase()==="form"}function ug(l){return Wr(l)&&l.tagName.toLowerCase()==="input"}function cg(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function dg(l,c){return l.button===0&&(!c||c==="_self")&&!cg(l)}var Br=null;function fg(){if(Br===null)try{new FormData(document.createElement("form"),0),Br=!1}catch{Br=!0}return Br}var hg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vu(l){return l!=null&&!hg.has(l)?(ba(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kr}"`),null):l}function pg(l,c){let o,u,f,d,h;if(og(l)){let m=l.getAttribute("action");u=m?Va(m,c):null,o=l.getAttribute("method")||Qr,f=vu(l.getAttribute("enctype"))||Kr,d=new FormData(l)}else if(sg(l)||ug(l)&&(l.type==="submit"||l.type==="image")){let m=l.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=l.getAttribute("formaction")||m.getAttribute("action");if(u=x?Va(x,c):null,o=l.getAttribute("formmethod")||m.getAttribute("method")||Qr,f=vu(l.getAttribute("formenctype"))||vu(m.getAttribute("enctype"))||Kr,d=new FormData(m,l),!fg()){let{name:b,type:C,value:_}=l;if(C==="image"){let T=b?`${b}.`:"";d.append(`${T}x`,"0"),d.append(`${T}y`,"0")}else b&&d.append(b,_)}}else{if(Wr(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Qr,u=null,f=Kr,h=l}return d&&f==="text/plain"&&(h=d,d=void 0),{action:u,method:o.toLowerCase(),encType:f,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Lu(l,c){if(l===!1||l===null||typeof l>"u")throw new Error(c)}function mg(l,c,o,u){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return o?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${u}`:f.pathname=`${f.pathname}.${u}`:f.pathname==="/"?f.pathname=`_root.${u}`:c&&Va(f.pathname,c)==="/"?f.pathname=`${c.replace(/\/$/,"")}/_root.${u}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${u}`,f}async function xg(l,c){if(l.id in c)return c[l.id];try{let o=await import(l.module);return c[l.id]=o,o}catch(o){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function gg(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function bg(l,c,o){let u=await Promise.all(l.map(async f=>{let d=c.routes[f.route.id];if(d){let h=await xg(d,o);return h.links?h.links():[]}return[]}));return Sg(u.flat(1).filter(gg).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function $h(l,c,o,u,f,d){let h=(x,b)=>o[b]?x.route.id!==o[b].route.id:!0,m=(x,b)=>o[b].pathname!==x.pathname||o[b].route.path?.endsWith("*")&&o[b].params["*"]!==x.params["*"];return d==="assets"?c.filter((x,b)=>h(x,b)||m(x,b)):d==="data"?c.filter((x,b)=>{let C=u.routes[x.route.id];if(!C||!C.hasLoader)return!1;if(h(x,b)||m(x,b))return!0;if(x.route.shouldRevalidate){let _=x.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(l,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function yg(l,c,{includeHydrateFallback:o}={}){return vg(l.map(u=>{let f=c.routes[u.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),o&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function vg(l){return[...new Set(l)]}function wg(l){let c={},o=Object.keys(l).sort();for(let u of o)c[u]=l[u];return c}function Sg(l,c){let o=new Set;return new Set(c),l.reduce((u,f)=>{let d=JSON.stringify(wg(f));return o.has(d)||(o.add(d),u.push({key:d,link:f})),u},[])}function Ep(){let l=O.useContext(_l);return Lu(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function _g(){let l=O.useContext(Ir);return Lu(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Hu=O.createContext(void 0);Hu.displayName="FrameworkContext";function Cp(){let l=O.useContext(Hu);return Lu(l,"You must render this element inside a <HydratedRouter> element"),l}function jg(l,c){let o=O.useContext(Hu),[u,f]=O.useState(!1),[d,h]=O.useState(!1),{onFocus:m,onBlur:x,onMouseEnter:b,onMouseLeave:C,onTouchStart:_}=c,T=O.useRef(null);O.useEffect(()=>{if(l==="render"&&h(!0),l==="viewport"){let p=w=>{w.forEach(k=>{h(k.isIntersecting)})},y=new IntersectionObserver(p,{threshold:.5});return T.current&&y.observe(T.current),()=>{y.disconnect()}}},[l]),O.useEffect(()=>{if(u){let p=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(p)}}},[u]);let N=()=>{f(!0)},S=()=>{f(!1),h(!1)};return o?l!=="intent"?[d,T,{}]:[d,T,{onFocus:gi(m,N),onBlur:gi(x,S),onMouseEnter:gi(b,N),onMouseLeave:gi(C,S),onTouchStart:gi(_,N)}]:[!1,T,{}]}function gi(l,c){return o=>{l&&l(o),o.defaultPrevented||c(o)}}function Ng({page:l,...c}){let{router:o}=Ep(),u=O.useMemo(()=>cp(o.routes,l,o.basename),[o.routes,l,o.basename]);return u?O.createElement(Cg,{page:l,matches:u,...c}):null}function Eg(l){let{manifest:c,routeModules:o}=Cp(),[u,f]=O.useState([]);return O.useEffect(()=>{let d=!1;return bg(l,c,o).then(h=>{d||f(h)}),()=>{d=!0}},[l,c,o]),u}function Cg({page:l,matches:c,...o}){let u=xn(),{future:f,manifest:d,routeModules:h}=Cp(),{basename:m}=Ep(),{loaderData:x,matches:b}=_g(),C=O.useMemo(()=>$h(l,c,b,d,u,"data"),[l,c,b,d,u]),_=O.useMemo(()=>$h(l,c,b,d,u,"assets"),[l,c,b,d,u]),T=O.useMemo(()=>{if(l===u.pathname+u.search+u.hash)return[];let p=new Set,y=!1;if(c.forEach(k=>{let j=d.routes[k.route.id];!j||!j.hasLoader||(!C.some(M=>M.route.id===k.route.id)&&k.route.id in x&&h[k.route.id]?.shouldRevalidate||j.hasClientLoader?y=!0:p.add(k.route.id))}),p.size===0)return[];let w=mg(l,m,f.unstable_trailingSlashAwareDataRequests,"data");return y&&p.size>0&&w.searchParams.set("_routes",c.filter(k=>p.has(k.route.id)).map(k=>k.route.id).join(",")),[w.pathname+w.search]},[m,f.unstable_trailingSlashAwareDataRequests,x,u,d,C,c,l,h]),N=O.useMemo(()=>yg(_,d),[_,d]),S=Eg(_);return O.createElement(O.Fragment,null,T.map(p=>O.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...o})),N.map(p=>O.createElement("link",{key:p,rel:"modulepreload",href:p,...o})),S.map(({key:p,link:y})=>O.createElement("link",{key:p,nonce:o.nonce,...y,crossOrigin:y.crossOrigin??o.crossOrigin})))}function kg(...l){return c=>{l.forEach(o=>{typeof o=="function"?o(c):o!=null&&(o.current=c)})}}var Ag=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ag&&(window.__reactRouterVersion="7.13.0")}catch{}function zg({basename:l,children:c,unstable_useTransitions:o,window:u}){let f=O.useRef();f.current==null&&(f.current=cx({window:u,v5Compat:!0}));let d=f.current,[h,m]=O.useState({action:d.action,location:d.location}),x=O.useCallback(b=>{o===!1?m(b):O.startTransition(()=>m(b))},[o]);return O.useLayoutEffect(()=>d.listen(x),[d,x]),O.createElement(ig,{basename:l,children:c,location:h.location,navigationType:h.action,navigator:d,unstable_useTransitions:o})}var kp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ap=O.forwardRef(function({onClick:c,discover:o="render",prefetch:u="none",relative:f,reloadDocument:d,replace:h,state:m,target:x,to:b,preventScrollReset:C,viewTransition:_,unstable_defaultShouldRevalidate:T,...N},S){let{basename:p,unstable_useTransitions:y}=O.useContext(sa),w=typeof b=="string"&&kp.test(b),k=xp(b,p);b=k.to;let j=Gx(b,{relative:f}),[M,U,V]=jg(u,N),Y=Dg(b,{replace:h,state:m,target:x,preventScrollReset:C,relative:f,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:y});function Q(le){c&&c(le),le.defaultPrevented||Y(le)}let G=O.createElement("a",{...N,...V,href:k.absoluteURL||j,onClick:k.isExternal||d?c:Q,ref:kg(S,U),target:x,"data-discover":!w&&o==="render"?"true":void 0});return M&&!w?O.createElement(O.Fragment,null,G,O.createElement(Ng,{page:j})):G});Ap.displayName="Link";var Tg=O.forwardRef(function({"aria-current":c="page",caseSensitive:o=!1,className:u="",end:f=!1,style:d,to:h,viewTransition:m,children:x,...b},C){let _=Si(h,{relative:b.relative}),T=xn(),N=O.useContext(Ir),{navigator:S,basename:p}=O.useContext(sa),y=N!=null&&Hg(_)&&m===!0,w=S.encodeLocation?S.encodeLocation(_).pathname:_.pathname,k=T.pathname,j=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;o||(k=k.toLowerCase(),j=j?j.toLowerCase():null,w=w.toLowerCase()),j&&p&&(j=Va(j,p)||j);const M=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let U=k===w||!f&&k.startsWith(w)&&k.charAt(M)==="/",V=j!=null&&(j===w||!f&&j.startsWith(w)&&j.charAt(w.length)==="/"),Y={isActive:U,isPending:V,isTransitioning:y},Q=U?c:void 0,G;typeof u=="function"?G=u(Y):G=[u,U?"active":null,V?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let le=typeof d=="function"?d(Y):d;return O.createElement(Ap,{...b,"aria-current":Q,className:G,ref:C,style:le,to:h,viewTransition:m},typeof x=="function"?x(Y):x)});Tg.displayName="NavLink";var Rg=O.forwardRef(({discover:l="render",fetcherKey:c,navigate:o,reloadDocument:u,replace:f,state:d,method:h=Qr,action:m,onSubmit:x,relative:b,preventScrollReset:C,viewTransition:_,unstable_defaultShouldRevalidate:T,...N},S)=>{let{unstable_useTransitions:p}=O.useContext(sa),y=Bg(),w=Lg(m,{relative:b}),k=h.toLowerCase()==="get"?"get":"post",j=typeof m=="string"&&kp.test(m),M=U=>{if(x&&x(U),U.defaultPrevented)return;U.preventDefault();let V=U.nativeEvent.submitter,Y=V?.getAttribute("formmethod")||h,Q=()=>y(V||U.currentTarget,{fetcherKey:c,method:Y,navigate:o,replace:f,state:d,relative:b,preventScrollReset:C,viewTransition:_,unstable_defaultShouldRevalidate:T});p&&o!==!1?O.startTransition(()=>Q()):Q()};return O.createElement("form",{ref:S,method:k,action:w,onSubmit:u?x:M,...N,"data-discover":!j&&l==="render"?"true":void 0})});Rg.displayName="Form";function Og(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zp(l){let c=O.useContext(_l);return ct(c,Og(l)),c}function Dg(l,{target:c,replace:o,state:u,preventScrollReset:f,relative:d,viewTransition:h,unstable_defaultShouldRevalidate:m,unstable_useTransitions:x}={}){let b=Dn(),C=xn(),_=Si(l,{relative:d});return O.useCallback(T=>{if(dg(T,c)){T.preventDefault();let N=o!==void 0?o:yi(C)===yi(_),S=()=>b(l,{replace:N,state:u,preventScrollReset:f,relative:d,viewTransition:h,unstable_defaultShouldRevalidate:m});x?O.startTransition(()=>S()):S()}},[C,b,_,o,u,c,l,f,d,h,m,x])}var Mg=0,Ug=()=>`__${String(++Mg)}__`;function Bg(){let{router:l}=zp("useSubmit"),{basename:c}=O.useContext(sa),o=tg(),u=l.fetch,f=l.navigate;return O.useCallback(async(d,h={})=>{let{action:m,method:x,encType:b,formData:C,body:_}=pg(d,c);if(h.navigate===!1){let T=h.fetcherKey||Ug();await u(T,o,h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:C,body:_,formMethod:h.method||x,formEncType:h.encType||b,flushSync:h.flushSync})}else await f(h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:C,body:_,formMethod:h.method||x,formEncType:h.encType||b,replace:h.replace,state:h.state,fromRouteId:o,flushSync:h.flushSync,viewTransition:h.viewTransition})},[u,f,c,o])}function Lg(l,{relative:c}={}){let{basename:o}=O.useContext(sa),u=O.useContext(ya);ct(u,"useFormAction must be used inside a RouteContext");let[f]=u.matches.slice(-1),d={...Si(l||".",{relative:c})},h=xn();if(l==null){d.search=h.search;let m=new URLSearchParams(d.search),x=m.getAll("index");if(x.some(C=>C==="")){m.delete("index"),x.filter(_=>_).forEach(_=>m.append("index",_));let C=m.toString();d.search=C?`?${C}`:""}}return(!l||l===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(d.pathname=d.pathname==="/"?o:Ya([o,d.pathname])),yi(d)}function Hg(l,{relative:c}={}){let o=O.useContext(bp);ct(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=zp("useViewTransitionState"),f=Si(l,{relative:c});if(!o.isTransitioning)return!1;let d=Va(o.currentLocation.pathname,u)||o.currentLocation.pathname,h=Va(o.nextLocation.pathname,u)||o.nextLocation.pathname;return $r(f.pathname,h)!=null||$r(f.pathname,d)!=null}function je({name:l,className:c="",fill:o=!1}){return s.jsx("span",{className:`material-symbols-outlined ${c}`,style:{fontVariationSettings:o?"'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24":"'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24"},"aria-hidden":"true",children:l})}const qg=({onNavigate:l,onNewTask:c,onLogout:o,currentScreen:u})=>s.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:[s.jsx("button",{onClick:()=>l("dashboard"),className:"mb-12 hover:opacity-80 transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50 rounded-lg","aria-label":"Go to Dashboard",children:s.jsx("img",{src:"/icon.png",alt:"Doppelganger Logo",className:"w-10 h-10",onError:f=>{f.currentTarget.src="/icon.png"}})}),s.jsxs("div",{className:"flex-1 flex flex-col gap-6",children:[s.jsx("button",{onClick:c,className:"w-12 h-12 rounded-2xl flex items-center justify-center text-white bg-white/5 hover:bg-white/10 transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",title:"New Task","aria-label":"New Task",children:s.jsx(je,{name:"add",className:"text-2xl"})}),s.jsx("button",{onClick:()=>l("dashboard"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50 ${u==="dashboard"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Dashboard","aria-label":"Dashboard",children:s.jsx(je,{name:"home",className:"text-2xl"})}),s.jsx("button",{onClick:()=>l("settings"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50 ${u==="settings"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Settings","aria-label":"Settings",children:s.jsx(je,{name:"settings",className:"text-2xl"})}),s.jsx("button",{onClick:()=>l("executions"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50 ${u==="executions"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Executions","aria-label":"Executions",children:s.jsx(je,{name:"history",className:"text-2xl"})}),s.jsx("button",{onClick:()=>l("captures"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50 ${u==="captures"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Captures","aria-label":"Captures",children:s.jsx(je,{name:"photo_camera",className:"text-2xl"})})]}),s.jsx("a",{href:"https://github.com/mnemosynestack/doppelganger",target:"_blank",rel:"noopener noreferrer",className:"w-12 h-12 rounded-2xl flex items-center justify-center text-yellow-500 hover:bg-yellow-500/10 transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-yellow-500/50 mb-2",title:"Star on GitHub","aria-label":"Star on GitHub",children:s.jsx(je,{name:"star",className:"text-2xl"})}),s.jsx("button",{onClick:o,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 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",title:"Logout","aria-label":"Logout",children:s.jsx(je,{name:"logout",className:"text-2xl"})})]}),Yg=Jr.memo(qg),Vg=({status:l,onSubmit:c,error:o,busy:u=!1})=>{const[f,d]=O.useState(""),[h,m]=O.useState(""),[x,b]=O.useState(""),[C,_]=O.useState(""),T=S=>{S.preventDefault(),c(h,x,f,C)},N=l==="setup"?u?"Creating account...":"Create Account":u?"Authenticating...":"Authenticate";return s.jsxs("div",{className:"fixed inset-0 z-[100] bg-[#020202] flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),s.jsxs("div",{className:"w-[400px] glass-card p-10 rounded-[48px] space-y-8 relative",children:[s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("img",{src:"/logo.png",alt:"Doppelganger",className:"h-10 mx-auto object-contain"}),l==="setup"&&s.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Initializing System"})]}),s.jsxs("form",{onSubmit:T,className:"space-y-8",children:[s.jsxs("div",{className:"space-y-4",children:[l==="setup"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{htmlFor:"auth-name",className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Name"}),s.jsx("input",{id:"auth-name",type:"text",value:f,onChange:S=>d(S.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",autoComplete:"name"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{htmlFor:"auth-email",className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Email"}),s.jsx("input",{id:"auth-email",type:"email",value:h,onChange:S=>m(S.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",required:!0,autoComplete:"email"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{htmlFor:"auth-pass",className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Password"}),s.jsx("input",{id:"auth-pass",type:"password",value:x,onChange:S=>b(S.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",required:!0,autoComplete:l==="setup"?"new-password":"current-password"})]}),l==="setup"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{htmlFor:"auth-pass-confirm",className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Confirm Password"}),s.jsx("input",{id:"auth-pass-confirm",type:"password",value:C,onChange:S=>_(S.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",required:!0,autoComplete:"new-password"})]})]}),s.jsxs("button",{type:"submit",disabled:u,"aria-busy":u,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 disabled:opacity-60 disabled:cursor-default flex items-center justify-center gap-3",children:[u&&s.jsx("div",{className:"w-4 h-4 border-2 border-black/10 border-t-black rounded-full animate-spin"}),N]}),o&&s.jsx("div",{role:"alert",className:"text-[9px] font-bold text-red-500 text-center uppercase tracking-widest",children:o})]})]})]})};function Zg(l){return l>=1e6?`${(l/1e6).toFixed(1).replace(/\.0$/,"")}m`:l>=1e3?`${(l/1e3).toFixed(1).replace(/\.0$/,"")}k`:String(l)}const Gg=({className:l})=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:l,"aria-hidden":"true",children:s.jsx("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.699-2.782.603-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.463-1.11-1.463-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.831.092-.646.35-1.086.636-1.336-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.564 9.564 0 0112 6.844c.85.004 1.705.114 2.504.336 1.909-1.294 2.747-1.025 2.747-1.025.546 1.379.202 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.161 22 16.418 22 12c0-5.523-4.477-10-10-10z"})});function Tp({className:l=""}){const[c,o]=O.useState("—"),u=d=>{const h=d.currentTarget.getBoundingClientRect(),m=Math.min(1,Math.max(0,(d.clientX-h.left)/h.width)),x=Math.min(1,Math.max(0,(d.clientY-h.top)/h.height));d.currentTarget.style.setProperty("--beam-x",`${(m*100).toFixed(2)}%`),d.currentTarget.style.setProperty("--beam-y",`${(x*100).toFixed(2)}%`)},f=d=>{d.currentTarget.style.setProperty("--beam-x","50%"),d.currentTarget.style.setProperty("--beam-y","50%")};return O.useEffect(()=>{let d=!0;return fetch("https://api.github.com/repos/mnemosynestack/doppelganger").then(h=>h.ok?h.json():null).then(h=>{!d||!h?.stargazers_count||o(Zg(Number(h.stargazers_count)))}).catch(()=>{d&&o("—")}),()=>{d=!1}},[]),s.jsxs("a",{href:"https://github.com/mnemosynestack/doppelganger",target:"_blank",rel:"noreferrer",onPointerMove:u,onPointerLeave:f,className:`gh-pill beam-follow inline-flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-4 py-2 text-[11px] uppercase tracking-[0.25em] text-white/70 transition hover:border-white/20 hover:bg-white/10 hover:text-white ${l}`,"aria-label":"Star Doppelganger on GitHub",children:[s.jsx(Gg,{className:"h-4 w-4"}),"GitHub",s.jsx("span",{className:"mx-1 h-3 w-px bg-white/20","aria-hidden":"true"}),s.jsx(je,{name:"star",className:"text-base",fill:!0}),c]})}const Xg=({tasks:l,onNewTask:c,onEditTask:o,onDeleteTask:u,onExportTasks:f,onImportTasks:d})=>{const h=O.useRef(null),[m,x]=Jr.useState(!1),[b,C]=Jr.useState([]),_=p=>{try{return p?`https://www.google.com/s2/favicons?domain=${new URL(p).hostname}&sz=64`:null}catch{return null}},T=()=>{h.current?.click()},N=p=>{const y=p.target.files?.[0];y&&d(y),p.target.value=""},S=p=>{C(y=>y.includes(p)?y.filter(w=>w!==p):[...y,p])};return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex-1 overflow-hidden animate-in fade-in duration-500",children:s.jsxs("div",{className:"h-full flex flex-col px-12 py-12 max-w-7xl mx-auto space-y-12 w-full",children:[s.jsxs("div",{className:"flex items-end justify-between",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] font-bold text-blue-500 uppercase tracking-[0.4em]",children:"Status"}),s.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Dashboard"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Tp,{}),s.jsxs("button",{onClick:()=>{C([]),x(!0)},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 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",children:[s.jsx(je,{name:"download",className:"w-4 h-4 inline-block mr-2 text-[16px] align-sub"}),"Export"]}),s.jsxs("button",{onClick:T,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 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",children:[s.jsx(je,{name:"upload",className:"w-4 h-4 inline-block mr-2 text-[16px] align-sub"}),"Import"]}),s.jsx("button",{onClick:c,className:"shine-effect bg-white text-black px-8 py-3 rounded-2xl font-bold text-[10px] tracking-[0.2em] uppercase transition-all hover:scale-105 active:scale-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",children:"+ New Task"}),s.jsx("input",{ref:h,type:"file",accept:"application/json",className:"hidden",onChange:N})]})]}),s.jsxs("div",{className:"relative flex-1 min-h-0",children:[s.jsx("div",{className:"pointer-events-none absolute top-0 left-0 right-0 h-10 bg-gradient-to-b from-[#050505] via-[#050505]/50 to-transparent z-10"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 content-start gap-6 overflow-y-auto custom-scrollbar pb-12 pr-4 h-full",children:l.map(p=>{const y=_(p.url);return s.jsxs("div",{className:"glass-card p-8 rounded-[40px] flex flex-col gap-6 group hover:-translate-y-1",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("div",{className:"w-12 h-12 rounded-2xl bg-white/5 border border-white/10 flex items-center justify-center overflow-hidden",children:y?s.jsx("img",{src:y,alt:"",className:"w-6 h-6 object-contain",onError:w=>{w.target.style.display="none"}}):s.jsx(je,{name:"public",className:"text-gray-500 text-xl"})}),s.jsx("div",{className:"px-3 py-1 rounded-full bg-white/5 text-[7px] font-bold uppercase tracking-widest text-gray-500",children:p.mode})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-bold text-white truncate",children:p.name||"Untitled"}),s.jsx("p",{className:"text-[10px] text-gray-600 font-mono truncate mt-1",children:p.url||"Target undefined"})]}),s.jsxs("div",{className:"flex gap-3 pt-4 border-t border-white/5",children:[s.jsx("button",{onClick:()=>o(p),className:"flex-1 py-2 rounded-xl bg-white text-black text-[9px] font-bold uppercase tracking-widest hover:scale-105 transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",children:"Edit Task"}),s.jsx("button",{onClick:()=>u(p.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 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50","aria-label":"Delete task",title:"Delete task",children:s.jsx(je,{name:"close",className:"text-base"})})]})]},p.id)})})]}),l.length===0&&s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center space-y-6",children:[s.jsx("div",{className:"w-24 h-24 border-2 border-dashed border-white/20 rounded-[40px] flex items-center justify-center text-3xl bg-white/5",children:s.jsx(je,{name:"rocket_launch",className:"text-white/50 text-4xl"})}),s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("p",{className:"text-sm font-bold uppercase tracking-widest text-white/70",children:"No Tasks Found"}),s.jsx("p",{className:"text-[10px] text-gray-500 max-w-[200px] mx-auto leading-relaxed",children:"Get started by creating your first automation task."})]}),s.jsx("button",{onClick:c,className:"px-6 py-3 bg-white text-black rounded-2xl font-bold text-[10px] tracking-[0.2em] uppercase hover:scale-105 transition-transform shadow-lg shadow-white/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",children:"Create First Task"})]})]})}),m&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 pb-20 sm:pb-6",children:[s.jsx("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm",onClick:()=>x(!1)}),s.jsxs("div",{className:"relative w-full max-w-lg bg-[#0a0a0a] border border-white/10 rounded-[32px] shadow-2xl overflow-hidden flex flex-col max-h-full slide-up",children:[s.jsxs("div",{className:"p-6 sm:p-8 shrink-0",children:[s.jsx("h3",{className:"text-xl font-bold text-white tracking-tight",children:"Export Tasks"}),s.jsx("p",{className:"text-[11px] text-white/50 mt-2 font-mono",children:"Select the tasks you want to export."})]}),s.jsxs("div",{className:"px-6 sm:px-8 pb-4 flex items-center gap-3 shrink-0 border-b border-white/5",children:[s.jsx("button",{onClick:()=>C(l.map(p=>p.id)),className:"text-[10px] font-bold uppercase tracking-widest text-blue-400 hover:text-blue-300 transition-colors",children:"Select All"}),s.jsx("span",{className:"text-white/20",children:"|"}),s.jsx("button",{onClick:()=>C([]),className:"text-[10px] font-bold uppercase tracking-widest text-white/40 hover:text-white/80 transition-colors",children:"Deselect All"}),s.jsx("div",{className:"flex-1"}),s.jsxs("span",{className:"text-[10px] font-mono text-white/30",children:[b.length," selected"]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-6 sm:p-8 space-y-2",children:l.map(p=>s.jsxs("button",{onClick:()=>S(p.id),className:`w-full text-left p-4 rounded-2xl border transition-all flex items-center gap-4 ${b.includes(p.id)?"bg-blue-500/10 border-blue-500/30":"bg-white/5 border-white/5 hover:border-white/10"}`,children:[s.jsx("div",{className:`w-5 h-5 rounded flex items-center justify-center border transition-colors ${b.includes(p.id)?"bg-blue-500 border-blue-400 text-white":"border-white/20"}`,children:b.includes(p.id)&&s.jsx(je,{name:"check",className:"text-[14px]"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm font-bold text-white truncate",children:p.name||"Untitled"}),s.jsx("div",{className:"text-[10px] text-white/40 font-mono truncate",children:p.url||"No URL"})]})]},p.id))}),s.jsxs("div",{className:"p-6 sm:p-8 bg-black/40 border-t border-white/5 flex gap-3 shrink-0",children:[s.jsx("button",{onClick:()=>x(!1),className:"flex-1 px-4 py-3 rounded-xl border border-white/10 text-white text-[10px] font-bold uppercase tracking-widest hover:bg-white/5 transition-all",children:"Cancel"}),s.jsxs("button",{onClick:()=>{f(b),x(!1)},disabled:b.length===0,className:`flex-1 px-4 py-3 rounded-xl text-[10px] font-bold uppercase tracking-widest transition-all ${b.length>0?"bg-white text-black hover:scale-105":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:["Export (",b.length,")"]})]})]})]})]})},Fh=O.memo(Xg),_t=l=>l.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Qg=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"]),Rp=(l,c)=>{const o=/\{\$(\w+)\}/g;let u="",f=0,d;const h=x=>!!c&&(x in c||x==="now"),m=x=>{if(x==="now")return!0;const b=c?c[x]:void 0;return b&&b.value!==""&&b.value!==void 0&&b.value!==null};for(;(d=o.exec(l))!==null;){d.index>f&&(u+=_t(l.substring(f,d.index)));const x=d[1],b=h(x),C=m(x);u+=`<span class="${b?C?"var-highlight-default":"var-highlight":"var-highlight-undefined"}">${_t(d[0])}</span>`,f=o.lastIndex}return u+=_t(l.substring(f)),u},Kg=l=>{const c=/("(?:\\.|[^"\\])*")|(-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|\b(true|false|null)\b/g;let o="",u=0,f;for(;(f=c.exec(l))!==null;){f.index>u&&(o+=_t(l.substring(u,f.index)));const d=f[0];if(f[1]){let h=!1,m=f.index+d.length;for(;m<l.length&&/\s/.test(l[m]);)m+=1;l[m]===":"&&(h=!0),o+=`<span class="${h?"code-token-key":"code-token-string"}">${_t(d)}</span>`}else f[2]?o+=`<span class="code-token-number">${_t(d)}</span>`:o+=`<span class="code-token-boolean">${_t(d)}</span>`;u=c.lastIndex}return o+=_t(l.substring(u)),o},Jg=(l,c)=>{const o=/(\{\$\w+\})|(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`)|(\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|(\btrue\b|\bfalse\b|\bnull\b|\bundefined\b)|(\b[A-Za-z_]\w*\b)/g;let u="",f=0,d;for(;(d=o.exec(l))!==null;){d.index>f&&(u+=_t(l.substring(f,d.index)));const h=d[0];if(d[1])u+=Rp(h,c);else if(d[2])u+=`<span class="code-token-comment">${_t(h)}</span>`;else if(d[3])u+=`<span class="code-token-string">${_t(h)}</span>`;else if(d[4])u+=`<span class="code-token-number">${_t(h)}</span>`;else if(d[5])u+=`<span class="code-token-boolean">${_t(h)}</span>`;else if(d[6]){const m=Qg.has(h)?"code-token-keyword":"code-token-identifier";u+=`<span class="${m}">${_t(h)}</span>`}else u+=_t(h);f=o.lastIndex}return u+=_t(l.substring(f)),u},$g=l=>{const c=/<\/?[^>]+>/g;let o="",u=0,f;for(;(f=c.exec(l))!==null;){f.index>u&&(o+=_t(l.substring(u,f.index)));const d=f[0];let h=_t(d);h=h.replace(/^(<\/?)([A-Za-z0-9-]+)/,'$1<span class="code-token-tag">$2</span>'),h=h.replace(/(\s)([A-Za-z0-9-:]+)(=)/g,'$1<span class="code-token-attr">$2</span>$3'),h=h.replace(/(".*?"|'.*?')/g,'<span class="code-token-string">$1</span>'),o+=`<span class="code-token-punct">${h}</span>`,u=c.lastIndex}return o+=_t(l.substring(u)),o},Op=(l,c,o)=>c==="javascript"?Jg(l,o):c==="json"?Kg(l):c==="html"?$g(l):Rp(l,o),Ot=({value:l,onChange:c,onBlur:o,placeholder:u,variables:f,className:d,syntax:h="plain"})=>{const m=O.useRef(null);return O.useEffect(()=>{if(m.current){const x=m.current.innerHTML,b=Op(l,h,f);if(x!==b){const C=window.getSelection();let _=0;if(C&&C.rangeCount>0){const T=C.getRangeAt(0),N=T.cloneRange();N.selectNodeContents(m.current),N.setEnd(T.endContainer,T.endOffset),_=N.toString().length}if(m.current.innerHTML=b,_>0){const T=document.createTreeWalker(m.current,NodeFilter.SHOW_TEXT);let N=0,S=T.nextNode();for(;S;){const p=S.textContent?.length||0;if(N+p>=_){const y=document.createRange();y.setStart(S,_-N),y.collapse(!0),C?.removeAllRanges(),C?.addRange(y);break}N+=p,S=T.nextNode()}}}}},[l,f]),s.jsx("div",{ref:m,contentEditable:!0,className:`rich-input-content w-full bg-transparent focus:outline-none text-white min-h-[1.5rem] ${d}`,"data-placeholder":u,onInput:x=>c(x.currentTarget.textContent||""),onBlur:x=>{const b=x.currentTarget.textContent||"";c(b),o?.(b)}})},wl=({value:l,onChange:c,onBlur:o,language:u,placeholder:f,className:d,readOnly:h,variables:m})=>{const x=O.useRef(null),b=O.useRef(null),C=l||f||"",_=!l&&!!f,T=O.useMemo(()=>Op(C,u,m),[C,u,m]);return O.useEffect(()=>{const N=x.current,S=b.current;if(!N||!S)return;const p=()=>{S.scrollTop=N.scrollTop,S.scrollLeft=N.scrollLeft};return N.addEventListener("scroll",p),()=>{N.removeEventListener("scroll",p)}},[]),s.jsxs("div",{className:`code-editor ${d||""}`,onWheel:N=>{const S=x.current;S&&(S.scrollHeight<=S.clientHeight||(S.scrollTop+=N.deltaY,S.scrollLeft+=N.deltaX,S.focus(),N.preventDefault()))},children:[s.jsx("pre",{ref:b,className:`code-editor-pre ${_?"code-editor-placeholder":""}`,"aria-hidden":!0,dangerouslySetInnerHTML:{__html:T}}),s.jsx("textarea",{ref:x,value:l,onChange:N=>c?.(N.target.value),onBlur:N=>o?.(N.target.value),spellCheck:!1,wrap:"off",readOnly:h,className:`code-editor-textarea ${h?"code-editor-textarea-readonly":""}`,"aria-label":"Code editor",tabIndex:h?-1:0})]})},Au=[{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:"wait_selector",label:"Wait for Selector",description:"Wait until element appears"},{type:"wait_downloads",label:"Wait for Downloads",description:"Wait until downloads finish"},{type:"scroll",label:"Scroll",description:"Scroll the page or container"},{type:"javascript",label:"JavaScript",description:"Run custom JS"},{type:"csv",label:"CSV",description:"Parse CSV into rows"},{type:"merge",label:"Merge",description:"Merge inputs into a single output"},{type:"screenshot",label:"Screenshot",description:"Capture a screenshot"},{type:"navigate",label:"Navigate To",description:"Navigate to a URL"},{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"}],Fg=({open:l,query:c,onQueryChange:o,onClose:u,onSelect:f})=>{const d=O.useRef(null),h=O.useMemo(()=>{const m=c.trim().toLowerCase();return m?Au.filter(x=>x.label.toLowerCase().includes(m)||x.description.toLowerCase().includes(m)):Au},[c]);return l?s.jsx("div",{className:"fixed inset-0 z-[190] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",onClick:u,children:s.jsxs("div",{className:"glass-card w-full max-w-xl rounded-[28px] border border-white/10 p-6 shadow-2xl",onClick:m=>m.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"Add Block"}),s.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Search actions and control flow blocks."})]}),s.jsx("button",{onClick:u,className:"p-2 rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all","aria-label":"Close",children:s.jsx(je,{name:"close",className:"text-base"})})]}),s.jsx("input",{ref:m=>{d.current=m,m&&m.focus()},value:c,onChange:m=>o(m.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"}),s.jsxs("div",{className:"mt-4 max-h-[320px] overflow-y-auto custom-scrollbar space-y-2",children:[h.map(m=>s.jsxs("button",{onClick:()=>f(m.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:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-white",children:m.label}),s.jsx("div",{className:"text-[9px] text-gray-500 mt-1",children:m.description})]},m.type)),h.length===0&&s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No matches."})]})]})}):null},Ig=({task:l,onChange:c,onCopy:o,copiedId:u})=>{const[f,d]=O.useState(()=>JSON.stringify(l,null,2)),[h,m]=O.useState(!1),x=b=>{const C=l,_={...C,...b&&typeof b=="object"?b:{}};return(!_.name||typeof _.name!="string")&&(_.name=C.name||"Task"),(!_.mode||!["scrape","agent","headful"].includes(_.mode))&&(_.mode=C.mode||"agent"),typeof _.wait!="number"&&(_.wait=typeof C.wait=="number"?C.wait:3),_.stealth||(_.stealth=C.stealth),(!_.variables||Array.isArray(_.variables))&&(_.variables=C.variables||{}),Array.isArray(_.actions)||(_.actions=C.actions||[]),_.extractionFormat||(_.extractionFormat=C.extractionFormat||"json"),_.includeShadowDom===void 0&&(_.includeShadowDom=C.includeShadowDom??!0),C.id&&_.id!==C.id&&(_.id=C.id),delete _.versions,delete _.last_opened,_};return O.useEffect(()=>{h||d(JSON.stringify(l,null,2))},[l,h]),s.jsxs("div",{className:"h-full flex flex-col min-h-0",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Protocol JSON"}),s.jsxs("button",{onClick:()=>{o(JSON.stringify(l,null,2),"json")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${u==="json"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[u==="json"?s.jsx(je,{name:"check",className:"text-sm"}):s.jsx(je,{name:"content_copy",className:"text-sm"}),u==="json"?"Copied":"Copy"]})]}),s.jsx(wl,{value:f,onChange:b=>{d(b);try{const C=JSON.parse(b),_=x(C);c(_),m(!1)}catch{m(!0)}},language:"json",className:"flex-1 min-h-0"})]})};function zu(){return zu=Object.assign?Object.assign.bind():function(l){for(var c=1;c<arguments.length;c++){var o=arguments[c];for(var u in o)({}).hasOwnProperty.call(o,u)&&(l[u]=o[u])}return l},zu.apply(null,arguments)}function Ih(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function Tu(l,c){return Tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},Tu(l,c)}function Wg(l,c){l.prototype=Object.create(c.prototype),l.prototype.constructor=l,Tu(l,c)}var Wh=Number.isNaN||function(c){return typeof c=="number"&&c!==c};function Pg(l,c){return!!(l===c||Wh(l)&&Wh(c))}function eb(l,c){if(l.length!==c.length)return!1;for(var o=0;o<l.length;o++)if(!Pg(l[o],c[o]))return!1;return!0}function wu(l,c){c===void 0&&(c=eb);var o,u=[],f,d=!1;function h(){for(var m=[],x=0;x<arguments.length;x++)m[x]=arguments[x];return d&&o===this&&c(m,u)||(f=l.apply(this,m),d=!0,o=this,u=m),f}return h}var tb=typeof performance=="object"&&typeof performance.now=="function",Ph=tb?function(){return performance.now()}:function(){return Date.now()};function ep(l){cancelAnimationFrame(l.id)}function ab(l,c){var o=Ph();function u(){Ph()-o>=c?l.call(null):f.id=requestAnimationFrame(u)}var f={id:requestAnimationFrame(u)};return f}var Su=-1;function tp(l){if(l===void 0&&(l=!1),Su===-1||l){var c=document.createElement("div"),o=c.style;o.width="50px",o.height="50px",o.overflow="scroll",document.body.appendChild(c),Su=c.offsetWidth-c.clientWidth,document.body.removeChild(c)}return Su}var vl=null;function ap(l){if(l===void 0&&(l=!1),vl===null||l){var c=document.createElement("div"),o=c.style;o.width="50px",o.height="50px",o.overflow="scroll",o.direction="rtl";var u=document.createElement("div"),f=u.style;return f.width="100px",f.height="100px",c.appendChild(u),document.body.appendChild(c),c.scrollLeft>0?vl="positive-descending":(c.scrollLeft=1,c.scrollLeft===0?vl="negative":vl="positive-ascending"),document.body.removeChild(c),vl}return vl}var nb=150,lb=function(c,o){return c};function ib(l){var c,o=l.getItemOffset,u=l.getEstimatedTotalSize,f=l.getItemSize,d=l.getOffsetForIndexAndAlignment,h=l.getStartIndexForOffset,m=l.getStopIndexForStartIndex,x=l.initInstanceProps,b=l.shouldResetStyleCacheOnItemSizeChange,C=l.validateProps;return c=(function(_){Wg(T,_);function T(S){var p;return p=_.call(this,S)||this,p._instanceProps=x(p.props,Ih(p)),p._outerRef=void 0,p._resetIsScrollingTimeoutId=null,p.state={instance:Ih(p),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof p.props.initialScrollOffset=="number"?p.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},p._callOnItemsRendered=void 0,p._callOnItemsRendered=wu(function(y,w,k,j){return p.props.onItemsRendered({overscanStartIndex:y,overscanStopIndex:w,visibleStartIndex:k,visibleStopIndex:j})}),p._callOnScroll=void 0,p._callOnScroll=wu(function(y,w,k){return p.props.onScroll({scrollDirection:y,scrollOffset:w,scrollUpdateWasRequested:k})}),p._getItemStyle=void 0,p._getItemStyle=function(y){var w=p.props,k=w.direction,j=w.itemSize,M=w.layout,U=p._getItemStyleCache(b&&j,b&&M,b&&k),V;if(U.hasOwnProperty(y))V=U[y];else{var Y=o(p.props,y,p._instanceProps),Q=f(p.props,y,p._instanceProps),G=k==="horizontal"||M==="horizontal",le=k==="rtl",de=G?Y:0;U[y]=V={position:"absolute",left:le?void 0:de,right:le?de:void 0,top:G?0:Y,height:G?"100%":Q,width:G?Q:"100%"}}return V},p._getItemStyleCache=void 0,p._getItemStyleCache=wu(function(y,w,k){return{}}),p._onScrollHorizontal=function(y){var w=y.currentTarget,k=w.clientWidth,j=w.scrollLeft,M=w.scrollWidth;p.setState(function(U){if(U.scrollOffset===j)return null;var V=p.props.direction,Y=j;if(V==="rtl")switch(ap()){case"negative":Y=-j;break;case"positive-descending":Y=M-k-j;break}return Y=Math.max(0,Math.min(Y,M-k)),{isScrolling:!0,scrollDirection:U.scrollOffset<Y?"forward":"backward",scrollOffset:Y,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._onScrollVertical=function(y){var w=y.currentTarget,k=w.clientHeight,j=w.scrollHeight,M=w.scrollTop;p.setState(function(U){if(U.scrollOffset===M)return null;var V=Math.max(0,Math.min(M,j-k));return{isScrolling:!0,scrollDirection:U.scrollOffset<V?"forward":"backward",scrollOffset:V,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._outerRefSetter=function(y){var w=p.props.outerRef;p._outerRef=y,typeof w=="function"?w(y):w!=null&&typeof w=="object"&&w.hasOwnProperty("current")&&(w.current=y)},p._resetIsScrollingDebounced=function(){p._resetIsScrollingTimeoutId!==null&&ep(p._resetIsScrollingTimeoutId),p._resetIsScrollingTimeoutId=ab(p._resetIsScrolling,nb)},p._resetIsScrolling=function(){p._resetIsScrollingTimeoutId=null,p.setState({isScrolling:!1},function(){p._getItemStyleCache(-1,null)})},p}T.getDerivedStateFromProps=function(p,y){return rb(p,y),C(p),null};var N=T.prototype;return N.scrollTo=function(p){p=Math.max(0,p),this.setState(function(y){return y.scrollOffset===p?null:{scrollDirection:y.scrollOffset<p?"forward":"backward",scrollOffset:p,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},N.scrollToItem=function(p,y){y===void 0&&(y="auto");var w=this.props,k=w.itemCount,j=w.layout,M=this.state.scrollOffset;p=Math.max(0,Math.min(p,k-1));var U=0;if(this._outerRef){var V=this._outerRef;j==="vertical"?U=V.scrollWidth>V.clientWidth?tp():0:U=V.scrollHeight>V.clientHeight?tp():0}this.scrollTo(d(this.props,p,y,M,this._instanceProps,U))},N.componentDidMount=function(){var p=this.props,y=p.direction,w=p.initialScrollOffset,k=p.layout;if(typeof w=="number"&&this._outerRef!=null){var j=this._outerRef;y==="horizontal"||k==="horizontal"?j.scrollLeft=w:j.scrollTop=w}this._callPropsCallbacks()},N.componentDidUpdate=function(){var p=this.props,y=p.direction,w=p.layout,k=this.state,j=k.scrollOffset,M=k.scrollUpdateWasRequested;if(M&&this._outerRef!=null){var U=this._outerRef;if(y==="horizontal"||w==="horizontal")if(y==="rtl")switch(ap()){case"negative":U.scrollLeft=-j;break;case"positive-ascending":U.scrollLeft=j;break;default:var V=U.clientWidth,Y=U.scrollWidth;U.scrollLeft=Y-V-j;break}else U.scrollLeft=j;else U.scrollTop=j}this._callPropsCallbacks()},N.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ep(this._resetIsScrollingTimeoutId)},N.render=function(){var p=this.props,y=p.children,w=p.className,k=p.direction,j=p.height,M=p.innerRef,U=p.innerElementType,V=p.innerTagName,Y=p.itemCount,Q=p.itemData,G=p.itemKey,le=G===void 0?lb:G,de=p.layout,L=p.outerElementType,se=p.outerTagName,E=p.style,ce=p.useIsScrolling,$=p.width,K=this.state.isScrolling,be=k==="horizontal"||de==="horizontal",J=be?this._onScrollHorizontal:this._onScrollVertical,me=this._getRangeToRender(),A=me[0],D=me[1],te=[];if(Y>0)for(var F=A;F<=D;F++)te.push(O.createElement(y,{data:Q,key:le(F,Q),index:F,isScrolling:ce?K:void 0,style:this._getItemStyle(F)}));var re=u(this.props,this._instanceProps);return O.createElement(L||se||"div",{className:w,onScroll:J,ref:this._outerRefSetter,style:zu({position:"relative",height:j,width:$,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:k},E)},O.createElement(U||V||"div",{children:te,ref:M,style:{height:be?"100%":re,pointerEvents:K?"none":void 0,width:be?re:"100%"}}))},N._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var p=this.props.itemCount;if(p>0){var y=this._getRangeToRender(),w=y[0],k=y[1],j=y[2],M=y[3];this._callOnItemsRendered(w,k,j,M)}}if(typeof this.props.onScroll=="function"){var U=this.state,V=U.scrollDirection,Y=U.scrollOffset,Q=U.scrollUpdateWasRequested;this._callOnScroll(V,Y,Q)}},N._getRangeToRender=function(){var p=this.props,y=p.itemCount,w=p.overscanCount,k=this.state,j=k.isScrolling,M=k.scrollDirection,U=k.scrollOffset;if(y===0)return[0,0,0,0];var V=h(this.props,U,this._instanceProps),Y=m(this.props,V,U,this._instanceProps),Q=!j||M==="backward"?Math.max(1,w):1,G=!j||M==="forward"?Math.max(1,w):1;return[Math.max(0,V-Q),Math.max(0,Math.min(y-1,Y+G)),V,Y]},T})(O.PureComponent),c.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},c}var rb=function(c,o){c.children,c.direction,c.height,c.layout,c.innerTagName,c.outerTagName,c.width,o.instance},Pr=ib({getItemOffset:function(c,o){var u=c.itemSize;return o*u},getItemSize:function(c,o){var u=c.itemSize;return u},getEstimatedTotalSize:function(c){var o=c.itemCount,u=c.itemSize;return u*o},getOffsetForIndexAndAlignment:function(c,o,u,f,d,h){var m=c.direction,x=c.height,b=c.itemCount,C=c.itemSize,_=c.layout,T=c.width,N=m==="horizontal"||_==="horizontal",S=N?T:x,p=Math.max(0,b*C-S),y=Math.min(p,o*C),w=Math.max(0,o*C-S+C+h);switch(u==="smart"&&(f>=w-S&&f<=y+S?u="auto":u="center"),u){case"start":return y;case"end":return w;case"center":{var k=Math.round(w+(y-w)/2);return k<Math.ceil(S/2)?0:k>p+Math.floor(S/2)?p:k}default:return f>=w&&f<=y?f:f<w?w:y}},getStartIndexForOffset:function(c,o){var u=c.itemCount,f=c.itemSize;return Math.max(0,Math.min(u-1,Math.floor(o/f)))},getStopIndexForStartIndex:function(c,o,u){var f=c.direction,d=c.height,h=c.itemCount,m=c.itemSize,x=c.layout,b=c.width,C=f==="horizontal"||x==="horizontal",_=o*m,T=C?b:d,N=Math.ceil((T+u-_)/m);return Math.max(0,Math.min(h-1,o+N-1))},initInstanceProps:function(c){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(c){c.itemSize}});const Dp=({capture:l,onDelete:c})=>s.jsxs("div",{className:"rounded-2xl border border-white/10 bg-white/[0.02] overflow-hidden",children:[s.jsxs("div",{className:"p-3 border-b border-white/10 flex items-center justify-between",children:[s.jsx("div",{className:"text-[9px] font-bold text-white uppercase tracking-widest",children:l.type==="recording"?"Recording":"Screenshot"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("a",{href:l.url,target:"_blank",rel:"noreferrer",className:"text-[9px] font-bold uppercase tracking-widest text-blue-300 hover:text-blue-200 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",children:"Open"}),c&&s.jsx("button",{onClick:()=>c(l.name),className:"text-[9px] font-bold uppercase tracking-widest text-red-300 hover:text-red-200 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",children:"Delete"})]})]}),s.jsx("div",{className:"bg-black",children:l.type==="recording"?s.jsx("video",{src:l.url,controls:!0,className:"w-full h-64 object-contain bg-black"}):s.jsx("img",{src:l.url,className:"w-full h-64 object-contain bg-black",alt:`Screenshot of ${l.name}`})}),s.jsx("div",{className:"p-3 text-[9px] text-gray-500 uppercase tracking-widest",children:l.name})]});function Lr(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _u={exports:{}};var np;function sb(){return np||(np=1,(function(l,c){(function(o){l.exports=o()})(function(){return(function o(u,f,d){function h(b,C){if(!f[b]){if(!u[b]){var _=typeof Lr=="function"&&Lr;if(!C&&_)return _(b,!0);if(m)return m(b,!0);var T=new Error("Cannot find module '"+b+"'");throw T.code="MODULE_NOT_FOUND",T}var N=f[b]={exports:{}};u[b][0].call(N.exports,function(S){var p=u[b][1][S];return h(p||S)},N,N.exports,o,u,f,d)}return f[b].exports}for(var m=typeof Lr=="function"&&Lr,x=0;x<d.length;x++)h(d[x]);return h})({1:[function(o,u,f){var d=o("./utils"),h=o("./support"),m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";f.encode=function(x){for(var b,C,_,T,N,S,p,y=[],w=0,k=x.length,j=k,M=d.getTypeOf(x)!=="string";w<x.length;)j=k-w,_=M?(b=x[w++],C=w<k?x[w++]:0,w<k?x[w++]:0):(b=x.charCodeAt(w++),C=w<k?x.charCodeAt(w++):0,w<k?x.charCodeAt(w++):0),T=b>>2,N=(3&b)<<4|C>>4,S=1<j?(15&C)<<2|_>>6:64,p=2<j?63&_:64,y.push(m.charAt(T)+m.charAt(N)+m.charAt(S)+m.charAt(p));return y.join("")},f.decode=function(x){var b,C,_,T,N,S,p=0,y=0,w="data:";if(x.substr(0,w.length)===w)throw new Error("Invalid base64 input, it looks like a data url.");var k,j=3*(x=x.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(x.charAt(x.length-1)===m.charAt(64)&&j--,x.charAt(x.length-2)===m.charAt(64)&&j--,j%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=h.uint8array?new Uint8Array(0|j):new Array(0|j);p<x.length;)b=m.indexOf(x.charAt(p++))<<2|(T=m.indexOf(x.charAt(p++)))>>4,C=(15&T)<<4|(N=m.indexOf(x.charAt(p++)))>>2,_=(3&N)<<6|(S=m.indexOf(x.charAt(p++))),k[y++]=b,N!==64&&(k[y++]=C),S!==64&&(k[y++]=_);return k}},{"./support":30,"./utils":32}],2:[function(o,u,f){var d=o("./external"),h=o("./stream/DataWorker"),m=o("./stream/Crc32Probe"),x=o("./stream/DataLengthProbe");function b(C,_,T,N,S){this.compressedSize=C,this.uncompressedSize=_,this.crc32=T,this.compression=N,this.compressedContent=S}b.prototype={getContentWorker:function(){var C=new h(d.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new x("data_length")),_=this;return C.on("end",function(){if(this.streamInfo.data_length!==_.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),C},getCompressedWorker:function(){return new h(d.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},b.createWorkerFrom=function(C,_,T){return C.pipe(new m).pipe(new x("uncompressedSize")).pipe(_.compressWorker(T)).pipe(new x("compressedSize")).withStreamInfo("compression",_)},u.exports=b},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(o,u,f){var d=o("./stream/GenericWorker");f.STORE={magic:"\0\0",compressWorker:function(){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},f.DEFLATE=o("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(o,u,f){var d=o("./utils"),h=(function(){for(var m,x=[],b=0;b<256;b++){m=b;for(var C=0;C<8;C++)m=1&m?3988292384^m>>>1:m>>>1;x[b]=m}return x})();u.exports=function(m,x){return m!==void 0&&m.length?d.getTypeOf(m)!=="string"?(function(b,C,_,T){var N=h,S=T+_;b^=-1;for(var p=T;p<S;p++)b=b>>>8^N[255&(b^C[p])];return-1^b})(0|x,m,m.length,0):(function(b,C,_,T){var N=h,S=T+_;b^=-1;for(var p=T;p<S;p++)b=b>>>8^N[255&(b^C.charCodeAt(p))];return-1^b})(0|x,m,m.length,0):0}},{"./utils":32}],5:[function(o,u,f){f.base64=!1,f.binary=!1,f.dir=!1,f.createFolders=!0,f.date=null,f.compression=null,f.compressionOptions=null,f.comment=null,f.unixPermissions=null,f.dosPermissions=null},{}],6:[function(o,u,f){var d=null;d=typeof Promise<"u"?Promise:o("lie"),u.exports={Promise:d}},{lie:37}],7:[function(o,u,f){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",h=o("pako"),m=o("./utils"),x=o("./stream/GenericWorker"),b=d?"uint8array":"array";function C(_,T){x.call(this,"FlateWorker/"+_),this._pako=null,this._pakoAction=_,this._pakoOptions=T,this.meta={}}f.magic="\b\0",m.inherits(C,x),C.prototype.processChunk=function(_){this.meta=_.meta,this._pako===null&&this._createPako(),this._pako.push(m.transformTo(b,_.data),!1)},C.prototype.flush=function(){x.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},C.prototype.cleanUp=function(){x.prototype.cleanUp.call(this),this._pako=null},C.prototype._createPako=function(){this._pako=new h[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var _=this;this._pako.onData=function(T){_.push({data:T,meta:_.meta})}},f.compressWorker=function(_){return new C("Deflate",_)},f.uncompressWorker=function(){return new C("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(o,u,f){function d(N,S){var p,y="";for(p=0;p<S;p++)y+=String.fromCharCode(255&N),N>>>=8;return y}function h(N,S,p,y,w,k){var j,M,U=N.file,V=N.compression,Y=k!==b.utf8encode,Q=m.transformTo("string",k(U.name)),G=m.transformTo("string",b.utf8encode(U.name)),le=U.comment,de=m.transformTo("string",k(le)),L=m.transformTo("string",b.utf8encode(le)),se=G.length!==U.name.length,E=L.length!==le.length,ce="",$="",K="",be=U.dir,J=U.date,me={crc32:0,compressedSize:0,uncompressedSize:0};S&&!p||(me.crc32=N.crc32,me.compressedSize=N.compressedSize,me.uncompressedSize=N.uncompressedSize);var A=0;S&&(A|=8),Y||!se&&!E||(A|=2048);var D=0,te=0;be&&(D|=16),w==="UNIX"?(te=798,D|=(function(re,_e){var Ne=re;return re||(Ne=_e?16893:33204),(65535&Ne)<<16})(U.unixPermissions,be)):(te=20,D|=(function(re){return 63&(re||0)})(U.dosPermissions)),j=J.getUTCHours(),j<<=6,j|=J.getUTCMinutes(),j<<=5,j|=J.getUTCSeconds()/2,M=J.getUTCFullYear()-1980,M<<=4,M|=J.getUTCMonth()+1,M<<=5,M|=J.getUTCDate(),se&&($=d(1,1)+d(C(Q),4)+G,ce+="up"+d($.length,2)+$),E&&(K=d(1,1)+d(C(de),4)+L,ce+="uc"+d(K.length,2)+K);var F="";return F+=`
|
|
12
|
-
\0`,F+=d(A,2),F+=V.magic,F+=d(j,2),F+=d(M,2),F+=d(me.crc32,4),F+=d(me.compressedSize,4),F+=d(me.uncompressedSize,4),F+=d(Q.length,2),F+=d(ce.length,2),{fileRecord:_.LOCAL_FILE_HEADER+F+Q+ce,dirRecord:_.CENTRAL_FILE_HEADER+d(te,2)+F+d(de.length,2)+"\0\0\0\0"+d(D,4)+d(y,4)+Q+ce+de}}var m=o("../utils"),x=o("../stream/GenericWorker"),b=o("../utf8"),C=o("../crc32"),_=o("../signature");function T(N,S,p,y){x.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=S,this.zipPlatform=p,this.encodeFileName=y,this.streamFiles=N,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}m.inherits(T,x),T.prototype.push=function(N){var S=N.meta.percent||0,p=this.entriesCount,y=this._sources.length;this.accumulate?this.contentBuffer.push(N):(this.bytesWritten+=N.data.length,x.prototype.push.call(this,{data:N.data,meta:{currentFile:this.currentFile,percent:p?(S+100*(p-y-1))/p:100}}))},T.prototype.openedSource=function(N){this.currentSourceOffset=this.bytesWritten,this.currentFile=N.file.name;var S=this.streamFiles&&!N.file.dir;if(S){var p=h(N,S,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},T.prototype.closedSource=function(N){this.accumulate=!1;var S=this.streamFiles&&!N.file.dir,p=h(N,S,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),S)this.push({data:(function(y){return _.DATA_DESCRIPTOR+d(y.crc32,4)+d(y.compressedSize,4)+d(y.uncompressedSize,4)})(N),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},T.prototype.flush=function(){for(var N=this.bytesWritten,S=0;S<this.dirRecords.length;S++)this.push({data:this.dirRecords[S],meta:{percent:100}});var p=this.bytesWritten-N,y=(function(w,k,j,M,U){var V=m.transformTo("string",U(M));return _.CENTRAL_DIRECTORY_END+"\0\0\0\0"+d(w,2)+d(w,2)+d(k,4)+d(j,4)+d(V.length,2)+V})(this.dirRecords.length,p,N,this.zipComment,this.encodeFileName);this.push({data:y,meta:{percent:100}})},T.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},T.prototype.registerPrevious=function(N){this._sources.push(N);var S=this;return N.on("data",function(p){S.processChunk(p)}),N.on("end",function(){S.closedSource(S.previous.streamInfo),S._sources.length?S.prepareNextSource():S.end()}),N.on("error",function(p){S.error(p)}),this},T.prototype.resume=function(){return!!x.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},T.prototype.error=function(N){var S=this._sources;if(!x.prototype.error.call(this,N))return!1;for(var p=0;p<S.length;p++)try{S[p].error(N)}catch{}return!0},T.prototype.lock=function(){x.prototype.lock.call(this);for(var N=this._sources,S=0;S<N.length;S++)N[S].lock()},u.exports=T},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,u,f){var d=o("../compressions"),h=o("./ZipFileWorker");f.generateWorker=function(m,x,b){var C=new h(x.streamFiles,b,x.platform,x.encodeFileName),_=0;try{m.forEach(function(T,N){_++;var S=(function(k,j){var M=k||j,U=d[M];if(!U)throw new Error(M+" is not a valid compression method !");return U})(N.options.compression,x.compression),p=N.options.compressionOptions||x.compressionOptions||{},y=N.dir,w=N.date;N._compressWorker(S,p).withStreamInfo("file",{name:T,dir:y,date:w,comment:N.comment||"",unixPermissions:N.unixPermissions,dosPermissions:N.dosPermissions}).pipe(C)}),C.entriesCount=_}catch(T){C.error(T)}return C}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,u,f){function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var h=new d;for(var m in this)typeof this[m]!="function"&&(h[m]=this[m]);return h}}(d.prototype=o("./object")).loadAsync=o("./load"),d.support=o("./support"),d.defaults=o("./defaults"),d.version="3.10.1",d.loadAsync=function(h,m){return new d().loadAsync(h,m)},d.external=o("./external"),u.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,u,f){var d=o("./utils"),h=o("./external"),m=o("./utf8"),x=o("./zipEntries"),b=o("./stream/Crc32Probe"),C=o("./nodejsUtils");function _(T){return new h.Promise(function(N,S){var p=T.decompressed.getContentWorker().pipe(new b);p.on("error",function(y){S(y)}).on("end",function(){p.streamInfo.crc32!==T.decompressed.crc32?S(new Error("Corrupted zip : CRC32 mismatch")):N()}).resume()})}u.exports=function(T,N){var S=this;return N=d.extend(N||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:m.utf8decode}),C.isNode&&C.isStream(T)?h.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",T,!0,N.optimizedBinaryString,N.base64).then(function(p){var y=new x(N);return y.load(p),y}).then(function(p){var y=[h.Promise.resolve(p)],w=p.files;if(N.checkCRC32)for(var k=0;k<w.length;k++)y.push(_(w[k]));return h.Promise.all(y)}).then(function(p){for(var y=p.shift(),w=y.files,k=0;k<w.length;k++){var j=w[k],M=j.fileNameStr,U=d.resolve(j.fileNameStr);S.file(U,j.decompressed,{binary:!0,optimizedBinaryString:!0,date:j.date,dir:j.dir,comment:j.fileCommentStr.length?j.fileCommentStr:null,unixPermissions:j.unixPermissions,dosPermissions:j.dosPermissions,createFolders:N.createFolders}),j.dir||(S.file(U).unsafeOriginalName=M)}return y.zipComment.length&&(S.comment=y.zipComment),S})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,u,f){var d=o("../utils"),h=o("../stream/GenericWorker");function m(x,b){h.call(this,"Nodejs stream input adapter for "+x),this._upstreamEnded=!1,this._bindStream(b)}d.inherits(m,h),m.prototype._bindStream=function(x){var b=this;(this._stream=x).pause(),x.on("data",function(C){b.push({data:C,meta:{percent:0}})}).on("error",function(C){b.isPaused?this.generatedError=C:b.error(C)}).on("end",function(){b.isPaused?b._upstreamEnded=!0:b.end()})},m.prototype.pause=function(){return!!h.prototype.pause.call(this)&&(this._stream.pause(),!0)},m.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},u.exports=m},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,u,f){var d=o("readable-stream").Readable;function h(m,x,b){d.call(this,x),this._helper=m;var C=this;m.on("data",function(_,T){C.push(_)||C._helper.pause(),b&&b(T)}).on("error",function(_){C.emit("error",_)}).on("end",function(){C.push(null)})}o("../utils").inherits(h,d),h.prototype._read=function(){this._helper.resume()},u.exports=h},{"../utils":32,"readable-stream":16}],14:[function(o,u,f){u.exports={isNode:typeof Buffer<"u",newBufferFrom:function(d,h){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(d,h);if(typeof d=="number")throw new Error('The "data" argument must not be a number');return new Buffer(d,h)},allocBuffer:function(d){if(Buffer.alloc)return Buffer.alloc(d);var h=new Buffer(d);return h.fill(0),h},isBuffer:function(d){return Buffer.isBuffer(d)},isStream:function(d){return d&&typeof d.on=="function"&&typeof d.pause=="function"&&typeof d.resume=="function"}}},{}],15:[function(o,u,f){function d(U,V,Y){var Q,G=m.getTypeOf(V),le=m.extend(Y||{},C);le.date=le.date||new Date,le.compression!==null&&(le.compression=le.compression.toUpperCase()),typeof le.unixPermissions=="string"&&(le.unixPermissions=parseInt(le.unixPermissions,8)),le.unixPermissions&&16384&le.unixPermissions&&(le.dir=!0),le.dosPermissions&&16&le.dosPermissions&&(le.dir=!0),le.dir&&(U=w(U)),le.createFolders&&(Q=y(U))&&k.call(this,Q,!0);var de=G==="string"&&le.binary===!1&&le.base64===!1;Y&&Y.binary!==void 0||(le.binary=!de),(V instanceof _&&V.uncompressedSize===0||le.dir||!V||V.length===0)&&(le.base64=!1,le.binary=!0,V="",le.compression="STORE",G="string");var L=null;L=V instanceof _||V instanceof x?V:S.isNode&&S.isStream(V)?new p(U,V):m.prepareContent(U,V,le.binary,le.optimizedBinaryString,le.base64);var se=new T(U,L,le);this.files[U]=se}var h=o("./utf8"),m=o("./utils"),x=o("./stream/GenericWorker"),b=o("./stream/StreamHelper"),C=o("./defaults"),_=o("./compressedObject"),T=o("./zipObject"),N=o("./generate"),S=o("./nodejsUtils"),p=o("./nodejs/NodejsStreamInputAdapter"),y=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var V=U.lastIndexOf("/");return 0<V?U.substring(0,V):""},w=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},k=function(U,V){return V=V!==void 0?V:C.createFolders,U=w(U),this.files[U]||d.call(this,U,null,{dir:!0,createFolders:V}),this.files[U]};function j(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var M={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var V,Y,Q;for(V in this.files)Q=this.files[V],(Y=V.slice(this.root.length,V.length))&&V.slice(0,this.root.length)===this.root&&U(Y,Q)},filter:function(U){var V=[];return this.forEach(function(Y,Q){U(Y,Q)&&V.push(Q)}),V},file:function(U,V,Y){if(arguments.length!==1)return U=this.root+U,d.call(this,U,V,Y),this;if(j(U)){var Q=U;return this.filter(function(le,de){return!de.dir&&Q.test(le)})}var G=this.files[this.root+U];return G&&!G.dir?G:null},folder:function(U){if(!U)return this;if(j(U))return this.filter(function(G,le){return le.dir&&U.test(G)});var V=this.root+U,Y=k.call(this,V),Q=this.clone();return Q.root=Y.name,Q},remove:function(U){U=this.root+U;var V=this.files[U];if(V||(U.slice(-1)!=="/"&&(U+="/"),V=this.files[U]),V&&!V.dir)delete this.files[U];else for(var Y=this.filter(function(G,le){return le.name.slice(0,U.length)===U}),Q=0;Q<Y.length;Q++)delete this.files[Y[Q].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(U){var V,Y={};try{if((Y=m.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:h.utf8encode})).type=Y.type.toLowerCase(),Y.compression=Y.compression.toUpperCase(),Y.type==="binarystring"&&(Y.type="string"),!Y.type)throw new Error("No output type specified.");m.checkSupport(Y.type),Y.platform!=="darwin"&&Y.platform!=="freebsd"&&Y.platform!=="linux"&&Y.platform!=="sunos"||(Y.platform="UNIX"),Y.platform==="win32"&&(Y.platform="DOS");var Q=Y.comment||this.comment||"";V=N.generateWorker(this,Y,Q)}catch(G){(V=new x("error")).error(G)}return new b(V,Y.type||"string",Y.mimeType)},generateAsync:function(U,V){return this.generateInternalStream(U).accumulate(V)},generateNodeStream:function(U,V){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(V)}};u.exports=M},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(o,u,f){u.exports=o("stream")},{stream:void 0}],17:[function(o,u,f){var d=o("./DataReader");function h(m){d.call(this,m);for(var x=0;x<this.data.length;x++)m[x]=255&m[x]}o("../utils").inherits(h,d),h.prototype.byteAt=function(m){return this.data[this.zero+m]},h.prototype.lastIndexOfSignature=function(m){for(var x=m.charCodeAt(0),b=m.charCodeAt(1),C=m.charCodeAt(2),_=m.charCodeAt(3),T=this.length-4;0<=T;--T)if(this.data[T]===x&&this.data[T+1]===b&&this.data[T+2]===C&&this.data[T+3]===_)return T-this.zero;return-1},h.prototype.readAndCheckSignature=function(m){var x=m.charCodeAt(0),b=m.charCodeAt(1),C=m.charCodeAt(2),_=m.charCodeAt(3),T=this.readData(4);return x===T[0]&&b===T[1]&&C===T[2]&&_===T[3]},h.prototype.readData=function(m){if(this.checkOffset(m),m===0)return[];var x=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,x},u.exports=h},{"../utils":32,"./DataReader":18}],18:[function(o,u,f){var d=o("../utils");function h(m){this.data=m,this.length=m.length,this.index=0,this.zero=0}h.prototype={checkOffset:function(m){this.checkIndex(this.index+m)},checkIndex:function(m){if(this.length<this.zero+m||m<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+m+"). Corrupted zip ?")},setIndex:function(m){this.checkIndex(m),this.index=m},skip:function(m){this.setIndex(this.index+m)},byteAt:function(){},readInt:function(m){var x,b=0;for(this.checkOffset(m),x=this.index+m-1;x>=this.index;x--)b=(b<<8)+this.byteAt(x);return this.index+=m,b},readString:function(m){return d.transformTo("string",this.readData(m))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var m=this.readInt(4);return new Date(Date.UTC(1980+(m>>25&127),(m>>21&15)-1,m>>16&31,m>>11&31,m>>5&63,(31&m)<<1))}},u.exports=h},{"../utils":32}],19:[function(o,u,f){var d=o("./Uint8ArrayReader");function h(m){d.call(this,m)}o("../utils").inherits(h,d),h.prototype.readData=function(m){this.checkOffset(m);var x=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,x},u.exports=h},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,u,f){var d=o("./DataReader");function h(m){d.call(this,m)}o("../utils").inherits(h,d),h.prototype.byteAt=function(m){return this.data.charCodeAt(this.zero+m)},h.prototype.lastIndexOfSignature=function(m){return this.data.lastIndexOf(m)-this.zero},h.prototype.readAndCheckSignature=function(m){return m===this.readData(4)},h.prototype.readData=function(m){this.checkOffset(m);var x=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,x},u.exports=h},{"../utils":32,"./DataReader":18}],21:[function(o,u,f){var d=o("./ArrayReader");function h(m){d.call(this,m)}o("../utils").inherits(h,d),h.prototype.readData=function(m){if(this.checkOffset(m),m===0)return new Uint8Array(0);var x=this.data.subarray(this.zero+this.index,this.zero+this.index+m);return this.index+=m,x},u.exports=h},{"../utils":32,"./ArrayReader":17}],22:[function(o,u,f){var d=o("../utils"),h=o("../support"),m=o("./ArrayReader"),x=o("./StringReader"),b=o("./NodeBufferReader"),C=o("./Uint8ArrayReader");u.exports=function(_){var T=d.getTypeOf(_);return d.checkSupport(T),T!=="string"||h.uint8array?T==="nodebuffer"?new b(_):h.uint8array?new C(d.transformTo("uint8array",_)):new m(d.transformTo("array",_)):new x(_)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,u,f){f.LOCAL_FILE_HEADER="PK",f.CENTRAL_FILE_HEADER="PK",f.CENTRAL_DIRECTORY_END="PK",f.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",f.ZIP64_CENTRAL_DIRECTORY_END="PK",f.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,u,f){var d=o("./GenericWorker"),h=o("../utils");function m(x){d.call(this,"ConvertWorker to "+x),this.destType=x}h.inherits(m,d),m.prototype.processChunk=function(x){this.push({data:h.transformTo(this.destType,x.data),meta:x.meta})},u.exports=m},{"../utils":32,"./GenericWorker":28}],25:[function(o,u,f){var d=o("./GenericWorker"),h=o("../crc32");function m(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(m,d),m.prototype.processChunk=function(x){this.streamInfo.crc32=h(x.data,this.streamInfo.crc32||0),this.push(x)},u.exports=m},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,u,f){var d=o("../utils"),h=o("./GenericWorker");function m(x){h.call(this,"DataLengthProbe for "+x),this.propName=x,this.withStreamInfo(x,0)}d.inherits(m,h),m.prototype.processChunk=function(x){if(x){var b=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=b+x.data.length}h.prototype.processChunk.call(this,x)},u.exports=m},{"../utils":32,"./GenericWorker":28}],27:[function(o,u,f){var d=o("../utils"),h=o("./GenericWorker");function m(x){h.call(this,"DataWorker");var b=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,x.then(function(C){b.dataIsReady=!0,b.data=C,b.max=C&&C.length||0,b.type=d.getTypeOf(C),b.isPaused||b._tickAndRepeat()},function(C){b.error(C)})}d.inherits(m,h),m.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this.data=null},m.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},m.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},m.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var x=null,b=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":x=this.data.substring(this.index,b);break;case"uint8array":x=this.data.subarray(this.index,b);break;case"array":case"nodebuffer":x=this.data.slice(this.index,b)}return this.index=b,this.push({data:x,meta:{percent:this.max?this.index/this.max*100:0}})},u.exports=m},{"../utils":32,"./GenericWorker":28}],28:[function(o,u,f){function d(h){this.name=h||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(h){this.emit("data",h)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(h){this.emit("error",h)}return!0},error:function(h){return!this.isFinished&&(this.isPaused?this.generatedError=h:(this.isFinished=!0,this.emit("error",h),this.previous&&this.previous.error(h),this.cleanUp()),!0)},on:function(h,m){return this._listeners[h].push(m),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(h,m){if(this._listeners[h])for(var x=0;x<this._listeners[h].length;x++)this._listeners[h][x].call(this,m)},pipe:function(h){return h.registerPrevious(this)},registerPrevious:function(h){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=h.streamInfo,this.mergeStreamInfo(),this.previous=h;var m=this;return h.on("data",function(x){m.processChunk(x)}),h.on("end",function(){m.end()}),h.on("error",function(x){m.error(x)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var h=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),h=!0),this.previous&&this.previous.resume(),!h},flush:function(){},processChunk:function(h){this.push(h)},withStreamInfo:function(h,m){return this.extraStreamInfo[h]=m,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var h in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,h)&&(this.streamInfo[h]=this.extraStreamInfo[h])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var h="Worker "+this.name;return this.previous?this.previous+" -> "+h:h}},u.exports=d},{}],29:[function(o,u,f){var d=o("../utils"),h=o("./ConvertWorker"),m=o("./GenericWorker"),x=o("../base64"),b=o("../support"),C=o("../external"),_=null;if(b.nodestream)try{_=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function T(S,p){return new C.Promise(function(y,w){var k=[],j=S._internalType,M=S._outputType,U=S._mimeType;S.on("data",function(V,Y){k.push(V),p&&p(Y)}).on("error",function(V){k=[],w(V)}).on("end",function(){try{var V=(function(Y,Q,G){switch(Y){case"blob":return d.newBlob(d.transformTo("arraybuffer",Q),G);case"base64":return x.encode(Q);default:return d.transformTo(Y,Q)}})(M,(function(Y,Q){var G,le=0,de=null,L=0;for(G=0;G<Q.length;G++)L+=Q[G].length;switch(Y){case"string":return Q.join("");case"array":return Array.prototype.concat.apply([],Q);case"uint8array":for(de=new Uint8Array(L),G=0;G<Q.length;G++)de.set(Q[G],le),le+=Q[G].length;return de;case"nodebuffer":return Buffer.concat(Q);default:throw new Error("concat : unsupported type '"+Y+"'")}})(j,k),U);y(V)}catch(Y){w(Y)}k=[]}).resume()})}function N(S,p,y){var w=p;switch(p){case"blob":case"arraybuffer":w="uint8array";break;case"base64":w="string"}try{this._internalType=w,this._outputType=p,this._mimeType=y,d.checkSupport(w),this._worker=S.pipe(new h(w)),S.lock()}catch(k){this._worker=new m("error"),this._worker.error(k)}}N.prototype={accumulate:function(S){return T(this,S)},on:function(S,p){var y=this;return S==="data"?this._worker.on(S,function(w){p.call(y,w.data,w.meta)}):this._worker.on(S,function(){d.delay(p,arguments,y)}),this},resume:function(){return d.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(S){if(d.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new _(this,{objectMode:this._outputType!=="nodebuffer"},S)}},u.exports=N},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,u,f){if(f.base64=!0,f.array=!0,f.string=!0,f.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",f.nodebuffer=typeof Buffer<"u",f.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")f.blob=!1;else{var d=new ArrayBuffer(0);try{f.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var h=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);h.append(d),f.blob=h.getBlob("application/zip").size===0}catch{f.blob=!1}}}try{f.nodestream=!!o("readable-stream").Readable}catch{f.nodestream=!1}},{"readable-stream":16}],31:[function(o,u,f){for(var d=o("./utils"),h=o("./support"),m=o("./nodejsUtils"),x=o("./stream/GenericWorker"),b=new Array(256),C=0;C<256;C++)b[C]=252<=C?6:248<=C?5:240<=C?4:224<=C?3:192<=C?2:1;b[254]=b[254]=1;function _(){x.call(this,"utf-8 decode"),this.leftOver=null}function T(){x.call(this,"utf-8 encode")}f.utf8encode=function(N){return h.nodebuffer?m.newBufferFrom(N,"utf-8"):(function(S){var p,y,w,k,j,M=S.length,U=0;for(k=0;k<M;k++)(64512&(y=S.charCodeAt(k)))==55296&&k+1<M&&(64512&(w=S.charCodeAt(k+1)))==56320&&(y=65536+(y-55296<<10)+(w-56320),k++),U+=y<128?1:y<2048?2:y<65536?3:4;for(p=h.uint8array?new Uint8Array(U):new Array(U),k=j=0;j<U;k++)(64512&(y=S.charCodeAt(k)))==55296&&k+1<M&&(64512&(w=S.charCodeAt(k+1)))==56320&&(y=65536+(y-55296<<10)+(w-56320),k++),y<128?p[j++]=y:(y<2048?p[j++]=192|y>>>6:(y<65536?p[j++]=224|y>>>12:(p[j++]=240|y>>>18,p[j++]=128|y>>>12&63),p[j++]=128|y>>>6&63),p[j++]=128|63&y);return p})(N)},f.utf8decode=function(N){return h.nodebuffer?d.transformTo("nodebuffer",N).toString("utf-8"):(function(S){var p,y,w,k,j=S.length,M=new Array(2*j);for(p=y=0;p<j;)if((w=S[p++])<128)M[y++]=w;else if(4<(k=b[w]))M[y++]=65533,p+=k-1;else{for(w&=k===2?31:k===3?15:7;1<k&&p<j;)w=w<<6|63&S[p++],k--;1<k?M[y++]=65533:w<65536?M[y++]=w:(w-=65536,M[y++]=55296|w>>10&1023,M[y++]=56320|1023&w)}return M.length!==y&&(M.subarray?M=M.subarray(0,y):M.length=y),d.applyFromCharCode(M)})(N=d.transformTo(h.uint8array?"uint8array":"array",N))},d.inherits(_,x),_.prototype.processChunk=function(N){var S=d.transformTo(h.uint8array?"uint8array":"array",N.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var p=S;(S=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),S.set(p,this.leftOver.length)}else S=this.leftOver.concat(S);this.leftOver=null}var y=(function(k,j){var M;for((j=j||k.length)>k.length&&(j=k.length),M=j-1;0<=M&&(192&k[M])==128;)M--;return M<0||M===0?j:M+b[k[M]]>j?M:j})(S),w=S;y!==S.length&&(h.uint8array?(w=S.subarray(0,y),this.leftOver=S.subarray(y,S.length)):(w=S.slice(0,y),this.leftOver=S.slice(y,S.length))),this.push({data:f.utf8decode(w),meta:N.meta})},_.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:f.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},f.Utf8DecodeWorker=_,d.inherits(T,x),T.prototype.processChunk=function(N){this.push({data:f.utf8encode(N.data),meta:N.meta})},f.Utf8EncodeWorker=T},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,u,f){var d=o("./support"),h=o("./base64"),m=o("./nodejsUtils"),x=o("./external");function b(p){return p}function C(p,y){for(var w=0;w<p.length;++w)y[w]=255&p.charCodeAt(w);return y}o("setimmediate"),f.newBlob=function(p,y){f.checkSupport("blob");try{return new Blob([p],{type:y})}catch{try{var w=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return w.append(p),w.getBlob(y)}catch{throw new Error("Bug : can't construct the Blob.")}}};var _={stringifyByChunk:function(p,y,w){var k=[],j=0,M=p.length;if(M<=w)return String.fromCharCode.apply(null,p);for(;j<M;)y==="array"||y==="nodebuffer"?k.push(String.fromCharCode.apply(null,p.slice(j,Math.min(j+w,M)))):k.push(String.fromCharCode.apply(null,p.subarray(j,Math.min(j+w,M)))),j+=w;return k.join("")},stringifyByChar:function(p){for(var y="",w=0;w<p.length;w++)y+=String.fromCharCode(p[w]);return y},applyCanBeUsed:{uint8array:(function(){try{return d.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return d.nodebuffer&&String.fromCharCode.apply(null,m.allocBuffer(1)).length===1}catch{return!1}})()}};function T(p){var y=65536,w=f.getTypeOf(p),k=!0;if(w==="uint8array"?k=_.applyCanBeUsed.uint8array:w==="nodebuffer"&&(k=_.applyCanBeUsed.nodebuffer),k)for(;1<y;)try{return _.stringifyByChunk(p,w,y)}catch{y=Math.floor(y/2)}return _.stringifyByChar(p)}function N(p,y){for(var w=0;w<p.length;w++)y[w]=p[w];return y}f.applyFromCharCode=T;var S={};S.string={string:b,array:function(p){return C(p,new Array(p.length))},arraybuffer:function(p){return S.string.uint8array(p).buffer},uint8array:function(p){return C(p,new Uint8Array(p.length))},nodebuffer:function(p){return C(p,m.allocBuffer(p.length))}},S.array={string:T,array:b,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return m.newBufferFrom(p)}},S.arraybuffer={string:function(p){return T(new Uint8Array(p))},array:function(p){return N(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:b,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return m.newBufferFrom(new Uint8Array(p))}},S.uint8array={string:T,array:function(p){return N(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:b,nodebuffer:function(p){return m.newBufferFrom(p)}},S.nodebuffer={string:T,array:function(p){return N(p,new Array(p.length))},arraybuffer:function(p){return S.nodebuffer.uint8array(p).buffer},uint8array:function(p){return N(p,new Uint8Array(p.length))},nodebuffer:b},f.transformTo=function(p,y){if(y=y||"",!p)return y;f.checkSupport(p);var w=f.getTypeOf(y);return S[w][p](y)},f.resolve=function(p){for(var y=p.split("/"),w=[],k=0;k<y.length;k++){var j=y[k];j==="."||j===""&&k!==0&&k!==y.length-1||(j===".."?w.pop():w.push(j))}return w.join("/")},f.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":d.nodebuffer&&m.isBuffer(p)?"nodebuffer":d.uint8array&&p instanceof Uint8Array?"uint8array":d.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},f.checkSupport=function(p){if(!d[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},f.MAX_VALUE_16BITS=65535,f.MAX_VALUE_32BITS=-1,f.pretty=function(p){var y,w,k="";for(w=0;w<(p||"").length;w++)k+="\\x"+((y=p.charCodeAt(w))<16?"0":"")+y.toString(16).toUpperCase();return k},f.delay=function(p,y,w){setImmediate(function(){p.apply(w||null,y||[])})},f.inherits=function(p,y){function w(){}w.prototype=y.prototype,p.prototype=new w},f.extend=function(){var p,y,w={};for(p=0;p<arguments.length;p++)for(y in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],y)&&w[y]===void 0&&(w[y]=arguments[p][y]);return w},f.prepareContent=function(p,y,w,k,j){return x.Promise.resolve(y).then(function(M){return d.blob&&(M instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(M))!==-1)&&typeof FileReader<"u"?new x.Promise(function(U,V){var Y=new FileReader;Y.onload=function(Q){U(Q.target.result)},Y.onerror=function(Q){V(Q.target.error)},Y.readAsArrayBuffer(M)}):M}).then(function(M){var U=f.getTypeOf(M);return U?(U==="arraybuffer"?M=f.transformTo("uint8array",M):U==="string"&&(j?M=h.decode(M):w&&k!==!0&&(M=(function(V){return C(V,d.uint8array?new Uint8Array(V.length):new Array(V.length))})(M))),M):x.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(o,u,f){var d=o("./reader/readerFor"),h=o("./utils"),m=o("./signature"),x=o("./zipEntry"),b=o("./support");function C(_){this.files=[],this.loadOptions=_}C.prototype={checkSignature:function(_){if(!this.reader.readAndCheckSignature(_)){this.reader.index-=4;var T=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+h.pretty(T)+", expected "+h.pretty(_)+")")}},isSignature:function(_,T){var N=this.reader.index;this.reader.setIndex(_);var S=this.reader.readString(4)===T;return this.reader.setIndex(N),S},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var _=this.reader.readData(this.zipCommentLength),T=b.uint8array?"uint8array":"array",N=h.transformTo(T,_);this.zipComment=this.loadOptions.decodeFileName(N)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var _,T,N,S=this.zip64EndOfCentralSize-44;0<S;)_=this.reader.readInt(2),T=this.reader.readInt(4),N=this.reader.readData(T),this.zip64ExtensibleData[_]={id:_,length:T,value:N}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var _,T;for(_=0;_<this.files.length;_++)T=this.files[_],this.reader.setIndex(T.localHeaderOffset),this.checkSignature(m.LOCAL_FILE_HEADER),T.readLocalPart(this.reader),T.handleUTF8(),T.processAttributes()},readCentralDir:function(){var _;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(m.CENTRAL_FILE_HEADER);)(_=new x({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(_);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var _=this.reader.lastIndexOfSignature(m.CENTRAL_DIRECTORY_END);if(_<0)throw this.isSignature(0,m.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(_);var T=_;if(this.checkSignature(m.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===h.MAX_VALUE_16BITS||this.diskWithCentralDirStart===h.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===h.MAX_VALUE_16BITS||this.centralDirRecords===h.MAX_VALUE_16BITS||this.centralDirSize===h.MAX_VALUE_32BITS||this.centralDirOffset===h.MAX_VALUE_32BITS){if(this.zip64=!0,(_=this.reader.lastIndexOfSignature(m.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(_),this.checkSignature(m.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,m.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(m.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(m.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var N=this.centralDirOffset+this.centralDirSize;this.zip64&&(N+=20,N+=12+this.zip64EndOfCentralSize);var S=T-N;if(0<S)this.isSignature(T,m.CENTRAL_FILE_HEADER)||(this.reader.zero=S);else if(S<0)throw new Error("Corrupted zip: missing "+Math.abs(S)+" bytes.")},prepareReader:function(_){this.reader=d(_)},load:function(_){this.prepareReader(_),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},u.exports=C},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(o,u,f){var d=o("./reader/readerFor"),h=o("./utils"),m=o("./compressedObject"),x=o("./crc32"),b=o("./utf8"),C=o("./compressions"),_=o("./support");function T(N,S){this.options=N,this.loadOptions=S}T.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(N){var S,p;if(N.skip(22),this.fileNameLength=N.readInt(2),p=N.readInt(2),this.fileName=N.readData(this.fileNameLength),N.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((S=(function(y){for(var w in C)if(Object.prototype.hasOwnProperty.call(C,w)&&C[w].magic===y)return C[w];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+h.pretty(this.compressionMethod)+" unknown (inner file : "+h.transformTo("string",this.fileName)+")");this.decompressed=new m(this.compressedSize,this.uncompressedSize,this.crc32,S,N.readData(this.compressedSize))},readCentralPart:function(N){this.versionMadeBy=N.readInt(2),N.skip(2),this.bitFlag=N.readInt(2),this.compressionMethod=N.readString(2),this.date=N.readDate(),this.crc32=N.readInt(4),this.compressedSize=N.readInt(4),this.uncompressedSize=N.readInt(4);var S=N.readInt(2);if(this.extraFieldsLength=N.readInt(2),this.fileCommentLength=N.readInt(2),this.diskNumberStart=N.readInt(2),this.internalFileAttributes=N.readInt(2),this.externalFileAttributes=N.readInt(4),this.localHeaderOffset=N.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");N.skip(S),this.readExtraFields(N),this.parseZIP64ExtraField(N),this.fileComment=N.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var N=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),N==0&&(this.dosPermissions=63&this.externalFileAttributes),N==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var N=d(this.extraFields[1].value);this.uncompressedSize===h.MAX_VALUE_32BITS&&(this.uncompressedSize=N.readInt(8)),this.compressedSize===h.MAX_VALUE_32BITS&&(this.compressedSize=N.readInt(8)),this.localHeaderOffset===h.MAX_VALUE_32BITS&&(this.localHeaderOffset=N.readInt(8)),this.diskNumberStart===h.MAX_VALUE_32BITS&&(this.diskNumberStart=N.readInt(4))}},readExtraFields:function(N){var S,p,y,w=N.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});N.index+4<w;)S=N.readInt(2),p=N.readInt(2),y=N.readData(p),this.extraFields[S]={id:S,length:p,value:y};N.setIndex(w)},handleUTF8:function(){var N=_.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=b.utf8decode(this.fileName),this.fileCommentStr=b.utf8decode(this.fileComment);else{var S=this.findExtraFieldUnicodePath();if(S!==null)this.fileNameStr=S;else{var p=h.transformTo(N,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var y=this.findExtraFieldUnicodeComment();if(y!==null)this.fileCommentStr=y;else{var w=h.transformTo(N,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(w)}}},findExtraFieldUnicodePath:function(){var N=this.extraFields[28789];if(N){var S=d(N.value);return S.readInt(1)!==1||x(this.fileName)!==S.readInt(4)?null:b.utf8decode(S.readData(N.length-5))}return null},findExtraFieldUnicodeComment:function(){var N=this.extraFields[25461];if(N){var S=d(N.value);return S.readInt(1)!==1||x(this.fileComment)!==S.readInt(4)?null:b.utf8decode(S.readData(N.length-5))}return null}},u.exports=T},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,u,f){function d(S,p,y){this.name=S,this.dir=y.dir,this.date=y.date,this.comment=y.comment,this.unixPermissions=y.unixPermissions,this.dosPermissions=y.dosPermissions,this._data=p,this._dataBinary=y.binary,this.options={compression:y.compression,compressionOptions:y.compressionOptions}}var h=o("./stream/StreamHelper"),m=o("./stream/DataWorker"),x=o("./utf8"),b=o("./compressedObject"),C=o("./stream/GenericWorker");d.prototype={internalStream:function(S){var p=null,y="string";try{if(!S)throw new Error("No output type specified.");var w=(y=S.toLowerCase())==="string"||y==="text";y!=="binarystring"&&y!=="text"||(y="string"),p=this._decompressWorker();var k=!this._dataBinary;k&&!w&&(p=p.pipe(new x.Utf8EncodeWorker)),!k&&w&&(p=p.pipe(new x.Utf8DecodeWorker))}catch(j){(p=new C("error")).error(j)}return new h(p,y,"")},async:function(S,p){return this.internalStream(S).accumulate(p)},nodeStream:function(S,p){return this.internalStream(S||"nodebuffer").toNodejsStream(p)},_compressWorker:function(S,p){if(this._data instanceof b&&this._data.compression.magic===S.magic)return this._data.getCompressedWorker();var y=this._decompressWorker();return this._dataBinary||(y=y.pipe(new x.Utf8EncodeWorker)),b.createWorkerFrom(y,S,p)},_decompressWorker:function(){return this._data instanceof b?this._data.getContentWorker():this._data instanceof C?this._data:new m(this._data)}};for(var _=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],T=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},N=0;N<_.length;N++)d.prototype[_[N]]=T;u.exports=d},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,u,f){(function(d){var h,m,x=d.MutationObserver||d.WebKitMutationObserver;if(x){var b=0,C=new x(S),_=d.document.createTextNode("");C.observe(_,{characterData:!0}),h=function(){_.data=b=++b%2}}else if(d.setImmediate||d.MessageChannel===void 0)h="document"in d&&"onreadystatechange"in d.document.createElement("script")?function(){var p=d.document.createElement("script");p.onreadystatechange=function(){S(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},d.document.documentElement.appendChild(p)}:function(){setTimeout(S,0)};else{var T=new d.MessageChannel;T.port1.onmessage=S,h=function(){T.port2.postMessage(0)}}var N=[];function S(){var p,y;m=!0;for(var w=N.length;w;){for(y=N,N=[],p=-1;++p<w;)y[p]();w=N.length}m=!1}u.exports=function(p){N.push(p)!==1||m||h()}}).call(this,typeof Ur<"u"?Ur:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(o,u,f){var d=o("immediate");function h(){}var m={},x=["REJECTED"],b=["FULFILLED"],C=["PENDING"];function _(w){if(typeof w!="function")throw new TypeError("resolver must be a function");this.state=C,this.queue=[],this.outcome=void 0,w!==h&&p(this,w)}function T(w,k,j){this.promise=w,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof j=="function"&&(this.onRejected=j,this.callRejected=this.otherCallRejected)}function N(w,k,j){d(function(){var M;try{M=k(j)}catch(U){return m.reject(w,U)}M===w?m.reject(w,new TypeError("Cannot resolve promise with itself")):m.resolve(w,M)})}function S(w){var k=w&&w.then;if(w&&(typeof w=="object"||typeof w=="function")&&typeof k=="function")return function(){k.apply(w,arguments)}}function p(w,k){var j=!1;function M(Y){j||(j=!0,m.reject(w,Y))}function U(Y){j||(j=!0,m.resolve(w,Y))}var V=y(function(){k(U,M)});V.status==="error"&&M(V.value)}function y(w,k){var j={};try{j.value=w(k),j.status="success"}catch(M){j.status="error",j.value=M}return j}(u.exports=_).prototype.finally=function(w){if(typeof w!="function")return this;var k=this.constructor;return this.then(function(j){return k.resolve(w()).then(function(){return j})},function(j){return k.resolve(w()).then(function(){throw j})})},_.prototype.catch=function(w){return this.then(null,w)},_.prototype.then=function(w,k){if(typeof w!="function"&&this.state===b||typeof k!="function"&&this.state===x)return this;var j=new this.constructor(h);return this.state!==C?N(j,this.state===b?w:k,this.outcome):this.queue.push(new T(j,w,k)),j},T.prototype.callFulfilled=function(w){m.resolve(this.promise,w)},T.prototype.otherCallFulfilled=function(w){N(this.promise,this.onFulfilled,w)},T.prototype.callRejected=function(w){m.reject(this.promise,w)},T.prototype.otherCallRejected=function(w){N(this.promise,this.onRejected,w)},m.resolve=function(w,k){var j=y(S,k);if(j.status==="error")return m.reject(w,j.value);var M=j.value;if(M)p(w,M);else{w.state=b,w.outcome=k;for(var U=-1,V=w.queue.length;++U<V;)w.queue[U].callFulfilled(k)}return w},m.reject=function(w,k){w.state=x,w.outcome=k;for(var j=-1,M=w.queue.length;++j<M;)w.queue[j].callRejected(k);return w},_.resolve=function(w){return w instanceof this?w:m.resolve(new this(h),w)},_.reject=function(w){var k=new this(h);return m.reject(k,w)},_.all=function(w){var k=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=w.length,M=!1;if(!j)return this.resolve([]);for(var U=new Array(j),V=0,Y=-1,Q=new this(h);++Y<j;)G(w[Y],Y);return Q;function G(le,de){k.resolve(le).then(function(L){U[de]=L,++V!==j||M||(M=!0,m.resolve(Q,U))},function(L){M||(M=!0,m.reject(Q,L))})}},_.race=function(w){var k=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=w.length,M=!1;if(!j)return this.resolve([]);for(var U=-1,V=new this(h);++U<j;)Y=w[U],k.resolve(Y).then(function(Q){M||(M=!0,m.resolve(V,Q))},function(Q){M||(M=!0,m.reject(V,Q))});var Y;return V}},{immediate:36}],38:[function(o,u,f){var d={};(0,o("./lib/utils/common").assign)(d,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),u.exports=d},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,u,f){var d=o("./zlib/deflate"),h=o("./utils/common"),m=o("./utils/strings"),x=o("./zlib/messages"),b=o("./zlib/zstream"),C=Object.prototype.toString,_=0,T=-1,N=0,S=8;function p(w){if(!(this instanceof p))return new p(w);this.options=h.assign({level:T,method:S,chunkSize:16384,windowBits:15,memLevel:8,strategy:N,to:""},w||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var j=d.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(j!==_)throw new Error(x[j]);if(k.header&&d.deflateSetHeader(this.strm,k.header),k.dictionary){var M;if(M=typeof k.dictionary=="string"?m.string2buf(k.dictionary):C.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(j=d.deflateSetDictionary(this.strm,M))!==_)throw new Error(x[j]);this._dict_set=!0}}function y(w,k){var j=new p(k);if(j.push(w,!0),j.err)throw j.msg||x[j.err];return j.result}p.prototype.push=function(w,k){var j,M,U=this.strm,V=this.options.chunkSize;if(this.ended)return!1;M=k===~~k?k:k===!0?4:0,typeof w=="string"?U.input=m.string2buf(w):C.call(w)==="[object ArrayBuffer]"?U.input=new Uint8Array(w):U.input=w,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new h.Buf8(V),U.next_out=0,U.avail_out=V),(j=d.deflate(U,M))!==1&&j!==_)return this.onEnd(j),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||M!==4&&M!==2)||(this.options.to==="string"?this.onData(m.buf2binstring(h.shrinkBuf(U.output,U.next_out))):this.onData(h.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&j!==1);return M===4?(j=d.deflateEnd(this.strm),this.onEnd(j),this.ended=!0,j===_):M!==2||(this.onEnd(_),!(U.avail_out=0))},p.prototype.onData=function(w){this.chunks.push(w)},p.prototype.onEnd=function(w){w===_&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=w,this.msg=this.strm.msg},f.Deflate=p,f.deflate=y,f.deflateRaw=function(w,k){return(k=k||{}).raw=!0,y(w,k)},f.gzip=function(w,k){return(k=k||{}).gzip=!0,y(w,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,u,f){var d=o("./zlib/inflate"),h=o("./utils/common"),m=o("./utils/strings"),x=o("./zlib/constants"),b=o("./zlib/messages"),C=o("./zlib/zstream"),_=o("./zlib/gzheader"),T=Object.prototype.toString;function N(p){if(!(this instanceof N))return new N(p);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},p||{});var y=this.options;y.raw&&0<=y.windowBits&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),!(0<=y.windowBits&&y.windowBits<16)||p&&p.windowBits||(y.windowBits+=32),15<y.windowBits&&y.windowBits<48&&(15&y.windowBits)==0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new C,this.strm.avail_out=0;var w=d.inflateInit2(this.strm,y.windowBits);if(w!==x.Z_OK)throw new Error(b[w]);this.header=new _,d.inflateGetHeader(this.strm,this.header)}function S(p,y){var w=new N(y);if(w.push(p,!0),w.err)throw w.msg||b[w.err];return w.result}N.prototype.push=function(p,y){var w,k,j,M,U,V,Y=this.strm,Q=this.options.chunkSize,G=this.options.dictionary,le=!1;if(this.ended)return!1;k=y===~~y?y:y===!0?x.Z_FINISH:x.Z_NO_FLUSH,typeof p=="string"?Y.input=m.binstring2buf(p):T.call(p)==="[object ArrayBuffer]"?Y.input=new Uint8Array(p):Y.input=p,Y.next_in=0,Y.avail_in=Y.input.length;do{if(Y.avail_out===0&&(Y.output=new h.Buf8(Q),Y.next_out=0,Y.avail_out=Q),(w=d.inflate(Y,x.Z_NO_FLUSH))===x.Z_NEED_DICT&&G&&(V=typeof G=="string"?m.string2buf(G):T.call(G)==="[object ArrayBuffer]"?new Uint8Array(G):G,w=d.inflateSetDictionary(this.strm,V)),w===x.Z_BUF_ERROR&&le===!0&&(w=x.Z_OK,le=!1),w!==x.Z_STREAM_END&&w!==x.Z_OK)return this.onEnd(w),!(this.ended=!0);Y.next_out&&(Y.avail_out!==0&&w!==x.Z_STREAM_END&&(Y.avail_in!==0||k!==x.Z_FINISH&&k!==x.Z_SYNC_FLUSH)||(this.options.to==="string"?(j=m.utf8border(Y.output,Y.next_out),M=Y.next_out-j,U=m.buf2string(Y.output,j),Y.next_out=M,Y.avail_out=Q-M,M&&h.arraySet(Y.output,Y.output,j,M,0),this.onData(U)):this.onData(h.shrinkBuf(Y.output,Y.next_out)))),Y.avail_in===0&&Y.avail_out===0&&(le=!0)}while((0<Y.avail_in||Y.avail_out===0)&&w!==x.Z_STREAM_END);return w===x.Z_STREAM_END&&(k=x.Z_FINISH),k===x.Z_FINISH?(w=d.inflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===x.Z_OK):k!==x.Z_SYNC_FLUSH||(this.onEnd(x.Z_OK),!(Y.avail_out=0))},N.prototype.onData=function(p){this.chunks.push(p)},N.prototype.onEnd=function(p){p===x.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},f.Inflate=N,f.inflate=S,f.inflateRaw=function(p,y){return(y=y||{}).raw=!0,S(p,y)},f.ungzip=S},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(o,u,f){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";f.assign=function(x){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var C=b.shift();if(C){if(typeof C!="object")throw new TypeError(C+"must be non-object");for(var _ in C)C.hasOwnProperty(_)&&(x[_]=C[_])}}return x},f.shrinkBuf=function(x,b){return x.length===b?x:x.subarray?x.subarray(0,b):(x.length=b,x)};var h={arraySet:function(x,b,C,_,T){if(b.subarray&&x.subarray)x.set(b.subarray(C,C+_),T);else for(var N=0;N<_;N++)x[T+N]=b[C+N]},flattenChunks:function(x){var b,C,_,T,N,S;for(b=_=0,C=x.length;b<C;b++)_+=x[b].length;for(S=new Uint8Array(_),b=T=0,C=x.length;b<C;b++)N=x[b],S.set(N,T),T+=N.length;return S}},m={arraySet:function(x,b,C,_,T){for(var N=0;N<_;N++)x[T+N]=b[C+N]},flattenChunks:function(x){return[].concat.apply([],x)}};f.setTyped=function(x){x?(f.Buf8=Uint8Array,f.Buf16=Uint16Array,f.Buf32=Int32Array,f.assign(f,h)):(f.Buf8=Array,f.Buf16=Array,f.Buf32=Array,f.assign(f,m))},f.setTyped(d)},{}],42:[function(o,u,f){var d=o("./common"),h=!0,m=!0;try{String.fromCharCode.apply(null,[0])}catch{h=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{m=!1}for(var x=new d.Buf8(256),b=0;b<256;b++)x[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;function C(_,T){if(T<65537&&(_.subarray&&m||!_.subarray&&h))return String.fromCharCode.apply(null,d.shrinkBuf(_,T));for(var N="",S=0;S<T;S++)N+=String.fromCharCode(_[S]);return N}x[254]=x[254]=1,f.string2buf=function(_){var T,N,S,p,y,w=_.length,k=0;for(p=0;p<w;p++)(64512&(N=_.charCodeAt(p)))==55296&&p+1<w&&(64512&(S=_.charCodeAt(p+1)))==56320&&(N=65536+(N-55296<<10)+(S-56320),p++),k+=N<128?1:N<2048?2:N<65536?3:4;for(T=new d.Buf8(k),p=y=0;y<k;p++)(64512&(N=_.charCodeAt(p)))==55296&&p+1<w&&(64512&(S=_.charCodeAt(p+1)))==56320&&(N=65536+(N-55296<<10)+(S-56320),p++),N<128?T[y++]=N:(N<2048?T[y++]=192|N>>>6:(N<65536?T[y++]=224|N>>>12:(T[y++]=240|N>>>18,T[y++]=128|N>>>12&63),T[y++]=128|N>>>6&63),T[y++]=128|63&N);return T},f.buf2binstring=function(_){return C(_,_.length)},f.binstring2buf=function(_){for(var T=new d.Buf8(_.length),N=0,S=T.length;N<S;N++)T[N]=_.charCodeAt(N);return T},f.buf2string=function(_,T){var N,S,p,y,w=T||_.length,k=new Array(2*w);for(N=S=0;N<w;)if((p=_[N++])<128)k[S++]=p;else if(4<(y=x[p]))k[S++]=65533,N+=y-1;else{for(p&=y===2?31:y===3?15:7;1<y&&N<w;)p=p<<6|63&_[N++],y--;1<y?k[S++]=65533:p<65536?k[S++]=p:(p-=65536,k[S++]=55296|p>>10&1023,k[S++]=56320|1023&p)}return C(k,S)},f.utf8border=function(_,T){var N;for((T=T||_.length)>_.length&&(T=_.length),N=T-1;0<=N&&(192&_[N])==128;)N--;return N<0||N===0?T:N+x[_[N]]>T?N:T}},{"./common":41}],43:[function(o,u,f){u.exports=function(d,h,m,x){for(var b=65535&d|0,C=d>>>16&65535|0,_=0;m!==0;){for(m-=_=2e3<m?2e3:m;C=C+(b=b+h[x++]|0)|0,--_;);b%=65521,C%=65521}return b|C<<16|0}},{}],44:[function(o,u,f){u.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(o,u,f){var d=(function(){for(var h,m=[],x=0;x<256;x++){h=x;for(var b=0;b<8;b++)h=1&h?3988292384^h>>>1:h>>>1;m[x]=h}return m})();u.exports=function(h,m,x,b){var C=d,_=b+x;h^=-1;for(var T=b;T<_;T++)h=h>>>8^C[255&(h^m[T])];return-1^h}},{}],46:[function(o,u,f){var d,h=o("../utils/common"),m=o("./trees"),x=o("./adler32"),b=o("./crc32"),C=o("./messages"),_=0,T=4,N=0,S=-2,p=-1,y=4,w=2,k=8,j=9,M=286,U=30,V=19,Y=2*M+1,Q=15,G=3,le=258,de=le+G+1,L=42,se=113,E=1,ce=2,$=3,K=4;function be(v,he){return v.msg=C[he],he}function J(v){return(v<<1)-(4<v?9:0)}function me(v){for(var he=v.length;0<=--he;)v[he]=0}function A(v){var he=v.state,I=he.pending;I>v.avail_out&&(I=v.avail_out),I!==0&&(h.arraySet(v.output,he.pending_buf,he.pending_out,I,v.next_out),v.next_out+=I,he.pending_out+=I,v.total_out+=I,v.avail_out-=I,he.pending-=I,he.pending===0&&(he.pending_out=0))}function D(v,he){m._tr_flush_block(v,0<=v.block_start?v.block_start:-1,v.strstart-v.block_start,he),v.block_start=v.strstart,A(v.strm)}function te(v,he){v.pending_buf[v.pending++]=he}function F(v,he){v.pending_buf[v.pending++]=he>>>8&255,v.pending_buf[v.pending++]=255&he}function re(v,he){var I,B,R=v.max_chain_length,H=v.strstart,ee=v.prev_length,oe=v.nice_match,P=v.strstart>v.w_size-de?v.strstart-(v.w_size-de):0,ve=v.window,Se=v.w_mask,we=v.prev,ze=v.strstart+le,Ke=ve[H+ee-1],Me=ve[H+ee];v.prev_length>=v.good_match&&(R>>=2),oe>v.lookahead&&(oe=v.lookahead);do if(ve[(I=he)+ee]===Me&&ve[I+ee-1]===Ke&&ve[I]===ve[H]&&ve[++I]===ve[H+1]){H+=2,I++;do;while(ve[++H]===ve[++I]&&ve[++H]===ve[++I]&&ve[++H]===ve[++I]&&ve[++H]===ve[++I]&&ve[++H]===ve[++I]&&ve[++H]===ve[++I]&&ve[++H]===ve[++I]&&ve[++H]===ve[++I]&&H<ze);if(B=le-(ze-H),H=ze-le,ee<B){if(v.match_start=he,oe<=(ee=B))break;Ke=ve[H+ee-1],Me=ve[H+ee]}}while((he=we[he&Se])>P&&--R!=0);return ee<=v.lookahead?ee:v.lookahead}function _e(v){var he,I,B,R,H,ee,oe,P,ve,Se,we=v.w_size;do{if(R=v.window_size-v.lookahead-v.strstart,v.strstart>=we+(we-de)){for(h.arraySet(v.window,v.window,we,we,0),v.match_start-=we,v.strstart-=we,v.block_start-=we,he=I=v.hash_size;B=v.head[--he],v.head[he]=we<=B?B-we:0,--I;);for(he=I=we;B=v.prev[--he],v.prev[he]=we<=B?B-we:0,--I;);R+=we}if(v.strm.avail_in===0)break;if(ee=v.strm,oe=v.window,P=v.strstart+v.lookahead,ve=R,Se=void 0,Se=ee.avail_in,ve<Se&&(Se=ve),I=Se===0?0:(ee.avail_in-=Se,h.arraySet(oe,ee.input,ee.next_in,Se,P),ee.state.wrap===1?ee.adler=x(ee.adler,oe,Se,P):ee.state.wrap===2&&(ee.adler=b(ee.adler,oe,Se,P)),ee.next_in+=Se,ee.total_in+=Se,Se),v.lookahead+=I,v.lookahead+v.insert>=G)for(H=v.strstart-v.insert,v.ins_h=v.window[H],v.ins_h=(v.ins_h<<v.hash_shift^v.window[H+1])&v.hash_mask;v.insert&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[H+G-1])&v.hash_mask,v.prev[H&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=H,H++,v.insert--,!(v.lookahead+v.insert<G)););}while(v.lookahead<de&&v.strm.avail_in!==0)}function Ne(v,he){for(var I,B;;){if(v.lookahead<de){if(_e(v),v.lookahead<de&&he===_)return E;if(v.lookahead===0)break}if(I=0,v.lookahead>=G&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+G-1])&v.hash_mask,I=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),I!==0&&v.strstart-I<=v.w_size-de&&(v.match_length=re(v,I)),v.match_length>=G)if(B=m._tr_tally(v,v.strstart-v.match_start,v.match_length-G),v.lookahead-=v.match_length,v.match_length<=v.max_lazy_match&&v.lookahead>=G){for(v.match_length--;v.strstart++,v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+G-1])&v.hash_mask,I=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart,--v.match_length!=0;);v.strstart++}else v.strstart+=v.match_length,v.match_length=0,v.ins_h=v.window[v.strstart],v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+1])&v.hash_mask;else B=m._tr_tally(v,0,v.window[v.strstart]),v.lookahead--,v.strstart++;if(B&&(D(v,!1),v.strm.avail_out===0))return E}return v.insert=v.strstart<G-1?v.strstart:G-1,he===T?(D(v,!0),v.strm.avail_out===0?$:K):v.last_lit&&(D(v,!1),v.strm.avail_out===0)?E:ce}function ke(v,he){for(var I,B,R;;){if(v.lookahead<de){if(_e(v),v.lookahead<de&&he===_)return E;if(v.lookahead===0)break}if(I=0,v.lookahead>=G&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+G-1])&v.hash_mask,I=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),v.prev_length=v.match_length,v.prev_match=v.match_start,v.match_length=G-1,I!==0&&v.prev_length<v.max_lazy_match&&v.strstart-I<=v.w_size-de&&(v.match_length=re(v,I),v.match_length<=5&&(v.strategy===1||v.match_length===G&&4096<v.strstart-v.match_start)&&(v.match_length=G-1)),v.prev_length>=G&&v.match_length<=v.prev_length){for(R=v.strstart+v.lookahead-G,B=m._tr_tally(v,v.strstart-1-v.prev_match,v.prev_length-G),v.lookahead-=v.prev_length-1,v.prev_length-=2;++v.strstart<=R&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+G-1])&v.hash_mask,I=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),--v.prev_length!=0;);if(v.match_available=0,v.match_length=G-1,v.strstart++,B&&(D(v,!1),v.strm.avail_out===0))return E}else if(v.match_available){if((B=m._tr_tally(v,0,v.window[v.strstart-1]))&&D(v,!1),v.strstart++,v.lookahead--,v.strm.avail_out===0)return E}else v.match_available=1,v.strstart++,v.lookahead--}return v.match_available&&(B=m._tr_tally(v,0,v.window[v.strstart-1]),v.match_available=0),v.insert=v.strstart<G-1?v.strstart:G-1,he===T?(D(v,!0),v.strm.avail_out===0?$:K):v.last_lit&&(D(v,!1),v.strm.avail_out===0)?E:ce}function Ee(v,he,I,B,R){this.good_length=v,this.max_lazy=he,this.nice_length=I,this.max_chain=B,this.func=R}function Qe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=k,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new h.Buf16(2*Y),this.dyn_dtree=new h.Buf16(2*(2*U+1)),this.bl_tree=new h.Buf16(2*(2*V+1)),me(this.dyn_ltree),me(this.dyn_dtree),me(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new h.Buf16(Q+1),this.heap=new h.Buf16(2*M+1),me(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new h.Buf16(2*M+1),me(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Xe(v){var he;return v&&v.state?(v.total_in=v.total_out=0,v.data_type=w,(he=v.state).pending=0,he.pending_out=0,he.wrap<0&&(he.wrap=-he.wrap),he.status=he.wrap?L:se,v.adler=he.wrap===2?0:1,he.last_flush=_,m._tr_init(he),N):be(v,S)}function ot(v){var he=Xe(v);return he===N&&(function(I){I.window_size=2*I.w_size,me(I.head),I.max_lazy_match=d[I.level].max_lazy,I.good_match=d[I.level].good_length,I.nice_match=d[I.level].nice_length,I.max_chain_length=d[I.level].max_chain,I.strstart=0,I.block_start=0,I.lookahead=0,I.insert=0,I.match_length=I.prev_length=G-1,I.match_available=0,I.ins_h=0})(v.state),he}function Be(v,he,I,B,R,H){if(!v)return S;var ee=1;if(he===p&&(he=6),B<0?(ee=0,B=-B):15<B&&(ee=2,B-=16),R<1||j<R||I!==k||B<8||15<B||he<0||9<he||H<0||y<H)return be(v,S);B===8&&(B=9);var oe=new Qe;return(v.state=oe).strm=v,oe.wrap=ee,oe.gzhead=null,oe.w_bits=B,oe.w_size=1<<oe.w_bits,oe.w_mask=oe.w_size-1,oe.hash_bits=R+7,oe.hash_size=1<<oe.hash_bits,oe.hash_mask=oe.hash_size-1,oe.hash_shift=~~((oe.hash_bits+G-1)/G),oe.window=new h.Buf8(2*oe.w_size),oe.head=new h.Buf16(oe.hash_size),oe.prev=new h.Buf16(oe.w_size),oe.lit_bufsize=1<<R+6,oe.pending_buf_size=4*oe.lit_bufsize,oe.pending_buf=new h.Buf8(oe.pending_buf_size),oe.d_buf=1*oe.lit_bufsize,oe.l_buf=3*oe.lit_bufsize,oe.level=he,oe.strategy=H,oe.method=I,ot(v)}d=[new Ee(0,0,0,0,function(v,he){var I=65535;for(I>v.pending_buf_size-5&&(I=v.pending_buf_size-5);;){if(v.lookahead<=1){if(_e(v),v.lookahead===0&&he===_)return E;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var B=v.block_start+I;if((v.strstart===0||v.strstart>=B)&&(v.lookahead=v.strstart-B,v.strstart=B,D(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-de&&(D(v,!1),v.strm.avail_out===0))return E}return v.insert=0,he===T?(D(v,!0),v.strm.avail_out===0?$:K):(v.strstart>v.block_start&&(D(v,!1),v.strm.avail_out),E)}),new Ee(4,4,8,4,Ne),new Ee(4,5,16,8,Ne),new Ee(4,6,32,32,Ne),new Ee(4,4,16,16,ke),new Ee(8,16,32,32,ke),new Ee(8,16,128,128,ke),new Ee(8,32,128,256,ke),new Ee(32,128,258,1024,ke),new Ee(32,258,258,4096,ke)],f.deflateInit=function(v,he){return Be(v,he,k,15,8,0)},f.deflateInit2=Be,f.deflateReset=ot,f.deflateResetKeep=Xe,f.deflateSetHeader=function(v,he){return v&&v.state?v.state.wrap!==2?S:(v.state.gzhead=he,N):S},f.deflate=function(v,he){var I,B,R,H;if(!v||!v.state||5<he||he<0)return v?be(v,S):S;if(B=v.state,!v.output||!v.input&&v.avail_in!==0||B.status===666&&he!==T)return be(v,v.avail_out===0?-5:S);if(B.strm=v,I=B.last_flush,B.last_flush=he,B.status===L)if(B.wrap===2)v.adler=0,te(B,31),te(B,139),te(B,8),B.gzhead?(te(B,(B.gzhead.text?1:0)+(B.gzhead.hcrc?2:0)+(B.gzhead.extra?4:0)+(B.gzhead.name?8:0)+(B.gzhead.comment?16:0)),te(B,255&B.gzhead.time),te(B,B.gzhead.time>>8&255),te(B,B.gzhead.time>>16&255),te(B,B.gzhead.time>>24&255),te(B,B.level===9?2:2<=B.strategy||B.level<2?4:0),te(B,255&B.gzhead.os),B.gzhead.extra&&B.gzhead.extra.length&&(te(B,255&B.gzhead.extra.length),te(B,B.gzhead.extra.length>>8&255)),B.gzhead.hcrc&&(v.adler=b(v.adler,B.pending_buf,B.pending,0)),B.gzindex=0,B.status=69):(te(B,0),te(B,0),te(B,0),te(B,0),te(B,0),te(B,B.level===9?2:2<=B.strategy||B.level<2?4:0),te(B,3),B.status=se);else{var ee=k+(B.w_bits-8<<4)<<8;ee|=(2<=B.strategy||B.level<2?0:B.level<6?1:B.level===6?2:3)<<6,B.strstart!==0&&(ee|=32),ee+=31-ee%31,B.status=se,F(B,ee),B.strstart!==0&&(F(B,v.adler>>>16),F(B,65535&v.adler)),v.adler=1}if(B.status===69)if(B.gzhead.extra){for(R=B.pending;B.gzindex<(65535&B.gzhead.extra.length)&&(B.pending!==B.pending_buf_size||(B.gzhead.hcrc&&B.pending>R&&(v.adler=b(v.adler,B.pending_buf,B.pending-R,R)),A(v),R=B.pending,B.pending!==B.pending_buf_size));)te(B,255&B.gzhead.extra[B.gzindex]),B.gzindex++;B.gzhead.hcrc&&B.pending>R&&(v.adler=b(v.adler,B.pending_buf,B.pending-R,R)),B.gzindex===B.gzhead.extra.length&&(B.gzindex=0,B.status=73)}else B.status=73;if(B.status===73)if(B.gzhead.name){R=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>R&&(v.adler=b(v.adler,B.pending_buf,B.pending-R,R)),A(v),R=B.pending,B.pending===B.pending_buf_size)){H=1;break}H=B.gzindex<B.gzhead.name.length?255&B.gzhead.name.charCodeAt(B.gzindex++):0,te(B,H)}while(H!==0);B.gzhead.hcrc&&B.pending>R&&(v.adler=b(v.adler,B.pending_buf,B.pending-R,R)),H===0&&(B.gzindex=0,B.status=91)}else B.status=91;if(B.status===91)if(B.gzhead.comment){R=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>R&&(v.adler=b(v.adler,B.pending_buf,B.pending-R,R)),A(v),R=B.pending,B.pending===B.pending_buf_size)){H=1;break}H=B.gzindex<B.gzhead.comment.length?255&B.gzhead.comment.charCodeAt(B.gzindex++):0,te(B,H)}while(H!==0);B.gzhead.hcrc&&B.pending>R&&(v.adler=b(v.adler,B.pending_buf,B.pending-R,R)),H===0&&(B.status=103)}else B.status=103;if(B.status===103&&(B.gzhead.hcrc?(B.pending+2>B.pending_buf_size&&A(v),B.pending+2<=B.pending_buf_size&&(te(B,255&v.adler),te(B,v.adler>>8&255),v.adler=0,B.status=se)):B.status=se),B.pending!==0){if(A(v),v.avail_out===0)return B.last_flush=-1,N}else if(v.avail_in===0&&J(he)<=J(I)&&he!==T)return be(v,-5);if(B.status===666&&v.avail_in!==0)return be(v,-5);if(v.avail_in!==0||B.lookahead!==0||he!==_&&B.status!==666){var oe=B.strategy===2?(function(P,ve){for(var Se;;){if(P.lookahead===0&&(_e(P),P.lookahead===0)){if(ve===_)return E;break}if(P.match_length=0,Se=m._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++,Se&&(D(P,!1),P.strm.avail_out===0))return E}return P.insert=0,ve===T?(D(P,!0),P.strm.avail_out===0?$:K):P.last_lit&&(D(P,!1),P.strm.avail_out===0)?E:ce})(B,he):B.strategy===3?(function(P,ve){for(var Se,we,ze,Ke,Me=P.window;;){if(P.lookahead<=le){if(_e(P),P.lookahead<=le&&ve===_)return E;if(P.lookahead===0)break}if(P.match_length=0,P.lookahead>=G&&0<P.strstart&&(we=Me[ze=P.strstart-1])===Me[++ze]&&we===Me[++ze]&&we===Me[++ze]){Ke=P.strstart+le;do;while(we===Me[++ze]&&we===Me[++ze]&&we===Me[++ze]&&we===Me[++ze]&&we===Me[++ze]&&we===Me[++ze]&&we===Me[++ze]&&we===Me[++ze]&&ze<Ke);P.match_length=le-(Ke-ze),P.match_length>P.lookahead&&(P.match_length=P.lookahead)}if(P.match_length>=G?(Se=m._tr_tally(P,1,P.match_length-G),P.lookahead-=P.match_length,P.strstart+=P.match_length,P.match_length=0):(Se=m._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++),Se&&(D(P,!1),P.strm.avail_out===0))return E}return P.insert=0,ve===T?(D(P,!0),P.strm.avail_out===0?$:K):P.last_lit&&(D(P,!1),P.strm.avail_out===0)?E:ce})(B,he):d[B.level].func(B,he);if(oe!==$&&oe!==K||(B.status=666),oe===E||oe===$)return v.avail_out===0&&(B.last_flush=-1),N;if(oe===ce&&(he===1?m._tr_align(B):he!==5&&(m._tr_stored_block(B,0,0,!1),he===3&&(me(B.head),B.lookahead===0&&(B.strstart=0,B.block_start=0,B.insert=0))),A(v),v.avail_out===0))return B.last_flush=-1,N}return he!==T?N:B.wrap<=0?1:(B.wrap===2?(te(B,255&v.adler),te(B,v.adler>>8&255),te(B,v.adler>>16&255),te(B,v.adler>>24&255),te(B,255&v.total_in),te(B,v.total_in>>8&255),te(B,v.total_in>>16&255),te(B,v.total_in>>24&255)):(F(B,v.adler>>>16),F(B,65535&v.adler)),A(v),0<B.wrap&&(B.wrap=-B.wrap),B.pending!==0?N:1)},f.deflateEnd=function(v){var he;return v&&v.state?(he=v.state.status)!==L&&he!==69&&he!==73&&he!==91&&he!==103&&he!==se&&he!==666?be(v,S):(v.state=null,he===se?be(v,-3):N):S},f.deflateSetDictionary=function(v,he){var I,B,R,H,ee,oe,P,ve,Se=he.length;if(!v||!v.state||(H=(I=v.state).wrap)===2||H===1&&I.status!==L||I.lookahead)return S;for(H===1&&(v.adler=x(v.adler,he,Se,0)),I.wrap=0,Se>=I.w_size&&(H===0&&(me(I.head),I.strstart=0,I.block_start=0,I.insert=0),ve=new h.Buf8(I.w_size),h.arraySet(ve,he,Se-I.w_size,I.w_size,0),he=ve,Se=I.w_size),ee=v.avail_in,oe=v.next_in,P=v.input,v.avail_in=Se,v.next_in=0,v.input=he,_e(I);I.lookahead>=G;){for(B=I.strstart,R=I.lookahead-(G-1);I.ins_h=(I.ins_h<<I.hash_shift^I.window[B+G-1])&I.hash_mask,I.prev[B&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=B,B++,--R;);I.strstart=B,I.lookahead=G-1,_e(I)}return I.strstart+=I.lookahead,I.block_start=I.strstart,I.insert=I.lookahead,I.lookahead=0,I.match_length=I.prev_length=G-1,I.match_available=0,v.next_in=oe,v.input=P,v.avail_in=ee,I.wrap=H,N},f.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,u,f){u.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(o,u,f){u.exports=function(d,h){var m,x,b,C,_,T,N,S,p,y,w,k,j,M,U,V,Y,Q,G,le,de,L,se,E,ce;m=d.state,x=d.next_in,E=d.input,b=x+(d.avail_in-5),C=d.next_out,ce=d.output,_=C-(h-d.avail_out),T=C+(d.avail_out-257),N=m.dmax,S=m.wsize,p=m.whave,y=m.wnext,w=m.window,k=m.hold,j=m.bits,M=m.lencode,U=m.distcode,V=(1<<m.lenbits)-1,Y=(1<<m.distbits)-1;e:do{j<15&&(k+=E[x++]<<j,j+=8,k+=E[x++]<<j,j+=8),Q=M[k&V];t:for(;;){if(k>>>=G=Q>>>24,j-=G,(G=Q>>>16&255)===0)ce[C++]=65535&Q;else{if(!(16&G)){if((64&G)==0){Q=M[(65535&Q)+(k&(1<<G)-1)];continue t}if(32&G){m.mode=12;break e}d.msg="invalid literal/length code",m.mode=30;break e}le=65535&Q,(G&=15)&&(j<G&&(k+=E[x++]<<j,j+=8),le+=k&(1<<G)-1,k>>>=G,j-=G),j<15&&(k+=E[x++]<<j,j+=8,k+=E[x++]<<j,j+=8),Q=U[k&Y];a:for(;;){if(k>>>=G=Q>>>24,j-=G,!(16&(G=Q>>>16&255))){if((64&G)==0){Q=U[(65535&Q)+(k&(1<<G)-1)];continue a}d.msg="invalid distance code",m.mode=30;break e}if(de=65535&Q,j<(G&=15)&&(k+=E[x++]<<j,(j+=8)<G&&(k+=E[x++]<<j,j+=8)),N<(de+=k&(1<<G)-1)){d.msg="invalid distance too far back",m.mode=30;break e}if(k>>>=G,j-=G,(G=C-_)<de){if(p<(G=de-G)&&m.sane){d.msg="invalid distance too far back",m.mode=30;break e}if(se=w,(L=0)===y){if(L+=S-G,G<le){for(le-=G;ce[C++]=w[L++],--G;);L=C-de,se=ce}}else if(y<G){if(L+=S+y-G,(G-=y)<le){for(le-=G;ce[C++]=w[L++],--G;);if(L=0,y<le){for(le-=G=y;ce[C++]=w[L++],--G;);L=C-de,se=ce}}}else if(L+=y-G,G<le){for(le-=G;ce[C++]=w[L++],--G;);L=C-de,se=ce}for(;2<le;)ce[C++]=se[L++],ce[C++]=se[L++],ce[C++]=se[L++],le-=3;le&&(ce[C++]=se[L++],1<le&&(ce[C++]=se[L++]))}else{for(L=C-de;ce[C++]=ce[L++],ce[C++]=ce[L++],ce[C++]=ce[L++],2<(le-=3););le&&(ce[C++]=ce[L++],1<le&&(ce[C++]=ce[L++]))}break}}break}}while(x<b&&C<T);x-=le=j>>3,k&=(1<<(j-=le<<3))-1,d.next_in=x,d.next_out=C,d.avail_in=x<b?b-x+5:5-(x-b),d.avail_out=C<T?T-C+257:257-(C-T),m.hold=k,m.bits=j}},{}],49:[function(o,u,f){var d=o("../utils/common"),h=o("./adler32"),m=o("./crc32"),x=o("./inffast"),b=o("./inftrees"),C=1,_=2,T=0,N=-2,S=1,p=852,y=592;function w(L){return(L>>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24)}function k(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function j(L){var se;return L&&L.state?(se=L.state,L.total_in=L.total_out=se.total=0,L.msg="",se.wrap&&(L.adler=1&se.wrap),se.mode=S,se.last=0,se.havedict=0,se.dmax=32768,se.head=null,se.hold=0,se.bits=0,se.lencode=se.lendyn=new d.Buf32(p),se.distcode=se.distdyn=new d.Buf32(y),se.sane=1,se.back=-1,T):N}function M(L){var se;return L&&L.state?((se=L.state).wsize=0,se.whave=0,se.wnext=0,j(L)):N}function U(L,se){var E,ce;return L&&L.state?(ce=L.state,se<0?(E=0,se=-se):(E=1+(se>>4),se<48&&(se&=15)),se&&(se<8||15<se)?N:(ce.window!==null&&ce.wbits!==se&&(ce.window=null),ce.wrap=E,ce.wbits=se,M(L))):N}function V(L,se){var E,ce;return L?(ce=new k,(L.state=ce).window=null,(E=U(L,se))!==T&&(L.state=null),E):N}var Y,Q,G=!0;function le(L){if(G){var se;for(Y=new d.Buf32(512),Q=new d.Buf32(32),se=0;se<144;)L.lens[se++]=8;for(;se<256;)L.lens[se++]=9;for(;se<280;)L.lens[se++]=7;for(;se<288;)L.lens[se++]=8;for(b(C,L.lens,0,288,Y,0,L.work,{bits:9}),se=0;se<32;)L.lens[se++]=5;b(_,L.lens,0,32,Q,0,L.work,{bits:5}),G=!1}L.lencode=Y,L.lenbits=9,L.distcode=Q,L.distbits=5}function de(L,se,E,ce){var $,K=L.state;return K.window===null&&(K.wsize=1<<K.wbits,K.wnext=0,K.whave=0,K.window=new d.Buf8(K.wsize)),ce>=K.wsize?(d.arraySet(K.window,se,E-K.wsize,K.wsize,0),K.wnext=0,K.whave=K.wsize):(ce<($=K.wsize-K.wnext)&&($=ce),d.arraySet(K.window,se,E-ce,$,K.wnext),(ce-=$)?(d.arraySet(K.window,se,E-ce,ce,0),K.wnext=ce,K.whave=K.wsize):(K.wnext+=$,K.wnext===K.wsize&&(K.wnext=0),K.whave<K.wsize&&(K.whave+=$))),0}f.inflateReset=M,f.inflateReset2=U,f.inflateResetKeep=j,f.inflateInit=function(L){return V(L,15)},f.inflateInit2=V,f.inflate=function(L,se){var E,ce,$,K,be,J,me,A,D,te,F,re,_e,Ne,ke,Ee,Qe,Xe,ot,Be,v,he,I,B,R=0,H=new d.Buf8(4),ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!L||!L.state||!L.output||!L.input&&L.avail_in!==0)return N;(E=L.state).mode===12&&(E.mode=13),be=L.next_out,$=L.output,me=L.avail_out,K=L.next_in,ce=L.input,J=L.avail_in,A=E.hold,D=E.bits,te=J,F=me,he=T;e:for(;;)switch(E.mode){case S:if(E.wrap===0){E.mode=13;break}for(;D<16;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if(2&E.wrap&&A===35615){H[E.check=0]=255&A,H[1]=A>>>8&255,E.check=m(E.check,H,2,0),D=A=0,E.mode=2;break}if(E.flags=0,E.head&&(E.head.done=!1),!(1&E.wrap)||(((255&A)<<8)+(A>>8))%31){L.msg="incorrect header check",E.mode=30;break}if((15&A)!=8){L.msg="unknown compression method",E.mode=30;break}if(D-=4,v=8+(15&(A>>>=4)),E.wbits===0)E.wbits=v;else if(v>E.wbits){L.msg="invalid window size",E.mode=30;break}E.dmax=1<<v,L.adler=E.check=1,E.mode=512&A?10:12,D=A=0;break;case 2:for(;D<16;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if(E.flags=A,(255&E.flags)!=8){L.msg="unknown compression method",E.mode=30;break}if(57344&E.flags){L.msg="unknown header flags set",E.mode=30;break}E.head&&(E.head.text=A>>8&1),512&E.flags&&(H[0]=255&A,H[1]=A>>>8&255,E.check=m(E.check,H,2,0)),D=A=0,E.mode=3;case 3:for(;D<32;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}E.head&&(E.head.time=A),512&E.flags&&(H[0]=255&A,H[1]=A>>>8&255,H[2]=A>>>16&255,H[3]=A>>>24&255,E.check=m(E.check,H,4,0)),D=A=0,E.mode=4;case 4:for(;D<16;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}E.head&&(E.head.xflags=255&A,E.head.os=A>>8),512&E.flags&&(H[0]=255&A,H[1]=A>>>8&255,E.check=m(E.check,H,2,0)),D=A=0,E.mode=5;case 5:if(1024&E.flags){for(;D<16;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}E.length=A,E.head&&(E.head.extra_len=A),512&E.flags&&(H[0]=255&A,H[1]=A>>>8&255,E.check=m(E.check,H,2,0)),D=A=0}else E.head&&(E.head.extra=null);E.mode=6;case 6:if(1024&E.flags&&(J<(re=E.length)&&(re=J),re&&(E.head&&(v=E.head.extra_len-E.length,E.head.extra||(E.head.extra=new Array(E.head.extra_len)),d.arraySet(E.head.extra,ce,K,re,v)),512&E.flags&&(E.check=m(E.check,ce,re,K)),J-=re,K+=re,E.length-=re),E.length))break e;E.length=0,E.mode=7;case 7:if(2048&E.flags){if(J===0)break e;for(re=0;v=ce[K+re++],E.head&&v&&E.length<65536&&(E.head.name+=String.fromCharCode(v)),v&&re<J;);if(512&E.flags&&(E.check=m(E.check,ce,re,K)),J-=re,K+=re,v)break e}else E.head&&(E.head.name=null);E.length=0,E.mode=8;case 8:if(4096&E.flags){if(J===0)break e;for(re=0;v=ce[K+re++],E.head&&v&&E.length<65536&&(E.head.comment+=String.fromCharCode(v)),v&&re<J;);if(512&E.flags&&(E.check=m(E.check,ce,re,K)),J-=re,K+=re,v)break e}else E.head&&(E.head.comment=null);E.mode=9;case 9:if(512&E.flags){for(;D<16;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if(A!==(65535&E.check)){L.msg="header crc mismatch",E.mode=30;break}D=A=0}E.head&&(E.head.hcrc=E.flags>>9&1,E.head.done=!0),L.adler=E.check=0,E.mode=12;break;case 10:for(;D<32;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}L.adler=E.check=w(A),D=A=0,E.mode=11;case 11:if(E.havedict===0)return L.next_out=be,L.avail_out=me,L.next_in=K,L.avail_in=J,E.hold=A,E.bits=D,2;L.adler=E.check=1,E.mode=12;case 12:if(se===5||se===6)break e;case 13:if(E.last){A>>>=7&D,D-=7&D,E.mode=27;break}for(;D<3;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}switch(E.last=1&A,D-=1,3&(A>>>=1)){case 0:E.mode=14;break;case 1:if(le(E),E.mode=20,se!==6)break;A>>>=2,D-=2;break e;case 2:E.mode=17;break;case 3:L.msg="invalid block type",E.mode=30}A>>>=2,D-=2;break;case 14:for(A>>>=7&D,D-=7&D;D<32;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if((65535&A)!=(A>>>16^65535)){L.msg="invalid stored block lengths",E.mode=30;break}if(E.length=65535&A,D=A=0,E.mode=15,se===6)break e;case 15:E.mode=16;case 16:if(re=E.length){if(J<re&&(re=J),me<re&&(re=me),re===0)break e;d.arraySet($,ce,K,re,be),J-=re,K+=re,me-=re,be+=re,E.length-=re;break}E.mode=12;break;case 17:for(;D<14;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if(E.nlen=257+(31&A),A>>>=5,D-=5,E.ndist=1+(31&A),A>>>=5,D-=5,E.ncode=4+(15&A),A>>>=4,D-=4,286<E.nlen||30<E.ndist){L.msg="too many length or distance symbols",E.mode=30;break}E.have=0,E.mode=18;case 18:for(;E.have<E.ncode;){for(;D<3;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}E.lens[ee[E.have++]]=7&A,A>>>=3,D-=3}for(;E.have<19;)E.lens[ee[E.have++]]=0;if(E.lencode=E.lendyn,E.lenbits=7,I={bits:E.lenbits},he=b(0,E.lens,0,19,E.lencode,0,E.work,I),E.lenbits=I.bits,he){L.msg="invalid code lengths set",E.mode=30;break}E.have=0,E.mode=19;case 19:for(;E.have<E.nlen+E.ndist;){for(;Ee=(R=E.lencode[A&(1<<E.lenbits)-1])>>>16&255,Qe=65535&R,!((ke=R>>>24)<=D);){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if(Qe<16)A>>>=ke,D-=ke,E.lens[E.have++]=Qe;else{if(Qe===16){for(B=ke+2;D<B;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if(A>>>=ke,D-=ke,E.have===0){L.msg="invalid bit length repeat",E.mode=30;break}v=E.lens[E.have-1],re=3+(3&A),A>>>=2,D-=2}else if(Qe===17){for(B=ke+3;D<B;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}D-=ke,v=0,re=3+(7&(A>>>=ke)),A>>>=3,D-=3}else{for(B=ke+7;D<B;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}D-=ke,v=0,re=11+(127&(A>>>=ke)),A>>>=7,D-=7}if(E.have+re>E.nlen+E.ndist){L.msg="invalid bit length repeat",E.mode=30;break}for(;re--;)E.lens[E.have++]=v}}if(E.mode===30)break;if(E.lens[256]===0){L.msg="invalid code -- missing end-of-block",E.mode=30;break}if(E.lenbits=9,I={bits:E.lenbits},he=b(C,E.lens,0,E.nlen,E.lencode,0,E.work,I),E.lenbits=I.bits,he){L.msg="invalid literal/lengths set",E.mode=30;break}if(E.distbits=6,E.distcode=E.distdyn,I={bits:E.distbits},he=b(_,E.lens,E.nlen,E.ndist,E.distcode,0,E.work,I),E.distbits=I.bits,he){L.msg="invalid distances set",E.mode=30;break}if(E.mode=20,se===6)break e;case 20:E.mode=21;case 21:if(6<=J&&258<=me){L.next_out=be,L.avail_out=me,L.next_in=K,L.avail_in=J,E.hold=A,E.bits=D,x(L,F),be=L.next_out,$=L.output,me=L.avail_out,K=L.next_in,ce=L.input,J=L.avail_in,A=E.hold,D=E.bits,E.mode===12&&(E.back=-1);break}for(E.back=0;Ee=(R=E.lencode[A&(1<<E.lenbits)-1])>>>16&255,Qe=65535&R,!((ke=R>>>24)<=D);){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if(Ee&&(240&Ee)==0){for(Xe=ke,ot=Ee,Be=Qe;Ee=(R=E.lencode[Be+((A&(1<<Xe+ot)-1)>>Xe)])>>>16&255,Qe=65535&R,!(Xe+(ke=R>>>24)<=D);){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}A>>>=Xe,D-=Xe,E.back+=Xe}if(A>>>=ke,D-=ke,E.back+=ke,E.length=Qe,Ee===0){E.mode=26;break}if(32&Ee){E.back=-1,E.mode=12;break}if(64&Ee){L.msg="invalid literal/length code",E.mode=30;break}E.extra=15&Ee,E.mode=22;case 22:if(E.extra){for(B=E.extra;D<B;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}E.length+=A&(1<<E.extra)-1,A>>>=E.extra,D-=E.extra,E.back+=E.extra}E.was=E.length,E.mode=23;case 23:for(;Ee=(R=E.distcode[A&(1<<E.distbits)-1])>>>16&255,Qe=65535&R,!((ke=R>>>24)<=D);){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if((240&Ee)==0){for(Xe=ke,ot=Ee,Be=Qe;Ee=(R=E.distcode[Be+((A&(1<<Xe+ot)-1)>>Xe)])>>>16&255,Qe=65535&R,!(Xe+(ke=R>>>24)<=D);){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}A>>>=Xe,D-=Xe,E.back+=Xe}if(A>>>=ke,D-=ke,E.back+=ke,64&Ee){L.msg="invalid distance code",E.mode=30;break}E.offset=Qe,E.extra=15&Ee,E.mode=24;case 24:if(E.extra){for(B=E.extra;D<B;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}E.offset+=A&(1<<E.extra)-1,A>>>=E.extra,D-=E.extra,E.back+=E.extra}if(E.offset>E.dmax){L.msg="invalid distance too far back",E.mode=30;break}E.mode=25;case 25:if(me===0)break e;if(re=F-me,E.offset>re){if((re=E.offset-re)>E.whave&&E.sane){L.msg="invalid distance too far back",E.mode=30;break}_e=re>E.wnext?(re-=E.wnext,E.wsize-re):E.wnext-re,re>E.length&&(re=E.length),Ne=E.window}else Ne=$,_e=be-E.offset,re=E.length;for(me<re&&(re=me),me-=re,E.length-=re;$[be++]=Ne[_e++],--re;);E.length===0&&(E.mode=21);break;case 26:if(me===0)break e;$[be++]=E.length,me--,E.mode=21;break;case 27:if(E.wrap){for(;D<32;){if(J===0)break e;J--,A|=ce[K++]<<D,D+=8}if(F-=me,L.total_out+=F,E.total+=F,F&&(L.adler=E.check=E.flags?m(E.check,$,F,be-F):h(E.check,$,F,be-F)),F=me,(E.flags?A:w(A))!==E.check){L.msg="incorrect data check",E.mode=30;break}D=A=0}E.mode=28;case 28:if(E.wrap&&E.flags){for(;D<32;){if(J===0)break e;J--,A+=ce[K++]<<D,D+=8}if(A!==(4294967295&E.total)){L.msg="incorrect length check",E.mode=30;break}D=A=0}E.mode=29;case 29:he=1;break e;case 30:he=-3;break e;case 31:return-4;default:return N}return L.next_out=be,L.avail_out=me,L.next_in=K,L.avail_in=J,E.hold=A,E.bits=D,(E.wsize||F!==L.avail_out&&E.mode<30&&(E.mode<27||se!==4))&&de(L,L.output,L.next_out,F-L.avail_out)?(E.mode=31,-4):(te-=L.avail_in,F-=L.avail_out,L.total_in+=te,L.total_out+=F,E.total+=F,E.wrap&&F&&(L.adler=E.check=E.flags?m(E.check,$,F,L.next_out-F):h(E.check,$,F,L.next_out-F)),L.data_type=E.bits+(E.last?64:0)+(E.mode===12?128:0)+(E.mode===20||E.mode===15?256:0),(te==0&&F===0||se===4)&&he===T&&(he=-5),he)},f.inflateEnd=function(L){if(!L||!L.state)return N;var se=L.state;return se.window&&(se.window=null),L.state=null,T},f.inflateGetHeader=function(L,se){var E;return L&&L.state?(2&(E=L.state).wrap)==0?N:((E.head=se).done=!1,T):N},f.inflateSetDictionary=function(L,se){var E,ce=se.length;return L&&L.state?(E=L.state).wrap!==0&&E.mode!==11?N:E.mode===11&&h(1,se,ce,0)!==E.check?-3:de(L,se,ce,ce)?(E.mode=31,-4):(E.havedict=1,T):N},f.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,u,f){var d=o("../utils/common"),h=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],m=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],x=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],b=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];u.exports=function(C,_,T,N,S,p,y,w){var k,j,M,U,V,Y,Q,G,le,de=w.bits,L=0,se=0,E=0,ce=0,$=0,K=0,be=0,J=0,me=0,A=0,D=null,te=0,F=new d.Buf16(16),re=new d.Buf16(16),_e=null,Ne=0;for(L=0;L<=15;L++)F[L]=0;for(se=0;se<N;se++)F[_[T+se]]++;for($=de,ce=15;1<=ce&&F[ce]===0;ce--);if(ce<$&&($=ce),ce===0)return S[p++]=20971520,S[p++]=20971520,w.bits=1,0;for(E=1;E<ce&&F[E]===0;E++);for($<E&&($=E),L=J=1;L<=15;L++)if(J<<=1,(J-=F[L])<0)return-1;if(0<J&&(C===0||ce!==1))return-1;for(re[1]=0,L=1;L<15;L++)re[L+1]=re[L]+F[L];for(se=0;se<N;se++)_[T+se]!==0&&(y[re[_[T+se]]++]=se);if(Y=C===0?(D=_e=y,19):C===1?(D=h,te-=257,_e=m,Ne-=257,256):(D=x,_e=b,-1),L=E,V=p,be=se=A=0,M=-1,U=(me=1<<(K=$))-1,C===1&&852<me||C===2&&592<me)return 1;for(;;){for(Q=L-be,le=y[se]<Y?(G=0,y[se]):y[se]>Y?(G=_e[Ne+y[se]],D[te+y[se]]):(G=96,0),k=1<<L-be,E=j=1<<K;S[V+(A>>be)+(j-=k)]=Q<<24|G<<16|le|0,j!==0;);for(k=1<<L-1;A&k;)k>>=1;if(k!==0?(A&=k-1,A+=k):A=0,se++,--F[L]==0){if(L===ce)break;L=_[T+y[se]]}if($<L&&(A&U)!==M){for(be===0&&(be=$),V+=E,J=1<<(K=L-be);K+be<ce&&!((J-=F[K+be])<=0);)K++,J<<=1;if(me+=1<<K,C===1&&852<me||C===2&&592<me)return 1;S[M=A&U]=$<<24|K<<16|V-p|0}}return A!==0&&(S[V+A]=L-be<<24|64<<16|0),w.bits=$,0}},{"../utils/common":41}],51:[function(o,u,f){u.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(o,u,f){var d=o("../utils/common"),h=0,m=1;function x(R){for(var H=R.length;0<=--H;)R[H]=0}var b=0,C=29,_=256,T=_+1+C,N=30,S=19,p=2*T+1,y=15,w=16,k=7,j=256,M=16,U=17,V=18,Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],G=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],de=new Array(2*(T+2));x(de);var L=new Array(2*N);x(L);var se=new Array(512);x(se);var E=new Array(256);x(E);var ce=new Array(C);x(ce);var $,K,be,J=new Array(N);function me(R,H,ee,oe,P){this.static_tree=R,this.extra_bits=H,this.extra_base=ee,this.elems=oe,this.max_length=P,this.has_stree=R&&R.length}function A(R,H){this.dyn_tree=R,this.max_code=0,this.stat_desc=H}function D(R){return R<256?se[R]:se[256+(R>>>7)]}function te(R,H){R.pending_buf[R.pending++]=255&H,R.pending_buf[R.pending++]=H>>>8&255}function F(R,H,ee){R.bi_valid>w-ee?(R.bi_buf|=H<<R.bi_valid&65535,te(R,R.bi_buf),R.bi_buf=H>>w-R.bi_valid,R.bi_valid+=ee-w):(R.bi_buf|=H<<R.bi_valid&65535,R.bi_valid+=ee)}function re(R,H,ee){F(R,ee[2*H],ee[2*H+1])}function _e(R,H){for(var ee=0;ee|=1&R,R>>>=1,ee<<=1,0<--H;);return ee>>>1}function Ne(R,H,ee){var oe,P,ve=new Array(y+1),Se=0;for(oe=1;oe<=y;oe++)ve[oe]=Se=Se+ee[oe-1]<<1;for(P=0;P<=H;P++){var we=R[2*P+1];we!==0&&(R[2*P]=_e(ve[we]++,we))}}function ke(R){var H;for(H=0;H<T;H++)R.dyn_ltree[2*H]=0;for(H=0;H<N;H++)R.dyn_dtree[2*H]=0;for(H=0;H<S;H++)R.bl_tree[2*H]=0;R.dyn_ltree[2*j]=1,R.opt_len=R.static_len=0,R.last_lit=R.matches=0}function Ee(R){8<R.bi_valid?te(R,R.bi_buf):0<R.bi_valid&&(R.pending_buf[R.pending++]=R.bi_buf),R.bi_buf=0,R.bi_valid=0}function Qe(R,H,ee,oe){var P=2*H,ve=2*ee;return R[P]<R[ve]||R[P]===R[ve]&&oe[H]<=oe[ee]}function Xe(R,H,ee){for(var oe=R.heap[ee],P=ee<<1;P<=R.heap_len&&(P<R.heap_len&&Qe(H,R.heap[P+1],R.heap[P],R.depth)&&P++,!Qe(H,oe,R.heap[P],R.depth));)R.heap[ee]=R.heap[P],ee=P,P<<=1;R.heap[ee]=oe}function ot(R,H,ee){var oe,P,ve,Se,we=0;if(R.last_lit!==0)for(;oe=R.pending_buf[R.d_buf+2*we]<<8|R.pending_buf[R.d_buf+2*we+1],P=R.pending_buf[R.l_buf+we],we++,oe===0?re(R,P,H):(re(R,(ve=E[P])+_+1,H),(Se=Y[ve])!==0&&F(R,P-=ce[ve],Se),re(R,ve=D(--oe),ee),(Se=Q[ve])!==0&&F(R,oe-=J[ve],Se)),we<R.last_lit;);re(R,j,H)}function Be(R,H){var ee,oe,P,ve=H.dyn_tree,Se=H.stat_desc.static_tree,we=H.stat_desc.has_stree,ze=H.stat_desc.elems,Ke=-1;for(R.heap_len=0,R.heap_max=p,ee=0;ee<ze;ee++)ve[2*ee]!==0?(R.heap[++R.heap_len]=Ke=ee,R.depth[ee]=0):ve[2*ee+1]=0;for(;R.heap_len<2;)ve[2*(P=R.heap[++R.heap_len]=Ke<2?++Ke:0)]=1,R.depth[P]=0,R.opt_len--,we&&(R.static_len-=Se[2*P+1]);for(H.max_code=Ke,ee=R.heap_len>>1;1<=ee;ee--)Xe(R,ve,ee);for(P=ze;ee=R.heap[1],R.heap[1]=R.heap[R.heap_len--],Xe(R,ve,1),oe=R.heap[1],R.heap[--R.heap_max]=ee,R.heap[--R.heap_max]=oe,ve[2*P]=ve[2*ee]+ve[2*oe],R.depth[P]=(R.depth[ee]>=R.depth[oe]?R.depth[ee]:R.depth[oe])+1,ve[2*ee+1]=ve[2*oe+1]=P,R.heap[1]=P++,Xe(R,ve,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],(function(Me,gt){var da,Dt,va,Ie,dt,Mt,We=gt.dyn_tree,Mn=gt.max_code,jl=gt.stat_desc.static_tree,wa=gt.stat_desc.has_stree,Za=gt.stat_desc.extra_bits,Sa=gt.stat_desc.extra_base,Ft=gt.stat_desc.max_length,X=0;for(Ie=0;Ie<=y;Ie++)Me.bl_count[Ie]=0;for(We[2*Me.heap[Me.heap_max]+1]=0,da=Me.heap_max+1;da<p;da++)Ft<(Ie=We[2*We[2*(Dt=Me.heap[da])+1]+1]+1)&&(Ie=Ft,X++),We[2*Dt+1]=Ie,Mn<Dt||(Me.bl_count[Ie]++,dt=0,Sa<=Dt&&(dt=Za[Dt-Sa]),Mt=We[2*Dt],Me.opt_len+=Mt*(Ie+dt),wa&&(Me.static_len+=Mt*(jl[2*Dt+1]+dt)));if(X!==0){do{for(Ie=Ft-1;Me.bl_count[Ie]===0;)Ie--;Me.bl_count[Ie]--,Me.bl_count[Ie+1]+=2,Me.bl_count[Ft]--,X-=2}while(0<X);for(Ie=Ft;Ie!==0;Ie--)for(Dt=Me.bl_count[Ie];Dt!==0;)Mn<(va=Me.heap[--da])||(We[2*va+1]!==Ie&&(Me.opt_len+=(Ie-We[2*va+1])*We[2*va],We[2*va+1]=Ie),Dt--)}})(R,H),Ne(ve,Ke,R.bl_count)}function v(R,H,ee){var oe,P,ve=-1,Se=H[1],we=0,ze=7,Ke=4;for(Se===0&&(ze=138,Ke=3),H[2*(ee+1)+1]=65535,oe=0;oe<=ee;oe++)P=Se,Se=H[2*(oe+1)+1],++we<ze&&P===Se||(we<Ke?R.bl_tree[2*P]+=we:P!==0?(P!==ve&&R.bl_tree[2*P]++,R.bl_tree[2*M]++):we<=10?R.bl_tree[2*U]++:R.bl_tree[2*V]++,ve=P,Ke=(we=0)===Se?(ze=138,3):P===Se?(ze=6,3):(ze=7,4))}function he(R,H,ee){var oe,P,ve=-1,Se=H[1],we=0,ze=7,Ke=4;for(Se===0&&(ze=138,Ke=3),oe=0;oe<=ee;oe++)if(P=Se,Se=H[2*(oe+1)+1],!(++we<ze&&P===Se)){if(we<Ke)for(;re(R,P,R.bl_tree),--we!=0;);else P!==0?(P!==ve&&(re(R,P,R.bl_tree),we--),re(R,M,R.bl_tree),F(R,we-3,2)):we<=10?(re(R,U,R.bl_tree),F(R,we-3,3)):(re(R,V,R.bl_tree),F(R,we-11,7));ve=P,Ke=(we=0)===Se?(ze=138,3):P===Se?(ze=6,3):(ze=7,4)}}x(J);var I=!1;function B(R,H,ee,oe){F(R,(b<<1)+(oe?1:0),3),(function(P,ve,Se,we){Ee(P),te(P,Se),te(P,~Se),d.arraySet(P.pending_buf,P.window,ve,Se,P.pending),P.pending+=Se})(R,H,ee)}f._tr_init=function(R){I||((function(){var H,ee,oe,P,ve,Se=new Array(y+1);for(P=oe=0;P<C-1;P++)for(ce[P]=oe,H=0;H<1<<Y[P];H++)E[oe++]=P;for(E[oe-1]=P,P=ve=0;P<16;P++)for(J[P]=ve,H=0;H<1<<Q[P];H++)se[ve++]=P;for(ve>>=7;P<N;P++)for(J[P]=ve<<7,H=0;H<1<<Q[P]-7;H++)se[256+ve++]=P;for(ee=0;ee<=y;ee++)Se[ee]=0;for(H=0;H<=143;)de[2*H+1]=8,H++,Se[8]++;for(;H<=255;)de[2*H+1]=9,H++,Se[9]++;for(;H<=279;)de[2*H+1]=7,H++,Se[7]++;for(;H<=287;)de[2*H+1]=8,H++,Se[8]++;for(Ne(de,T+1,Se),H=0;H<N;H++)L[2*H+1]=5,L[2*H]=_e(H,5);$=new me(de,Y,_+1,T,y),K=new me(L,Q,0,N,y),be=new me(new Array(0),G,0,S,k)})(),I=!0),R.l_desc=new A(R.dyn_ltree,$),R.d_desc=new A(R.dyn_dtree,K),R.bl_desc=new A(R.bl_tree,be),R.bi_buf=0,R.bi_valid=0,ke(R)},f._tr_stored_block=B,f._tr_flush_block=function(R,H,ee,oe){var P,ve,Se=0;0<R.level?(R.strm.data_type===2&&(R.strm.data_type=(function(we){var ze,Ke=4093624447;for(ze=0;ze<=31;ze++,Ke>>>=1)if(1&Ke&&we.dyn_ltree[2*ze]!==0)return h;if(we.dyn_ltree[18]!==0||we.dyn_ltree[20]!==0||we.dyn_ltree[26]!==0)return m;for(ze=32;ze<_;ze++)if(we.dyn_ltree[2*ze]!==0)return m;return h})(R)),Be(R,R.l_desc),Be(R,R.d_desc),Se=(function(we){var ze;for(v(we,we.dyn_ltree,we.l_desc.max_code),v(we,we.dyn_dtree,we.d_desc.max_code),Be(we,we.bl_desc),ze=S-1;3<=ze&&we.bl_tree[2*le[ze]+1]===0;ze--);return we.opt_len+=3*(ze+1)+5+5+4,ze})(R),P=R.opt_len+3+7>>>3,(ve=R.static_len+3+7>>>3)<=P&&(P=ve)):P=ve=ee+5,ee+4<=P&&H!==-1?B(R,H,ee,oe):R.strategy===4||ve===P?(F(R,2+(oe?1:0),3),ot(R,de,L)):(F(R,4+(oe?1:0),3),(function(we,ze,Ke,Me){var gt;for(F(we,ze-257,5),F(we,Ke-1,5),F(we,Me-4,4),gt=0;gt<Me;gt++)F(we,we.bl_tree[2*le[gt]+1],3);he(we,we.dyn_ltree,ze-1),he(we,we.dyn_dtree,Ke-1)})(R,R.l_desc.max_code+1,R.d_desc.max_code+1,Se+1),ot(R,R.dyn_ltree,R.dyn_dtree)),ke(R),oe&&Ee(R)},f._tr_tally=function(R,H,ee){return R.pending_buf[R.d_buf+2*R.last_lit]=H>>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&H,R.pending_buf[R.l_buf+R.last_lit]=255&ee,R.last_lit++,H===0?R.dyn_ltree[2*ee]++:(R.matches++,H--,R.dyn_ltree[2*(E[ee]+_+1)]++,R.dyn_dtree[2*D(H)]++),R.last_lit===R.lit_bufsize-1},f._tr_align=function(R){F(R,2,3),re(R,j,de),(function(H){H.bi_valid===16?(te(H,H.bi_buf),H.bi_buf=0,H.bi_valid=0):8<=H.bi_valid&&(H.pending_buf[H.pending++]=255&H.bi_buf,H.bi_buf>>=8,H.bi_valid-=8)})(R)}},{"../utils/common":41}],53:[function(o,u,f){u.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(o,u,f){(function(d){(function(h,m){if(!h.setImmediate){var x,b,C,_,T=1,N={},S=!1,p=h.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(h);y=y&&y.setTimeout?y:h,x={}.toString.call(h.process)==="[object process]"?function(M){process.nextTick(function(){k(M)})}:(function(){if(h.postMessage&&!h.importScripts){var M=!0,U=h.onmessage;return h.onmessage=function(){M=!1},h.postMessage("","*"),h.onmessage=U,M}})()?(_="setImmediate$"+Math.random()+"$",h.addEventListener?h.addEventListener("message",j,!1):h.attachEvent("onmessage",j),function(M){h.postMessage(_+M,"*")}):h.MessageChannel?((C=new MessageChannel).port1.onmessage=function(M){k(M.data)},function(M){C.port2.postMessage(M)}):p&&"onreadystatechange"in p.createElement("script")?(b=p.documentElement,function(M){var U=p.createElement("script");U.onreadystatechange=function(){k(M),U.onreadystatechange=null,b.removeChild(U),U=null},b.appendChild(U)}):function(M){setTimeout(k,0,M)},y.setImmediate=function(M){typeof M!="function"&&(M=new Function(""+M));for(var U=new Array(arguments.length-1),V=0;V<U.length;V++)U[V]=arguments[V+1];var Y={callback:M,args:U};return N[T]=Y,x(T),T++},y.clearImmediate=w}function w(M){delete N[M]}function k(M){if(S)setTimeout(k,0,M);else{var U=N[M];if(U){S=!0;try{(function(V){var Y=V.callback,Q=V.args;switch(Q.length){case 0:Y();break;case 1:Y(Q[0]);break;case 2:Y(Q[0],Q[1]);break;case 3:Y(Q[0],Q[1],Q[2]);break;default:Y.apply(m,Q)}})(U)}finally{w(M),S=!1}}}}function j(M){M.source===h&&typeof M.data=="string"&&M.data.indexOf(_)===0&&k(+M.data.slice(_.length))}})(typeof self>"u"?d===void 0?this:d:self)}).call(this,typeof Ur<"u"?Ur:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(_u)),_u.exports}var ob=sb();const ub=Ou(ob),cb=l=>{switch(l.split(".").pop()?.toLowerCase()||""){case"pdf":return"picture_as_pdf";case"csv":case"xls":case"xlsx":return"table_view";case"png":case"jpg":case"jpeg":case"gif":case"svg":return"image";case"txt":case"md":return"description";case"json":return"data_object";case"zip":case"tar":case"gz":return"folder_zip";default:return"insert_drive_file"}},Hr=6e4,ju=200,lp=200,bi=1e6,Nu=2e3,Eu=2e3,db=360,Mp=12,qr=db+Mp,fb=4,hb=4,pb=({index:l,style:c,data:o})=>{const u=o[l];return u?s.jsx("div",{style:{...c,paddingBottom:Mp},children:s.jsx(Dp,{capture:u})}):null},mb=l=>`${(l/(1024*1024)).toFixed(2)} MB`,xb=l=>{if(typeof l=="boolean")return l;if(typeof l=="string"){const c=l.trim().toLowerCase();if(c==="true")return!0;if(c==="false")return!1}return null},Yr=(l,c)=>l.length<=c?{text:l,truncated:!1}:{text:l.slice(0,c),truncated:!0},gb=l=>!l||l.data===void 0||l.data===null?{reason:"No data to copy."}:{raw:l.data},Vr=(l,c,o)=>l.length<=c?l:(o.push(`first ${c.toLocaleString()} chars`),l.slice(0,c)),bb=l=>{const c=[];if(typeof l=="string")return{text:Vr(l,bi,c),truncated:c.length>0,reason:c.join(", ")};if(Array.isArray(l)){let u=l;l.length>Nu&&(u=l.slice(0,Nu),c.push(`first ${Nu.toLocaleString()} items`));let f="";try{f=JSON.stringify(u,null,2)}catch{f=String(u)}return f=Vr(f,bi,c),{text:f,truncated:c.length>0,reason:c.join(", ")}}if(l&&typeof l=="object"){let u=l;const f=Object.keys(l);f.length>Eu&&(u=f.slice(0,Eu).reduce((h,m)=>(h[m]=l[m],h),{}),c.push(`first ${Eu.toLocaleString()} keys`));let d="";try{d=JSON.stringify(u,null,2)}catch{d=String(u)}return d=Vr(d,bi,c),{text:d,truncated:c.length>0,reason:c.join(", ")}}return{text:Vr(String(l),bi,c),truncated:c.length>0,reason:c.join(", ")}},yb=l=>{if(typeof l=="string")return l;try{return JSON.stringify(l,null,2)}catch{return String(l)}},ip=l=>{if(!l||l.data===void 0||l.data===null||l.data==="")return{text:"",truncated:!1,language:"plain"};const c=l.data;if(typeof c=="string"){const u=c.trim(),f=u.startsWith("<")&&u.includes(">")?"html":u.startsWith("{")||u.startsWith("[")?"json":"plain",d=Yr(c,Hr);return{text:d.text,truncated:d.truncated,language:f}}if(Array.isArray(c)){const u=c.length>ju?c.slice(0,ju):c,f=JSON.stringify(u,null,2),d=Yr(f,Hr);return{text:d.text,truncated:d.truncated||c.length>ju,language:"json"}}if(c&&typeof c=="object"){const u=Object.keys(c);let f=c,d=!1;u.length>lp&&(d=!0,f=u.slice(0,lp).reduce((x,b)=>(x[b]=c[b],x),{}));const h=JSON.stringify(f,null,2),m=Yr(h,Hr);return{text:m.text,truncated:m.truncated||d,language:"json"}}const o=Yr(String(c),Hr);return{text:o.text,truncated:o.truncated,language:"plain"}},vb=l=>{const c=[];let o=[],u="",f=!1;for(let d=0;d<l.length;d+=1){const h=l[d];f?h==='"'?l[d+1]==='"'?(u+='"',d+=1):f=!1:u+=h:h==='"'?f=!0:h===","?(o.push(u),u=""):h===`
|
|
13
|
-
`?(o.push(u),c.push(o),o=[],u=""):h==="\r"||(u+=h)}return o.push(u),(o.length>1||o[0]!==""||c.length>0)&&c.push(o),c},wb=l=>{if(!l)return null;if(typeof l=="string"){const c=l.trim();if(!c.includes(",")||!c.includes(`
|
|
14
|
-
`))return null;const o=vb(c).filter(d=>d.some(h=>String(h||"").trim()!==""));if(o.length<2)return null;const u=o[0].map((d,h)=>String(d||"").trim()||`column_${h+1}`),f=o.slice(1);return u.length<2?null:{headers:u,rows:f}}if(Array.isArray(l)){if(l.length===0)return null;if(l.every(c=>c&&typeof c=="object"&&!Array.isArray(c))){const c=[];if(l.forEach(u=>{Object.keys(u).forEach(f=>{c.includes(f)||c.push(f)})}),c.length===0)return null;const o=l.map(u=>c.map(f=>u[f]??""));return{headers:c,rows:o}}if(l.every(c=>Array.isArray(c))){const c=Math.max(...l.map(u=>u.length));return{headers:Array.from({length:c},(u,f)=>`column_${f+1}`),rows:l}}return null}if(l&&typeof l=="object"){const c=Object.keys(l);return c.length===0?null:{headers:c,rows:[c.map(o=>l[o]??"")]}}return null},Sb=(l,c)=>l==null?null:typeof l=="string"?c?{content:l,mime:"text/csv",ext:"csv"}:{content:l,mime:"application/json",ext:"json"}:{content:JSON.stringify(l,null,2),mime:"application/json",ext:"json"},_b=(l,c,o)=>{const u=new Blob([c],{type:o}),f=URL.createObjectURL(u),d=document.createElement("a");d.href=f,d.download=l,document.body.appendChild(d),d.click(),d.remove(),URL.revokeObjectURL(f)},Up=({results:l,pinnedResults:c,isExecuting:o,isHeadful:u,runId:f,onConfirm:d,onNotify:h,onPin:m,onUnpin:x,fullWidth:b})=>{const[C,_]=O.useState(null),[T,N]=O.useState("raw"),[S,p]=O.useState("data"),[y,w]=O.useState(()=>c&&!l?"pinned":"latest"),[k,j]=O.useState("checking"),[M,U]=O.useState(!1),[V,Y]=O.useState(!1),[Q,G]=O.useState([]),le=O.useRef(null),de=y==="pinned"&&c?c:l,L=wb(de?.data),se=de&&de.data!==void 0&&de.data!==null&&de.data!==""?ip(de):null,E=de?.screenshotUrl?`${de.screenshotUrl}${y==="latest"?`?t=${Date.now()}`:""}`:null,ce=J=>{const me=xb(J);return me!==null?me?s.jsx(je,{name:"check",className:"text-xs text-blue-400"}):"":J??""},$=async()=>{Y(!0);try{const J=f?`?runId=${encodeURIComponent(f)}`:"",me=await fetch(`/api/data/captures${J}`),A=me.ok?await me.json():{captures:[]};G(Array.isArray(A.captures)?A.captures:[])}catch{G([])}finally{Y(!1)}};O.useEffect(()=>{N(L?"table":"raw"),!de?.downloads||de.downloads.length===0?p("data"):de?.data||p("downloads")},[de]),O.useEffect(()=>{if(l){w("latest");return}c&&w("pinned")},[l,c]),O.useEffect(()=>{!c&&y==="pinned"&&w("latest")},[c,y]),O.useEffect(()=>{if(!u||y!=="latest")return;let J=!1;return(async()=>{try{const A=await fetch("/novnc/core/rfb.js",{method:"HEAD",cache:"no-store"});J||j(A.ok?"novnc":"native")}catch{J||j("native")}})(),()=>{J=!0}},[u,y]);const K=async(J,me,A)=>{if(!J){h("Nothing to copy.","error");return}let D=J;try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(D);else{const te=document.createElement("textarea");te.value=D,te.style.position="fixed",te.style.left="-999999px",te.style.top="-999999px",document.body.appendChild(te),te.focus(),te.select(),document.execCommand("copy"),te.remove()}_(me),setTimeout(()=>_(null),2e3),A?.truncatedNotice?h("Copied truncated data.","success"):D.length!==J.length&&h("Copied a truncated preview.","success")}catch(te){console.error("Copy failed:",te),h("Copy failed.","error")}};if(u&&y==="latest"){const{origin:J,hostname:me}=window.location,A=`${J}/novnc.html?host=${me}&path=websockify`,D=()=>{const te=le.current;if(te){if(document.fullscreenElement){document.exitFullscreen().catch(()=>{});return}te.requestFullscreen?.().catch(()=>{})}};return k==="native"?s.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Headful session running in a native browser window."})}):k==="checking"?s.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Checking headful viewer..."})}):s.jsxs("div",{ref:le,className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative",children:[s.jsx("button",{type:"button",onClick:D,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"}),s.jsx("iframe",{src:A,className:"absolute inset-0 w-full h-full",title:"Headful Browser"})]})}if(!de&&!(o&&y==="latest"))return s.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center space-y-4 opacity-20",children:[s.jsx("div",{className:"w-16 h-16 border border-white/10 rounded-full flex items-center justify-center",children:s.jsx(je,{name:"terminal",className:"text-2xl text-white"})}),s.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.3em]",children:"Ready"})]});const be=b?"space-y-12 relative z-10 w-full":"space-y-12 relative z-10 max-w-5xl mx-auto";return s.jsxs("div",{className:be,children:[s.jsxs("div",{className:"flex items-end justify-between border-b border-white/5 pb-10",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("p",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Preview"}),s.jsx("h2",{className:"text-xl font-mono text-white truncate max-w-xl tracking-tight italic",children:de?.finalUrl||de?.url||""})]}),s.jsx("div",{className:`px-4 py-2 rounded-xl text-[9px] font-bold uppercase tracking-[0.2em] ${y==="pinned"?"bg-amber-500/10 text-amber-300":o?"bg-blue-500/10 text-blue-400 animate-pulse":"bg-green-500/10 text-green-400"}`,children:y==="pinned"?"Pinned":o?"Running":"Finished"})]}),s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"glass-card rounded-[32px] overflow-hidden flex flex-col min-h-[400px]",children:[s.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:[s.jsx("span",{children:"Screenshot"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-white/20",children:de?.timestamp||"--:--:--"}),s.jsx("button",{type:"button",onClick:()=>{U(!0),$()},className:"px-3 py-2 rounded-xl border border-white/10 text-[8px] font-bold uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all",children:"View All Captures"})]})]}),s.jsx("div",{className:"relative bg-black flex-1 flex items-center justify-center overflow-hidden",children:E?s.jsx("img",{src:E,className:"absolute inset-0 w-full h-full object-contain transition-opacity duration-1000"}):s.jsx("div",{className:"text-[8px] font-bold text-white/5 uppercase tracking-widest",children:"Waiting for Frame..."})})]}),s.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col h-[400px]",children:[s.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"}),s.jsxs("div",{className:"flex-1 font-mono text-[10px] text-gray-400 space-y-2 overflow-y-auto custom-scrollbar pr-2",children:[de?.logs?.map((J,me)=>s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-white/10 shrink-0",children:"›"})," ",s.jsx("span",{children:J})]},me)),o&&y==="latest"&&(!de?.logs||de?.logs.length===0)&&s.jsx("div",{className:"animate-pulse",children:"Connecting to kernel..."})]})]})]}),M&&s.jsx("div",{className:"fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-6",children:s.jsxs("div",{className:"glass-card rounded-[32px] w-full max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[s.jsxs("div",{className:"p-6 border-b border-white/10 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-widest",children:"Captures"}),s.jsx("div",{className:"text-sm font-bold text-white",children:"Recordings and Screenshots"})]}),s.jsx("button",{onClick:()=>U(!1),className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all bg-white/5 border-white/10 text-white hover:bg-white/10",children:"Close"})]}),s.jsxs("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:[V&&s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!V&&Q.length===0&&s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!V&&Q.length>0&&s.jsx(Pr,{height:Math.min(Math.max(qr,Q.length*qr),qr*fb),width:"100%",itemCount:Q.length,itemSize:qr,overscanCount:hb,itemData:Q,className:"custom-scrollbar",children:pb})]})]})}),s.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col relative",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[s.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:S==="downloads"?"Downloads":"Data"}),s.jsxs("div",{className:"flex items-center gap-2",children:[de?.downloads&&de.downloads.length>0&&s.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["data","downloads"].map(J=>s.jsx("button",{onClick:()=>p(J),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${S===J?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:J},J))}),c&&s.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["latest","pinned"].map(J=>s.jsx("button",{onClick:()=>w(J),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${y===J?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:J},J))}),L&&S==="data"&&s.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["table","raw"].map(J=>s.jsx("button",{onClick:()=>N(J),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${T===J?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:J},J))}),y==="pinned"?s.jsx("button",{onClick:()=>{x?.(),w("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"}):s.jsx("button",{onClick:()=>{if(!de){h("No data to pin.","error");return}m?.(de),w("pinned")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-white hover:bg-white/10",title:"Pin data",children:c?"Update Pin":"Pin"}),S==="data"&&s.jsx("button",{onClick:()=>{const J=Sb(de?.data,L);if(!J){h("No data to export.","error");return}const me=`doppelganger-data-${new Date().toISOString().replace(/[:.]/g,"-")}.${J.ext}`;_b(me,J.content,J.mime),h(`Exported ${J.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"}),S==="downloads"&&s.jsxs("button",{onClick:async()=>{if(!(!de?.downloads||de.downloads.length===0)){if(de.downloads.length===1){const J=de.downloads[0],me=document.createElement("a");me.href=J.path,me.download=J.name,document.body.appendChild(me),me.click(),me.remove(),h(`Downloading ${J.name}`,"success");return}h("Generating ZIP...","success");try{const J=new ub;for(const te of de.downloads){const re=await(await fetch(te.path)).blob();J.file(te.name,re)}const me=await J.generateAsync({type:"blob"}),A=URL.createObjectURL(me),D=document.createElement("a");D.href=A,D.download=`doppelganger-downloads-${new Date().toISOString().replace(/[:.]/g,"-")}.zip`,document.body.appendChild(D),D.click(),D.remove(),URL.revokeObjectURL(A)}catch(J){console.error("Failed to zip files:",J),h("Failed to zip files.","error")}}},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:de?.downloads?.length===1?"Download File":"Download ZIP",children:[s.jsx(je,{name:"folder_zip",className:"text-[14px]"}),de?.downloads?.length===1?"Download":"Download ZIP"]}),S==="data"&&s.jsxs("button",{onClick:async()=>{const J=gb(de);if(J.reason){h(J.reason||"Data too large to copy safely.","error");return}const me=ip(de);let D=yb(J.raw),te=!1;me.truncated&&(await d({message:"Preview is truncated for performance.",confirmLabel:"Copy full",cancelLabel:"Copy preview"})||(D=me.text||"",te=!0)),D.length>bi&&(await d({message:`Copying ${mb(D.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:te?"Copy preview":"Copy truncated"})||(D=bb(J.raw).text,te=!0)),K(D,"data",{skipSizeConfirm:!0,truncatedNotice:te})},className:`px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${C==="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:[C==="data"?s.jsx(je,{name:"check",className:"text-sm"}):s.jsx(je,{name:"content_copy",className:"text-sm"}),C==="data"?"Copied":"Copy"]})]})]}),se?.truncated&&s.jsx("button",{type:"button",onClick:()=>h("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"}),s.jsx("div",{className:"max-h-[70vh] overflow-y-auto custom-scrollbar pr-2 relative",children:(()=>{const J=de&&de.data!==void 0&&de.data!==null&&de.data!=="",me=de&&de.downloads&&de.downloads.length>0;return o&&y==="latest"&&(!de||!J&&!me)?s.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"Buffering data stream..."}):!de||!J&&!me?s.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"No data available."}):s.jsx("div",{className:"h-full",children:S==="downloads"?s.jsx("div",{className:"space-y-2",children:de.downloads.map((A,D)=>s.jsxs("div",{className:"flex items-center justify-between bg-white/[0.02] border border-white/5 rounded-xl p-4 hover:bg-white/[0.04] transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-4 overflow-hidden pr-4",children:[s.jsx("div",{className:"p-3 bg-white/5 rounded-lg border border-white/10 shrink-0",children:s.jsx(je,{name:cb(A.name),className:"text-2xl text-white/70"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h4",{className:"text-sm font-bold text-white truncate",children:A.name}),s.jsx("p",{className:"text-[10px] text-gray-500 truncate mt-1",children:A.url})]})]}),s.jsx("a",{href:A.path,download:A.name,className:"shrink-0 p-3 rounded-lg border border-white/10 bg-white/5 text-white/80 hover:bg-white/10 hover:text-white transition-all flex items-center justify-center",title:"Download file",children:s.jsx(je,{name:"download",className:"text-[18px]"})})]},D))}):L&&T==="table"?s.jsx("div",{className:"overflow-auto custom-scrollbar rounded-2xl border border-white/10",children:s.jsxs("table",{className:"min-w-full table-auto text-[10px] text-left text-white/80 font-mono",children:[s.jsx("thead",{className:"bg-white/5 text-[9px] uppercase tracking-widest text-white/50",children:s.jsx("tr",{children:L.headers.map(A=>s.jsx("th",{className:"px-3 py-2 border-b border-white/10 whitespace-nowrap",children:A},A))})}),s.jsx("tbody",{children:L.rows.map((A,D)=>s.jsx("tr",{className:"odd:bg-white/[0.02]",children:L.headers.map((te,F)=>s.jsx("td",{className:"px-3 py-2 border-b border-white/5 align-top whitespace-normal break-words",children:ce(A[F])},`${D}-${F}`))},D))})]})}):s.jsx(wl,{readOnly:!0,value:se?.text||"",language:se?.language||"plain"})})})()})]})]})},jb=[{value:"Control",label:"Ctrl"},{value:"Shift",label:"Shift"},{value:"Alt",label:"Alt"},{value:"Meta",label:"Meta"}],Nb=["Enter","Tab","Escape","Space","Backspace","Delete","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","F1","F2","F3","F4","F5"].concat([...Array(10)].map((l,c)=>`${c}`)).concat(Array.from({length:26},(l,c)=>String.fromCharCode(65+c))),Eb=[{value:"replace",label:"Replace Text"},{value:"append",label:"Append Text"}],Cb=l=>{if(!l)return{modifiers:[],baseKey:""};const c=l.split("+"),o=c.pop()||"";return{modifiers:c,baseKey:o}},rp=(l,c)=>[...l.filter(Boolean),c].filter(Boolean).join("+"),sp=l=>{const c=(l||"").trim(),o=c.match(/^\{\$([\w.]+)\}$/);return o?o[1]:c},mn={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"}]},kb=O.memo(({action:l,index:c,depth:o,status:u,isDragging:f,isDragOver:d,translateY:h,variables:m,availableTasks:x,onUpdate:b,onRemove:C,onAutoSave:_,onOpenPalette:T,onOpenContextMenu:N,onPointerDown:S,dragState:p})=>{const y=u==="running"?"border-yellow-400/60":u==="success"?"border-green-400/60":u==="error"?"border-red-400/70":u==="skipped"?"border-gray-500/40":"",w=j=>{const M="text-[12px]";return j==="if"||j==="else"?s.jsx(je,{name:"call_split",className:`${M} text-blue-400`}):j==="end"?s.jsx(je,{name:"subdirectory_arrow_right",className:`${M} text-gray-500`}):j==="while"||j==="repeat"?s.jsx(je,{name:"repeat",className:`${M} text-amber-400`}):j==="foreach"?s.jsx(je,{name:"list",className:`${M} text-amber-300`}):j==="on_error"?s.jsx(je,{name:"warning",className:`${M} text-red-400`}):j==="set"?s.jsx(je,{name:"data_object",className:`${M} text-green-400`}):j==="stop"?s.jsx(je,{name:"stop",className:`${M} text-red-400`}):j==="click"?s.jsx(je,{name:"ads_click",className:`${M} text-blue-300`}):j==="type"?s.jsx(je,{name:"text_format",className:`${M} text-green-300`}):j==="hover"?s.jsx(je,{name:"my_location",className:`${M} text-purple-300`}):j==="press"?s.jsx(je,{name:"keyboard",className:`${M} text-amber-300`}):j==="wait"?s.jsx(je,{name:"schedule",className:`${M} text-slate-300`}):j==="wait_selector"?s.jsx(je,{name:"schedule",className:`${M} text-orange-300`}):j==="scroll"?s.jsx(je,{name:"swap_vert",className:`${M} text-cyan-300`}):j==="javascript"?s.jsx(je,{name:"code",className:`${M} text-yellow-300`}):j==="csv"?s.jsx(je,{name:"table_chart",className:`${M} text-emerald-300`}):j==="merge"?s.jsx(je,{name:"layers",className:`${M} text-emerald-200`}):j==="screenshot"?s.jsx(je,{name:"photo_camera",className:`${M} text-emerald-300`}):j==="start"?s.jsx(je,{name:"play_circle",className:`${M} text-emerald-300`}):j==="navigate"?s.jsx(je,{name:"navigation",className:`${M} text-blue-400`}):s.jsx("span",{className:"text-[9px] text-white/20",children:"|"})},k=j=>!j||!(j instanceof HTMLElement)?!1:!!j.closest('input, textarea, select, button, a, [contenteditable="true"], [data-no-drag="true"]');return s.jsxs("div",{id:`action-${l.id}`,onPointerDown:j=>{k(j.target)||j.button===0&&(j.preventDefault(),S(j,l.id,c))},onContextMenu:j=>N(j,l.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 ${y} ${f?"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":""} ${d&&!f?"ring-2 ring-blue-400/60 bg-blue-500/5":""} ${l.disabled?"opacity-40 grayscale":""}`,style:{transform:f?`translateY(${(p?.currentY||0)-(p?.pointerOffset||0)-(p?.originTop||0)}px)`:h?`translateY(${h}px)`:void 0,marginLeft:o?o*12:void 0},children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"text-[8px] font-bold text-white/20 font-mono tracking-tighter",children:(c+1).toString().padStart(2,"0")}),s.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:w(l.type)}),s.jsx("button",{onClick:()=>T(l.id),className:"action-type-select text-[10px] font-bold uppercase tracking-[0.2em] text-blue-400 focus:outline-none cursor-pointer rounded focus-visible:ring-2 focus-visible:ring-blue-400/50","aria-label":`Change action type: ${l.type}`,children:Au.find(j=>j.type===l.type)?.label||l.type})]}),s.jsx("button",{"data-no-drag":"true",onClick:()=>C(l.id),className:"text-gray-600 hover:text-red-500 transition-colors opacity-0 group-hover/item:opacity-100 focus:opacity-100 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-red-500/50","aria-label":"Delete action",title:"Delete action",children:s.jsx(je,{name:"close",className:"text-base"})})]}),(l.type==="click"||l.type==="type"||l.type==="hover"||l.type==="wait_selector")&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector"}),s.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:s.jsx(Ot,{value:l.selector||"",onChange:j=>b(l.id,{selector:j}),onBlur:()=>_(),variables:m,placeholder:".btn-primary"})})]}),l.type==="scroll"&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),s.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:s.jsx(Ot,{value:l.selector||"",onChange:j=>b(l.id,{selector:j}),onBlur:()=>_(),variables:m,placeholder:".scroll-container or leave empty"})})]}),l.type==="scroll"&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Scroll Speed (ms)"}),s.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:s.jsx(Ot,{value:l.key||"",onChange:j=>b(l.id,{key:j}),onBlur:()=>_(),variables:m,placeholder:"500"})})]}),(l.type==="navigate"||l.type==="type"||l.type==="wait"||l.type==="wait_selector"||l.type==="scroll"||l.type==="javascript"||l.type==="csv")&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:l.type==="navigate"?"URL":l.type==="type"?"Content":l.type==="wait"?"Seconds":l.type==="wait_selector"?"Timeout (Sec)":l.type==="scroll"?"Pixels":l.type==="csv"?"CSV Input":"Script"}),s.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:l.type==="javascript"?s.jsx(wl,{value:l.value||"",onChange:j=>b(l.id,{value:j}),onBlur:()=>_(),language:"javascript",variables:m,className:"min-h-[120px]",placeholder:"return document.title"}):l.type==="csv"?s.jsx(wl,{value:l.value||"",onChange:j=>b(l.id,{value:j}),onBlur:()=>_(),language:"plain",variables:m,className:"min-h-[120px]",placeholder:"name,age\\nAda,31"}):s.jsx(Ot,{value:l.value||"",onChange:j=>b(l.id,{value:j}),onBlur:()=>_(),variables:m,placeholder:l.type==="navigate"?"https://example.com":l.type==="type"?"Search keywords":l.type==="wait"?"3":l.type==="wait_selector"?"10":"400"})}),l.type==="type"&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Mode"}),s.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:s.jsx("select",{value:l.typeMode||"replace",onChange:j=>{b(l.id,{typeMode:j.target.value},!0)},className:"custom-select w-full bg-transparent border-none px-0 py-0 text-[11px] text-white",children:Eb.map(j=>s.jsx("option",{value:j.value,children:j.label},j.value))})})]})]}),l.type==="screenshot"&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Label (Optional)"}),s.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:s.jsx(Ot,{value:l.value||"",onChange:j=>b(l.id,{value:j}),onBlur:()=>_(),variables:m,placeholder:"checkout-step"})})]}),l.type==="press"&&(()=>{const{modifiers:j,baseKey:M}=Cb(l.key);return s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Key"}),s.jsx("div",{className:"grid grid-cols-2 gap-1 text-[10px] text-white",children:jb.map(U=>s.jsxs("label",{className:"inline-flex items-center space-x-1",children:[s.jsx("input",{type:"checkbox",checked:j.includes(U.value),onChange:V=>{const Y=V.target.checked?[...j,U.value]:j.filter(Q=>Q!==U.value);b(l.id,{key:rp(Y,M)},!0)},className:"h-3 w-3 rounded border border-white/30 bg-black/80"}),s.jsx("span",{className:"uppercase text-[9px] text-white/70",children:U.label})]},U.value))}),s.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:s.jsxs("select",{value:M,onChange:U=>b(l.id,{key:rp(j,U.target.value)},!0),className:"custom-select w-full bg-transparent border-none px-0 py-0 text-[11px] text-white",children:[s.jsx("option",{value:"",children:"Select key"}),Nb.map(U=>s.jsx("option",{value:U,children:U},U))]})})]})})(),l.type==="if"&&(()=>{const j=Object.keys(m||{}),M=sp(l.conditionVar||""),U=M&&m?.[M]?.type,V=l.conditionVarType||U||"string",Y=mn[V]||mn.string,Q=l.conditionOp||Y[0].value;return s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),s.jsx("input",{type:"text",list:`if-var-${l.id}`,value:l.conditionVar||"",onChange:G=>b(l.id,{conditionVar:G.target.value}),onBlur:()=>_(),placeholder:"variable name",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),j.length>0&&s.jsx("datalist",{id:`if-var-${l.id}`,children:j.map(G=>s.jsx("option",{value:G},G))})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),s.jsxs("select",{value:V,onChange:G=>{const le=G.target.value,de=mn[le]||mn.string;b(l.id,{conditionVarType:le,conditionOp:de[0].value,conditionValue:le==="boolean"?"":l.conditionValue||""},!0)},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:[s.jsx("option",{value:"string",children:"String"}),s.jsx("option",{value:"number",children:"Number"}),s.jsx("option",{value:"boolean",children:"Boolean"})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),s.jsx("select",{value:Q,onChange:G=>b(l.id,{conditionOp:G.target.value},!0),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:Y.map(G=>s.jsx("option",{value:G.value,children:G.label},G.value))})]})]}),V!=="boolean"&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),s.jsx("input",{type:V==="number"?"number":"text",value:l.conditionValue||"",onChange:G=>b(l.id,{conditionValue:G.target.value}),onBlur:()=>_(),placeholder:V==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),l.type==="while"&&(()=>{const j=Object.keys(m||{}),M=sp(l.conditionVar||""),U=M&&m?.[M]?.type,V=l.conditionVarType||U||"string",Y=mn[V]||mn.string,Q=l.conditionOp||Y[0].value;return s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),s.jsx("input",{type:"text",list:`while-var-${l.id}`,value:l.conditionVar||"",onChange:G=>b(l.id,{conditionVar:G.target.value}),onBlur:()=>_(),placeholder:"variable name",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),j.length>0&&s.jsx("datalist",{id:`while-var-${l.id}`,children:j.map(G=>s.jsx("option",{value:G},G))})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),s.jsxs("select",{value:V,onChange:G=>{const le=G.target.value,de=mn[le]||mn.string;b(l.id,{conditionVarType:le,conditionOp:de[0].value,conditionValue:le==="boolean"?"":l.conditionValue||""},!0)},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:[s.jsx("option",{value:"string",children:"String"}),s.jsx("option",{value:"number",children:"Number"}),s.jsx("option",{value:"boolean",children:"Boolean"})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),s.jsx("select",{value:Q,onChange:G=>b(l.id,{conditionOp:G.target.value},!0),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:Y.map(G=>s.jsx("option",{value:G.value,children:G.label},G.value))})]})]}),V!=="boolean"&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),s.jsx("input",{type:V==="number"?"number":"text",value:l.conditionValue||"",onChange:G=>b(l.id,{conditionValue:G.target.value}),onBlur:()=>_(),placeholder:V==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),l.type==="repeat"&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Times"}),s.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:s.jsx(Ot,{value:l.value||"",onChange:j=>b(l.id,{value:j}),variables:m,placeholder:"3"})})]}),l.type==="foreach"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),s.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:s.jsx(Ot,{value:l.selector||"",onChange:j=>b(l.id,{selector:j}),variables:m,placeholder:".list-item"})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable (Array Name)"}),s.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:s.jsx(Ot,{value:l.varName||"",onChange:j=>b(l.id,{varName:j}),variables:m,placeholder:"items"})})]})]}),l.type==="set"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable Name"}),s.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:s.jsx(Ot,{value:l.varName||"",onChange:j=>b(l.id,{varName:j}),variables:m,placeholder:"status"})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Value"}),s.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:s.jsx(Ot,{value:l.value||"",onChange:j=>b(l.id,{value:j}),variables:m,placeholder:"ready"})})]})]}),l.type==="merge"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Sources"}),s.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:s.jsx(Ot,{value:l.value||"",onChange:j=>b(l.id,{value:j}),variables:m,placeholder:"items, extraItems, {$block.output}"})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Target Variable (Optional)"}),s.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:s.jsx(Ot,{value:l.varName||"",onChange:j=>b(l.id,{varName:j}),variables:m,placeholder:"allItems"})})]})]}),l.type==="stop"&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Outcome"}),s.jsxs("select",{value:l.value||"success",onChange:j=>b(l.id,{value:j.target.value},!0),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:[s.jsx("option",{value:"success",children:"Success"}),s.jsx("option",{value:"error",children:"Error"})]})]}),l.type==="on_error"&&s.jsx("div",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Runs if any action fails."}),l.type==="start"&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Task"}),s.jsxs("select",{value:l.value||"",onChange:j=>b(l.id,{value:j.target.value},!0),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:[s.jsx("option",{value:"",disabled:!0,children:"Select task"}),x.length===0&&s.jsx("option",{value:"",disabled:!0,children:"No other tasks"}),x.map(j=>s.jsx("option",{value:j.id,children:j.name||j.id},j.id))]})]})]})}),Ab=({name:l,def:c,updateVariable:o,removeVariable:u})=>{const[f,d]=O.useState(l);return O.useEffect(()=>{d(l)},[l]),s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx("input",{type:"text",value:f,onChange:h=>d(h.target.value),onBlur:()=>{f!==l&&o(l,f,c.type,c.value)},placeholder:"Variable name","aria-label":"Variable name",className:"var-name flex-1 bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),s.jsxs("select",{value:c.type,onChange:h=>o(l,l,h.target.value,c.value),"aria-label":"Variable type",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:[s.jsx("option",{value:"string",children:"STR"}),s.jsx("option",{value:"number",children:"NUM"}),s.jsx("option",{value:"boolean",children:"BOOL"})]}),s.jsx("div",{className:"flex-1",children:c.type==="boolean"?s.jsxs("select",{value:String(c.value),onChange:h=>o(l,l,c.type,h.target.value),"aria-label":"Variable 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:[s.jsx("option",{value:"true",children:"True"}),s.jsx("option",{value:"false",children:"False"})]}):s.jsx("input",{type:c.type==="number"?"number":"text",value:c.value,onChange:h=>o(l,l,c.type,h.target.value),"aria-label":"Variable value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})}),s.jsx("button",{onClick:()=>u(l),className:"p-2 text-red-500 hover:text-red-400 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-red-500/50","aria-label":`Remove variable ${l}`,title:"Remove variable",children:"×"})]})},Bp=({currentTask:l,setCurrentTask:c,tasks:o=[],editorView:u,setEditorView:f,isExecuting:d,onSave:h,onRun:m,results:x,pinnedResults:b,onConfirm:C,onNotify:_,onPinResults:T,onUnpinResults:N,onRunSnapshot:S,runId:p,onStop:y})=>{const[w,k]=O.useState(null),[j,M]=O.useState(null),U=O.useRef(null),V=O.useRef(null),[,Y]=O.useState(null),[Q,G]=O.useState(null),[le,de]=O.useState(null),[L,se]=O.useState([]),[E,ce]=O.useState(!1),[$,K]=O.useState(!1),[be,J]=O.useState(""),[me,A]=O.useState(null),[D,te]=O.useState(null),[F,re]=O.useState(!1),[_e,Ne]=O.useState({}),[ke,Ee]=O.useState([]),[Qe,Xe]=O.useState(!1),ot=O.useRef(l);O.useEffect(()=>{ot.current=l},[l]);const Be=O.useCallback(X=>{h(X||ot.current,!1)},[h]),v=()=>{try{const X=localStorage.getItem("doppelganger.layout.leftWidthPct");if(!X)return .3;const fe=parseFloat(X);return Number.isNaN(fe)?.3:Math.min(.75,Math.max(.25,fe))}catch{return .3}},he=X=>{const ye=Math.floor(window.innerWidth*.8);return Math.max(320,Math.min(ye,X))},[I,B]=O.useState(()=>{if(typeof window>"u")return 360;const X=v();return he(Math.round(window.innerWidth*X))}),R=O.useRef(!1),H=o.filter(X=>String(X.id||"")!==String(l.id||"")),ee=Qe&&ke.length===1&&ke[0]?.id==="host",oe=1e6,P=X=>`${(X/(1024*1024)).toFixed(2)} MB`,ve=async(X,fe,ye)=>{if(!X){_("Nothing to copy.","error");return}let Re=X;X.length>oe&&(await C({message:`Copying ${P(X.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:"Copy segment"})||(Re=X.slice(0,oe)));try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(Re);else{const He=document.createElement("textarea");He.value=Re,He.style.position="fixed",He.style.left="-999999px",He.style.top="-999999px",document.body.appendChild(He),He.focus(),He.select(),document.execCommand("copy"),He.remove()}k(fe),setTimeout(()=>k(null),2e3),ye?.truncatedNotice||Re.length!==X.length&&_("Copied a truncated preview.","success")}catch(He){console.error("Copy failed:",He),_("Copy failed.","error")}};O.useEffect(()=>{let X=!1;return(async()=>{try{const ye=await fetch("/api/settings/proxies",{credentials:"include"});if(!ye.ok)throw new Error("Failed to load proxies");const Re=await ye.json();if(X)return;Ee(Array.isArray(Re.proxies)?Re.proxies:[])}catch{X||Ee([])}finally{X||Xe(!0)}})(),()=>{X=!0}},[]),O.useEffect(()=>{if(ee&&l.rotateProxies){const X={...l,rotateProxies:!1};c(X),Be(X)}},[ee,l]);const Se=new Set(["if","while","repeat","foreach","on_error"]),we=X=>{let fe=0;return X.map(ye=>{(ye.type==="else"||ye.type==="end")&&(fe=Math.max(0,fe-1));const Re=fe;return(ye.type==="else"||Se.has(ye.type))&&(fe+=1),Re})},ze=X=>{const fe={id:"act_"+Date.now(),type:X,selector:"",value:""};X==="set"&&(fe.varName=""),X==="merge"&&(fe.varName=""),X==="start"&&(fe.value=""),X==="type"&&(fe.typeMode="replace"),X==="if"&&(fe.conditionVar="",fe.conditionVarType="string",fe.conditionOp="equals",fe.conditionValue=""),X==="while"&&(fe.conditionVar="",fe.conditionVarType="string",fe.conditionOp="equals",fe.conditionValue=""),X==="wait_downloads"&&(fe.value="30");const ye={...l,actions:[...l.actions,fe]};c(ye),Be(ye)},Ke=O.useCallback(X=>{K(!0),J(""),A(X||null)},[]),Me=O.useCallback(X=>{const fe=ot.current;if(!fe)return;const ye={...fe,actions:fe.actions.filter(Re=>Re.id!==X)};c(ye),h(ye,!1)},[c,h]),gt=O.useCallback((X,fe,ye=!1)=>{if(ye){const Re=ot.current;if(!Re)return;const He={...Re,actions:Re.actions.map(lt=>lt.id===X?{...lt,...fe}:lt)};c(He),h(He,!1)}else c(Re=>Re?{...Re,actions:Re.actions.map(He=>He.id===X?{...He,...fe}:He)}:null)},[c,h]),da=(X,fe)=>{if(X===fe)return;const ye=[...l.actions],Re=ye.findIndex(fa=>fa.id===X),He=ye.findIndex(fa=>fa.id===fe);if(Re===-1||He===-1)return;const[lt]=ye.splice(Re,1);ye.splice(He,0,lt);const pt={...l,actions:ye};c(pt),Be(pt)},Dt=(X,fe,ye,Re)=>{if(ye!==void 0&&Re!==void 0&&Math.abs(X-Re)<14)return ye;const He=l.actions;let lt=He.length-1;for(let pt=0;pt<He.length;pt++){if(He[pt].id===fe)continue;const fa=document.getElementById(`action-${He[pt].id}`);if(!fa)continue;const Nl=fa.getBoundingClientRect(),_i=Nl.top+Nl.height*.4;if(X<_i){lt=pt;break}}return lt},va=()=>{if(Q){if(le!==null&&le!==Q.index){const X=l.actions[le]?.id;X&&da(Q.id,X)}G(null),de(null),U.current=null}};O.useEffect(()=>{if(!Q)return;const X=ye=>{if(U.current!==null&&ye.pointerId!==U.current)return;if(V.current){const lt=V.current.getBoundingClientRect();ye.clientY<lt.top+28&&(V.current.scrollTop-=14),ye.clientY>lt.bottom-28&&(V.current.scrollTop+=14)}const Re=Q.originTop+Q.height/2,He=Dt(ye.clientY,Q.id,Q.index,Re);G(lt=>lt&&{...lt,currentY:ye.clientY}),de(He)},fe=ye=>{U.current!==null&&ye.pointerId!==U.current||va()};return window.addEventListener("pointermove",X),window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe),()=>{window.removeEventListener("pointermove",X),window.removeEventListener("pointerup",fe),window.removeEventListener("pointercancel",fe)}},[Q,le,l.actions]);const Ie=()=>{const X="var_"+Date.now().toString().slice(-4),fe={...l,variables:{...l.variables,[X]:{type:"string",value:""}}};c(fe),Be(fe)},dt=X=>({...X,id:"act_"+Date.now()+"_"+Math.floor(Math.random()*1e3)}),Mt=O.useCallback((X,fe)=>{X.preventDefault();const ye=8,Re=200,He=190,lt=Math.min(Math.max(X.clientX+12,ye),window.innerWidth-Re-ye),pt=Math.min(Math.max(X.clientY+12,ye),window.innerHeight-He-ye);M({id:fe,x:lt,y:pt})},[]),We=()=>M(null);O.useEffect(()=>{if(!j)return;const X=ye=>{ye.target?.closest(".action-context-menu")||M(null)},fe=ye=>{ye.key==="Escape"&&M(null)};return window.addEventListener("mousedown",X),window.addEventListener("keydown",fe),window.addEventListener("scroll",X,!0),()=>{window.removeEventListener("mousedown",X),window.removeEventListener("keydown",fe),window.removeEventListener("scroll",X,!0)}},[j]),O.useEffect(()=>{if(!p||l.mode!=="agent")return;Ne({});const X=new EventSource(`/api/executions/stream?runId=${encodeURIComponent(p)}`,{withCredentials:!0});return X.onmessage=fe=>{if(fe.data)try{const ye=JSON.parse(fe.data);ye&&ye.actionId&&ye.status&&Ne(Re=>({...Re,[ye.actionId]:ye.status}))}catch{}},X.addEventListener("ready",()=>{}),X.onopen=()=>{},X.onerror=()=>{X.close()},()=>{X.close()}},[p,l.mode]),O.useEffect(()=>{if(typeof window>"u")return;const X=v();B(he(Math.round(window.innerWidth*X)))},[]),O.useEffect(()=>{const X=ye=>{if(!R.current)return;const Re=he(ye.clientX);B(Re)},fe=()=>{R.current=!1,document.body.style.cursor="",document.body.style.userSelect=""};return window.addEventListener("pointermove",X),window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe),()=>{window.removeEventListener("pointermove",X),window.removeEventListener("pointerup",fe),window.removeEventListener("pointercancel",fe)}},[]);const Mn=X=>{const fe={...l.variables};delete fe[X];const ye={...l,variables:fe};c(ye),Be(ye)},jl=(X,fe,ye,Re)=>{const He={...l.variables};delete He[X];let lt=Re;ye==="number"&&(lt=parseFloat(Re)||0),ye==="boolean"&&(lt=Re==="true"||Re===!0),He[fe]={type:ye,value:lt};const pt={...l,variables:He};c(pt),Be(pt)},wa=async()=>{if(l.id){ce(!0);try{const X=await fetch(`/api/tasks/${l.id}/versions`);if(!X.ok)throw new Error("Failed to load versions");const fe=await X.json();se(Array.isArray(fe.versions)?fe.versions:[])}catch{se([])}finally{ce(!1)}}},Za=async X=>{if(!(!l.id||!await C("Rollback to this version? Current changes will be saved as a new version.")))try{const ye=await fetch(`/api/tasks/${l.id}/rollback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({versionId:X})});if(!ye.ok)throw new Error("Rollback failed");const Re=await ye.json();c(Re),_("Rolled back to selected version.","success"),wa()}catch{_("Rollback failed.","error")}},Sa=async X=>{if(l.id){re(!0);try{const fe=await fetch(`/api/tasks/${l.id}/versions/${X}`);if(!fe.ok)throw new Error("Failed to load version");const ye=await fe.json();if(!ye?.snapshot)throw new Error("Missing snapshot");te({id:ye.metadata?.id||X,timestamp:ye.metadata?.timestamp||Date.now(),snapshot:ye.snapshot})}catch{_("Failed to load version snapshot.","error")}finally{re(!1)}}};O.useEffect(()=>{u==="history"&&wa()},[u,l.id]);const Ft=O.useCallback((X,fe,ye)=>{const Re=X.currentTarget.getBoundingClientRect(),He=X.clientY-Re.top;U.current=X.pointerId,X.currentTarget.setPointerCapture(X.pointerId),G({id:fe,startY:X.clientY,currentY:X.clientY,height:Re.height,index:ye,originTop:Re.top,pointerOffset:He}),de(ye)},[]);return s.jsxs("div",{className:"flex-1 flex overflow-hidden animate-in fade-in slide-in-from-bottom-4 duration-500",children:[s.jsxs("aside",{className:"glass border-r border-white/10 flex flex-col shrink-0 overflow-hidden",style:{width:I},children:[s.jsxs("div",{className:"p-8 border-b border-white/10 space-y-6 shrink-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("input",{type:"text",value:l.name,onChange:X=>c({...l,name:X.target.value}),onBlur:()=>Be(),placeholder:"Task Name...","aria-label":"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"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("button",{onClick:()=>f("history"),className:"w-8 h-8 rounded-full text-gray-400 hover:text-white hover:bg-white/5 transition-all flex items-center justify-center",title:"Task History","aria-label":"Task History",children:s.jsx(je,{name:"history",className:"text-sm"})}),u==="history"&&s.jsxs("button",{onClick:async()=>{await h(l,!0),wa()},className:"h-8 px-4 bg-white text-black text-[10px] font-bold uppercase tracking-widest rounded-lg hover:bg-white/90 transition-all flex items-center gap-2",children:[s.jsx(je,{name:"save",className:"text-[12px] text-black"}),s.jsx("span",{children:"Save Version"})]})]})]}),s.jsx("div",{className:"bg-white/5 p-1 rounded-xl flex gap-1 border border-white/5",children:["scrape","agent","headful"].map(X=>s.jsx("button",{onClick:()=>{const fe={...l,mode:X};c(fe),Be(fe)},className:`flex-1 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${l.mode===X?"bg-white text-black":"text-gray-500 hover:text-white"}`,"aria-pressed":l.mode===X,children:X==="scrape"?"Scraper":X==="agent"?"Agent":"Headful"},X))}),s.jsxs("div",{className:"flex items-center justify-between px-2",children:[s.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Interface Mode"}),s.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/5",children:["visual","json","api"].map(X=>s.jsx("button",{onClick:()=>f(X),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${u===X?"bg-white text-black":"text-gray-500 hover:text-white"}`,"aria-pressed":u===X,children:X},X))})]})]}),s.jsxs("div",{className:`flex-1 p-8 min-h-0 relative ${u==="json"?"overflow-hidden":"overflow-y-auto custom-scrollbar"} ${u==="visual"?"space-y-8":""}`,children:[u==="visual"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Target URL"}),s.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:s.jsx(Ot,{value:l.url,onChange:X=>c({...l,url:X}),onBlur:()=>Be(),variables:l.variables,placeholder:"https://..."})})]}),s.jsx("div",{className:"grid grid-cols-2 gap-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Wait (Sec)"}),s.jsx("input",{type:"number",value:l.wait,onChange:X=>c({...l,wait:parseFloat(X.target.value)||0}),onBlur:()=>Be(),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"})]})}),l.mode==="agent"&&s.jsxs("div",{className:"space-y-6 order-1",children:[s.jsxs("div",{className:"space-y-3",ref:V,children:[(()=>{const X=we(l.actions);return l.actions.map((fe,ye)=>{const Re=Q?.id===fe.id,lt=Q&&le!==null&&Q.index!==le&&fe.id!==Q.id&&(Q.index<le&&ye>Q.index&&ye<=le||Q.index>le&&ye<Q.index&&ye>=le)?(Q?.height||0)*(Q.index<(le??0)?-1:1):0,pt=X[ye]||0,fa=fe.disabled?"skipped":_e[fe.id];return s.jsx(kb,{action:fe,index:ye,depth:pt,status:fa,isDragging:Re,isDragOver:le===ye,translateY:lt,variables:l.variables,availableTasks:H,onUpdate:gt,onRemove:Me,onAutoSave:Be,onOpenPalette:Ke,onOpenContextMenu:Mt,onPointerDown:Ft,dragState:Q})})})(),j&&(()=>{const X=l.actions.findIndex(ye=>ye.id===j.id),fe=l.actions[X];return fe?s.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:j.x,top:j.y},children:[s.jsx("button",{onClick:()=>{gt(fe.id,{disabled:!fe.disabled},!0),We()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:fe.disabled?"Enable":"Disable"}),s.jsx("button",{onClick:()=>{Me(fe.id),We()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors text-red-400",children:"Delete"}),s.jsx("button",{onClick:()=>{Y(dt(fe)),Me(fe.id),We()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Cut"}),s.jsx("button",{onClick:()=>{Y(dt(fe)),We()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Copy"}),s.jsx("button",{onClick:()=>{const ye=dt(fe),Re=[...l.actions];Re.splice(X+1,0,ye),c({...l,actions:Re}),We()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Duplicate"})]}):null})(),s.jsx("button",{onClick:()=>Ke(),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"})]}),s.jsxs("div",{className:"bg-white/5 rounded-xl p-4 border border-white/5 space-y-4",children:[s.jsx("h4",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest border-b border-white/5 pb-2",children:"Behavior Config"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(l.stealth).map(([X,fe])=>s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[s.jsx("input",{type:"checkbox",checked:fe,onChange:ye=>{const Re={...l,stealth:{...l.stealth,[X]:ye.target.checked},humanTyping:X==="naturalTyping"?ye.target.checked:l.humanTyping};c(Re),Be(Re)},className:"w-3 h-3 rounded bg-transparent border-white/20"}),s.jsx("span",{className:"text-[9px] font-bold text-gray-500 group-hover:text-white transition-all",children:X.replace(/([A-Z])/g," $1").toUpperCase()})]},X))})]})]}),s.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[s.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)"}),s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("p",{className:"text-[8px] text-gray-600",children:"Dynamic Params"}),s.jsx("button",{onClick:Ie,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"})]}),s.jsx("div",{className:"space-y-2",children:Object.entries(l.variables).map(([X,fe])=>s.jsx(Ab,{name:X,def:fe,updateVariable:jl,removeVariable:Mn},X))})]})]}),s.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[s.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"}),s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Output format"}),s.jsxs("select",{value:l.extractionFormat||"json",onChange:X=>{const fe={...l,extractionFormat:X.target.value};c(fe),Be(fe)},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:[s.jsx("option",{value:"json",children:"JSON"}),s.jsx("option",{value:"csv",children:"CSV"})]})]}),s.jsxs("p",{className:"text-[8px] text-gray-600",children:["Process scraped HTML with JavaScript. Use ",s.jsx("code",{className:"text-blue-400 bg-white/5 px-1 py-0.5 rounded",children:"$$data.html()"})," to access the raw HTML."]}),s.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:s.jsx(Ot,{value:l.extractionScript||"",onChange:X=>c({...l,extractionScript:X}),onBlur:()=>Be(),variables:l.variables,syntax:"javascript",placeholder:`// Example: Extract all links
|
|
15
|
-
const html = $$data.html();
|
|
16
|
-
const parser = new DOMParser();
|
|
17
|
-
const doc = parser.parseFromString(html, 'text/html');
|
|
18
|
-
const links = Array.from(doc.querySelectorAll('a')).map(a => a.href);
|
|
19
|
-
return JSON.stringify(links, null, 2);`})})]})]}),l.mode==="scrape"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Selector Filter"}),s.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:s.jsx(Ot,{value:l.selector||"",onChange:X=>c({...l,selector:X}),onBlur:()=>Be(),variables:l.variables,placeholder:".main-content"})})]}),s.jsxs("div",{className:"pt-4 border-t border-white/10 space-y-3",children:[s.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:[s.jsx("input",{type:"checkbox",checked:l.rotateUserAgents,onChange:X=>{const fe={...l,rotateUserAgents:X.target.checked};c(fe),Be(fe)},className:"w-4 h-4 rounded border-white/20 bg-transparent"}),s.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate UA"})]}),s.jsxs("label",{className:`flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 transition-all ${ee?"opacity-50 cursor-not-allowed":"hover:bg-white/[0.05] cursor-pointer group"}`,title:ee?"Configure proxies in Settings → Proxies to enable rotation.":"Rotate proxies per task.",children:[s.jsx("input",{type:"checkbox",checked:l.rotateProxies,onChange:X=>{const fe={...l,rotateProxies:X.target.checked};c(fe),Be(fe)},disabled:ee,className:"w-4 h-4 rounded border-white/20 bg-transparent"}),s.jsx("span",{className:`text-[10px] font-bold text-gray-500 uppercase tracking-widest ${ee?"":"group-hover:text-white"}`,children:"Rotate Proxies"})]}),s.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:[s.jsx("input",{type:"checkbox",checked:l.rotateViewport,onChange:X=>{const fe={...l,rotateViewport:X.target.checked};c(fe),Be(fe)},className:"w-4 h-4 rounded border-white/20 bg-transparent"}),s.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate Viewport"})]}),s.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:[s.jsx("input",{type:"checkbox",checked:l.includeShadowDom!==!1,onChange:X=>{const fe={...l,includeShadowDom:X.target.checked};c(fe),Be(fe)},className:"w-4 h-4 rounded border-white/20 bg-transparent"}),s.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include Shadow DOM in HTML"})]}),s.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:[s.jsx("input",{type:"checkbox",checked:!!l.disableRecording,onChange:X=>{const fe={...l,disableRecording:X.target.checked};c(fe),Be(fe)},className:"w-4 h-4 rounded border-white/20 bg-transparent"}),s.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Disable automated recording"})]}),s.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:[s.jsx("input",{type:"checkbox",checked:!!l.statelessExecution,onChange:X=>{const fe={...l,statelessExecution:X.target.checked};c(fe),Be(fe)},className:"w-4 h-4 rounded border-white/20 bg-transparent"}),s.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Stateless execution (no shared cookies)"})]})]})]}),u==="json"&&s.jsx(Ig,{task:l,onChange:c,onCopy:(X,fe)=>{ve(X,fe)},copiedId:w}),u==="api"&&s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"space-y-6 flex-1 flex flex-col min-h-0",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Deployment Endpoint"}),s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx("input",{type:"text",readOnly:!0,value:l.id?`${window.location.origin}/tasks/${l.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"}),s.jsxs("button",{onClick:()=>{const X=l.id?`${window.location.origin}/tasks/${l.id}/api`:"";X&&ve(X,"endpoint")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${w==="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:[w==="endpoint"?s.jsx(je,{name:"check",className:"text-sm"}):s.jsx(je,{name:"content_copy",className:"text-sm"}),w==="endpoint"?"Copied":"Copy"]})]})]}),s.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Override Variables (JSON)"}),s.jsxs("button",{onClick:()=>{const X={};Object.entries(l.variables).forEach(([fe,ye])=>X[fe]=ye.value),ve(JSON.stringify({variables:X},null,2),"vars")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${w==="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:[w==="vars"?s.jsx(je,{name:"check",className:"text-sm"}):s.jsx(je,{name:"content_copy",className:"text-sm"}),w==="vars"?"Copied":"Copy"]})]}),s.jsx(wl,{readOnly:!0,value:(()=>{const X={};return Object.entries(l.variables).forEach(([fe,ye])=>X[fe]=ye.value),JSON.stringify({variables:X},null,2)})(),language:"json",className:"flex-1"})]})]}),s.jsx("p",{className:"text-[8px] text-gray-600 mt-4 font-mono uppercase tracking-widest leading-loose",children:"Automate via HTTP POST to the above endpoint with your API key in the headers."})]}),u==="history"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Task Versions"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:wa,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"}),s.jsx("button",{onClick:async()=>{if(!l.id||!await C("Clear all task versions?"))return;(await fetch(`/api/tasks/${l.id}/versions/clear`,{method:"POST"})).ok?(_("Version history cleared.","success"),wa()):_("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"})]})]}),E&&s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading versions..."}),!E&&L.length===0&&s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No versions yet. Save changes to create history."}),s.jsx("div",{className:"space-y-3",children:L.map(X=>s.jsxs("div",{className:"glass-card p-4 rounded-2xl flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:X.name}),s.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(X.timestamp).toLocaleString()," | ",X.mode]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>Sa(X.id),disabled:F,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:F?"Loading...":"View"}),s.jsx("button",{onClick:()=>Za(X.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"})]})]},X.id))})]})]}),s.jsx(Fg,{open:$,query:be,onQueryChange:J,onClose:()=>K(!1),onSelect:X=>{me?X==="if"?gt(me,{type:X,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""},!0):X==="while"?gt(me,{type:X,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""},!0):gt(me,{type:X},!0):ze(X),K(!1)}}),s.jsx("div",{className:"p-8 border-t border-white/10 backdrop-blur-xl shrink-0",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("button",{onClick:m,disabled:d&&l.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:[d&&l.mode!=="headful"?s.jsx("div",{className:"w-3 h-3 border-2 border-black/20 border-t-black rounded-full animate-spin"}):s.jsx(je,{name:"play_arrow",className:"text-sm text-black"}),s.jsx("span",{children:d&&l.mode==="headful"?"Stop Headful":d?"Running...":"Run Task"})]}),d&&s.jsx("button",{onClick:()=>y?.(),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:s.jsx(je,{name:"stop",className:"text-base"})})]})})]}),s.jsx("div",{className:"w-2 cursor-col-resize bg-white/5 hover:bg-white/10 transition-colors",onPointerDown:X=>{X.preventDefault(),R.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}),s.jsxs("main",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#020202] p-12 relative",children:[s.jsx("div",{className:"absolute inset-0 opacity-[0.02] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),s.jsx(Up,{results:x,pinnedResults:b,isExecuting:d,isHeadful:l.mode==="headful",runId:p,onConfirm:C,onNotify:_,onPin:T,onUnpin:N,fullWidth:l.mode==="headful"}),D&&s.jsx("div",{className:"fixed inset-0 z-[210] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:s.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:[s.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Task Snapshot"}),s.jsx("div",{className:"text-lg font-bold text-white",children:D.snapshot.name}),s.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(D.timestamp).toLocaleString()," | ",D.snapshot.mode]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>te(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"}),s.jsx("button",{onClick:()=>{S&&S(D.snapshot),te(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"})]})]}),s.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:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Snapshot JSON"}),s.jsx(wl,{readOnly:!0,value:JSON.stringify(D.snapshot,null,2),language:"json",className:"min-h-[320px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"}),s.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."})]})]})]})})]})]})},zb=({apiKey:l,loading:c,saving:o,onRegenerate:u,onCopy:f})=>{const[d,h]=O.useState(!1);return s.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:s.jsx(je,{name:"database",className:"text-xl"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"API Key"}),s.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage task API access"})]})]}),s.jsxs("div",{className:"flex flex-col gap-4",children:[s.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:[s.jsx("span",{className:l&&!d?"text-[14px] leading-none":void 0,children:c?"Loading...":l?d?l:"••••••••••••••••••••••••••••••••••••••••":"No API key set"}),s.jsx("button",{onClick:()=>h(m=>!m),disabled:!l,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:d?"Hide key":"Show key","aria-label":d?"Hide key":"Show key",children:d?s.jsx(je,{name:"visibility_off",className:"text-base"}):s.jsx(je,{name:"visibility",className:"text-base"})})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs("button",{onClick:u,disabled:o,"aria-busy":o,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 flex items-center justify-center gap-2",children:[o&&s.jsx("div",{className:"w-3 h-3 border-2 border-black/20 border-t-black rounded-full animate-spin"}),o?l?"Rotating...":"Generating...":l?"Rotate Key":"Generate Key"]}),s.jsxs("button",{onClick:f,disabled:!l,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:[s.jsx(je,{name:"content_copy",className:"text-base"}),"Copy Key"]})]}),s.jsx("p",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Use this key in `key`, `x-api-key`, or `Authorization: Bearer` headers."})]})]})},Tb=({onClearStorage:l})=>s.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:s.jsx(je,{name:"delete",className:"text-xl"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Storage"}),s.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage stored data"})]})]}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx("button",{onClick:()=>l("screenshots"),className:"flex-1 px-6 py-4 bg-red-500/5 border border-red-500/10 text-red-400 rounded-2xl text-[9px] font-bold uppercase tracking-widest hover:bg-red-500/10 transition-all",children:"Clear Captures"}),s.jsx("button",{onClick:()=>l("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"})]})]}),Rb=72,Lp=6,Zr=Rb+Lp,Ob=5,Db=2,Mb=({index:l,style:c,data:o})=>{const u=o.captures[l];return u?s.jsx("div",{style:{...c,paddingBottom:Lp},children:s.jsxs("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:u.type==="recording"?"Recording":"Screenshot"}),s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:u.name})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("a",{href:u.url,target:"_blank",rel:"noreferrer",className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all","aria-label":`Open ${u.name}`,children:"Open"}),s.jsx("button",{onClick:()=>o.onDelete(u.name),className:"px-3 py-2 rounded-xl border border-red-500/20 text-[9px] font-bold uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all",children:"Delete"})]})]})}):null},Ub=({captures:l,loading:c,onRefresh:o,onDelete:u})=>{const f=Math.min(Math.max(Zr,l.length*Zr),Zr*Ob);return s.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Captures"}),s.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Recordings and screenshots"})]}),s.jsx("button",{onClick:o,disabled:c,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all disabled:opacity-50",children:"Refresh"})]}),c&&s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!c&&l.length===0&&s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!c&&l.length>0&&s.jsx(Pr,{height:f,width:"100%",itemCount:l.length,itemSize:Zr,overscanCount:Db,itemData:{captures:l,onDelete:u},children:Mb})]})},Bb=({cookies:l,originsCount:c,loading:o,onClear:u,onDelete:f})=>{const[d,h]=O.useState({}),[m,x]=O.useState({}),b=S=>`${S.name}|${S.domain||""}|${S.path||""}|${S.expires||""}`,C=S=>{if(!S)return!1;let p=0;for(let y=0;y<S.length;y+=1){const w=S.charCodeAt(y);(w===9||w===10||w===13||w>=32&&w<=126)&&(p+=1)}return p/S.length>=.85},_=S=>{if(!S)return null;if(/%[0-9A-Fa-f]{2}/.test(S))try{const p=decodeURIComponent(S);if(p!==S&&C(p))return{value:p,kind:"URL"}}catch{}if(/^[A-Za-z0-9+/=]+$/.test(S)&&S.length>=12&&S.length%4===0)try{const p=atob(S);if(p&&C(p))return{value:p,kind:"Base64"}}catch{}return null},T=S=>{const p=b(S);h(y=>({...y,[p]:!y[p]}))},N=S=>{const p=b(S);x(y=>({...y,[p]:!y[p]}))};return s.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:s.jsx(je,{name:"database",className:"text-xl"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Cookies"}),s.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Browser storage state"})]})]}),s.jsx("button",{onClick:u,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-yellow-500/5 border border-yellow-500/10 text-yellow-400 hover:bg-yellow-500/10 transition-all",children:"Clear Cookies"})]}),o&&s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading data..."}),!o&&l.length===0&&s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No cookies found."}),s.jsx("div",{className:"space-y-3",children:l.map(S=>{const p=b(S),y=!!d[p],w=S.value||"",k=_(w),j=!!k&&!!m[p],M=j&&k?k.value:w,U=y||M.length<=120?M:`${M.slice(0,120)}...`;return s.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:S.name}),s.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[S.domain||"local"," | ",S.path||"/",S.expires?` | ${new Date(S.expires*1e3).toLocaleString()}`:""]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[k&&s.jsx("button",{onClick:()=>N(S),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:j?"Show Raw":`Decode ${k.kind}`}),s.jsx("button",{onClick:()=>f(S),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"})]})]}),s.jsx("div",{onClick:()=>T(S),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:U||"(empty)"})]},p)})}),!o&&c>0&&s.jsxs("div",{className:"pt-2 text-[8px] text-gray-600 uppercase tracking-widest",children:["Origins stored: ",c]})]})},Lb=({tab:l,onTabChange:c})=>s.jsxs("div",{className:"flex items-end justify-between mb-8",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] font-bold text-purple-500 uppercase tracking-[0.4em]",children:"System"}),s.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Settings"})]}),s.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["system","data","proxies"].map(o=>s.jsx("button",{onClick:()=>c(o),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${l===o?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:o},o))})]}),Hb=({splitPercent:l,onChange:c,onReset:o})=>{const u=Number.isFinite(l)?Math.min(75,Math.max(25,l)):30;return s.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Layout"}),s.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default editor split"})]}),s.jsx("button",{onClick:o,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"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[s.jsx("span",{children:"Editor"}),s.jsxs("span",{children:[u,"%"]})]}),s.jsx("input",{type:"range",min:25,max:75,step:5,value:u,onChange:f=>c(Math.min(75,Math.max(25,Number(f.target.value)))),className:"w-full accent-white"}),s.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[s.jsx("span",{children:"Preview"}),s.jsxs("span",{children:[100-u,"%"]})]})]})]})},qb=({proxies:l,defaultProxyId:c,includeDefaultInRotation:o,rotationMode:u,loading:f,onRefresh:d,onAdd:h,onImport:m,onUpdate:x,onDelete:b,onSetDefault:C,onToggleIncludeDefault:_,onRotationModeChange:T})=>{const[N,S]=O.useState(""),[p,y]=O.useState(""),[w,k]=O.useState(""),[j,M]=O.useState(""),[U,V]=O.useState(null),[Y,Q]=O.useState(""),[G,le]=O.useState(""),[de,L]=O.useState(""),[se,E]=O.useState(""),[ce,$]=O.useState(""),K=O.useRef(null),be=()=>{N.trim()&&(h({server:N.trim(),username:p.trim()||void 0,password:w.trim()||void 0,label:j.trim()||void 0}),S(""),y(""),k(""),M(""))},J=F=>{V(F.id),Q(F.server),le(F.username||""),L(""),E(F.label||"")},me=()=>{V(null),Q(""),le(""),L(""),E("")},A=()=>{!U||!Y.trim()||(x(U,{server:Y.trim(),username:G.trim()||void 0,password:de.trim()||void 0,label:se.trim()||void 0}),me())},D=F=>{const re=F.trim();if(!re)return null;if(re.includes("://"))return{server:re};const _e=re.split(":");if(_e.length<2)return null;const Ne=_e[0]?.trim(),ke=_e[1]?.trim();if(!Ne||!ke)return null;const Ee=_e[2]?_e[2].trim():"",Qe=_e.length>3?_e.slice(3).join(":").trim():"";return{server:`${Ne}:${ke}`,username:Ee||void 0,password:Qe||void 0}},te=async F=>{const re=Array.from(F.target.files||[]);if(re.length)try{const ke=(await Promise.all(re.map(Ee=>Ee.text()))).join(`
|
|
20
|
-
`).split(/\r?\n/).flatMap(Ee=>Ee.split(/[,;]+/)).map(D).filter(Boolean);if(ke.length===0){$("No valid proxies found in file.");return}$(""),m(ke)}catch{$("Failed to read file.")}finally{K.current&&(K.current.value="")}};return s.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:s.jsx(je,{name:"security",className:"text-xl"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Proxies"}),s.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Set defaults and rotate per task"})]}),s.jsx("div",{className:"ml-auto",children:s.jsxs("button",{onClick:d,disabled:f,className:"px-4 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all disabled:opacity-50 inline-flex items-center gap-2",children:[s.jsx(je,{name:"sync",className:`text-base ${f?"animate-spin":""}`}),"Refresh"]})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx("input",{type:"text",placeholder:"Proxy server (host:port or scheme://host:port)",value:N,onChange:F=>S(F.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white","aria-label":"Proxy server address"}),s.jsx("input",{type:"text",placeholder:"Label (optional)",value:j,onChange:F=>M(F.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white","aria-label":"Proxy label"}),s.jsx("input",{type:"text",placeholder:"Username (optional)",value:p,onChange:F=>y(F.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white","aria-label":"Proxy username"}),s.jsx("input",{type:"password",placeholder:"Password (optional)",value:w,onChange:F=>k(F.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white","aria-label":"Proxy password"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:be,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"}),s.jsx("button",{onClick:()=>K.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"}),s.jsx("button",{onClick:()=>C("host"),className:`px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 transition-all ${c?"text-white hover:bg-white/5":"bg-white/10 text-white"}`,children:"Use Host IP"})]}),s.jsx("input",{ref:K,type:"file",accept:".txt,text/plain",onChange:te,className:"hidden"}),ce&&s.jsx("div",{className:"text-[9px] text-red-400 uppercase tracking-widest",children:ce}),s.jsxs("label",{className:"flex items-center justify-between gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all group",children:[s.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotation mode"}),s.jsxs("select",{value:u,onChange:F=>T(F.target.value==="random"?"random":"round-robin"),className:"bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[10px] text-white uppercase tracking-widest","aria-label":"Rotation mode",children:[s.jsx("option",{value:"round-robin",children:"Round robin"}),s.jsx("option",{value:"random",children:"Random"})]})]}),s.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:[s.jsx("input",{type:"checkbox",checked:o,onChange:F=>_(F.target.checked),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),s.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include default IP in rotation pool"})]}),s.jsxs("div",{className:"space-y-3",children:[f&&s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading proxies..."}),!f&&l.length===0&&s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No proxies saved yet."}),!f&&l.map(F=>{const re=F.id===c,_e=F.id===U;return s.jsx("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:_e?s.jsxs("div",{className:"w-full space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.jsx("input",{type:"text",value:Y,onChange:Ne=>Q(Ne.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white",placeholder:"Proxy server","aria-label":"Proxy server"}),s.jsx("input",{type:"text",value:se,onChange:Ne=>E(Ne.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white",placeholder:"Label","aria-label":"Label"}),s.jsx("input",{type:"text",value:G,onChange:Ne=>le(Ne.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white",placeholder:"Username","aria-label":"Username"}),s.jsx("input",{type:"password",value:de,onChange:Ne=>L(Ne.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","aria-label":"Password"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:A,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"}),s.jsx("button",{onClick:me,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"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:F.label||F.server}),s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:F.server})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:()=>C(F.id),className:`px-3 py-2 rounded-xl border text-[9px] font-bold uppercase tracking-widest transition-all inline-flex items-center gap-2 ${re?"bg-white text-black border-white":"border-white/10 text-white hover:bg-white/5"}`,children:[re?s.jsx(je,{name:"star",className:"text-base"}):s.jsx(je,{name:"star_outline",className:"text-base"}),re?"Default":"Set Default"]}),F.id!=="host"&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>J(F),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"}),s.jsxs("button",{onClick:()=>b(F.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:[s.jsx(je,{name:"delete",className:"text-base"}),"Delete"]})]})]})]})},F.id)})]})]})},Yb=({selection:l,options:c,loading:o,onChange:u})=>s.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"User Agent"}),s.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default browser identity"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("select",{value:l,onChange:f=>u(f.target.value),disabled:o,className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white uppercase tracking-widest disabled:opacity-60",children:[s.jsx("option",{value:"system",children:"System user agent (default)"}),c.map(f=>s.jsx("option",{value:f,children:f},f))]}),s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Applies when rotate UA is disabled in tasks."})]})]}),Vb=({version:l})=>{const[c,o]=O.useState(!1),u=l?`v${l}`:"Unknown",f=async()=>{const d=l||u;try{if(typeof navigator<"u"&&navigator.clipboard&&typeof window<"u"&&window.isSecureContext)await navigator.clipboard.writeText(d);else if(typeof document<"u"){const m=document.createElement("textarea");m.value=d,m.style.position="fixed",m.style.opacity="0",document.body.appendChild(m),m.select(),document.execCommand("copy"),document.body.removeChild(m)}o(!0),setTimeout(()=>o(!1),1500)}catch{o(!1)}};return s.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:s.jsx(je,{name:"content_copy",className:"text-xl"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Version"}),s.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Package metadata"})]})]}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("div",{className:"text-[9px] font-bold uppercase tracking-[0.3em] text-white",children:u}),s.jsx("button",{onClick:f,className:"px-4 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all",type:"button",children:c?"Copied":"Copy version"})]})]})},Zb="0.6.7",Gb={version:Zb},Xb=Gb.version,Qb=({onClearStorage:l,onConfirm:c,onNotify:o})=>{const[u,f]=O.useState("system"),[d,h]=O.useState([]),[m,x]=O.useState([]),[b,C]=O.useState([]),[_,T]=O.useState(!1),[N,S]=O.useState(null),[p,y]=O.useState(!1),[w,k]=O.useState(!1),[j,M]=O.useState(30),[U,V]=O.useState([]),[Y,Q]=O.useState(null),[G,le]=O.useState(!1),[de,L]=O.useState("round-robin"),[se,E]=O.useState(!1),[ce,$]=O.useState("system"),[K,be]=O.useState([]),[J,me]=O.useState(!1),A="doppelganger.layout.leftWidthPct";O.useEffect(()=>{try{const R=localStorage.getItem(A);if(R){const H=Math.min(75,Math.max(25,Math.round(parseFloat(R)*100)));Number.isNaN(H)||M(H)}}catch{}},[]);const D=async()=>{T(!0);try{const[R,H]=await Promise.all([fetch("/api/data/captures"),fetch("/api/data/cookies")]),ee=R.ok?await R.json():{captures:[]},oe=H.ok?await H.json():{cookies:[],origins:[]};h(Array.isArray(ee.captures)?ee.captures:[]),x(Array.isArray(oe.cookies)?oe.cookies:[]),C(Array.isArray(oe.origins)?oe.origins:[])}catch{h([]),x([]),C([])}finally{T(!1)}},te=async R=>{if(!await c(`Delete capture ${R}?`))return;(await fetch(`/api/data/captures/${encodeURIComponent(R)}`,{method:"DELETE"})).ok?(o("Capture deleted.","success"),D()):o("Delete failed.","error")},F=async R=>{if(!await c(`Delete cookie ${R.name}?`))return;(await fetch("/api/data/cookies/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:R.name,domain:R.domain,path:R.path})})).ok?(o("Cookie deleted.","success"),D()):o("Delete failed.","error")},re=async()=>{y(!0);try{const R=await fetch("/api/settings/api-key",{credentials:"include"});if(!R.ok){R.status===401&&o("Session expired. Please log in again.","error"),S(null);return}const H=await R.json();S(H.apiKey||null)}catch{S(null)}finally{y(!1)}},_e=async()=>{E(!0);try{const R=await fetch("/api/settings/proxies",{credentials:"include"});if(!R.ok){R.status===401&&o("Session expired. Please log in again.","error"),V([]),Q(null),L("round-robin");return}const H=await R.json();V(Array.isArray(H.proxies)?H.proxies:[]),Q(H.defaultProxyId||null),le(!!H.includeDefaultInRotation),L(H.rotationMode==="random"?"random":"round-robin")}catch{V([]),Q(null),le(!1),L("round-robin")}finally{E(!1)}},Ne=async R=>{E(!0);try{const H=await fetch("/api/settings/proxies",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(R)});if(!H.ok){let oe="";try{const P=await H.json();oe=P?.error||P?.message||""}catch{oe=""}o(`Failed to add proxy${oe?`: ${oe}`:""}.`,"error");return}const ee=await H.json();V(Array.isArray(ee.proxies)?ee.proxies:[]),Q(ee.defaultProxyId||null),le(!!ee.includeDefaultInRotation),L(ee.rotationMode==="random"?"random":"round-robin"),o("Proxy added.","success")}catch{o("Failed to add proxy.","error")}finally{E(!1)}},ke=async()=>{me(!0);try{const R=await fetch("/api/settings/user-agent",{credentials:"include"});if(!R.ok){R.status===401&&o("Session expired. Please log in again.","error"),$("system"),be([]);return}const H=await R.json();$(H.selection==="system"?"system":String(H.selection||"system")),be(Array.isArray(H.userAgents)?H.userAgents:[])}catch{$("system"),be([])}finally{me(!1)}},Ee=async R=>{me(!0);try{const H=await fetch("/api/settings/user-agent",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({selection:R})});if(!H.ok){o("Failed to update user agent.","error");return}const ee=await H.json();$(ee.selection==="system"?"system":String(ee.selection||"system")),be(Array.isArray(ee.userAgents)?ee.userAgents:[]),o("User agent updated.","success")}catch{o("Failed to update user agent.","error")}finally{me(!1)}},Qe=async R=>{if(!R.length){o("No valid proxies found in file.","error");return}E(!0);try{const H=await fetch("/api/settings/proxies/import",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({proxies:R})});if(!H.ok){let oe="";try{const P=await H.json();oe=P?.error||P?.message||""}catch{oe=""}o(`Failed to import proxies${oe?`: ${oe}`:""}.`,"error");return}const ee=await H.json();V(Array.isArray(ee.proxies)?ee.proxies:[]),Q(ee.defaultProxyId||null),le(!!ee.includeDefaultInRotation),L(ee.rotationMode==="random"?"random":"round-robin"),o("Proxies imported.","success")}catch{o("Failed to import proxies.","error")}finally{E(!1)}},Xe=async(R,H)=>{E(!0);try{const ee=await fetch(`/api/settings/proxies/${encodeURIComponent(R)}`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(H)});if(!ee.ok){let P="";try{const ve=await ee.json();P=ve?.error||ve?.message||""}catch{P=""}o(`Failed to update proxy${P?`: ${P}`:""}.`,"error");return}const oe=await ee.json();V(Array.isArray(oe.proxies)?oe.proxies:[]),Q(oe.defaultProxyId||null),le(!!oe.includeDefaultInRotation),L(oe.rotationMode==="random"?"random":"round-robin"),o("Proxy updated.","success")}catch{o("Failed to update proxy.","error")}finally{E(!1)}},ot=async R=>{if(!(R==="host"||!await c("Delete this proxy?"))){E(!0);try{const ee=await fetch(`/api/settings/proxies/${encodeURIComponent(R)}`,{method:"DELETE",credentials:"include"});if(!ee.ok){o("Delete failed.","error");return}const oe=await ee.json();V(Array.isArray(oe.proxies)?oe.proxies:[]),Q(oe.defaultProxyId||null),le(!!oe.includeDefaultInRotation),L(oe.rotationMode==="random"?"random":"round-robin"),o("Proxy deleted.","success")}catch{o("Delete failed.","error")}finally{E(!1)}}},Be=async R=>{const H=R==="host"?null:R;E(!0);try{const ee=await fetch("/api/settings/proxies/default",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({id:H})});if(!ee.ok){o("Failed to set default.","error");return}const oe=await ee.json();V(Array.isArray(oe.proxies)?oe.proxies:[]),Q(oe.defaultProxyId||null),le(!!oe.includeDefaultInRotation),L(oe.rotationMode==="random"?"random":"round-robin"),o("Default proxy updated.","success")}catch{o("Failed to set default.","error")}finally{E(!1)}},v=async R=>{E(!0);try{const H=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({includeDefaultInRotation:R})});if(!H.ok){o("Failed to update rotation setting.","error");return}const ee=await H.json();V(Array.isArray(ee.proxies)?ee.proxies:[]),Q(ee.defaultProxyId||null),le(!!ee.includeDefaultInRotation),L(ee.rotationMode==="random"?"random":"round-robin"),o("Rotation setting updated.","success")}catch{o("Failed to update rotation setting.","error")}finally{E(!1)}},he=async R=>{E(!0);try{const H=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({rotationMode:R})});if(!H.ok){o("Failed to update rotation mode.","error");return}const ee=await H.json();V(Array.isArray(ee.proxies)?ee.proxies:[]),Q(ee.defaultProxyId||null),le(!!ee.includeDefaultInRotation),L(ee.rotationMode==="random"?"random":"round-robin"),o("Rotation mode updated.","success")}catch{o("Failed to update rotation mode.","error")}finally{E(!1)}},I=async()=>{k(!0);try{const R=await fetch("/api/settings/api-key",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"});if(!R.ok){let ee="";try{const oe=await R.json();ee=oe?.error||oe?.message||""}catch{ee=""}R.status===401?o("Session expired. Please log in again.","error"):o(`Failed to generate API key${ee?`: ${ee}`:""}.`,"error");return}const H=await R.json();S(H.apiKey||null),o("API key generated.","success")}catch{o("Failed to generate API key.","error")}finally{k(!1)}},B=async()=>{if(N)try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(N);else{const R=document.createElement("textarea");R.value=N,R.style.position="fixed",R.style.opacity="0",document.body.appendChild(R),R.select();const H=document.execCommand("copy");if(document.body.removeChild(R),!H)throw new Error("Copy failed")}o("API key copied.","success")}catch{o("Copy failed.","error")}};return O.useEffect(()=>{u==="data"&&D(),u==="system"&&(re(),ke()),u==="proxies"&&_e()},[u]),O.useEffect(()=>{try{localStorage.setItem(A,String(j/100))}catch{}},[j]),s.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:s.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[s.jsx(Lb,{tab:u,onTabChange:f}),u==="system"&&s.jsxs(s.Fragment,{children:[s.jsx(zb,{apiKey:N,loading:p,saving:w,onRegenerate:I,onCopy:B}),s.jsx(Yb,{selection:ce,options:K,loading:J,onChange:Ee}),s.jsx(Hb,{splitPercent:j,onChange:M,onReset:()=>M(30)}),s.jsx(Vb,{version:Xb}),s.jsx(Tb,{onClearStorage:l})]}),u==="data"&&s.jsxs(s.Fragment,{children:[s.jsx(Ub,{captures:d,loading:_,onRefresh:D,onDelete:te}),s.jsx(Bb,{cookies:m,originsCount:b.length,loading:_,onClear:()=>l("cookies"),onDelete:F})]}),u==="proxies"&&s.jsx(qb,{proxies:U,defaultProxyId:Y,includeDefaultInRotation:G,rotationMode:de,loading:se,onRefresh:_e,onAdd:Ne,onImport:Qe,onUpdate:Xe,onDelete:ot,onSetDefault:Be,onToggleIncludeDefault:v,onRotationModeChange:he}),s.jsx("div",{className:"pt-8 flex justify-center border-t border-white/5 mt-8",children:s.jsx(Tp,{})})]})})},Ru=({title:l="Loading",subtitle:c})=>s.jsxs("div",{className:"fixed inset-0 z-[80] bg-[#020202] flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),s.jsxs("div",{className:"glass-card p-10 rounded-[40px] text-center space-y-4",children:[s.jsx("div",{className:"w-12 h-12 mx-auto rounded-full border border-white/10 flex items-center justify-center",children:s.jsx("div",{className:"w-5 h-5 border-2 border-white/20 border-t-white rounded-full animate-spin"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:l}),c&&s.jsx("p",{className:"text-xs font-mono text-white/80",children:c})]})]})]}),Gr=140,Kb=6,Jb=4,$b=({index:l,style:c,data:o})=>{const u=o.items[l];return u?s.jsxs("div",{style:c,onClick:()=>o.navigate(`/executions/${u.id}`),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o.navigate(`/executions/${u.id}`))},role:"button",tabIndex:0,className:"glass-card w-full rounded-2xl p-5 flex items-center gap-4 text-left hover:bg-white/[0.06] transition-all cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.source==="api"?s.jsx(je,{name:"cloud",className:"text-xl"}):s.jsx(je,{name:"monitor",className:"text-xl"})}),s.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[s.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:u.taskName||u.mode}),s.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(u.timestamp).toLocaleString()," | ",u.source," | ",u.mode," | ",u.status," | ",u.durationMs,"ms"]}),u.url&&s.jsx("div",{className:"text-[9px] text-white/50 truncate font-mono",children:u.url})]}),s.jsx("button",{onClick:f=>{f.stopPropagation(),o.deleteExecution(u.id)},className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-red-500/5 border border-red-500/10 text-red-400 hover:bg-red-500/10 transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50","aria-label":`Delete execution ${u.id}`,children:"Delete"})]}):null},Fb=({onConfirm:l,onNotify:c})=>{const o=Dn(),[u,f]=O.useState([]),[d,h]=O.useState("all"),[m,x]=O.useState(!1),b=O.useCallback(async()=>{x(!0);try{const S=await fetch("/api/executions");if(!S.ok)throw new Error("Failed to load");const p=await S.json();f(Array.isArray(p.executions)?p.executions:[])}catch{f([])}finally{x(!1)}},[]),C=O.useCallback(async()=>{if(!await l("Clear all executions?"))return;(await fetch("/api/executions/clear",{method:"POST"})).ok?(c("Executions cleared.","success"),b()):c("Clear failed.","error")},[b,l,c]),_=O.useCallback(async S=>{if(!await l("Delete this execution?"))return;(await fetch(`/api/executions/${S}`,{method:"DELETE"})).ok?(c("Execution deleted.","success"),f(w=>w.filter(k=>k.id!==S))):c("Delete failed.","error")},[l,c]);O.useEffect(()=>{b()},[b]);const T=O.useMemo(()=>u.filter(S=>d==="all"?!0:S.source===d),[u,d]),N=O.useMemo(()=>({items:T,deleteExecution:_,navigate:o}),[T,_,o]);return s.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:s.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{className:"flex items-end justify-between",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Executions"}),s.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Run History"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["all","editor","api"].map(S=>s.jsx("button",{onClick:()=>h(S),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50 ${d===S?"bg-white text-black":"text-gray-500 hover:text-white"}`,"aria-pressed":d===S,children:S},S))}),s.jsx("button",{onClick:b,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 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",title:"Refresh","aria-label":"Refresh executions",children:s.jsx(je,{name:"sync",className:"text-xl"})}),s.jsx("button",{onClick:C,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 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",title:"Clear all","aria-label":"Clear all executions",children:s.jsx(je,{name:"delete",className:"text-xl"})})]})]}),m&&s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading executions..."}),!m&&T.length===0&&s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No executions found."}),!m&&T.length>0&&s.jsx(Pr,{height:Math.min(Math.max(Gr,T.length*Gr),Gr*Kb),itemCount:T.length,itemSize:Gr,width:"100%",overscanCount:Jb,itemData:N,className:"custom-scrollbar",children:$b})]})})},Ib=l=>{if(!l.result)return null;const c=l.result||{};return{url:l.url||c.url||"",finalUrl:c.final_url||c.finalUrl,html:c.html,data:c.data??c.html??"",screenshotUrl:c.screenshot_url||c.screenshotUrl,logs:c.logs||[],timestamp:new Date(l.timestamp).toLocaleTimeString()}},Wb=({onConfirm:l,onNotify:c})=>{const{id:o}=Sp(),u=Dn(),[f,d]=O.useState(null),[h,m]=O.useState(!1);if(O.useEffect(()=>{(async()=>{if(o){m(!0);try{const C=await fetch(`/api/executions/${o}`);if(!C.ok)throw new Error("Failed to load execution");const _=await C.json();d(_.execution||null)}catch{d(null)}finally{m(!1)}}})()},[o]),h)return s.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:s.jsx("div",{className:"max-w-6xl mx-auto text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading execution..."})});if(!f)return s.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:s.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[s.jsx("button",{onClick:()=>u("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Back"}),s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Execution not found."})]})});const x=Ib(f);return s.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:s.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{className:"flex items-end justify-between",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Execution"}),s.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:f.taskName||f.mode}),s.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(f.timestamp).toLocaleString()," | ",f.source," | ",f.mode," | ",f.status," | ",f.durationMs,"ms"]})]}),s.jsx("button",{onClick:()=>u("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Back"})]}),s.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col min-h-[420px]",children:[s.jsx("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:s.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"})}),x?s.jsx(Up,{results:x,isExecuting:!1,onConfirm:l,onNotify:c,fullWidth:!0}):s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"No output captured."})]})]})})},Pb=360,Hp=12,Xr=Pb+Hp,ey=6,ty=4,ay=({index:l,style:c,data:o})=>{const u=o.captures[l];return u?s.jsx("div",{style:{...c,paddingBottom:Hp},children:s.jsx(Dp,{capture:u,onDelete:o.onDelete})}):null},ny=({onConfirm:l,onNotify:c})=>{const o=Dn(),[u,f]=O.useState([]),[d,h]=O.useState(!1),m=async()=>{h(!0);try{const C=await fetch("/api/data/captures"),_=C.ok?await C.json():{captures:[]};f(Array.isArray(_.captures)?_.captures:[])}catch{f([])}finally{h(!1)}},x=O.useCallback(async C=>{if(!await l(`Delete capture ${C}?`))return;(await fetch(`/api/data/captures/${encodeURIComponent(C)}`,{method:"DELETE"})).ok?(f(N=>N.filter(S=>S.name!==C)),c("Capture deleted.","success")):c("Delete failed.","error")},[l,c]);O.useEffect(()=>{m()},[]);const b=O.useMemo(()=>({captures:u,onDelete:x}),[u,x]);return s.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:s.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{className:"flex items-end justify-between",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Captures"}),s.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:"All Captures"}),s.jsx("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:"Recordings and screenshots from every run"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:m,disabled:d,"aria-busy":d,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 inline-flex items-center gap-2",children:[s.jsx(je,{name:"sync",className:`text-base ${d?"animate-spin":""}`}),"Refresh"]}),s.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:"Executions"})]})]}),s.jsxs("div",{className:"glass-card rounded-[32px] p-8",children:[d&&s.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!d&&u.length===0&&s.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!d&&u.length>0&&s.jsx("div",{className:"space-y-4",children:s.jsx(Pr,{height:Math.min(Math.max(Xr,u.length*Xr),Xr*ey),width:"100%",itemCount:u.length,itemSize:Xr,overscanCount:ty,itemData:b,className:"custom-scrollbar",children:ay})})]})]})})},qp=({title:l="Not Found",subtitle:c="The page you requested does not exist.",onBack:o})=>s.jsx("div",{className:"h-full flex items-center justify-center px-10",children:s.jsxs("div",{className:"glass-card w-full max-w-2xl rounded-[40px] border border-white/10 p-10 text-center space-y-6",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"404"}),s.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:l}),s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.25em] text-gray-500",children:c}),o&&s.jsxs("button",{onClick:o,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:[s.jsx(je,{name:"arrow_back",className:"text-base"}),"Back"]})]})}),ly=({message:l,tone:c,onClose:o})=>{const[u,f]=O.useState(!1);return O.useEffect(()=>{const d=setTimeout(()=>{f(!0)},2500);return()=>clearTimeout(d)},[]),O.useEffect(()=>{if(!u)return;const d=setTimeout(()=>o(),240);return()=>clearTimeout(d)},[u,o]),s.jsx("div",{className:`fixed bottom-6 right-6 z-[220] max-w-sm w-full ${u?"animate-out fade-out slide-out-to-bottom-3 duration-200":"animate-in fade-in slide-in-from-bottom-3 duration-300"}`,children:s.jsxs("div",{className:`glass-card rounded-2xl border border-white/10 p-4 shadow-2xl flex items-start gap-3 ${u?"animate-out fade-out zoom-out-95 duration-200":"animate-in fade-in zoom-in-95 duration-300"}`,children:[s.jsx("div",{className:`mt-1 h-2.5 w-2.5 rounded-full ${c==="error"?"bg-red-400":"bg-emerald-400"}`}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-[8px] font-bold uppercase tracking-[0.35em] text-gray-500",children:"Notification"}),s.jsx("p",{className:"mt-2 font-mono text-[11px] text-white leading-relaxed",children:l})]}),s.jsx("button",{onClick:()=>f(!0),className:"px-2 py-1 text-[8px] font-bold uppercase tracking-[0.2em] text-white/60 hover:text-white",children:"Close"})]})})},iy=({request:l,onResolve:c})=>s.jsx("div",{className:"fixed inset-0 z-[201] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:s.jsxs("div",{className:"glass-card w-full max-w-md rounded-[32px] border border-white/10 p-8 text-center shadow-2xl",children:[s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:l.title??"Confirm"}),s.jsx("p",{className:"mt-4 font-mono text-sm text-white",children:l.message}),s.jsxs("div",{className:"mt-6 flex gap-4",children:[s.jsx("button",{onClick:()=>c(!1),className:"w-full rounded-2xl px-6 py-3 text-[9px] font-bold uppercase tracking-[0.3em] transition-all bg-white/5 border border-white/10 text-gray-300 hover:bg-white/10",children:l.cancelLabel??"Cancel"}),s.jsx("button",{onClick:()=>c(!0),className:"w-full rounded-2xl px-6 py-3 text-[9px] font-bold uppercase tracking-[0.3em] transition-all bg-white text-black hover:scale-105 shadow-xl shadow-white/10",children:l.confirmLabel??"Confirm"})]})]})}),ry=({tasks:l,loadTasks:c,touchTask:o,currentTask:u,setCurrentTask:f,onTaskLoaded:d,...h})=>{const{id:m}=Sp(),x=Dn(),[b,C]=O.useState(!1),[_,T]=O.useState(!1);return O.useEffect(()=>{(async()=>{if(u?.id===m)return;C(!0),T(!1);let S=l;l.length===0&&(S=await c());const p=S.find(y=>String(y.id)===String(m));if(p){const y={...p};(!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((w,k)=>w&&w.id?w:{...w,id:`act_${Date.now()}_${k}_${Math.floor(Math.random()*1e3)}`})),y.includeShadowDom===void 0&&(y.includeShadowDom=!0),f(y),d?.(y),m&&o(m)}else T(!0);C(!1)})()},[m,l]),_?s.jsx(qp,{title:"Task Not Found",subtitle:"This task does not exist or was deleted.",onBack:()=>x("/dashboard")}):b||!u||String(u.id)!==String(m)?s.jsx(Ru,{title:"Loading Mission Data",subtitle:"Syncing task payload"}):s.jsx(Bp,{currentTask:u,setCurrentTask:f,tasks:l,...h})},sy=(l,c)=>{if(typeof l!="string"||!l)return c;switch(l){case"ALREADY_SETUP":return"An account already exists";case"INVALID":return"Invalid credentials";case"SESSION_SAVE_FAILED":return"Unable to persist your session";default:{const o=l.toLowerCase().replace(/_/g," ");return o.charAt(0).toUpperCase()+o.slice(1)}}};function oy(){const l=Dn(),[c,o]=O.useState(null),[u,f]=O.useState("checking"),[d,h]=O.useState(""),[m,x]=O.useState(!1),b=O.useCallback(async()=>{try{const N=await(await fetch("/api/auth/me",{credentials:"include"})).json();if(N.authenticated)return o(N.user),f("authenticated"),!0;const p=await(await fetch("/api/auth/check-setup",{credentials:"include"})).json();f(p.setupRequired?"setup":"login")}catch{f("login")}return!1},[]);O.useEffect(()=>{b()},[b]);const C=O.useCallback(async(T,N,S,p)=>{if(!T||!N){h("Email and password are required");return}if(u==="setup"&&(!S||N!==p)){h(S?"Passwords do not match":"Name required");return}if(m)return;const y=u==="setup"?"/api/auth/setup":"/api/auth/login",w=u==="setup"?{name:S,email:T,password:N}:{email:T,password:N};x(!0);try{const k=await fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(w)}),j=await k.json().catch(()=>({}));if(k.ok)h(""),f("checking"),await b()?l("/"):(h("Authentication failed"),f("login"));else{const M=u==="setup"?"Setup failed":"Invalid credentials";h(sy(j?.error,M))}}catch{h("Network error")}finally{x(!1)}},[u,m,l,b]),_=O.useCallback(async T=>{await T("Are you sure you want to log out?")&&(await fetch("/api/auth/logout",{method:"POST",credentials:"include"}),o(null),f("login"),l("/"))},[l]);return{user:c,setUser:o,authStatus:u,setAuthStatus:f,authError:d,authBusy:m,checkAuth:b,handleAuthSubmit:C,logout:_}}const op=l=>{if(!l)return"";const c=JSON.parse(JSON.stringify(l));return delete c.last_opened,JSON.stringify(c)},Fr=l=>{if(typeof l=="boolean")return l;if(l==null)return!1;const c=String(l).toLowerCase();return c==="true"||c==="1"},uy=l=>l&&l[0].toUpperCase()+l.slice(1),Yp=l=>{if(!l.actions||!Array.isArray(l.actions))return l;let c=!1;const o=l.actions.map((u,f)=>u.id?u:(c=!0,{...u,id:`act_${Date.now()}_${f}_${Math.floor(Math.random()*1e3)}`}));return c?{...l,actions:o}:l},cy=()=>({name:"Imported Task",url:"",mode:"scrape",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,rotateViewport:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},includeShadowDom:!0,disableRecording:!1,statelessExecution:!1}),dy=(l,c)=>{if(!l||typeof l!="object")return null;const o=cy(),u={...o,...l};return(!u.name||typeof u.name!="string")&&(u.name=`Imported Task ${c+1}`),(!u.mode||!["scrape","agent","headful"].includes(u.mode))&&(u.mode="scrape"),typeof u.wait!="number"&&(u.wait=3),u.stealth||(u.stealth=o.stealth),(!u.variables||Array.isArray(u.variables))&&(u.variables={}),Array.isArray(u.actions)||(u.actions=[]),u.rotateProxies===void 0&&(u.rotateProxies=!1),u.disableRecording===void 0&&(u.disableRecording=!1),u.disableRecording=Fr(u.disableRecording),u.statelessExecution===void 0&&(u.statelessExecution=!1),u.statelessExecution=Fr(u.statelessExecution),delete u.versions,delete u.last_opened,u},fy=()=>({name:"Task "+Math.floor(Math.random()*100),url:"",mode:"agent",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,rotateViewport:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},extractionFormat:"json",includeShadowDom:!0,disableRecording:!1,statelessExecution:!1});function hy(l,c,o){const[u,f]=O.useState([]),[d,h]=O.useState(null),m=O.useRef(null);O.useEffect(()=>{m.current=d},[d]);const x=O.useCallback(async()=>{try{const k=[...await(await fetch("/api/tasks",{credentials:"include"})).json()].sort((j,M)=>(M.last_opened||0)-(j.last_opened||0));return f(k),k}catch(y){return console.error("Failed to load tasks",y),[]}},[]),b=O.useCallback(async y=>{try{await fetch(`/api/tasks/${y}/touch`,{method:"POST"}),x()}catch(w){console.error("Failed to touch task",w)}},[x]),C=O.useCallback((y,w)=>{const k=fy();w(!0),h(k),y(null),l("/tasks/new")},[l]),_=O.useCallback((y,w,k)=>{const j={...y};(!j.variables||Array.isArray(j.variables))&&(j.variables={}),j.stealth||(j.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),j.rotateProxies===void 0&&(j.rotateProxies=!1),j.rotateViewport===void 0&&(j.rotateViewport=!1),j.extractionFormat||(j.extractionFormat="json"),j.includeShadowDom===void 0&&(j.includeShadowDom=!0),j.disableRecording===void 0&&(j.disableRecording=!1),j.disableRecording=Fr(j.disableRecording),j.statelessExecution===void 0&&(j.statelessExecution=!1),j.statelessExecution=Fr(j.statelessExecution);const M=Yp(j);h(M),w(M),k(null),l(`/tasks/${y.id}`),y.id&&b(y.id)},[l,b]),T=O.useCallback(async(y,w)=>{await o("Are you sure you want to delete this task?")&&(await fetch(`/api/tasks/${y}`,{method:"DELETE"}),x(),w.includes(y)&&l("/dashboard"))},[o,x,l]),N=O.useCallback(async(y,w,k,j=!1)=>{const M=k||m.current;if(!M)return;const U={...M,last_opened:Date.now()},Q=await(await fetch(`/api/tasks${j?"?version=true":""}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U)})).json();h(Q),y(Q),x(),w.includes("new")&&l(`/tasks/${Q.id}`,{replace:!0})},[l,x]),S=O.useCallback(y=>{let w=u;if(y&&y.length>0&&(w=u.filter(Y=>Y.id&&y.includes(Y.id))),w.length===0){c("No tasks selected to export.","error");return}const k={exportedAt:new Date().toISOString(),tasks:w},j=new Blob([JSON.stringify(k,null,2)],{type:"application/json"}),M=URL.createObjectURL(j),U=document.createElement("a"),V=new Date().toISOString().slice(0,10);U.href=M,U.download=`doppelganger-tasks-${V}.json`,document.body.appendChild(U),U.click(),U.remove(),URL.revokeObjectURL(M),c(`Exported ${w.length} task(s).`,"success")},[u,c]),p=O.useCallback(async y=>{try{const w=await y.text(),k=JSON.parse(w),j=Array.isArray(k)?k:k?.tasks;if(!Array.isArray(j)){c("Invalid import file.","error");return}const M=Date.now(),U=j.map((V,Y)=>dy(V,Y)).filter(V=>!!V).map(V=>V.id?V:{...V,id:`task_${M}`});if(U.length===0){c("No tasks to import.","error");return}await Promise.all(U.map(V=>fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)}))),await x(),c(`Imported ${U.length} task(s).`,"success")}catch(w){c(`Import failed: ${w.message||"Unknown error"}`,"error")}},[c,x]);return O.useEffect(()=>{x()},[x]),{tasks:u,setTasks:f,currentTask:d,setCurrentTask:h,loadTasks:x,touchTask:b,createNewTask:C,editTask:_,deleteTask:T,saveTask:N,exportTasks:S,importTasks:p}}const up=(l,c)=>{const o=String(l||"").trim();if(!o)return"Execution failed.";const u=o.toLowerCase();if(c==="headful"){if(u.includes("missing x server")||u.includes("$display"))return"Headful browser could not start because no display server is available.";if(u.includes("failed to connect to the bus"))return"Headful browser could not start due to missing system services."}let f=o;const d=f.indexOf("--disable-");return d>0&&(f=f.slice(0,d).trim()),f.length>240&&(f=`${f.slice(0,240)}...`),f||"Execution failed."},py=l=>{const c=String(l||"").toLowerCase();return c.includes("missing x server")||c.includes("$display")||c.includes("platform failed to initialize")||c.includes("no display server")};function my(l){const[c,o]=O.useState(!1),[u,f]=O.useState(null),[d,h]=O.useState(null),m=O.useRef(null),x=async()=>{try{await fetch("/headful/stop",{method:"POST"})}catch(_){console.error("Failed to stop headful session",_)}finally{o(!1)}};return{isExecuting:c,results:u,setResults:f,activeRunId:d,runTaskWithSnapshot:async(_,T,N)=>{if(!_||!_.url)return;const S=Yp(_);T&&S!==T&&N(S);const p=`run_${Date.now()}_${Math.floor(Math.random()*1e3)}`;if(h(p),c&&S.mode==="headful"){await x();return}o(!0),f({url:S.url,logs:[],timestamp:"Running..."});let y=null;try{const w={};Object.entries(S.variables).forEach(([Q,G])=>{w[Q]=G.value});const k=Q=>Q.replace(/\\{\$(\w+)\\}/g,(G,le)=>{if(le==="now")return new Date().toISOString();const de=w[le];return de==null||de===""?"":String(de)}),j=Q=>typeof Q!="string"?Q:k(Q),M=S.mode!=="agent";y={...{...S,url:M?k(S.url||""):S.url||"",selector:M?j(S.selector):S.selector,actions:M?S.actions.map(Q=>({...Q,selector:j(Q.selector),value:j(Q.value),key:j(Q.key)})):S.actions},taskVariables:w,variables:w,runSource:"editor",taskId:S.id,taskName:S.name,taskSnapshot:S,runId:p};const Y=await(async Q=>{const G=new AbortController;m.current=G;const le=await fetch(`/${Q}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y),signal:G.signal});if(!le.ok){let de=null;try{de=await le.json()}catch{de=null}const L=new Error(de?.details||de?.error||"Request failed");throw L.code=de?.error,L}return le.json()})(S.mode);f({url:S.url,finalUrl:Y.final_url,html:Y.html,data:Y.data??Y.html??"No data captured.",screenshotUrl:Y.screenshot_url,downloads:Y.downloads,logs:Y.logs||[],timestamp:new Date().toLocaleTimeString()})}catch(w){if(w?.name==="AbortError"){l("Execution stopped.","success"),o(!1);return}if(S?.mode==="headful"&&y&&(w?.code==="HEADFUL_DISPLAY_UNAVAILABLE"||py(w?.message||String(w))))try{const j=await(async()=>{const M=new AbortController;m.current=M;const U=await fetch("/scrape",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y),signal:M.signal});if(!U.ok){const V=await U.json();throw new Error(V.details||V.error||"Request failed")}return U.json()})();j.logs=["Headful display unavailable; ran headless instead.",...j.logs||[]],f({url:S.url,finalUrl:j.final_url,html:j.html,data:j.data??j.html??"No data captured.",screenshotUrl:j.screenshot_url,downloads:j.downloads,logs:j.logs||[],timestamp:new Date().toLocaleTimeString()}),o(!1);return}catch(j){const M=up(j?.message||String(j),S?.mode);l(`Execution crash: ${M}`,"error"),o(!1);return}const k=up(w?.message||String(w),S?.mode);l(`Execution crash: ${k}`,"error"),S?.mode==="headful"&&o(!1)}finally{m.current=null,S.mode!=="headful"&&o(!1)}},stopTask:async _=>{if(_?.mode==="headful"){await x();return}if(d)try{await fetch("/api/executions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:d})})}catch(T){console.error("Failed to request stop",T)}m.current&&m.current.abort(),o(!1)}}}function xy(){const[l,c]=O.useState(null),[o,u]=O.useState(null),f=O.useRef(null),d=O.useCallback((x,b="success")=>{c({message:x,tone:b}),b==="success"&&setTimeout(()=>{c(C=>C&&C.message===x?null:C)},2e3)},[]),h=O.useCallback(x=>new Promise(b=>{f.current=b,u(typeof x=="string"?{message:x}:x)}),[]),m=O.useCallback(x=>{const b=f.current;f.current=null,u(null),b&&b(x)},[]);return{centerAlert:l,setCenterAlert:c,centerConfirm:o,showAlert:d,requestConfirm:h,closeConfirm:m}}function gy(){const l=Dn(),c=xn(),{centerAlert:o,setCenterAlert:u,centerConfirm:f,showAlert:d,requestConfirm:h,closeConfirm:m}=xy(),{authStatus:x,authError:b,authBusy:C,handleAuthSubmit:_,logout:T}=oy(),{tasks:N,currentTask:S,setCurrentTask:p,loadTasks:y,touchTask:w,createNewTask:k,editTask:j,deleteTask:M,saveTask:U,exportTasks:V,importTasks:Y}=hy(l,d,h),{isExecuting:Q,results:G,setResults:le,activeRunId:de,runTaskWithSnapshot:L,stopTask:se}=my(d);O.useEffect(()=>{x==="authenticated"&&y()},[x]);const[E,ce]=O.useState(!1),$=O.useRef(""),[K,be]=O.useState("visual"),[J,me]=O.useState({}),A="doppelganger.pinnedResults",te=(I=>I?.id?String(I.id):"new")(S),F=S&&J[te]||null;O.useEffect(()=>{try{const I=localStorage.getItem(A);if(I){const B=JSON.parse(I);B&&typeof B=="object"&&me(B)}}catch{}},[]),O.useEffect(()=>{try{localStorage.setItem(A,JSON.stringify(J))}catch{}},[J]),O.useEffect(()=>{!c.pathname.startsWith("/tasks")&&K==="history"&&be("visual")},[c.pathname,K]),O.useEffect(()=>{c.pathname==="/tasks/new"&&!S&&k(le,ce)},[c.pathname]),O.useEffect(()=>{if(!S){ce(!1);return}const I=op(S);ce(I!==$.current)},[S]),O.useEffect(()=>{if(typeof window>"u")return;const I=B=>{E&&(B.preventDefault(),B.returnValue="")};return window.addEventListener("beforeunload",I),()=>window.removeEventListener("beforeunload",I)},[E]);const re=O.useCallback(I=>{$.current=op(I),ce(!1)},[]),_e=I=>{S&&me(B=>({...B,[te]:I}))},Ne=()=>{S&&me(I=>{const B={...I};return delete B[te],B})},ke=async I=>{if(!await h(`Delete all ${I}?`))return;await fetch(I==="screenshots"?"/api/clear-screenshots":"/api/clear-cookies",{method:"POST"}),d(`${uy(I)} cleared.`,"success")},Ee=()=>c.pathname.startsWith("/tasks")?"editor":c.pathname==="/settings"?"settings":c.pathname==="/executions"?"executions":c.pathname==="/captures"?"captures":"dashboard",Qe=O.useCallback(I=>{I==="dashboard"?l("/dashboard"):I==="settings"?l("/settings"):I==="executions"?l("/executions"):I==="captures"&&l("/captures")},[l]),Xe=O.useCallback(()=>{k(le,ce)},[k,le,ce]),ot=O.useCallback(I=>{j(I,re,le)},[j,re,le]),Be=O.useCallback(I=>{M(I,c.pathname)},[M,c.pathname]),v=O.useCallback(()=>{T(h)},[T,h]);let he;return x==="login"||x==="setup"?he=s.jsx(Vg,{status:x,onSubmit:_,error:b,busy:C}):x==="checking"?he=s.jsx(Ru,{title:"Authenticating",subtitle:"Verifying session state"}):he=s.jsxs("div",{className:"h-full flex flex-row overflow-hidden bg-[#020202]",children:[s.jsx(Yg,{onNavigate:Qe,onNewTask:Xe,onLogout:v,currentScreen:Ee()}),s.jsxs(rg,{children:[s.jsx(ga,{path:"/",element:s.jsx(Fh,{tasks:N,onNewTask:Xe,onEditTask:ot,onDeleteTask:Be,onExportTasks:V,onImportTasks:Y})}),s.jsx(ga,{path:"/dashboard",element:s.jsx(Fh,{tasks:N,onNewTask:Xe,onEditTask:ot,onDeleteTask:Be,onExportTasks:V,onImportTasks:Y})}),s.jsx(ga,{path:"/tasks/new",element:S?s.jsx(Bp,{currentTask:S,setCurrentTask:p,tasks:N,editorView:K,setEditorView:be,isExecuting:Q,onSave:(I,B)=>U(re,c.pathname,I,B),onRun:()=>L(S,S,p),onRunSnapshot:I=>L(I||S,S,p),results:G,pinnedResults:F,onConfirm:h,onNotify:d,onPinResults:_e,onUnpinResults:Ne,runId:de,onStop:()=>se(S)}):s.jsx(Ru,{title:"Initializing",subtitle:"Preparing task workspace"})}),s.jsx(ga,{path:"/tasks/:id",element:s.jsx(ry,{tasks:N,loadTasks:y,touchTask:w,currentTask:S,setCurrentTask:p,editorView:K,setEditorView:be,isExecuting:Q,onSave:(I,B)=>U(re,c.pathname,I,B),onRun:()=>L(S,S,p),onRunSnapshot:I=>L(I||S,S,p),results:G,pinnedResults:F,onConfirm:h,onNotify:d,onPinResults:_e,onUnpinResults:Ne,runId:de,onStop:()=>se(S),onTaskLoaded:re})}),s.jsx(ga,{path:"/settings",element:s.jsx(Qb,{onClearStorage:ke,onConfirm:h,onNotify:d})}),s.jsx(ga,{path:"/executions",element:s.jsx(Fb,{onConfirm:h,onNotify:d})}),s.jsx(ga,{path:"/executions/:id",element:s.jsx(Wb,{onConfirm:h,onNotify:d})}),s.jsx(ga,{path:"/captures",element:s.jsx(ny,{onConfirm:h,onNotify:d})}),s.jsx(ga,{path:"*",element:s.jsx(qp,{onBack:()=>l("/dashboard")})})]})]}),s.jsxs("div",{className:"h-full",children:[o&&s.jsx(ly,{message:o.message,tone:o.tone,onClose:()=>u(null)}),f&&s.jsx(iy,{request:f,onResolve:m}),he]})}ux.createRoot(document.getElementById("root")).render(s.jsx(Jr.StrictMode,{children:s.jsx(zg,{children:s.jsx(gy,{})})}));
|