heyiam 0.2.24 → 0.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=te(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(ee(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var N=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&&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)},P={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=P,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,N)}catch(e){N(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var ne=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ie=[],ae=-1;function oe(e){return{current:e}}function se(e){0>ae||(e.current=ie[ae],ie[ae]=null,ae--)}function F(e,t){ae++,ie[ae]=e.current,e.current=t}var ce=oe(null),le=oe(null),ue=oe(null),de=oe(null);function fe(e,t){switch(F(ue,t),F(le,e),F(ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}se(ce),F(ce,e)}function pe(){se(ce),se(le),se(ue)}function me(e){e.memoizedState!==null&&F(de,e);var t=ce.current,n=Hd(t,e.type);t!==n&&(F(le,e),F(ce,n))}function he(e){le.current===e&&(se(ce),se(le)),de.current===e&&(se(de),Qf._currentValue=re)}var ge,_e;function ve(e){if(ge===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||``,_e=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+ge+e+_e}var ye=!1;function be(e,t){if(!e||ye)return``;ye=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ye=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ve(n):``}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return ve(e.type);case 16:return ve(`Lazy`);case 13:return e.child!==t&&t!==null?ve(`Suspense Fallback`):ve(`Suspense`);case 19:return ve(`SuspenseList`);case 0:case 15:return be(e.type,!1);case 11:return be(e.type.render,!1);case 1:return be(e.type,!0);case 31:return ve(`Activity`);default:return``}}function Se(e){try{var t=``,n=null;do t+=xe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Ce=Object.prototype.hasOwnProperty,we=t.unstable_scheduleCallback,Te=t.unstable_cancelCallback,Ee=t.unstable_shouldYield,De=t.unstable_requestPaint,Oe=t.unstable_now,ke=t.unstable_getCurrentPriorityLevel,Ae=t.unstable_ImmediatePriority,je=t.unstable_UserBlockingPriority,Me=t.unstable_NormalPriority,Ne=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,Fe=t.log,Ie=t.unstable_setDisableYieldValue,Le=null,Re=null;function ze(e){if(typeof Fe==`function`&&Ie(e),Re&&typeof Re.setStrictMode==`function`)try{Re.setStrictMode(Le,e)}catch{}}var Be=Math.clz32?Math.clz32:Ue,Ve=Math.log,He=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(Ve(e)/He|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(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 Je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(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 Ze(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Be(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Be(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function rt(e,t){var n=t&-t;return n=n&42?1:it(n),(n&(e.suspendedLanes|t))===0?n:0}function it(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 at(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ot(){var e=P.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function st(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var ct=Math.random().toString(36).slice(2),lt=`__reactFiber$`+ct,ut=`__reactProps$`+ct,dt=`__reactContainer$`+ct,ft=`__reactEvents$`+ct,pt=`__reactListeners$`+ct,mt=`__reactHandles$`+ct,ht=`__reactResources$`+ct,gt=`__reactMarker$`+ct;function _t(e){delete e[lt],delete e[ut],delete e[ft],delete e[pt],delete e[mt]}function vt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[lt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function yt(e){if(e=e[lt]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function xt(e){var t=e[ht];return t||=e[ht]={hoistableStyles:new Map,hoistableScripts:new Map},t}function St(e){e[gt]=!0}var Ct=new Set,wt={};function Tt(e,t){Et(e,t),Et(e+`Capture`,t)}function Et(e,t){for(wt[e]=t,e=0;e<t.length;e++)Ct.add(t[e])}var Dt=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]*$`),Ot={},kt={};function At(e){return Ce.call(kt,e)?!0:Ce.call(Ot,e)?!1:Dt.test(e)?kt[e]=!0:(Ot[e]=!0,!1)}function jt(e,t,n){if(At(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Mt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Nt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Pt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ft(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function It(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lt(e){if(!e._valueTracker){var t=Ft(e)?`checked`:`value`;e._valueTracker=It(e,t,``+e[t])}}function Rt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ft(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function zt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Bt=/[\n"\\]/g;function Vt(e){return e.replace(Bt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ht(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Pt(t)):e.value!==``+Pt(t)&&(e.value=``+Pt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Wt(e,o,Pt(n)):Wt(e,o,Pt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Pt(s):e.removeAttribute(`name`)}function Ut(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Lt(e);return}n=n==null?``:``+Pt(n),t=t==null?n:``+Pt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Lt(e)}function Wt(e,t,n){t===`number`&&zt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Gt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Pt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Kt(e,t,n){if(t!=null&&(t=``+Pt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Pt(n)}function qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ne(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Pt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Lt(e)}function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yt=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 Xt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Yt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Xt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Xt(e,o,t[o])}function Qt(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 $t=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`]]),en=/^[\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 tn(e){return en.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function nn(){}var rn=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,sn=null;function cn(e){var t=yt(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ht(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Vt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ut]||null;if(!a)throw Error(i(90));Ht(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Rt(r)}break a;case`textarea`:Kt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Gt(e,!!n.multiple,t,!1)}}}var ln=!1;function un(e,t,n){if(ln)return e(t,n);ln=!0;try{return e(t)}finally{if(ln=!1,(on!==null||sn!==null)&&(bu(),on&&(t=on,e=sn,sn=on=null,cn(t),e)))for(t=0;t<e.length;t++)cn(e[t])}}function dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ut]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var fn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,`passive`,{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return _n=i.slice(e,1<r?1-r:void 0)}function yn(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 bn(){return!0}function xn(){return!1}function Sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?bn:xn,this.isPropagationStopped=xn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wn=Sn(Cn),I=h({},Cn,{view:0,detail:0}),Tn=Sn(I),En,Dn,On,kn=h({},I,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,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!==On&&(On&&e.type===`mousemove`?(En=e.screenX-On.screenX,Dn=e.screenY-On.screenY):Dn=En=0,On=e),En)},movementY:function(e){return`movementY`in e?e.movementY:Dn}}),An=Sn(kn),jn=Sn(h({},kn,{dataTransfer:0})),Mn=Sn(h({},I,{relatedTarget:0})),Nn=Sn(h({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=Sn(h({},Cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=Sn(h({},Cn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={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`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=Sn(h({},I,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=yn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?yn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?yn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=Sn(h({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=Sn(h({},I,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=Sn(h({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=Sn(h({},kn,{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})),Kn=Sn(h({},Cn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=fn&&`CompositionEvent`in window,Yn=null;fn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=fn&&`TextEvent`in window&&!Yn,Zn=fn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=vn(),_n=gn=hn=null,nr=!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 Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={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 or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){on?sn?sn.push(r):sn=[r]:on=r,t=Ed(t,`onChange`),0<t.length&&(n=new wn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){yd(e,0)}function dr(e){if(Rt(bt(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(fn){var mr;if(fn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,an(e)),un(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ce.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function L(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?L(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=zt(e.document)}return t}function R(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 kr=fn&&`documentMode`in document&&11>=document.documentMode,Ar=null,z=null,jr=null,Mr=!1;function Nr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mr||Ar==null||Ar!==zt(r)||(r=Ar,`selectionStart`in r&&R(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),jr&&Tr(jr,r)||(jr=r,r=Ed(z,`onSelect`),0<r.length&&(t=new wn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function B(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var V={animationend:B(`Animation`,`AnimationEnd`),animationiteration:B(`Animation`,`AnimationIteration`),animationstart:B(`Animation`,`AnimationStart`),transitionrun:B(`Transition`,`TransitionRun`),transitionstart:B(`Transition`,`TransitionStart`),transitioncancel:B(`Transition`,`TransitionCancel`),transitionend:B(`Transition`,`TransitionEnd`)},Pr={},Fr={};fn&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete V.animationend.animation,delete V.animationiteration.animation,delete V.animationstart.animation),`TransitionEvent`in window||delete V.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!V[e])return e;var t=V[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,Gr=`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(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),Tt(t,[e])}var qr=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&&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)},Jr=[],Yr=0,Xr=0;function Zr(){for(var e=Yr,t=Xr=Yr=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ti(n,i,a)}}function Qr(e,t,n,r){Jr[Yr++]=e,Jr[Yr++]=t,Jr[Yr++]=n,Jr[Yr++]=r,Xr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $r(e,t,n,r){return Qr(e,t,n,r),ni(e)}function ei(e,t){return Qr(e,null,null,t),ni(e)}function ti(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Be(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function ii(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ci(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function li(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ce.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ai(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ui(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ai(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ai(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ai(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:Se(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:Se(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-Be(r)-1;r&=~(1<<i),n+=1;var a=32-Be(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-Be(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var Ai=null,H=null,U=!1,ji=null,Mi=!1,Ni=Error(i(519));function Pi(e){throw Bi(hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ni}function Fi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[lt]=e,t[ut]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Ut(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=nn),t=!0):t=!1,t||Pi(e,!0)}function Ii(e){for(Ai=e.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:Ai=Ai.return}}function Li(e){if(e!==Ai)return!1;if(!U)return Ii(e),U=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&H&&Pi(e),Ii(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));H=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));H=uf(e)}else t===27?(t=H,Zd(e.type)?(e=lf,lf=null,H=e):H=t):H=Ai?cf(e.stateNode.nextSibling):null;return!0}function Ri(){H=Ai=null,U=!1}function zi(){var e=ji;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),ji=null),e}function Bi(e){ji===null?ji=[e]:ji.push(e)}var Vi=oe(null),Hi=null,Ui=null;function Wi(e,t,n){F(Vi,t._currentValue),t._currentValue=n}function Gi(e){e._currentValue=Vi.current,se(Vi)}function Ki(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function qi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ki(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ki(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ji(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===de.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&qi(t,e,n,r),t.flags|=262144}function Yi(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xi(e){Hi=e,Ui=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zi(e){return W(Hi,e)}function Qi(e,t){return Hi===null&&Xi(e),W(e,t)}function W(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ui===null){if(e===null)throw Error(i(308));Ui=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ui=Ui.next=t;return n}var $i=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ea=t.unstable_scheduleCallback,ta=t.unstable_NormalPriority,na={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ra(){return{controller:new $i,data:new Map,refCount:0}}function ia(e){e.refCount--,e.refCount===0&&ea(ta,function(){e.controller.abort()})}var aa=null,oa=0,sa=0,ca=null;function la(e,t){if(aa===null){var n=aa=[];oa=0,sa=dd(),ca={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return oa++,t.then(ua,ua),t}function ua(){if(--oa===0&&aa!==null){ca!==null&&(ca.status=`fulfilled`);var e=aa;aa=null,sa=0,ca=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function da(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var fa=N.S;N.S=function(e,t){eu=Oe(),typeof t==`object`&&t&&typeof t.then==`function`&&la(e,t),fa!==null&&fa(e,t)};var pa=oe(null);function ma(){var e=pa.current;return e===null?Rl.pooledCache:e}function ha(e,t){t===null?F(pa,pa.current):F(pa,t.pool)}function ga(){var e=ma();return e===null?null:{parent:na._currentValue,pool:e}}var _a=Error(i(460)),va=Error(i(474)),ya=Error(i(542)),ba={then:function(){}};function xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Sa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nn,nn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e;default:if(typeof t.status==`string`)t.then(nn,nn);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e}throw wa=t,_a}}function Ca(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(wa=e,_a):e}}var wa=null;function Ta(){if(wa===null)throw Error(i(459));var e=wa;return wa=null,e}function Ea(e){if(e===_a||e===ya)throw Error(i(483))}var Da=null,Oa=0;function ka(e){var t=Oa;return Oa+=1,Da===null&&(Da=[]),Sa(Da,e,t)}function Aa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ja(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ma(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=si(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ca(i)===t.type)?(t=a(t,n.props),Aa(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Aa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ui(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=li(t.type,t.key,t.props,null,e.mode,n),Aa(n,t),n.return=e,n;case v:return t=pi(t,e.mode,n),t.return=e,t;case O:return t=Ca(t),f(e,t,n)}if(ne(t)||ee(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ka(t),n);if(t.$$typeof===C)return f(e,Qi(e,t),n);ja(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ca(n),p(e,t,n,r)}if(ne(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ka(n),r);if(n.$$typeof===C)return p(e,t,Qi(e,n),r);ja(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ca(r),m(e,t,n,r,i)}if(ne(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ka(r),i);if(r.$$typeof===C)return m(e,t,n,Qi(t,r),i);ja(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),U&&Ti(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return U&&Ti(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),U&&Ti(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),U&&Ti(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return U&&Ti(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),U&&Ti(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=pi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ca(o),b(e,r,o,c)}if(ne(o))return h(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ka(o),c);if(o.$$typeof===C)return b(e,r,Qi(e,o),c);ja(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=b(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Fa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ga(n[e],t)}var qa=oe(null),Ja=oe(0);function Ya(e,t){e=Ul,F(Ja,e),F(qa,t),Ul=e|t.baseLanes}function Xa(){F(Ja,Ul),F(qa,qa.current)}function Za(){Ul=Ja.current,se(qa),se(Ja)}var Qa=oe(null),$a=null;function eo(e){var t=e.alternate;F(ao,ao.current&1),F(Qa,e),$a===null&&(t===null||qa.current!==null||t.memoizedState!==null)&&($a=e)}function to(e){F(ao,ao.current),F(Qa,e),$a===null&&($a=e)}function no(e){e.tag===22?(F(ao,ao.current),F(Qa,e),$a===null&&($a=e)):ro(e)}function ro(){F(ao,ao.current),F(Qa,Qa.current)}function io(e){se(Qa),$a===e&&($a=null),se(ao)}var ao=oe(0);function oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))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)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 so=0,G=null,K=null,co=null,lo=!1,uo=!1,fo=!1,po=0,mo=0,ho=null,go=0;function _o(){throw Error(i(321))}function vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function yo(e,t,n,r,i,a){return so=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Is:Ls,fo=!1,a=n(r,i),fo=!1,uo&&(a=xo(t,n,r,i)),bo(e),a}function bo(e){N.H=Fs;var t=K!==null&&K.next!==null;if(so=0,co=K=G=null,lo=!1,mo=0,ho=null,t)throw Error(i(300));e===null||ec||(e=e.dependencies,e!==null&&Yi(e)&&(ec=!0))}function xo(e,t,n,r){G=e;var a=0;do{if(uo&&(ho=null),mo=0,uo=!1,25<=a)throw Error(i(301));if(a+=1,co=K=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Rs,o=t(n,r)}while(uo);return o}function So(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?ko(t):t,e=e.useState()[0],(K===null?null:K.memoizedState)!==e&&(G.flags|=1024),t}function Co(){var e=po!==0;return po=0,e}function wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function To(e){if(lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lo=!1}so=0,co=K=G=null,uo=!1,mo=po=0,ho=null}function Eo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return co===null?G.memoizedState=co=e:co=co.next=e,co}function Do(){if(K===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=K.next;var t=co===null?G.memoizedState:co.next;if(t!==null)co=t,K=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));K=e,e={memoizedState:K.memoizedState,baseState:K.baseState,baseQueue:K.baseQueue,queue:K.queue,next:null},co===null?G.memoizedState=co=e:co=co.next=e}return co}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ko(e){var t=mo;return mo+=1,ho===null&&(ho=[]),e=Sa(ho,e,t),t=G,(co===null?t.memoizedState:co.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Is:Ls),e}function Ao(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ko(e);if(e.$$typeof===C)return Zi(e)}throw Error(i(438,String(e)))}function jo(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Oo(),G.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Mo(e,t){return typeof t==`function`?t(e):t}function No(e){return Po(Do(),K,e)}function Po(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(so&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===sa&&(d=!0);else if((so&p)===p){u=u.next,p===sa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,G.lanes|=p,Gl|=p;f=u.action,fo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,G.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(ec=!0,d&&(n=ca,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Fo(e){var t=Do(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);wr(o,t.memoizedState)||(ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Io(e,t,n){var r=G,a=Do(),o=U;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!wr((K||a).memoizedState,n);if(s&&(a.memoizedState=n,ec=!0),a=a.queue,ss(zo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||co!==null&&co.memoizedState.tag&1){if(r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||so&127||Lo(r,t,n)}return n}function Lo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=Oo(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Bo(t)&&Vo(e)}function zo(e,t,n){return n(function(){Bo(t)&&Vo(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Vo(e){var t=ei(e,2);t!==null&&hu(t,e,2)}function Ho(e){var t=Eo();if(typeof e==`function`){var n=e;if(e=n(),fo){ze(!0);try{n()}finally{ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:e},t}function Uo(e,t,n,r){return e.baseState=n,Po(e,K,typeof r==`function`?r:Mo)}function Wo(e,t,n,r,a){if(Ms(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Go(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Go(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Ko(e,t,s)}catch(n){Jo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Ko(e,t,a)}catch(n){Jo(e,t,n)}}function Ko(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){qo(e,t,n)},function(n){return Jo(e,t,n)}):qo(e,t,n)}function qo(e,t,n){t.status=`fulfilled`,t.value=n,Yo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Go(e,n)))}function Jo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Yo(t),t=t.next;while(t!==r)}e.action=null}function Yo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xo(e,t){return t}function Zo(e,t){if(U){var n=Rl.formState;if(n!==null){a:{var r=G;if(U){if(H){b:{for(var i=H,a=Mi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){H=cf(i.nextSibling),r=i.data===`F!`;break a}}Pi(r)}r=!1}r&&(t=n[0])}}return n=Eo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:t},n.queue=r,n=ks.bind(null,G,r),r.dispatch=n,r=Ho(!1),a=js.bind(null,G,!1,r.queue),r=Eo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Wo.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Qo(e){return $o(Do(),K,e)}function $o(e,t,n){if(t=Po(e,t,Xo)[0],e=No(Mo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ko(t)}catch(e){throw e===_a?ya:e}else r=t;t=Do();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,ns(9,{destroy:void 0},es.bind(null,i,n),null)),[r,a,e]}function es(e,t){e.action=t}function ts(e){var t=Do(),n=K;if(n!==null)return $o(t,n,e);Do(),t=t.memoizedState,n=Do();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=Oo(),G.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function rs(){return Do().memoizedState}function is(e,t,n,r){var i=Eo();G.flags|=e,i.memoizedState=ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function as(e,t,n,r){var i=Do();r=r===void 0?null:r;var a=i.memoizedState.inst;K!==null&&r!==null&&vo(r,K.memoizedState.deps)?i.memoizedState=ns(t,a,n,r):(G.flags|=e,i.memoizedState=ns(1|t,a,n,r))}function os(e,t){is(8390656,8,e,t)}function ss(e,t){as(2048,8,e,t)}function cs(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=Oo(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Do().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(q&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return as(4,2,e,t)}function ds(e,t){return as(4,4,e,t)}function fs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){n=n==null?null:n.concat([e]),as(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&vo(t,r[1]))return r[0];if(r=e(),fo){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||so&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),G.lanes|=e,Gl|=e,n)}function vs(e,t,n,r){return wr(n,t)?n:qa.current===null?!(so&42)||so&1073741824&&!(Y&261930)?(ec=!0,e.memoizedState=n):(e=mu(),G.lanes|=e,Gl|=e,t):(e=_s(e,n,r),wr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,js(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,da(c,r),pu(e)):As(e,t,r,pu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ss(e).queue;ys(e,a,t,re,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},pu())}function ws(){return Zi(Qf)}function Ts(){return Do().memoizedState}function Es(){return Do().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ra(n);var r=za(t,e,n);r!==null&&(hu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=$r(e,t,n,r),n!==null&&(hu(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,pu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return Qr(e,t,i,0),Rl===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return hu(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(i(479))}else t=$r(e,n,r,2),t!==null&&hu(t,e,2)}function Ms(e){var t=e.alternate;return e===G||t!==null&&t===G}function Ns(e,t){uo=lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Fs={readContext:Zi,use:Ao,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useLayoutEffect:_o,useInsertionEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useSyncExternalStore:_o,useId:_o,useHostTransitionStatus:_o,useFormState:_o,useActionState:_o,useOptimistic:_o,useMemoCache:_o,useCacheRefresh:_o};Fs.useEffectEvent=_o;var Is={readContext:Zi,use:Ao,useCallback:function(e,t){return Eo().memoizedState=[e,t===void 0?null:t],e},useContext:Zi,useEffect:os,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),is(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var n=Eo();t=t===void 0?null:t;var r=e();if(fo){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Eo();if(n!==void 0){var i=n(t);if(fo){ze(!0);try{n(t)}finally{ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=Eo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=ks.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Eo(),e,t)},useTransition:function(){var e=Ho(!1);return e=ys.bind(null,G,e.queue,!0,!1),Eo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=Eo();if(U){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Y&127||Lo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,os(zo.bind(null,r,o,e),[e]),r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,o,n,t),null),n},useId:function(){var e=Eo(),t=Rl.identifierPrefix;if(U){var n=wi,r=Ci;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=po++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=Eo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:jo,useCacheRefresh:function(){return Eo().memoizedState=Ds.bind(null,G)},useEffectEvent:function(e){var t=Eo(),n={impl:e};return t.memoizedState=n,function(){if(q&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:Zi,use:Ao,useCallback:hs,useContext:Zi,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:No,useRef:rs,useState:function(){return No(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Do(),K.memoizedState,e,t)},useTransition:function(){var e=No(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){return Uo(Do(),K,e,t)},useMemoCache:jo,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:Zi,use:Ao,useCallback:hs,useContext:Zi,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Fo,useRef:rs,useState:function(){return Fo(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Do();return K===null?_s(n,e,t):vs(n,K.memoizedState,e,t)},useTransition:function(){var e=Fo(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){var n=Do();return K===null?(n.baseState=e,[e,n.queue.dispatch]):Uo(n,K,e,t)},useMemoCache:jo,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ra(r);i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(hu(t,e,r),Ba(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ra(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(hu(t,e,r),Ba(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ra(n);r.tag=2,t!=null&&(r.callback=t),t=za(e,r,n),t!==null&&(hu(t,e,n),Ba(t,e,n))}};function Vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Hs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Us(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ws(e){qr(e)}function Gs(e){console.error(e)}function Ks(e){qr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){return n=Ra(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=Ra(e),e.tag=3,e}function Zs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ji(t,n,a,!0),n=Qa.current,n!==null){switch(n.tag){case 31:case 13:return $a===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(U)return t=Qa.current,t===null?(r!==Ni&&(t=Error(i(423),{cause:r}),Bi(hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=hi(r,n),a=Ys(e.stateNode,r,a),Va(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ni&&(e=Error(i(422),{cause:r}),Bi(hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=hi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ys(n.stateNode,r,e),Va(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xs(a),Zs(a,e,n,r),Va(n,a),!1}n=n.return}while(n!==null);return!1}var $s=Error(i(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?Pa(t,null,n,r):Na(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Xi(t),r=yo(e,t,n,o,a,i),s=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(U&&s&&Di(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Dc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Ec(e,t,i)}return t.flags|=1,e=si(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Dc(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Ec(e,t,i)}return fc(e,t,n,r,i)}function ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ha(t,a===null?null:a.cachePool),a===null?Xa():Ya(t,a),no(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ha(t,null),Xa(),ro(t)):(ha(t,a.cachePool),Ya(t,a),ro(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=ma();return a=a===null?null:{parent:na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ha(t,null),Xa(),no(t),e!==null&&Ji(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return Na(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,io(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(U){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if(to(t),(e=H)?(e=rf(e,Mi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,H=null)):e=null,e===null)throw Pi(t);return t.lanes=536870912,null}return cc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(to(t),a)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ec||Ji(e,t,n,!1),a=(n&e.childLanes)!==0,ec||a){if(r=Rl,r!==null&&(s=rt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ei(e,s),hu(r,e,s),$s;Du(),t=lc(e,t,n)}else e=o.treeContext,H=cf(s.nextSibling),Ai=t,U=!0,ji=null,Mi=!1,e!==null&&ki(t,e),t=cc(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return Xi(t),n=yo(e,t,n,r,void 0,i),r=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(U&&r&&Di(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return Xi(t),t.updateQueue=null,n=xo(t,r,n,i),bo(e),r=Co(),e!==null&&!ec?(wo(e,t,a),Ec(e,t,a)):(U&&r&&Di(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(Xi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=Zi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ia(t),o=n.contextType,a.context=typeof o==`object`&&o?Zi(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Bs.enqueueReplaceState(a,a.state,null),Wa(t,r,a,i),Ua(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=Zi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Hs(t,a,r,o),Fa=!1;var f=t.memoizedState;a.state=f,Wa(t,r,a,i),Ua(),l=t.memoizedState,s||f!==l||Fa?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Fa||Vs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,La(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=Zi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Hs(t,a,r,c),Fa=!1,f=t.memoizedState,a.state=f,Wa(t,r,a,i),Ua();var p=t.memoizedState;o!==d||f!==p||Fa||e!==null&&e.dependencies!==null&&Yi(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Fa||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Yi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,dc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Na(t,e.child,null,i),t.child=Na(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ec(e,t,i),e}function hc(e,t,n,r){return Ri(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:ga()}}function vc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function yc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ao.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(U){if(a?eo(t):ro(t),(e=H)?(e=rf(e,Mi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,H=null)):e=null,e===null)throw Pi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ro(t),a=t.mode,c=xc({mode:`hidden`,children:c},a),r=ui(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(null,r)):(eo(t),bc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(eo(t),t.flags&=-257,t=Sc(e,t,n)):t.memoizedState===null?(ro(t),c=r.fallback,a=t.mode,r=xc({mode:`visible`,children:r.children},a),c=ui(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Na(t,e.child,null,n),r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,t=oc(null,r)):(ro(t),t.child=e.child,t.flags|=128,t=null);else if(eo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Bi({value:r,source:null,stack:null}),t=Sc(e,t,n)}else if(ec||Ji(e,t,n,!1),s=(n&e.childLanes)!==0,ec||s){if(s=Rl,s!==null&&(r=rt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ei(e,r),hu(s,e,r),$s;af(c)||Du(),t=Sc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,H=cf(c.nextSibling),Ai=t,U=!0,ji=null,Mi=!1,e!==null&&ki(t,e),t=bc(t,r.children),t.flags|=4096);return t}return a?(ro(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,a,n,null),c.flags|=2):c=si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=_c(n):(a=c.cachePool,a===null?a=ga():(l=na._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(e.child,r)):(eo(t),n=e.child,e=n.sibling,n=si(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function bc(e,t){return t=xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function xc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function Sc(e,t,n){return Na(t,e.child,null,n),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ki(e.return,t,n)}function wc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Tc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ao.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,F(ao,o),tc(e,t,r,n),r=U?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cc(e,n,t);else if(e.tag===19)Cc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wc(t,!0,n,null,a,r);break;case`together`:wc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ji(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Yi(e))):!0}function Oc(e,t,n){switch(t.tag){case 3:fe(t,t.stateNode.containerInfo),Wi(t,na,e.memoizedState.cache),Ri();break;case 27:case 5:me(t);break;case 4:fe(t,t.stateNode.containerInfo);break;case 10:Wi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,to(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(eo(t),e=Ec(e,t,n),e===null?null:e.sibling):yc(e,t,n):(eo(t),t.flags|=128,null);eo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Ji(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Tc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),F(ao,ao.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Wi(t,na,e.memoizedState.cache)}return Ec(e,t,n)}function kc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Dc(e,n)&&!(t.flags&128))return ec=!1,Oc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,U&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ca(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=nc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=M(e)||e,Error(i(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Us(r,t.pendingProps),mc(e,t,r,a,n);case 3:a:{if(fe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,La(e,t),Wa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Wi(t,na,r),r!==o.cache&&qi(t,[na],n,!0),Ua(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==a){a=hi(Error(i(424)),t),Bi(a),t=hc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(H=cf(e.firstChild),Ai=t,U=!0,ji=null,Mi=!0,n=Pa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ri(),r===a){t=Ec(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:U||(n=t.type,e=t.pendingProps,r=Bd(ue.current).createElement(n),r[lt]=t,r[ut]=e,Pd(r,n,e),St(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return me(t),e===null&&U&&(r=t.stateNode=ff(t.type,t.pendingProps,ue.current),Ai=t,Mi=!0,a=H,Zd(t.type)?(lf=a,H=cf(r.firstChild)):H=a),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&U&&((a=r=H)&&(r=tf(r,t.type,t.pendingProps,Mi),r===null?a=!1:(t.stateNode=r,Ai=t,H=cf(r.firstChild),Mi=!1,a=!0)),a||Pi(t)),me(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=yo(e,t,So,null,null,n),Qf._currentValue=a),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&U&&((e=n=H)&&(n=nf(n,t.pendingProps,Mi),n===null?e=!1:(t.stateNode=n,Ai=t,H=null,e=!0)),e||Pi(t)),null;case 13:return yc(e,t,n);case 4:return fe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Na(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Wi(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Xi(t),a=Zi(a),r=r(a),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return Tc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return Xi(t),r=Zi(na),e===null?(a=ma(),a===null&&(a=Rl,o=ra(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ia(t),Wi(t,na,a)):((e.lanes&n)!==0&&(La(e,t),Wa(t,null,null,n),Ua()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Wi(t,na,r),r!==a.cache&&qi(t,[na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Wi(t,na,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ac(e){e.flags|=4}function jc(e,t,n,r,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(wu())e.flags|=8192;else throw wa=ba,va}else e.flags&=-16777217}function Mc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw wa=ba,va}function Nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ze(),e.lanes|=t,Yl|=t)}function Pc(e,t){if(!U)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ic(e,t,n){var r=t.pendingProps;switch(Oi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fc(t),null;case 1:return Fc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Gi(na),pe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Li(t)?Ac(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zi())),Fc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ac(t),o===null?(Fc(t),jc(t,a,null,r,n)):(Fc(t),Mc(t,o))):o?o===e.memoizedState?(Fc(t),t.flags&=-16777217):(Ac(t),Fc(t),Mc(t,o)):(e=e.memoizedProps,e!==r&&Ac(t),Fc(t),jc(t,a,e,r,n)),null;case 27:if(he(t),n=ue.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Fc(t),null}e=ce.current,Li(t)?Fi(t,e):(e=ff(a,r,n),t.stateNode=e,Ac(t))}return Fc(t),null;case 5:if(he(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Fc(t),null}if(o=ce.current,Li(t))Fi(t,o);else{var s=Bd(ue.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[lt]=t,o[ut]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ue.current,Li(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ai,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[lt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Pi(t,!0)}else e=Bd(e).createTextNode(r),e[lt]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Li(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[lt]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(i(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Li(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[lt]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),a=!1}else a=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(io(t),t):(io(t),null)}return io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return pe(),e===null&&Sd(t.stateNode.containerInfo),Fc(t),null;case 10:return Gi(t.type),Fc(t),null;case 19:if(se(ao),r=t.memoizedState,r===null)return Fc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Pc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(e),o!==null){for(t.flags|=128,Pc(r,!1),e=o.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return F(ao,ao.current&1|2),U&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Oe()>tu&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304)}else{if(!a)if(e=oo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!U)return Fc(t),null}else 2*Oe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Oe(),e.sibling=null,n=ao.current,F(ao,a?n&1|2:n&1),U&&Ti(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&se(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gi(na),Fc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Lc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gi(na),pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(ao),null;case 4:return pe(),null;case 10:return Gi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&se(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gi(na),null;case 25:return null;default:return null}}function Rc(e,t){switch(Oi(t),t.tag){case 3:Gi(na),pe();break;case 26:case 27:case 5:he(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:se(ao);break;case 10:Gi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&se(pa);break;case 24:Gi(na)}}function zc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Bc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Z(e,e.return,t)}}}function Hc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Uc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Gc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ut]=t}catch(t){Z(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(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&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[lt]=e,t[ut]=n}catch(t){Z(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,nl=null;function rl(e,t){if(e=e.containerInfo,Rd=sp,e=Or(e),R(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,nl=t;nl!==null;)if(t=nl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,nl=e;else for(;nl!==null;){switch(t=nl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Us(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,nl=e;break}nl=t.return}}function il(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:yl(e,n),r&4&&zc(5,n);break;case 1:if(yl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Vc(n),r&512&&Uc(n,n.return);break;case 3:if(yl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ka(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Zc(n);case 26:case 5:yl(e,n),t===null&&r&4&&Gc(n),r&512&&Uc(n,n.return);break;case 12:yl(e,n);break;case 31:yl(e,n),r&4&&ul(e,n);break;case 13:yl(e,n),r&4&&dl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Qc,!r){t=t!==null&&t.memoizedState!==null||$c,i=Qc;var a=$c;Qc=r,($c=t)&&!a?xl(e,n,(n.subtreeFlags&8772)!=0):yl(e,n),Qc=i,$c=a}break;case 30:break;default:yl(e,n)}}function al(e){var t=e.alternate;t!==null&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_t(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 ol=null,sl=!1;function cl(e,t,n){for(n=n.child;n!==null;)ll(e,t,n),n=n.sibling}function ll(e,t,n){if(Re&&typeof Re.onCommitFiberUnmount==`function`)try{Re.onCommitFiberUnmount(Le,n)}catch{}switch(n.tag){case 26:$c||Wc(n,t),cl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$c||Wc(n,t);var r=ol,i=sl;Zd(n.type)&&(ol=n.stateNode,sl=!1),cl(e,t,n),pf(n.stateNode),ol=r,sl=i;break;case 5:$c||Wc(n,t);case 6:if(r=ol,i=sl,ol=null,cl(e,t,n),ol=r,sl=i,ol!==null)if(sl)try{(ol.nodeType===9?ol.body:ol.nodeName===`HTML`?ol.ownerDocument.body:ol).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{ol.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:ol!==null&&(sl?(e=ol,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(ol,n.stateNode));break;case 4:r=ol,i=sl,ol=n.stateNode.containerInfo,sl=!0,cl(e,t,n),ol=r,sl=i;break;case 0:case 11:case 14:case 15:Bc(2,n,t),$c||Bc(4,n,t),cl(e,t,n);break;case 1:$c||(Wc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Hc(n,t,r)),cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:$c=(r=$c)||n.memoizedState!==null,cl(e,t,n),$c=r;break;default:cl(e,t,n)}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function fl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tl),t;default:throw Error(i(435,e.tag))}}function pl(e,t){var n=fl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function ml(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){ol=c.stateNode,sl=!1;break a}break;case 5:ol=c.stateNode,sl=!1;break a;case 3:case 4:ol=c.stateNode.containerInfo,sl=!0;break a}c=c.return}if(ol===null)throw Error(i(160));ll(o,s,a),ol=null,sl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gl(t,e),t=t.sibling}var hl=null;function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ml(t,e),_l(e),r&4&&(Bc(3,e,e.return),zc(3,e),Bc(5,e,e.return));break;case 1:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&64&&Qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=hl;if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[gt]||o[lt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[lt]=e,St(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[lt]=e,St(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Kc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),n!==null&&r&4&&Kc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),e.flags&32){a=e.stateNode;try{Jt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Kc(e,a,n===null?a:n.memoizedProps)),r&1024&&(el=!0);break;case 6:if(ml(t,e),_l(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=hl,hl=gf(t.containerInfo),ml(t,e),hl=a,_l(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}el&&(el=!1,vl(e));break;case 4:r=hl,hl=gf(e.stateNode.containerInfo),ml(t,e),_l(e),hl=r;break;case 12:ml(t,e),_l(e);break;case 31:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 13:ml(t,e),_l(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Oe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Qc,d=$c;if(Qc=u||a,$c=d||l,ml(t,e),$c=d,Qc=u,_l(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Qc||$c||bl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,pl(e,n))));break;case 19:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 30:break;case 21:break;default:ml(t,e),_l(e)}}function _l(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Xc(e,Jc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Jt(o,``),n.flags&=-33),Xc(e,Jc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Yc(e,Jc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)il(e,t.alternate,t),t=t.sibling}function bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bc(4,t,t.return),bl(t);break;case 1:Wc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Hc(t,t.return,n),bl(t);break;case 27:pf(t.stateNode);case 26:case 5:Wc(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}e=e.sibling}}function xl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:xl(i,a,n),zc(4,a);break;case 1:if(xl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ga(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Vc(a),Uc(a,a.return);break;case 27:Zc(a);case 26:case 5:xl(i,a,n),n&&r===null&&o&4&&Gc(a),Uc(a,a.return);break;case 12:xl(i,a,n);break;case 31:xl(i,a,n),n&&o&4&&ul(i,a);break;case 13:xl(i,a,n),n&&o&4&&dl(i,a);break;case 22:a.memoizedState===null&&xl(i,a,n),Uc(a,a.return);break;case 30:break;default:xl(i,a,n)}t=t.sibling}}function Sl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ia(n))}function Cl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e))}function wl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tl(e,t,n,r),t=t.sibling}function Tl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,n,r),i&2048&&zc(9,t);break;case 1:wl(e,t,n,r);break;case 3:wl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e)));break;case 12:if(i&2048){wl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else wl(e,t,n,r);break;case 31:wl(e,t,n,r);break;case 13:wl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?wl(e,t,n,r):(a._visibility|=2,El(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?wl(e,t,n,r):Dl(e,t),i&2048&&Sl(o,t);break;case 24:wl(e,t,n,r),i&2048&&Cl(t.alternate,t);break;default:wl(e,t,n,r)}}function El(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:El(a,o,s,c,i),zc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,El(a,o,s,c,i)):u._visibility&2?El(a,o,s,c,i):Dl(a,o),i&&l&2048&&Sl(o.alternate,o);break;case 24:El(a,o,s,c,i),i&&l&2048&&Cl(o.alternate,o);break;default:El(a,o,s,c,i)}t=t.sibling}}function Dl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Dl(n,r),i&2048&&Sl(r.alternate,r);break;case 24:Dl(n,r),i&2048&&Cl(r.alternate,r);break;default:Dl(n,r)}t=t.sibling}}var Ol=8192;function kl(e,t,n){if(e.subtreeFlags&Ol)for(e=e.child;e!==null;)Al(e,t,n),e=e.sibling}function Al(e,t,n){switch(e.tag){case 26:kl(e,t,n),e.flags&Ol&&e.memoizedState!==null&&Gf(n,hl,e.memoizedState,e.memoizedProps);break;case 5:kl(e,t,n);break;case 3:case 4:var r=hl;hl=gf(e.stateNode.containerInfo),kl(e,t,n),hl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ol,Ol=16777216,kl(e,t,n),Ol=r):kl(e,t,n));break;default:kl(e,t,n)}}function jl(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 Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nl(e),e=e.sibling}function Nl(e){switch(e.tag){case 0:case 11:case 15:Ml(e),e.flags&2048&&Bc(9,e,e.return);break;case 3:Ml(e);break;case 12:Ml(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Pl(e)):Ml(e);break;default:Ml(e)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bc(8,t,t.return),Pl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Pl(t));break;default:Pl(t)}e=e.sibling}}function Fl(e,t){for(;nl!==null;){var n=nl;switch(n.tag){case 0:case 11:case 15:Bc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ia(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nl=r;else a:for(n=e;nl!==null;){r=nl;var i=r.sibling,a=r.return;if(al(r),r===n){nl=null;break a}if(i!==null){i.return=a,nl=i;break a}nl=a}}}var Il={getCacheForType:function(e){var t=Zi(na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Zi(na).controller.signal}},Ll=typeof WeakMap==`function`?WeakMap:Map,q=0,Rl=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return q&2&&Y!==0?Y&-Y:N.T===null?ot():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||U){var e=Ge;Ge<<=1,!(Ge&3932160)&&(Ge=262144),Jl=e}else Jl=536870912;return e=Qa.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===Rl&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),$e(e,n),(!(q&2)||e!==Rl)&&(e===Rl&&(!(q&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(q&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ye(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Oe(),10<a)){if(yu(r,t,Jl,!Bl),Je(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},Al(t,a,d);var m=(a&62914560)===a?$l-Oe():(a&4194048)===a?eu-Oe():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Be(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function bu(){return q&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Ui=Hi=null,To(e),Da=null,Oa=0,e=J;for(;e!==null;)Rc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),Rl=e,J=n=si(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Ye(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Be(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Zr(),n}function Cu(e,t){G=null,N.H=Fs,t===_a||t===ya?(t=Ta(),X=3):t===va?(t=Ta(),X=4):X=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,qs(e,hi(t,e.current)))}function wu(){var e=Qa.current;return e===null?!0:(Y&4194048)===Y?$a===null:(Y&62914560)===Y||Y&536870912?e===$a:!1}function Tu(){var e=N.H;return N.H=Fs,e===null?Fs:e}function Eu(){var e=N.A;return N.A=Il,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&Qa.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||Rl===null||yu(Rl,Y,Jl,!1)}function Ou(e,t,n){var r=q;q|=2;var i=Tu(),a=Eu();(Rl!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:Qa.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ui=Hi=null,q=r,N.H=i,N.A=a,J===null&&(Rl=null,Y=0,Zr()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=q;q|=2;var r=Tu(),a=Eu();Rl!==e||Y!==t?(nu=null,tu=Oe()+500,Su(e,t)):Vl=Ye(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(xa(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||Rl!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:xa(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Ui=Hi=null,N.H=r,N.A=a,q=n,J===null?(Rl=null,Y=0,Zr(),Wl):0}function ju(){for(;J!==null&&!Ee();)Mu(J)}function Mu(e){var t=kc(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:To(t);default:Rc(n,t),t=J=ci(t,Ul),t=kc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Ui=Hi=null,To(t),Da=null,Oa=0;var i=t.return;try{if(Qs(e,i,t,n,Y)){Wl=1,qs(e,hi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,qs(e,hi(n,e.current)),J=null;return}t.flags&32768?(U||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Ic(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Lc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(q&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Xr,et(e,n,o,s,c,l),e===Rl&&(J=Rl=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Me,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=q,q|=4;try{rl(e,t,n)}finally{q=s,P.p=a,N.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=q;q|=4;try{gl(t,e);var a=zd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&L(s.ownerDocument.documentElement,s)){if(c!==null&&R(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{q=i,P.p=r,N.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=q;q|=4;try{il(e,t.alternate,t)}finally{q=i,P.p=r,N.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,De();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),at(n),t=t.stateNode,Re&&typeof Re.onCommitFiberRoot==`function`)try{Re.onCommitFiberRoot(Le,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{N.T=t,P.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ia(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=at(su),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,q&6)throw Error(i(331));var c=q;if(q|=4,Nl(o.current),Tl(o,o.current,s,n),q=c,id(0,!1),Re&&typeof Re.onPostCommitFiberRoot==`function`)try{Re.onPostCommitFiberRoot(Le,o)}catch{}return!0}finally{P.p=a,N.T=r,Vu(e,t)}}function Wu(e,t,n){t=hi(n,t),t=Ys(e.stateNode,t,2),e=za(e,t,2),e!==null&&($e(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=hi(n,e),n=Xs(2),r=za(t,n,2),r!==null&&(Zs(n,r,t,e),$e(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Oe()-$l?!(q&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Ze()),e=ei(e,t),e!==null&&($e(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return we(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Be(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Je(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ye(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Oe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Be(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Xe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Y,n=Je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Te(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ye(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Te(r),at(n)){case 2:case 8:n=je;break;case 32:n=Me;break;case 268435456:n=Pe;break;default:n=Me}return r=cd.bind(null,e),n=we(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Te(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Je(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Oe()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){q&6?we(Ae,ad):od()})}function dd(){if(nd===0){var e=sa;e===0&&(e=We,We<<=1,!(We&261888)&&(We=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:tn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ut]||null).action),o=r.submitter;o&&(t=(t=o[ut]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new wn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Gr.length;hd++){var gd=Gr[hd];Kr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Kr(Lr,`onAnimationEnd`),Kr(Rr,`onAnimationIteration`),Kr(zr,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Br,`onTransitionRun`),Kr(Vr,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),Et(`onMouseEnter`,[`mouseout`,`mouseover`]),Et(`onMouseLeave`,[`mouseout`,`mouseover`]),Et(`onPointerEnter`,[`pointerout`,`pointerover`]),Et(`onPointerLeave`,[`pointerout`,`pointerover`]),Tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[ft];n===void 0&&(n=t[ft]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Ct.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!pn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=vt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}un(function(){var r=a,i=an(n),s=[];a:{var c=Wr.get(e);if(c!==void 0){var l=wn,u=e;switch(e){case`keypress`:if(yn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Lr:case Rr:case zr:l=Nn;break;case Ur:l=Wn;break;case`scroll`:case`scrollend`:l=Tn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=dn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==rn&&(u=n.relatedTarget||n.fromElement)&&(vt(u)||u[dt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?vt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:bt(l),h=u==null?c:bt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,vt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c))if(pr)v=Sr;else{v=br;var y=yr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Qt(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Wt(c,`number`,c.value)}switch(y=r?bt(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Ar=y,z=r,jr=null);break;case`focusout`:jr=z=Ar=null;break;case`mousedown`:Mr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Mr=!1,Nr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Nr(s,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=vn()):(hn=i,gn=`value`in hn?hn.value:hn.textContent,nr=!0)),y=Ed(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=dn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=dn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=dn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=dn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9
+ `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Jt(e,``+r);break;case`className`:Mt(e,`class`,r);break;case`tabIndex`:Mt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Mt(e,n,r);break;case`style`:Zt(e,r,o);break;case`data`:if(t!==`object`){Mt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=tn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),jt(e,`popover`,r);break;case`xlinkActuate`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:jt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=$t.get(n)||n,jt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Zt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Jt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!wt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):jt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Ut(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Gt(e,!!r,n,!0):Gt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}qt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(Qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Ht(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Gt(e,!!n,n?[]:``,!1):Gt(e,!!n,t,!0)):Gt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Kt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(Qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[gt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==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(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=P.d;P.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Vt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Vt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Vt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Vt(n.imageSizes)+`"]`)):i+=`[href="`+Vt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Vt(r)+`"][href="`+Vt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),St(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=xt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);St(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=xt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),St(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=xt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),St(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ue.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=xt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=xt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=xt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Vt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),St(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Vt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Vt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,St(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),St(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[gt]||a[lt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===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;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){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=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ai(3,null,null,t),e.current=a,a.stateNode=e,t=ra(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ia(a),e}function tp(e){return e?(e=ri,e):ri}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ra(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=za(e,r,t),n!==null&&(hu(n,e,t),Ba(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ei(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=it(t);var n=ei(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,up(e,t,n,r)}finally{P.p=a,N.T=i}}function lp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,up(e,t,n,r)}finally{P.p=a,N.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Be(o);s.entanglements[1]|=c,o&=~c}rd(a),!(q&6)&&(tu=Oe()+500,id(0,!1))}}break;case 31:case 13:s=ei(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=an(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=vt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(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(ke()){case Ae:return 2;case je:return 8;case Me:case Ne:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=yt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=vt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,st(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,st(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rn=r,n.target.dispatchEvent(r),rn=null}else return t=yt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ut]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[dt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.4`)throw Error(i(527,Lp,`19.2.4`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Le=zp.inject(Rp),Re=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ws,s=Gs,c=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[dt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()}))(),_=u(),v=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.memo`),c=Symbol.for(`react.lazy`),l=Symbol.iterator;function u(e){return typeof e!=`object`||!e?null:(e=l&&e[l]||e[`@@iterator`],typeof e==`function`?e:null)}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,p={};function m(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||d}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function h(){}h.prototype=m.prototype;function g(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||d}var _=g.prototype=new h;_.constructor=g,f(_,m.prototype),_.isPureReactComponent=!0;var v=Array.isArray;function y(){}var b={H:null,A:null,T:null,S:null},x=Object.prototype.hasOwnProperty;function S(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function C(e,t){return S(e.type,t,e.props)}function w(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function T(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var E=/\/+/g;function D(e,t){return typeof e==`object`&&e&&e.key!=null?T(``+e.key):t.toString(36)}function O(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(y,y):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var l=!1;if(e===null)l=!0;else switch(s){case`bigint`:case`string`:case`number`:l=!0;break;case`object`:switch(e.$$typeof){case t:case n:l=!0;break;case c:return l=e._init,k(l(e._payload),r,i,a,o)}}if(l)return o=o(e),l=a===``?`.`+D(e,0):a,v(o)?(i=``,l!=null&&(i=l.replace(E,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(w(o)&&(o=C(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(E,`$&/`)+`/`)+l)),r.push(o)),1;l=0;var d=a===``?`.`:a+`:`;if(v(e))for(var f=0;f<e.length;f++)a=e[f],s=d+D(a,f),l+=k(a,r,i,s,o);else if(f=u(e),typeof f==`function`)for(e=f.call(e),f=0;!(a=e.next()).done;)a=a.value,s=d+D(a,f++),l+=k(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return k(O(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return l}function A(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}var j=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&&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)};e.Children={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!w(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=m,e.Fragment=r,e.createContext=function(e){return e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:i,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)x.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return S(e,a,i)},e.forwardRef=function(e){return{$$typeof:o,render:e}},e.isValidElement=w,e.memo=function(e,t){return{$$typeof:s,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=b.T,n={};b.T=n;try{var r=e(),i=b.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(y,j)}catch(e){j(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),b.T=t}},e.useCallback=function(e,t){return b.H.useCallback(e,t)},e.useContext=function(e){return b.H.useContext(e)},e.useEffect=function(e,t){return b.H.useEffect(e,t)},e.useLayoutEffect=function(e,t){return b.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return b.H.useMemo(e,t)},e.useOptimistic=function(e,t){return b.H.useOptimistic(e,t)},e.useRef=function(e){return b.H.useRef(e)},e.useState=function(e){return b.H.useState(e)}})),y=o(((e,t)=>{t.exports=v()})),b=`modulepreload`,x=function(e){return`/`+e},S={},C=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=x(t,n),t in S)return;S[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:b,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},w=c(y(),1),T=`popstate`;function E(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function D(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ee(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:te(t)}return ne(t,n,null,e)}function O(e,t){if(e===!1||e==null)throw Error(t)}function k(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function A(){return Math.random().toString(36).substring(2,10)}function j(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ee(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?M(t):t,state:n,key:t&&t.key||r||A(),unstable_mask:i}}function te({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function M(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ne(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=E(e)?e:ee(h.location,e,t);n&&n(r,e),l=u()+1;let d=j(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=E(e)?e:ee(h.location,e,t);n&&n(r,e),l=u();let i=j(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return N(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(T,d),c=e,()=>{i.removeEventListener(T,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function N(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),O(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:te(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function P(e,t,n=`/`){return re(e,t,n,!1)}function re(e,t,n,r){let i=be((typeof t==`string`?M(t):t).pathname||`/`,n);if(i==null)return null;let a=ae(e);se(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ye(i);o=ge(a[e],t,r)}return o}function ie(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ae(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;O(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Oe([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(O(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ae(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:me(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of oe(e.path))a(e,t,!0,n)}),t}function oe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=oe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function se(e){e.sort((e,t)=>e.score===t.score?he(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var F=/^:[\w-]+$/,ce=3,le=2,ue=1,de=10,fe=-2,pe=e=>e===`*`;function me(e,t){let n=e.split(`/`),r=n.length;return n.some(pe)&&(r+=fe),t&&(r+=le),n.filter(e=>!pe(e)).reduce((e,t)=>e+(F.test(t)?ce:t===``?ue:de),r)}function he(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ge(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=_e({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=_e({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Oe([a,u.pathname]),pathnameBase:ke(Oe([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Oe([a,u.pathnameBase]))}return o}function _e(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ve(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ve(e,t=!1,n=!0){k(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ye(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return k(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function be(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var xe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Se(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?M(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?Ce(n.substring(1),`/`):Ce(n,t)):a=t,{pathname:a,search:Ae(r),hash:je(i)}}function Ce(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function we(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Te(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ee(e){let t=Te(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function De(e,t,n,r=!1){let i;typeof e==`string`?i=M(e):(i={...e},O(!i.pathname||!i.pathname.includes(`?`),we(`?`,`pathname`,`search`,i)),O(!i.pathname||!i.pathname.includes(`#`),we(`#`,`pathname`,`hash`,i)),O(!i.search||!i.search.includes(`#`),we(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Se(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Oe=e=>e.join(`/`).replace(/\/\/+/g,`/`),ke=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Ae=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,je=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Me=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ne(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Pe(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Fe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ie(e,t){let n=e;if(typeof n!=`string`||!xe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Fe)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=be(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{k(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Le=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Le);var Re=[`GET`,...Le];new Set(Re);var ze=w.createContext(null);ze.displayName=`DataRouter`;var Be=w.createContext(null);Be.displayName=`DataRouterState`;var Ve=w.createContext(!1),He=w.createContext({isTransitioning:!1});He.displayName=`ViewTransition`;var Ue=w.createContext(new Map);Ue.displayName=`Fetchers`;var We=w.createContext(null);We.displayName=`Await`;var Ge=w.createContext(null);Ge.displayName=`Navigation`;var Ke=w.createContext(null);Ke.displayName=`Location`;var qe=w.createContext({outlet:null,matches:[],isDataRoute:!1});qe.displayName=`Route`;var Je=w.createContext(null);Je.displayName=`RouteError`;var Ye=`REACT_ROUTER_ERROR`,Xe=`REDIRECT`,Ze=`ROUTE_ERROR_RESPONSE`;function Qe(e){if(e.startsWith(`${Ye}:${Xe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function $e(e){if(e.startsWith(`${Ye}:${Ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Me(t.status,t.statusText,t.data)}catch{}}function et(e,{relative:t}={}){O(tt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=w.useContext(Ge),{hash:i,pathname:a,search:o}=ct(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Oe([n,a])),r.createHref({pathname:s,search:o,hash:i})}function tt(){return w.useContext(Ke)!=null}function nt(){return O(tt(),`useLocation() may be used only in the context of a <Router> component.`),w.useContext(Ke).location}var rt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function it(e){w.useContext(Ge).static||w.useLayoutEffect(e)}function at(){let{isDataRoute:e}=w.useContext(qe);return e?Dt():ot()}function ot(){O(tt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=w.useContext(ze),{basename:t,navigator:n}=w.useContext(Ge),{matches:r}=w.useContext(qe),{pathname:i}=nt(),a=JSON.stringify(Ee(r)),o=w.useRef(!1);return it(()=>{o.current=!0}),w.useCallback((r,s={})=>{if(k(o.current,rt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=De(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Oe([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}w.createContext(null);function st(){let{matches:e}=w.useContext(qe),t=e[e.length-1];return t?t.params:{}}function ct(e,{relative:t}={}){let{matches:n}=w.useContext(qe),{pathname:r}=nt(),i=JSON.stringify(Ee(n));return w.useMemo(()=>De(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function lt(e,t){return ut(e,t)}function ut(e,t,n){O(tt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=w.useContext(Ge),{matches:i}=w.useContext(qe),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;kt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) 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="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=nt(),d;if(t){let e=typeof t==`string`?M(t):t;O(c===`/`||e.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 "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=P(e,{pathname:p});k(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),k(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=_t(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Oe([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Oe([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?w.createElement(Ke.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function dt(){let e=Et(),t=Ne(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=w.createElement(w.Fragment,null,w.createElement(`p`,null,`💿 Hey developer 👋`),w.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,w.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,w.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),w.createElement(w.Fragment,null,w.createElement(`h2`,null,`Unexpected Application Error!`),w.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?w.createElement(`pre`,{style:i},n):null,o)}var ft=w.createElement(dt,null),pt=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=$e(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:w.createElement(qe.Provider,{value:this.props.routeContext},w.createElement(Je.Provider,{value:e,children:this.props.component}));return this.context?w.createElement(ht,{error:e},t):t}};pt.contextType=Ve;var mt=new WeakMap;function ht({children:e,error:t}){let{basename:n}=w.useContext(Ge);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qe(t.digest);if(e){let r=mt.get(t);if(r)throw r;let i=Ie(e.location,n);if(Fe&&!mt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw mt.set(t,n),n}return w.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function gt({routeContext:e,match:t,children:n}){let r=w.useContext(ze);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(qe.Provider,{value:e},n)}function _t(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);O(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Pe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ft,o&&(s<0&&c===0?(kt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?w.createElement(n.route.Component,null):n.route.element?n.route.element:e,w.createElement(gt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?w.createElement(pt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yt(e){let t=w.useContext(ze);return O(t,vt(e)),t}function bt(e){let t=w.useContext(Be);return O(t,vt(e)),t}function xt(e){let t=w.useContext(qe);return O(t,vt(e)),t}function St(e){let t=xt(e),n=t.matches[t.matches.length-1];return O(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ct(){return St(`useRouteId`)}function wt(){return bt(`useNavigation`).navigation}function Tt(){let{matches:e,loaderData:t}=bt(`useMatches`);return w.useMemo(()=>e.map(e=>ie(e,t)),[e,t])}function Et(){let e=w.useContext(Je),t=bt(`useRouteError`),n=St(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Dt(){let{router:e}=yt(`useNavigate`),t=St(`useNavigate`),n=w.useRef(!1);return it(()=>{n.current=!0}),w.useCallback(async(r,i={})=>{k(n.current,rt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ot={};function kt(e,t,n){!t&&!Ot[e]&&(Ot[e]=!0,k(!1,n))}w.useOptimistic,w.memo(At);function At({routes:e,future:t,state:n,isStatic:r,onError:i}){return ut(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function jt(e){O(!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 Mt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){O(!tt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=w.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=M(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=w.useMemo(()=>{let e=be(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return k(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:w.createElement(Ge.Provider,{value:c},w.createElement(Ke.Provider,{children:t,value:h}))}function Nt({children:e,location:t}){return lt(Pt(e),t)}function Pt(e,t=[]){let n=[];return w.Children.forEach(e,(e,r)=>{if(!w.isValidElement(e))return;let i=[...t,r];if(e.type===w.Fragment){n.push.apply(n,Pt(e.props.children,i));return}O(e.type===jt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),O(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Pt(e.props.children,i)),n.push(a)}),n}var Ft=`get`,It=`application/x-www-form-urlencoded`;function Lt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Rt(e){return Lt(e)&&e.tagName.toLowerCase()===`button`}function zt(e){return Lt(e)&&e.tagName.toLowerCase()===`form`}function Bt(e){return Lt(e)&&e.tagName.toLowerCase()===`input`}function Vt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ht(e,t){return e.button===0&&(!t||t===`_self`)&&!Vt(e)}function Ut(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Wt(e,t){let n=Ut(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Gt=null;function Kt(){if(Gt===null)try{new FormData(document.createElement(`form`),0),Gt=!1}catch{Gt=!0}return Gt}var qt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Jt(e){return e!=null&&!qt.has(e)?(k(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${It}"`),null):e}function Yt(e,t){let n,r,i,a,o;if(zt(e)){let o=e.getAttribute(`action`);r=o?be(o,t):null,n=e.getAttribute(`method`)||Ft,i=Jt(e.getAttribute(`enctype`))||It,a=new FormData(e)}else if(Rt(e)||Bt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?be(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Ft,i=Jt(e.getAttribute(`formenctype`))||Jt(o.getAttribute(`enctype`))||It,a=new FormData(o,e),!Kt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Lt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Ft,r=null,i=It,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Xt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Zt=/[&><\u2028\u2029]/g;function Qt(e){return e.replace(Zt,e=>Xt[e])}function $t(e,t){if(e===!1||e==null)throw Error(t)}function en(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&be(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function tn(e,t){if(e.id in t)return t[e.id];try{let n=await C(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function nn(e){return e!=null&&typeof e.page==`string`}function rn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function an(e,t,n){return un((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await tn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(rn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function on(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function sn(e,t,{includeHydrateFallback:n}={}){return cn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function cn(e){return[...new Set(e)]}function ln(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function un(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!nn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ln(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function dn(){let e=w.useContext(ze);return $t(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function fn(){let e=w.useContext(Be);return $t(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var pn=w.createContext(void 0);pn.displayName=`FrameworkContext`;function mn(){let e=w.useContext(pn);return $t(e,`You must render this element inside a <HydratedRouter> element`),e}function hn(e,t){let n=w.useContext(pn),[r,i]=w.useState(!1),[a,o]=w.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=w.useRef(null);w.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),w.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:gn(s,p),onBlur:gn(c,m),onMouseEnter:gn(l,p),onMouseLeave:gn(u,m),onTouchStart:gn(d,p)}]:[a,f,{}]:[!1,f,{}]}function gn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function _n({page:e,...t}){let{router:n}=dn(),r=w.useMemo(()=>P(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?w.createElement(yn,{page:e,matches:r,...t}):null}function vn(e){let{manifest:t,routeModules:n}=mn(),[r,i]=w.useState([]);return w.useEffect(()=>{let r=!1;return an(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function yn({page:e,matches:t,...n}){let r=nt(),{future:i,manifest:a,routeModules:o}=mn(),{basename:s}=dn(),{loaderData:c,matches:l}=fn(),u=w.useMemo(()=>on(e,t,l,a,r,`data`),[e,t,l,a,r]),d=w.useMemo(()=>on(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=en(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=w.useMemo(()=>sn(d,a),[d,a]),m=vn(d);return w.createElement(w.Fragment,null,f.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>w.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>w.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function bn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var xn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{xn&&(window.__reactRouterVersion=`7.13.2`)}catch{}function Sn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=w.useRef();i.current??=D({window:r,v5Compat:!0});let a=i.current,[o,s]=w.useState({action:a.action,location:a.location}),c=w.useCallback(e=>{n===!1?s(e):w.startTransition(()=>s(e))},[n]);return w.useLayoutEffect(()=>a.listen(c),[a,c]),w.createElement(Mt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function Cn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=w.useState({action:n.action,location:n.location}),o=w.useCallback(e=>{r===!1?a(e):w.startTransition(()=>a(e))},[r]);return w.useLayoutEffect(()=>n.listen(o),[n,o]),w.createElement(Mt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Cn.displayName=`unstable_HistoryRouter`;var wn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,I=w.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:_}=w.useContext(Ge),v=typeof l==`string`&&wn.test(l),y=Ie(l,h);l=y.to;let b=et(l,{relative:r}),x=nt(),S=null;if(o){let e=De(o,[],x.unstable_mask?x.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Oe([h,e.pathname])),S=g.createHref(e)}let[C,T,E]=hn(n,p),D=jn(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(y.isExternal||i),A=w.createElement(`a`,{...p,...E,href:(k?S:void 0)||y.absoluteURL||b,onClick:k?O:e,ref:bn(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?w.createElement(w.Fragment,null,A,w.createElement(_n,{page:b})):A});I.displayName=`Link`;var Tn=w.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=ct(a,{relative:c.relative}),d=nt(),f=w.useContext(Be),{navigator:p,basename:m}=w.useContext(Ge),h=f!=null&&Hn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=be(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,T;T=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(S):i;return w.createElement(I,{...c,"aria-current":C,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Tn.displayName=`NavLink`;var En=w.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Ft,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=w.useContext(Ge),g=Fn(),_=In(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&wn.test(s);return w.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?w.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});En.displayName=`Form`;function Dn({getKey:e,storageKey:t,...n}){let r=w.useContext(pn),{basename:i}=w.useContext(Ge),a=nt(),o=Tt();Bn({getKey:e,storageKey:t});let s=w.useMemo(()=>{if(!r||!e)return null;let t=zn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return w.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Qt(JSON.stringify(t||Ln))}, ${Qt(JSON.stringify(s))})`}})}Dn.displayName=`ScrollRestoration`;function On(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kn(e){let t=w.useContext(ze);return O(t,On(e)),t}function An(e){let t=w.useContext(Be);return O(t,On(e)),t}function jn(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=at(),d=nt(),f=ct(e,{relative:o});return w.useCallback(p=>{if(Ht(p,t)){p.preventDefault();let t=n===void 0?te(d)===te(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?w.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Mn(e){k(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=w.useRef(Ut(e)),n=w.useRef(!1),r=nt(),i=w.useMemo(()=>Wt(r.search,n.current?null:t.current),[r.search]),a=at();return[i,w.useCallback((e,t)=>{let r=Ut(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Nn=0,Pn=()=>`__${String(++Nn)}__`;function Fn(){let{router:e}=kn(`useSubmit`),{basename:t}=w.useContext(Ge),n=Ct(),r=e.fetch,i=e.navigate;return w.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Yt(e,t);a.navigate===!1?await r(a.fetcherKey||Pn(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function In(e,{relative:t}={}){let{basename:n}=w.useContext(Ge),r=w.useContext(qe);O(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ct(e||`.`,{relative:t})},o=nt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Oe([n,a.pathname])),te(a)}var Ln=`react-router-scroll-positions`,Rn={};function zn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:be(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Bn({getKey:e,storageKey:t}={}){let{router:n}=kn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=An(`useScrollRestoration`),{basename:a}=w.useContext(Ge),o=nt(),s=Tt(),c=wt();w.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Vn(w.useCallback(()=>{if(c.state===`idle`){let t=zn(o,s,a,e);Rn[t]=window.scrollY}try{sessionStorage.setItem(t||Ln,JSON.stringify(Rn))}catch(e){k(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(w.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Ln);e&&(Rn=JSON.parse(e))}catch{}},[t]),w.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Rn,()=>window.scrollY,e?(t,n)=>zn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),w.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{k(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Vn(e,t){let{capture:n}=t||{};w.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Hn(e,{relative:t}={}){let n=w.useContext(He);O(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=kn(`useViewTransitionState`),i=ct(e,{relative:t});if(!n.isTransitioning)return!1;let a=be(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=be(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _e(i.pathname,o)!=null||_e(i.pathname,a)!=null}var Un=`/api`;function Wn(e){return encodeURIComponent(e)}async function Gn(e){let t=await fetch(`${Un}${e}`);if(!t.ok)throw Error(`GET ${e} failed: ${t.status}`);return t.json()}async function Kn(e,t){let n=await fetch(`${Un}${e}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)});if(!n.ok){let t=await n.json().catch(()=>({error:{message:`POST ${e} failed`}}));throw Error(t.error?.message??`POST ${e} failed: ${n.status}`)}return n.json()}function qn(e,t,n){let r=new AbortController;return fetch(`${Un}${e}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:r.signal}).then(async e=>{if(e.status===401){n({type:`error`,message:`AUTH_REQUIRED`});return}if(!e.ok){n({type:`error`,message:(await e.json().catch(()=>({error:{message:`Request failed`}}))).error?.message??`Request failed`});return}let t=e.body?.getReader();if(!t){n({type:`error`,message:`No response stream`});return}let r=new TextDecoder,i=``;for(;;){let{done:e,value:a}=await t.read();if(e)break;i+=r.decode(a,{stream:!0});let o=i.split(`
12
+ `);i=o.pop()??``;for(let e of o){if(!e.startsWith(`data: `))continue;let t=e.slice(6).trim();if(t)try{n(JSON.parse(t))}catch{}}}}).catch(e=>{e.name!==`AbortError`&&n({type:`error`,message:e.message})}),r}async function Jn(){return(await Gn(`/projects`)).projects}async function Yn(e){return(await Gn(`/projects/${Wn(e)}/sessions`)).sessions}async function Xn(e,t){return(await Gn(`/projects/${Wn(e)}/sessions/${Wn(t)}`)).session}async function Zn(){return Gn(`/source-audit`)}async function Qn(){return Gn(`/archive/stats`)}async function $n(){return Kn(`/archive/sync`)}async function er(){let e=await fetch(`${Un}/archive/export`);if(!e.ok){let t=await e.json().catch(()=>({error:`Export failed`}));throw Error(t.error??`Export failed: ${e.status}`)}let t=await e.blob(),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=e.headers.get(`Content-Disposition`)?.match(/filename="(.+)"/)?.[1]??`heyiam-archive.tar.gz`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}async function tr(){return Gn(`/archive/verify`)}async function nr(e){return Gn(`/projects/${Wn(e)}/detail`)}async function rr(e){return Gn(`/projects/${Wn(e)}/boundaries`)}async function ir(e,t){await Kn(`/projects/${Wn(e)}/boundaries`,t)}function ar(e,t){return qn(`/projects/${Wn(e)}/triage`,{},t)}function or(e,t,n,r,i){return qn(`/projects/${Wn(e)}/enhance-project`,{selectedSessionIds:t,skippedSessions:n,force:i},r)}async function sr(e,t,n,r){return Kn(`/projects/${Wn(e)}/refine-narrative`,{draftNarrative:t,draftTimeline:n,answers:r})}function cr(e,t,n){return qn(`/projects/${Wn(e)}/upload`,t,n)}async function lr(){try{return await Gn(`/settings/api-key`)}catch{return{hasKey:!1}}}async function ur(e){await Kn(`/settings/api-key`,{apiKey:e})}async function dr(){try{return await Gn(`/auth/status`)}catch{return{authenticated:!1}}}async function fr(e,t){let n=new URLSearchParams;return e&&n.set(`q`,e),t?.source&&n.set(`source`,t.source),t?.project&&n.set(`project`,t.project),t?.skill&&n.set(`skill`,t.skill),Gn(`/search?${n.toString()}`)}async function pr(e){return(await Gn(`/sessions/${Wn(e)}`)).session}async function mr(e,t=`summary`){return Gn(`/sessions/${Wn(e)}/context?format=${t}`)}async function hr(e){return Gn(`/sessions/${Wn(e)}/transcript`)}async function gr(e,t,n,r){try{return await Kn(`/projects/${Wn(e)}/enhance-save`,{selectedSessionIds:t,result:n,...r}),!0}catch{return!1}}async function _r(e){try{return await Gn(`/projects/${Wn(e)}/git-remote`)}catch{return{url:null}}}async function vr(e,t,n){return Kn(`/projects/${Wn(e)}/screenshot-capture`,{url:n,slug:t})}async function yr(e){return Kn(`/auth/poll`,{device_code:e})}async function br(e){return Gn(`/auth/check-username?username=${encodeURIComponent(e)}`)}async function xr(e){return Kn(`/auth/signup`,{username:e})}async function Sr(){return Kn(`/auth/login`)}async function Cr(){await Kn(`/auth/logout`)}async function wr(){return Gn(`/dashboard`)}async function Tr(){await Kn(`/onboarding/complete`)}function Er(e){let t=new EventSource(`${Un}/sync/progress`);return t.onmessage=t=>{try{e(JSON.parse(t.data))}catch{}},t.onerror=()=>{t.close()},()=>t.close()}var Dr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),L=o(((e,t)=>{t.exports=Dr()}))(),Or={default:`bg-surface-low text-on-surface-variant`,green:`bg-green-bg text-green`,amber:`bg-amber-bg text-amber`,violet:`bg-violet-bg text-violet`,primary:`bg-primary/10 text-primary`};function R({variant:e=`default`,children:t}){return(0,L.jsx)(`span`,{className:`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm ${Or[e]}`,children:t})}function kr({value:e,onChange:t,onSubmit:n,compact:r=!1,placeholder:i=`Search sessions...`,autoFocus:a=!1}){let o=(0,_.useRef)(null);return(0,_.useEffect)(()=>{function e(e){e.key===`/`&&!e.ctrlKey&&!e.metaKey&&document.activeElement?.tagName!==`INPUT`&&document.activeElement?.tagName!==`TEXTAREA`&&(e.preventDefault(),o.current?.focus())}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsxs)(`svg`,{className:`absolute top-1/2 -translate-y-1/2 text-on-surface-variant ${r?`left-2 w-3.5 h-3.5`:`left-3 w-4 h-4`}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,L.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,L.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,L.jsx)(`input`,{ref:o,type:`text`,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n&&n(),e.key===`Escape`&&o.current?.blur()},placeholder:i,autoFocus:a,className:[`w-full bg-surface-low border border-ghost rounded-md font-mono text-on-surface placeholder:text-outline transition-colors`,`focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20`,r?`text-xs pl-7 pr-2 py-1`:`text-sm pl-9 pr-3 py-2`].join(` `)}),!r&&(0,L.jsx)(`kbd`,{className:`absolute right-3 top-1/2 -translate-y-1/2 font-mono text-[10px] text-outline bg-surface-mid px-1.5 py-0.5 rounded-sm border border-ghost`,children:`/`})]})}function Ar({back:e,chips:t,actions:n,children:r}){let i=at(),a=nt().pathname===`/search`,[o,s]=(0,_.useState)(``);return(0,L.jsxs)(`div`,{className:`min-h-screen flex flex-col bg-surface-mid`,children:[(0,L.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsxs)(I,{to:`/`,className:`flex items-center gap-2 shrink-0`,children:[(0,L.jsx)(`span`,{className:`w-6 h-6 bg-primary rounded-md flex items-center justify-center text-on-primary font-display text-xs font-bold`,children:`h`}),(0,L.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface`,children:`heyi.am`})]}),e&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`text-outline text-xs`,children:`/`}),(0,L.jsx)(I,{to:e.to,className:`text-sm text-on-surface-variant hover:text-on-surface transition-colors`,children:e.label})]}),t&&t.length>0&&(0,L.jsx)(`div`,{className:`flex items-center gap-1.5 ml-1`,children:t.map(e=>(0,L.jsx)(R,{variant:e.variant,children:e.label},e.label))})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!a&&(0,L.jsx)(`div`,{className:`w-48`,children:(0,L.jsx)(kr,{value:o,onChange:s,onSubmit:()=>{i(`/search?q=${encodeURIComponent(o)}`),s(``)},compact:!0})}),n]})]})}),(0,L.jsx)(`main`,{className:`flex-1 overflow-y-auto`,children:r})]})}function z({hover:e,className:t=``,children:n}){return(0,L.jsx)(`div`,{className:[`bg-surface-lowest border border-ghost rounded-md p-4`,e?`transition-shadow hover:shadow-md`:``,t].filter(Boolean).join(` `),children:n})}var jr={refined:`bg-green-bg text-green`,local:`bg-surface-low text-on-surface-variant`,exported:`bg-amber-bg text-amber`,violet:`bg-violet-bg text-violet`};function Mr({variant:e,children:t}){return(0,L.jsx)(`span`,{className:`font-mono text-[9px] leading-tight uppercase tracking-wider py-0.5 px-1.5 rounded-sm ${jr[e]}`,children:t})}function Nr({label:e,value:t,valueSize:n=`text-2xl`}){return(0,L.jsxs)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md p-4`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mb-1`,children:e}),(0,L.jsx)(`div`,{className:`font-display font-bold text-on-surface ${n}`,children:t})]})}function B({title:e,children:t}){return(0,L.jsxs)(`div`,{className:`bg-surface-low border border-ghost rounded-sm p-2.5`,children:[e&&(0,L.jsx)(`div`,{className:`font-body text-sm font-semibold text-on-surface mb-1`,children:e}),(0,L.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:t})]})}function V({title:e,meta:t,children:n}){return(0,L.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,L.jsx)(`h3`,{className:`font-display text-base font-semibold text-on-surface`,children:e}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t&&(0,L.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant`,children:t}),n]})]})}var Pr={main:`#084471`,orchestrator:`#084471`,"frontend-dev":`#7c3aed`,frontend:`#7c3aed`,"backend-dev":`#0891b2`,backend:`#0891b2`,"qa-engineer":`#059669`,qa:`#059669`,"ux-designer":`#d97706`,ux:`#d97706`,"product-manager":`#dc2626`,pm:`#dc2626`,"security-engineer":`#475569`,"team-lead":`#475569`,explore:`#94a3b8`,"code-reviewer":`#e11d48`,reviewer:`#e11d48`,"code-explorer":`#2563eb`,explorer:`#2563eb`,"code-architect":`#7e22ce`,architect:`#7e22ce`,"test-runner":`#16a34a`,tester:`#16a34a`,"build-fix":`#ea580c`,fixer:`#ea580c`,planner:`#0d9488`,plan:`#0d9488`,research:`#6366f1`,researcher:`#6366f1`,agent:`#2563eb`,wiring:`#c026d3`,enhance:`#0891b2`},Fr=`#084471`,Ir=`#d1d5db`,Lr=`'IBM Plex Mono', monospace`,Rr=`#6b7280`,zr=`#9ca3af`,Br=[`#e11d48`,`#2563eb`,`#7e22ce`,`#ea580c`,`#0d9488`,`#6366f1`,`#c026d3`,`#0891b2`,`#ca8a04`,`#16a34a`,`#be185d`,`#4f46e5`,`#0e7490`,`#b45309`,`#059669`];function Vr(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)}function Hr(e){if(!e)return Rr;let t=e.toLowerCase();if(Pr[t])return Pr[t];for(let[e,n]of Object.entries(Pr))if(t.includes(e)||e.includes(t))return n;return Br[Vr(t)%Br.length]}function Ur(e){return new Date(e.date).getTime()}function Wr(e){if(e.endTime)return new Date(e.endTime).getTime();let t=e.wallClockMinutes??e.durationMinutes;return Ur(e)+t*6e4}function Gr(e){let t=e/36e5;if(t<20)return`${Math.round(t)}h gap`;let n=Math.round(t/24);return n===1?`1 day gap`:`${n} days gap`}function Kr(e){let t=new Date(e),n=t.toLocaleString(`en-US`,{month:`short`}),r=t.getDate(),i=t.getHours(),a=t.getMinutes().toString().padStart(2,`0`),o=i>=12?`PM`:`AM`;return`${n} ${r}, ${i%12||12}:${a} ${o}`}function qr(e){if(e<60)return`${Math.round(e)}m`;let t=Math.floor(e/60),n=e%60;return n>0?`${t}h ${n}m`:`${t}h`}var Jr=36e5,Yr=160,Xr=480;function Zr(e){return Math.min(Math.max(e*3,Yr),Xr)}function Qr(e){if(!e.length)return[];let t=[...e].sort((e,t)=>Ur(e)-Ur(t)),n=[],r=null;for(let e of t){let t=Ur(e),i=Wr(e);!r||t>=r.e?(r&&n.push(r),r={sessions:[e],s:t,e:i}):(r.sessions.push(e),i>r.e&&(r.e=i))}r&&n.push(r);let i=[];for(let e=0;e<n.length;e++){let t=n[e];if(e>0){let r=t.s-n[e-1].e;r>Jr&&i.push({type:`gap`,durationMs:r})}t.sessions.length===1?i.push({type:`session`,session:t.sessions[0],startMs:t.s,endMs:t.e}):i.push({type:`concurrent`,sessions:t.sessions,startMs:t.s,endMs:t.e})}return i}function $r(e){let t=[...e].sort((e,t)=>Ur(e)-Ur(t)),n=[],r=new Map;for(let e of t){let t=Ur(e),i=-1;for(let e=0;e<n.length;e++)if(n[e]<=t){i=e;break}i===-1&&(i=n.length,n.push(0));let a=((e.children?.length??0)>5?30:15)*6e4;n[i]=Wr(e)+a,r.set(e.id,i)}return r}function ei(e,t,n,r,i){return n===t?r:r+(e-t)/(n-t)*(i-r)}function ti(e){return e.children?.length?e.children.map(e=>({id:e.sessionId,role:e.role,durationMinutes:e.durationMinutes??0,linesOfCode:e.linesOfCode??0,date:e.date})):[]}var ni=2*6e4;function ri(e,t){let n=e.map(e=>({...e,startMs:e.date?new Date(e.date).getTime():t,endMs:(e.date?new Date(e.date).getTime():t)+e.durationMinutes*6e4})).sort((e,t)=>e.startMs-t.startMs),r=[],i=null;for(let e of n)!i||e.startMs>i.startMs+ni?(i&&r.push({children:i.children,startMs:i.startMs,endMs:i.endMs}),i={children:[e],startMs:e.startMs,endMs:e.endMs}):(i.children.push(e),e.endMs>i.endMs&&(i.endMs=e.endMs));return i&&r.push({children:i.children,startMs:i.startMs,endMs:i.endMs}),r}function ii(e,t){let n=e.map(e=>{let n=e.date?new Date(e.date).getTime():t,r=n+e.durationMinutes*6e4;return{...e,startMs:n,endMs:r}}).sort((e,t)=>e.startMs-t.startMs),r=new Map;return n.forEach((e,t)=>r.set(e.id,t)),{laneMap:r,laneCount:n.length}}function ai(e){let t=ti(e);return{title:e.title,timestamp:Kr(e.date),duration:qr(e.wallClockMinutes??e.durationMinutes),linesOfCode:e.linesOfCode,agentCount:t.length,session:e}}var oi=6,si=30;function ci(e){let t=new Map;for(let n of e){let e=n.role??`agent`,r=t.get(e);r?(r.totalMin+=n.durationMinutes,r.count+=1):t.set(e,{totalMin:n.durationMinutes,count:1})}return[...t.entries()].sort((e,t)=>t[1].totalMin-e[1].totalMin).map(([e,{totalMin:t,count:n}])=>({role:e,color:Hr(e),duration:qr(t),count:n}))}function li(e,t){return t.map(e=>{let t=ti(e.session);return{title:e.session.title,timestamp:Kr(e.session.date),agents:ci(t),totalAgents:t.length,xStart:e.xStart,xEnd:e.xEnd}})}var ui=30,di=56,fi=50,pi=140,mi=4,hi=300,gi=1200,_i=140,vi=32;function yi(e){return e<=5?44:e<=10?32:e<=20?22:16}function bi(e,t){return e.length<=t?e:e.slice(0,t-1)+`…`}function xi(e,t,n,r){if(r===n)return`M ${e} ${n} L ${t} ${n}`;let i=Math.min(fi,(t-e)/4);return[`M ${e} ${n}`,`C ${e+i} ${n}, ${e+i} ${r}, ${e+i*2} ${r}`,`L ${t-i*2} ${r}`,`C ${t-i} ${r}, ${t-i} ${n}, ${t} ${n}`].join(` `)}var Si=8;function Ci(e,t=Si){let n=[],r=[],i=[],a=!1,o=48,s=0,c=0,l=o,u=(e,t)=>{e<s&&(s=e),e+t>c&&(c=e+t)};for(let s of e){if(s.type===`gap`){r.push({path:`M ${o} 0 L ${o+72} 0`,color:zr,width:1.5,dashed:!0}),n.push({kind:`gap`,pos:{x:o,y:16},label:Gr(s.durationMs),durationMs:s.durationMs}),u(-8,40),o+=72+di;continue}if(s.type===`session`){let e=s.session,t=ti(e),a=e.durationMinutes,c=t.length>0?Math.max(Yr,t.length*30+100):Yr,l=t.length>0?Math.min(Math.max(a*mi,c),gi):Math.min(Math.max(Zr(a),Yr),Xr),d=qr(e.durationMinutes),f=ai(e),p=Kr(e.date);if(t.length>0){let a=t.slice(0,ui),s=Ur(e),c=s+e.durationMinutes*6e4,m=Math.max(c,...a.map(e=>(e.date?new Date(e.date).getTime():s)+e.durationMinutes*6e4)),h=ri(a,s),g=Math.max(...h.map(e=>e.children.length),1),_=yi(g),v=Math.min((g-1)*_,300),y=o,b=o+l,x=0-v/2-32,S=y+fi*2;n.push({kind:`label`,pos:{x:S+8,y:x},title:bi(e.title,vi),sub:d,timestamp:p,color:Fr,above:!0,session:e,tooltip:f}),u(x-4,28),n.push({kind:`dot`,pos:{x:y,y:0},color:Fr,size:`lg`,tooltip:f}),r.push({path:`M ${y} 0 L ${b} 0`,color:Fr,width:1.5});for(let e of h){let t=e.children.length,n=Math.min((t-1)*_,v),i=t>1?n/(t-1):0,a=0-n/2,o=ei(e.startMs,s,m,y,b);e.children.forEach((e,t)=>{let n=a+t*i,c=Hr(e.role),l=(e.date?new Date(e.date).getTime():s)+e.durationMinutes*6e4,d=ei(Math.min(l,m),s,m,y,b),f=Math.max(d,o+100);r.push({path:xi(o,Math.min(f,b),0,n),color:c,width:1.5}),u(n-2,4)})}n.push({kind:`dot`,pos:{x:b,y:0},color:Fr,size:`lg`,tooltip:f}),i.push({session:e,xStart:y,xEnd:b}),o=b+di}else n.push({kind:`label`,pos:{x:o+14,y:-28},title:bi(e.title,vi),sub:d,timestamp:p,color:Fr,above:!0,session:e,tooltip:f}),u(-32,28),n.push({kind:`dot`,pos:{x:o,y:0},color:Fr,size:`sm`,tooltip:f}),n.push({kind:`dot`,pos:{x:o+l,y:0},color:Fr,size:`sm`,tooltip:f}),r.push({path:`M ${o} 0 L ${o+l} 0`,color:Fr,width:3}),i.push({session:e,xStart:o,xEnd:o+l}),o+=l+di;continue}if(s.type===`concurrent`){let e=[...s.sessions].sort((e,t)=>Ur(e)-Ur(t)),c=e.slice(0,t),l=$r(c),d=Math.max(...l.values())+1,f=e.length-c.length;f>0&&(a=!0);let p=Math.max(...c.map(e=>ti(e).length),0),m=p>15?Math.max(pi,p*5+60):p>5?Math.max(pi,p*8+40):pi,h=s.startMs,g=s.endMs,_=(g-h)/6e4,v=Math.min(Math.max(_*mi,hi),gi),y=o,b=o+v,x=Array(d).fill(0);for(let a of e.slice(0,t)){let e=l.get(a.id)??0,t=0+e*m,o=ti(a),s=ai(a),c=Kr(a.date),d=qr(a.durationMinutes),f=ei(Ur(a),h,g,y,b),p=f+Math.min(Math.max(a.durationMinutes*mi,20),b-f);if(o.length>0){let l=o.slice(0,ui),h=Ur(a),g=Wr(a),{laneMap:_,laneCount:v}=ii(l,h),y=yi(v),b=Math.min((v-1)*y,m-40),S=v>1?b/(v-1):0,C=t-b/2,w=C-32;(x[e]===0||f>=x[e])&&(n.push({kind:`label`,pos:{x:f+8,y:w},title:bi(a.title,vi),sub:d,timestamp:c,color:Fr,above:!0,session:a,tooltip:s}),x[e]=f+_i),u(w-4,28),n.push({kind:`dot`,pos:{x:f,y:t},color:Fr,size:`lg`,tooltip:s}),r.push({path:`M ${f} ${t} L ${p} ${t}`,color:Fr,width:1.5});let T=v>15?.4:v>8?.6:.8,E=v>15?1:1.5;l.forEach(e=>{let n=C+(_.get(e.id)??0)*S,i=Hr(e.role),a=e.date?new Date(e.date).getTime():h,o=a+e.durationMinutes*6e4,s=ei(a,h,g,f,p),c=Math.min(ei(Math.min(o,g),h,g,f,p),p),l=Math.max(c,s+60);r.push({path:xi(s,Math.min(l,p),t,n),color:i,width:E,opacity:T}),u(n-2,4)}),n.push({kind:`dot`,pos:{x:p,y:t},color:Fr,size:`lg`,tooltip:s}),i.push({session:a,xStart:f,xEnd:p})}else (x[e]===0||f>=x[e])&&(n.push({kind:`label`,pos:{x:f+8,y:t-28},title:bi(a.title,vi),sub:d,timestamp:c,color:Fr,above:!0,session:a,tooltip:s}),x[e]=f+_i),u(t-32,28),n.push({kind:`dot`,pos:{x:f,y:t},color:Fr,size:`sm`,tooltip:s}),n.push({kind:`dot`,pos:{x:p,y:t},color:Fr,size:`sm`,tooltip:s}),r.push({path:`M ${f} ${t} L ${p} ${t}`,color:Fr,width:3}),i.push({session:a,xStart:f,xEnd:p});u(t-4,8)}if(f>0){let e=0+d*m;n.push({kind:`label`,pos:{x:y+8,y:e},title:`+${f} more sessions`,color:zr,above:!1}),u(e,16)}o=b+di}}let d=o-di,f=-s+36,p=c-s+72;return{nodes:n.map(e=>({...e,pos:{x:e.pos.x,y:e.pos.y+f}})),tracks:r,sessionRanges:i,hasConcurrentOverflow:a,threadStart:l,threadEnd:d,totalW:o+48,totalH:Math.max(p,100),centerY:0+f}}function wi(e,t,n){if(!n.length)return null;let r=e+t/2,i=null,a=1/0;for(let e of n){let t=(e.xStart+e.xEnd)/2,n=Math.abs(r-t);n<a&&(a=n,i=e)}return i}function Ti({entry:e}){if(!e||e.agents.length===0)return null;let t=e.agents.slice(0,oi),n=e.agents.length-t.length,r=e.totalAgents>=si;return(0,L.jsxs)(`div`,{style:{fontFamily:Lr,fontSize:10,display:`flex`,alignItems:`baseline`,gap:14,padding:`6px 0`,minHeight:28},children:[r?(0,L.jsxs)(`span`,{style:{fontSize:10,fontWeight:700,letterSpacing:`0.06em`,color:`#d97706`,flexShrink:0},children:[`LEGENDARY AGENTIC USE — `,e.totalAgents,` agents:`]}):(0,L.jsxs)(`span`,{style:{fontSize:10,color:Rr,fontWeight:600,flexShrink:0},children:[e.totalAgents,` agents:`]}),(0,L.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:10,alignItems:`center`},children:[t.map(e=>(0,L.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5},children:[(0,L.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:e.color,boxShadow:`0 0 4px ${e.color}40`,flexShrink:0}}),(0,L.jsx)(`span`,{style:{fontWeight:600,color:e.color,letterSpacing:`0.03em`},children:e.role.toUpperCase()}),e.count>1&&(0,L.jsxs)(`span`,{style:{color:zr},children:[`×`,e.count]}),(0,L.jsx)(`span`,{style:{color:zr},children:e.duration})]},e.role)),n>0&&(0,L.jsxs)(`span`,{style:{color:zr,fontStyle:`italic`},children:[`+`,n,` more`]})]})]})}function Ei({data:e,pos:t}){return(0,L.jsxs)(`div`,{style:{position:`absolute`,left:t.x,top:t.y-8,transform:`translateY(-100%)`,background:`#1f2937`,color:`#f9fafb`,borderRadius:6,padding:`10px 14px`,fontFamily:Lr,fontSize:11,lineHeight:1.5,whiteSpace:`nowrap`,zIndex:100,pointerEvents:`none`,boxShadow:`0 4px 16px rgba(0,0,0,0.18)`},children:[(0,L.jsx)(`div`,{style:{fontWeight:700,fontSize:12,marginBottom:4,color:`#fff`},children:e.title}),(0,L.jsx)(`div`,{style:{color:`#d1d5db`},children:e.timestamp}),(0,L.jsxs)(`div`,{style:{display:`flex`,gap:16,marginTop:4},children:[(0,L.jsx)(`span`,{children:e.duration}),(0,L.jsxs)(`span`,{children:[e.linesOfCode.toLocaleString(),` lines`]}),e.agentCount>0&&(0,L.jsxs)(`span`,{children:[e.agentCount,` agents`]})]})]})}function Di({sessions:e,onSessionClick:t,maxHeight:n}){let r=(0,_.useMemo)(()=>Qr(e),[e]),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),u=(0,_.useRef)(null),d=i?999:Si,f=(0,_.useMemo)(()=>Ci(r,d),[r,d]),p=(0,_.useMemo)(()=>li(r,f.sessionRanges),[r,f.sessionRanges]),m=(0,_.useRef)(null),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=p.filter(e=>e.agents.length>0);e.length>0&&y(e[0])},[p]);let b=(0,_.useCallback)(()=>{let e=m.current;if(!e)return;let t=p.filter(e=>e.agents.length>0),n=wi(e.scrollLeft,e.clientWidth,t);n&&y(n)},[p]),x=(0,_.useCallback)(()=>{if(c){u.current&&cancelAnimationFrame(u.current),u.current=null,l(!1);return}l(!0);let e=()=>{let t=m.current;if(t){if(t.scrollLeft>=t.scrollWidth-t.clientWidth-1){l(!1),u.current=null;return}t.scrollLeft+=1.2,u.current=requestAnimationFrame(e)}};u.current=requestAnimationFrame(e)},[c]);(0,_.useEffect)(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),(0,_.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&s(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]);let S=(0,_.useCallback)((e,t)=>{e&&g({tooltip:e,pos:t})},[]),C=(0,_.useCallback)(()=>g(null),[]);if(!e.length)return(0,L.jsx)(`div`,{"data-testid":`work-timeline-empty`,children:(0,L.jsx)(`p`,{style:{fontFamily:Lr,fontSize:`0.8125rem`,color:Rr},children:`No sessions to display.`})});let w=p.some(e=>e.agents.length>0),T=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12},children:[(0,L.jsx)(`div`,{style:{flex:1,minWidth:0},children:w&&(0,L.jsx)(Ti,{entry:v})}),(0,L.jsx)(`div`,{style:{display:`flex`,gap:6,flexShrink:0},children:f.totalW>600&&(0,L.jsx)(`button`,{onClick:x,style:(e=>({padding:`3px 10px`,fontSize:10,fontWeight:600,border:`1px solid ${Ir}`,borderRadius:4,background:e?Fr:`#fff`,color:e?`#fff`:Fr,cursor:`pointer`,fontFamily:Lr,letterSpacing:`0.03em`,flexShrink:0}))(c),children:c?`PAUSE`:`PLAY`})})]}),(0,L.jsx)(`div`,{ref:m,onScroll:b,style:{overflowX:`auto`,overflowY:o?`auto`:`hidden`,WebkitOverflowScrolling:`touch`,paddingBottom:12,maxHeight:o?`calc(100vh - 80px)`:void 0},children:(0,L.jsxs)(`div`,{style:{position:`relative`,width:f.totalW,height:f.totalH,fontFamily:Lr},children:[(0,L.jsxs)(`svg`,{style:{position:`absolute`,inset:0,width:f.totalW,height:f.totalH,pointerEvents:`none`},children:[(0,L.jsx)(`line`,{x1:f.threadStart,y1:f.centerY,x2:f.threadEnd,y2:f.centerY,stroke:Ir,strokeWidth:1.5}),f.tracks.map((e,t)=>(0,L.jsx)(`path`,{d:e.path,fill:`none`,stroke:e.color,strokeWidth:e.width,opacity:e.opacity??.8,strokeDasharray:e.dashed?`6 4`:void 0,transform:`translate(0, ${f.centerY})`},`t-${t}`))]}),f.nodes.map((e,n)=>{if(e.kind===`label`)return(0,L.jsxs)(`div`,{style:{position:`absolute`,left:e.pos.x,top:e.pos.y,cursor:t&&e.session?`pointer`:`default`,whiteSpace:`nowrap`},onClick:t&&e.session?()=>t(e.session):void 0,onMouseEnter:e.tooltip?()=>S(e.tooltip,e.pos):void 0,onMouseLeave:e.tooltip?C:void 0,children:[(0,L.jsx)(`span`,{style:{fontSize:12,fontWeight:700,color:e.color,letterSpacing:`0.01em`,display:`block`},children:e.title}),(0,L.jsxs)(`span`,{style:{fontSize:10,color:zr,display:`flex`,gap:8,marginTop:1},children:[e.sub&&(0,L.jsx)(`span`,{children:e.sub}),e.timestamp&&(0,L.jsx)(`span`,{style:{color:Rr},children:e.timestamp})]})]},`l-${n}`);if(e.kind===`dot`){let t=e.size===`lg`?6:4;return(0,L.jsx)(`div`,{onMouseEnter:e.tooltip?()=>S(e.tooltip,e.pos):void 0,onMouseLeave:e.tooltip?C:void 0,style:{position:`absolute`,left:e.pos.x-t,top:e.pos.y-t,width:t*2,height:t*2,borderRadius:`50%`,background:e.color,boxShadow:`0 0 ${e.size===`lg`?10:5}px ${e.color}50`,zIndex:2,cursor:e.tooltip?`pointer`:`default`}},`d-${n}`)}return e.kind===`gap`?(0,L.jsx)(`div`,{style:{position:`absolute`,left:e.pos.x,top:e.pos.y,width:72,height:22,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:10,color:zr,letterSpacing:`0.04em`},children:e.label},`g-${n}`):null}),h&&(0,L.jsx)(Ei,{data:h.tooltip,pos:h.pos})]})})]});if(o)return(0,L.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:9998,background:`#f8f9fb`,display:`flex`,flexDirection:`column`,padding:`16px 24px`},children:[(0,L.jsx)(`button`,{onClick:()=>s(!1),style:{position:`absolute`,top:16,right:24,zIndex:1,padding:`6px 14px`,fontSize:12,fontWeight:700,border:`1px solid ${Ir}`,borderRadius:4,background:`#fff`,color:Fr,cursor:`pointer`,fontFamily:Lr},children:`Close`}),(0,L.jsx)(`div`,{"data-testid":`work-timeline`,style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:T})]});let E=n&&f.totalH>n;return(0,L.jsxs)(`div`,{"data-testid":`work-timeline`,style:{position:`relative`},children:[(0,L.jsx)(`div`,{style:E?{maxHeight:n,overflow:`hidden`}:void 0,children:T}),E&&(0,L.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,height:64,background:`linear-gradient(transparent, #f8f9fb)`,display:`flex`,alignItems:`flex-end`,justifyContent:`center`,paddingBottom:10},children:(0,L.jsx)(`button`,{onClick:()=>{a(!0),s(!0)},style:{padding:`5px 16px`,fontSize:11,fontWeight:700,border:`1px solid ${Ir}`,borderRadius:4,background:`#fff`,color:Fr,cursor:`pointer`,fontFamily:Lr,letterSpacing:`0.03em`,boxShadow:`0 2px 8px rgba(0,0,0,0.08)`},children:`EXPAND TIMELINE`})})]})}var Oi=`'IBM Plex Mono', monospace`,ki=`#16a34a`,Ai=`#dc2626`,H=`#9ca3af`,U=`#6b7280`,ji=`#e4e4e7`;function Mi(e){return e<1e3?String(e):`${(e/1e3).toFixed(1)}k`}function Ni(e){return e===0?`0`:e>=1e3?`${(e/1e3).toFixed(e%1e3==0?0:1)}k`:String(e)}function Pi(e){if(e<=0)return[0];let t=e/4,n=10**Math.floor(Math.log10(t)),r=[1,2,2.5,5,10],i=n;for(let e of r)if(e*n>=t){i=e*n;break}let a=[];for(let t=0;t<=e+i*.1;t+=i)a.push(Math.round(t));return a[a.length-1]<e&&a.push(a[a.length-1]+Math.round(i)),a}function Fi(e){let t=[...e].filter(e=>e.date).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());if(t.length===0)return[];let n=0,r=0;return t.map((e,t)=>{let i=0,a=0;if(e.filesChanged&&e.filesChanged.length>0)for(let t of e.filesChanged)i+=t.additions,a+=t.deletions;else i=Math.max(0,e.linesOfCode);return n+=i,r+=a,{dateMs:new Date(e.date).getTime(),cumulativeAdded:n,cumulativeDeleted:r,sessionIndex:t,sessionId:e.id,title:e.title,added:i,deleted:a}})}var Ii=3600*1e3,Li=600*1e3;function Ri(e){if(e.length===0)return{visualTimes:[],totalVisualTime:0};let t=[0],n=0;for(let r=1;r<e.length;r++){let i=e[r].dateMs-e[r-1].dateMs;n+=i>Ii?Li:Math.max(i,0),t.push(n)}return{visualTimes:t,totalVisualTime:n}}function zi(e,t,n){if(e.length<2)return[];let r=e[0].dateMs,i=e[e.length-1].dateMs;if(i-r<14*864e5)return[];let a=[],o=new Date(r),s=new Date(i),c=new Date(o.getFullYear(),o.getMonth()+1,1);for(;c<=s;){let r=c.getTime(),i=0,o=1/0;for(let t=0;t<e.length;t++){let n=Math.abs(e[t].dateMs-r);n<o&&(o=n,i=t)}a.push({x:n(t[i]),label:c.toLocaleString(`en-US`,{month:`short`}).toUpperCase()}),c.setMonth(c.getMonth()+1)}return a}function Bi({sessions:e,totalLoc:t,totalFiles:n,keyMoments:r,onSessionClick:i}){let a=Fi(e);if(a.length===0)return(0,L.jsx)(`div`,{style:{fontFamily:Oi,fontSize:`0.75rem`,color:U,padding:16},children:`No session data available for growth chart.`});let{visualTimes:o,totalVisualTime:s}=Ri(a),c=new Map;if(r)for(let e of r)c.set(e.sessionId,e.label);let l=a[a.length-1].cumulativeAdded,u=a[a.length-1].cumulativeDeleted,d=u>0,f=Pi(Math.max(l,1)),p=f[f.length-1]||1,m=d?Pi(u):[],h=d?m[m.length-1]||1:0,g=Math.max(700,Math.round(s/6e4*.8)+120),_=d?50:0,v=d?2:0,y=164+v+_+36,b=s||1,x=e=>48+e/b*(g-48-16),S=e=>164-e/p*140,C=e=>164+v+e/h*_,w=a.map((e,t)=>({x:x(o[t]),y:S(e.cumulativeAdded)})),T=d?a.map((e,t)=>({x:x(o[t]),y:C(e.cumulativeDeleted)})):[];function E(e){if(e.length===0)return``;let t=`M${e[0].x.toFixed(1)},${e[0].y.toFixed(1)}`;for(let n=1;n<e.length;n++)t+=` L${e[n].x.toFixed(1)},${e[n-1].y.toFixed(1)}`,t+=` L${e[n].x.toFixed(1)},${e[n].y.toFixed(1)}`;return t}let D=E(w),O=D+` L${w[w.length-1].x.toFixed(1)},164 L${w[0].x.toFixed(1)},164 Z`,k=d?E(T):``,A=d?k+` L${T[T.length-1].x.toFixed(1)},${164+v} L${T[0].x.toFixed(1)},${164+v} Z`:``,j=new Set,ee=-1/0;for(let e=0;e<a.length;e++){let t=x(o[e]);t-ee>=90&&(j.add(e),ee=t)}a.length>1&&j.add(a.length-1);let te=zi(a,o,x),M=g>700,ne=[...e].filter(e=>e.date).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,padding:`8px 12px`,borderBottom:`1px solid ${ji}`,fontFamily:Oi},children:[(0,L.jsx)(`span`,{style:{fontSize:10,fontWeight:700,color:H,textTransform:`uppercase`,letterSpacing:`0.06em`},children:`Code Changes Over Time`}),(0,L.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:11,fontWeight:600},children:[(0,L.jsxs)(`span`,{style:{color:ki},children:[`+`,Mi(l)]}),d&&(0,L.jsxs)(`span`,{style:{color:Ai},children:[`-`,Mi(u)]}),(0,L.jsxs)(`span`,{style:{color:`#191c1e`},children:[Mi(t),` total`]})]})]}),(0,L.jsx)(`div`,{style:M?{overflowX:`auto`}:{padding:`4px 0`},children:(0,L.jsxs)(`svg`,{viewBox:`0 0 ${g} ${y}`,width:M?g:`100%`,height:M?y:void 0,preserveAspectRatio:`xMidYMid meet`,style:{display:`block`},children:[(0,L.jsxs)(`defs`,{children:[(0,L.jsxs)(`linearGradient`,{id:`addGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,L.jsx)(`stop`,{offset:`0%`,stopColor:ki,stopOpacity:.12}),(0,L.jsx)(`stop`,{offset:`100%`,stopColor:ki,stopOpacity:.02})]}),(0,L.jsxs)(`linearGradient`,{id:`delGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,L.jsx)(`stop`,{offset:`0%`,stopColor:Ai,stopOpacity:.02}),(0,L.jsx)(`stop`,{offset:`100%`,stopColor:Ai,stopOpacity:.1})]})]}),f.map(e=>(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`line`,{x1:48,y1:S(e),x2:g-16,y2:S(e),stroke:ji,strokeWidth:`0.5`,strokeDasharray:`4,4`}),(0,L.jsx)(`text`,{x:40,y:S(e)+3,textAnchor:`end`,fontFamily:Oi,fontSize:`8`,fill:H,children:e===0?``:`+${Ni(e)}`})]},`ya-${e}`)),(0,L.jsx)(`line`,{x1:48,y1:164,x2:g-16,y2:164,stroke:ji,strokeWidth:`1`}),(0,L.jsx)(`text`,{x:40,y:167,textAnchor:`end`,fontFamily:Oi,fontSize:`8`,fill:U,fontWeight:`600`,children:`0`}),d&&m.filter(e=>e>0).map(e=>(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`line`,{x1:48,y1:C(e),x2:g-16,y2:C(e),stroke:ji,strokeWidth:`0.5`,strokeDasharray:`4,4`}),(0,L.jsx)(`text`,{x:40,y:C(e)+3,textAnchor:`end`,fontFamily:Oi,fontSize:`8`,fill:H,children:`-${Ni(e)}`})]},`yd-${e}`)),te.map((e,t)=>(0,L.jsx)(`line`,{x1:e.x,y1:24,x2:e.x,y2:164+v+_,stroke:ji,strokeWidth:`0.5`,strokeDasharray:`2,4`},`m-${t}`)),(0,L.jsx)(`path`,{d:O,fill:`url(#addGrad)`}),(0,L.jsx)(`path`,{d:D,fill:`none`,stroke:ki,strokeWidth:`1.5`}),d&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{d:A,fill:`url(#delGrad)`}),(0,L.jsx)(`path`,{d:k,fill:`none`,stroke:Ai,strokeWidth:`1.5`})]}),a.map((e,t)=>{let n=x(o[t]),r=c.has(e.sessionId),a=j.has(t);return(0,L.jsxs)(`g`,{style:i?{cursor:`pointer`}:void 0,onClick:i?()=>i(ne[t]):void 0,children:[r?(0,L.jsx)(`circle`,{cx:n,cy:S(e.cumulativeAdded),r:`5`,fill:ki,stroke:`#fff`,strokeWidth:`2`}):a?(0,L.jsx)(`circle`,{cx:n,cy:S(e.cumulativeAdded),r:`3`,fill:ki}):null,d&&e.cumulativeDeleted>0&&a&&(0,L.jsx)(`circle`,{cx:n,cy:C(e.cumulativeDeleted),r:`2.5`,fill:Ai}),r&&(0,L.jsx)(`text`,{x:n,y:S(e.cumulativeAdded)-12,textAnchor:`middle`,fontFamily:Oi,fontSize:`8`,fill:U,children:c.get(e.sessionId)}),a&&(0,L.jsx)(`text`,{x:n,y:y-8,textAnchor:`middle`,fontFamily:Oi,fontSize:`8`,fill:H,children:new Date(e.dateMs).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})})]},`pt-${t}`)})]})}),(0,L.jsxs)(`div`,{style:{display:`flex`,gap:24,padding:`8px 12px`,borderTop:`1px solid ${ji}`,fontFamily:Oi,fontSize:10},children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:ki},children:[`+`,Mi(l)]}),(0,L.jsx)(`div`,{style:{color:H,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Added`})]}),d&&(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:Ai},children:[`-`,Mi(u)]}),(0,L.jsx)(`div`,{style:{color:H,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Deleted`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:`#191c1e`},children:Mi(t)}),(0,L.jsx)(`div`,{style:{color:H,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Lines changed`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:`#191c1e`},children:n}),(0,L.jsx)(`div`,{style:{color:H,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Files`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:`#191c1e`},children:a.length}),(0,L.jsx)(`div`,{style:{color:H,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Sessions`})]})]})]})}var Vi=[`preview_project`,`preview_enhanced`,`prompt_enhance`];function Hi(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function Ui(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Wi(){let[e,t]=(0,_.useState)(`loading`),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(new Set),[c,l]=(0,_.useState)(0),[u,d]=(0,_.useState)(0),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(``),[x,S]=(0,_.useState)(`idle`),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(``),[D,O]=(0,_.useState)(!1),[k,A]=(0,_.useState)(``),j=(0,_.useRef)(null),ee=(0,_.useRef)(``),te=(0,_.useCallback)(()=>{Tr().catch(()=>{}),t(`dashboard`)},[]);(0,_.useEffect)(()=>{let e=!1,n=null;return wr().then(i=>{if(!e){if(r(i),i.onboardingComplete){t(`dashboard`);return}i.sync.status===`syncing`?(t(`syncing`),a(i.sync),n=Er(n=>{e||(a(n),n.currentProject&&s(e=>new Set(e).add(n.currentProject)),n.status===`done`&&wr().then(n=>{e||(r(n),n.isEmpty?te():setTimeout(()=>{e||t(`reveal`)},800))}))})):i.isEmpty?t(`dashboard`):t(`reveal`)}}).catch(()=>{e||t(`dashboard`)}),()=>{e=!0,n?.()}},[te]),(0,_.useEffect)(()=>{if(e!==`reveal`)return;let n=[];for(let e=1;e<=4;e++)n.push(setTimeout(()=>l(e),e*400));return n.push(setTimeout(()=>t(`prompt_project`),3100)),()=>n.forEach(clearTimeout)},[e]);let M=n?.stats,ne=n?.projects??[],N=ne.length>0?ne.reduce((e,t)=>t.sessionCount>e.sessionCount?t:e,ne[0]):null,P=e!==`dashboard`&&e!==`loading`,re=Vi.includes(e),ie=[`This is what a project looks like.
13
+ Scroll down to explore.`,`The work timeline shows every
14
+ session as a bar — longer bars
15
+ mean longer sessions.`,`The growth chart tracks your
16
+ codebase over time. Green is
17
+ additions, red is deletions.`,`Each session is a card you can
18
+ click to see the full AI
19
+ conversation transcript.`];return(0,L.jsxs)(Ar,{chips:[{label:`local-first`,variant:`primary`},{label:`private by default`,variant:`green`}],actions:(0,L.jsx)(`div`,{className:`flex items-center gap-3`,children:P?(0,L.jsx)(`button`,{onClick:te,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Skip tour`}):(0,L.jsx)(I,{to:`/settings`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Settings`})}),children:[e!==`dashboard`&&(0,L.jsxs)(`div`,{className:`flex min-h-[calc(100vh-3rem)]`,style:{justifyContent:re?`flex-start`:`center`,alignItems:re?`flex-start`:`center`},children:[(0,L.jsxs)(`div`,{className:`shrink-0 transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)]`,style:{width:re?340:`100%`,maxWidth:re?340:680,padding:re?`1.5rem 1rem 1.5rem 1.5rem`:`0 1.5rem`,position:re?`sticky`:`relative`,top:re?48:`auto`,alignSelf:re?`flex-start`:`center`},children:[e===`loading`&&(0,L.jsxs)(Qi,{compact:!1,children:[(0,L.jsx)(W,{variant:`prompt`,children:`$ heyiam`}),(0,L.jsx)(W,{variant:`active`,children:` Connecting...`})]}),e===`syncing`&&i&&(0,L.jsxs)(Qi,{compact:!1,children:[(0,L.jsx)(W,{variant:`prompt`,children:`$ heyiam`}),(0,L.jsx)(W,{variant:`info`,children:` Indexing your AI coding sessions.`}),(0,L.jsx)(W,{variant:`info`,children:` Everything stays on your machine.`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),i.phase===`discovering`&&(0,L.jsx)(W,{variant:`active`,children:` Discovering sessions...`}),(i.phase===`indexing`||i.phase===`done`)&&(0,L.jsxs)(W,{variant:`passed`,children:[` Found `,i.parentCount,` sessions`]}),i.phase===`indexing`&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(W,{variant:`active`,children:[` `,`Indexing... (`,i.current,`/`,i.total,`)`,i.currentProject?` — ${i.currentProject}`:``]}),o.size>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(W,{variant:`section`,children:` Projects found:`}),[...o].slice(0,8).map(e=>(0,L.jsxs)(W,{variant:`default`,children:[` `,e]},e)),o.size>8&&(0,L.jsxs)(W,{variant:`default`,children:[` ...and `,o.size-8,` more`]})]})]}),i.phase===`done`&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(W,{variant:`passed`,children:[` Indexed `,i.total,` sessions`]}),(0,L.jsx)(W,{variant:`passed`,children:` Ready.`})]})]}),e===`reveal`&&M&&(0,L.jsxs)(Qi,{compact:!1,children:[(0,L.jsx)(W,{variant:`prompt`,children:`$ heyiam`}),(0,L.jsxs)(W,{variant:`passed`,children:[` Indexed `,M.sessionCount,` sessions. Ready.`]}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(W,{variant:`section`,children:` Your coding in numbers:`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),c>=1&&(0,L.jsxs)(W,{variant:`reveal`,children:[` `,(0,L.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:M.sessionCount}),` sessions indexed`]}),c>=2&&(0,L.jsxs)(W,{variant:`reveal`,children:[` `,(0,L.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:M.projectCount}),` projects discovered`]}),c>=3&&(0,L.jsxs)(W,{variant:`reveal`,children:[` `,(0,L.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:M.sourceCount}),` `,M.sourceCount===1?`tool`:`tools`,` detected`]}),c>=4&&N&&(0,L.jsxs)(W,{variant:`reveal`,children:[` `,`Biggest: `,(0,L.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:N.projectName}),` (`,N.sessionCount,` sessions)`]})]}),e===`prompt_project`&&(0,L.jsxs)(Qi,{compact:!1,children:[(0,L.jsx)(W,{variant:`prompt`,children:`$ heyiam`}),(0,L.jsxs)(W,{variant:`passed`,children:[` `,M?.sessionCount,` sessions across `,M?.projectCount,` projects.`]}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(W,{variant:`info`,children:` Here's what a project page looks`}),(0,L.jsx)(W,{variant:`info`,children:` like — with timeline, growth chart,`}),(0,L.jsx)(W,{variant:`info`,children:` and clickable sessions.`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)($i,{question:`See a demo project?`,onYes:()=>t(`preview_project`),onNo:()=>t(`prompt_enhance`)})]}),e===`preview_project`&&(0,L.jsxs)(Qi,{compact:!0,children:[(0,L.jsx)(W,{variant:`prompt`,children:`$ heyiam project view`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),g?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(W,{variant:`info`,children:` Viewing session detail.`}),(0,L.jsx)(W,{variant:`info`,children:` Click X to go back.`})]}):(0,L.jsxs)(L.Fragment,{children:[ie[u]?.split(`
20
+ `).map((e,t)=>(0,L.jsxs)(W,{variant:`info`,children:[` `,e]},`${u}-${t}`)),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsxs)(W,{variant:`default`,children:[` `,(0,L.jsxs)(`span`,{className:`text-white/30`,children:[`section `,u+1,`/4`]})]})]}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)($i,{question:`Enhance this project?`,onYes:()=>{v(null),t(`preview_enhanced`)},onNo:()=>{v(null),t(`preview_enhanced`)},yesLabel:`Enhance`,noLabel:`Skip`})]}),e===`preview_enhanced`&&(0,L.jsxs)(Qi,{compact:!0,children:[(0,L.jsx)(W,{variant:`prompt`,children:`$ heyiam enhance heyi-am`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(W,{variant:`passed`,children:` Reading 16 sessions...`}),(0,L.jsx)(W,{variant:`passed`,children:` Extracting skills...`}),(0,L.jsx)(W,{variant:`passed`,children:` Writing narrative...`}),(0,L.jsx)(W,{variant:`passed`,children:` Building project arc...`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(W,{variant:`passed`,children:` Enhanced. Scroll to see the`}),(0,L.jsx)(W,{variant:`passed`,children:` difference.`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)($i,{question:`Continue tour?`,onYes:()=>t(`prompt_enhance`),onNo:()=>te()})]}),e===`prompt_enhance`&&(0,L.jsxs)(Qi,{compact:!0,children:[(0,L.jsx)(W,{variant:`prompt`,children:`$ heyiam enhance`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(W,{variant:`info`,children:` To enhance your own projects,`}),(0,L.jsx)(W,{variant:`info`,children:` you need an Anthropic API key.`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),m?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(W,{variant:`passed`,children:` API key saved. You're all set.`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)($i,{question:`Continue?`,onYes:()=>t(`claim_username`),onNo:()=>t(`claim_username`)})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)($i,{question:`Add your API key now?`,onYes:()=>{},onNo:()=>t(`claim_username`),noLabel:`I'll do this later`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(`div`,{className:`triage-terminal__line opacity-80`,children:` Paste your key:`}),(0,L.jsx)(`div`,{className:`flex items-center gap-2 mt-1 ml-4`,children:(0,L.jsx)(`input`,{type:`password`,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&f.startsWith(`sk-`)&&ur(f).then(()=>h(!0)).catch(()=>{})},placeholder:`sk-ant-...`,className:`bg-white/10 border border-white/20 rounded px-2 py-1 text-[11px] font-mono text-[#34d399] w-48 outline-none focus:border-[#9dcaff] placeholder:text-white/20`})}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`You can always add this later in Settings.`]})]})]}),e===`claim_username`&&(0,L.jsxs)(Qi,{compact:!1,children:[(0,L.jsx)(W,{variant:`prompt`,children:`$ heyiam publish`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(W,{variant:`section`,children:` Claim your portfolio page`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)(W,{variant:`info`,children:` Want to show off your AI dev work?`}),(0,L.jsx)(W,{variant:`info`,children:` Claim a name and create a public`}),(0,L.jsx)(W,{variant:`info`,children:` portfolio on heyi.am — show how`}),(0,L.jsx)(W,{variant:`info`,children:` you build, not just what you ship.`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsxs)(W,{variant:`info`,children:[` Your page: `,(0,L.jsxs)(`span`,{className:`text-[#9dcaff] font-semibold`,children:[`heyi.am/`,y||`your-name`]})]}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`Optional — the CLI works fully without an account.`]}),(0,L.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`You choose what to publish. Nothing is public by default.`]}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),x===`claimed`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(W,{variant:`passed`,children:[` Welcome, `,T,`!`]}),(0,L.jsxs)(W,{variant:`passed`,children:[` heyi.am/`,T,` is yours.`]}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsx)($i,{question:`Ready to explore?`,onYes:te,onNo:te,yesLabel:`Let's go`})]}):D?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(W,{variant:`active`,children:` Waiting for signup to complete...`}),(0,L.jsx)(W,{variant:`info`,children:` A browser window should have opened.`}),(0,L.jsx)(W,{variant:`info`,children:` Sign up there, then come back here.`}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 ml-4`,children:[(0,L.jsx)(`button`,{onClick:()=>{O(!1),S(`idle`),A(``)},className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:`Cancel`}),(0,L.jsx)(`button`,{onClick:()=>{O(!1),te()},className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:`Skip this`})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`triage-terminal__line opacity-80`,children:` Choose a username:`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 mt-1 ml-4`,children:[(0,L.jsx)(`span`,{className:`text-white/40 text-[11px] font-mono`,children:`heyi.am/`}),(0,L.jsx)(`input`,{type:`text`,value:y,onChange:e=>{let t=e.target.value.toLowerCase().replace(/[^a-z0-9-]/g,``);b(t),S(`idle`),w(``),j.current&&clearTimeout(j.current),t.length>=3&&t!==ee.current&&(j.current=setTimeout(async()=>{ee.current=t,S(`checking`);try{let e=await br(t);S(e.available?`available`:`taken`),e.available||w(e.reason||`Taken`)}catch{S(`idle`)}},500))},onKeyDown:async e=>{if(e.key===`Enter`&&y.length>=3){if(e.preventDefault(),x===`submitting`||x===`checking`||D)return;j.current&&clearTimeout(j.current),S(`submitting`),w(``);try{let e=await br(y);if(!e.available){S(`taken`),w(e.reason||`Username is taken`);return}let t=await xr(y);A(t.device_code),O(!0),S(`available`),window.open(t.verification_uri,`_blank`);let n=Date.now(),r=async()=>{try{let e=await yr(t.device_code);if(e.authenticated){O(!1),S(`claimed`),E(e.username||y);return}}catch{}Date.now()-n<3e5?setTimeout(r,5e3):(O(!1),S(`error`),w(`Timed out. Try again.`))};setTimeout(r,5e3)}catch{S(`error`),w(`Could not connect. Try again later.`)}}},placeholder:`your-name`,className:`bg-white/10 border border-white/20 rounded px-2 py-1 text-[11px] font-mono text-[#34d399] w-36 outline-none focus:border-[#9dcaff] placeholder:text-white/20`,autoFocus:!0}),x===`checking`&&(0,L.jsx)(`span`,{className:`text-[10px] text-[#fbbf24] font-mono`,children:`checking...`}),x===`available`&&(0,L.jsx)(`span`,{className:`text-[10px] text-[#34d399] font-mono`,children:`available!`}),x===`submitting`&&(0,L.jsx)(`span`,{className:`text-[10px] text-[#fbbf24] font-mono`,children:`claiming...`}),x===`taken`&&(0,L.jsx)(`span`,{className:`text-[10px] text-[#f87171] font-mono`,children:C}),x===`error`&&(0,L.jsx)(`span`,{className:`text-[10px] text-[#f87171] font-mono`,children:C})]}),y.length>=3&&x===`idle`&&(0,L.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px] mt-1`,children:[` `,`Press Enter to check & claim`]}),(0,L.jsx)(W,{variant:`default`,children:`\xA0`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 mt-1 ml-4`,children:[(0,L.jsx)(`button`,{disabled:D||x===`submitting`,onClick:async()=>{if(!(D||x===`submitting`)){S(`submitting`),w(``);try{let e=await xr(``);A(e.device_code),O(!0),S(`idle`),window.open(e.verification_uri,`_blank`);let t=Date.now(),n=async()=>{try{let t=await yr(e.device_code);if(t.authenticated){O(!1),S(`claimed`),E(t.username||``);return}}catch{}Date.now()-t<3e5?setTimeout(n,5e3):(O(!1),S(`error`),w(`Timed out.`))};setTimeout(n,5e3)}catch{S(`error`),w(`Could not connect. Try again later.`)}}},className:`text-[10px] font-mono px-2.5 py-1 rounded bg-white/10 text-white/70 hover:text-white/90 hover:bg-white/15 transition-colors disabled:opacity-40`,children:`Already have an account? Log in`}),(0,L.jsx)(`button`,{onClick:()=>te(),className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:`I'll do this later`})]})]})]})]}),re&&(0,L.jsx)(`div`,{className:`flex-1 min-w-0 pr-4 pt-6 pb-8 animate-[slideIn_0.6s_cubic-bezier(0.16,1,0.3,1)_forwards]`,children:(e===`preview_project`||e===`preview_enhanced`||e===`prompt_enhance`)&&(0,L.jsx)(Ji,{enhanced:e===`preview_enhanced`||e===`prompt_enhance`,onScrollSection:d,selectedSession:g,onSelectSession:v},e===`preview_project`?`draft`:`enhanced`)})]}),e===`dashboard`&&(0,L.jsx)(ea,{dashboard:n,stats:M,projects:ne})]})}var Gi=[`bg-primary`,`bg-green`,`bg-violet`];function Ki(){let e=[`Set up project scaffolding with Vite + React + TypeScript`,`Build SQLite sync pipeline for session indexing`,`Implement real-time file watcher with debounce`,`Design project detail page with work timeline`,`Add full-text search across all sessions`,`Fix subagent indexing — children were silently dropped`,`Add multi-agent orchestration visualization`,`Build guided onboarding flow with CLI aesthetics`,`Implement session archiving with hard links`,`Add Cursor workspace discovery and polling`,`Design growth chart with cumulative LOC tracking`,`Build publish flow with streaming SSE upload`,`Add Ed25519 session sealing for interviews`,`Implement project-level AI enhancement pipeline`,`Fix work timeline SVG rendering for long sessions`,`Add context export in compact/summary/full formats`],t=[`TypeScript`,`React`,`SQLite`,`Node.js`,`CSS`,`Vite`,`Shell`,`Vitest`],n=[`claude`,`claude`,`claude`,`cursor`,`claude`,`codex`],r=new Date(`2026-02-15T10:00:00Z`),i=[];for(let a=0;a<e.length;a++){let o=new Date(r.getTime()+a*2.5*864e5+Math.random()*432e5),s=15+Math.floor(Math.random()*120),c=new Date(o.getTime()+s*6e4),l=Math.floor(200+Math.random()*5e3),u=Math.floor(50+Math.random()*l*.3),d=a%4==0?[{sessionId:`child-${a}-1`,role:`frontend-dev`,durationMinutes:Math.floor(s*.6),linesOfCode:Math.floor(l*.3),date:o.toISOString()},{sessionId:`child-${a}-2`,role:`qa-engineer`,durationMinutes:Math.floor(s*.4),linesOfCode:Math.floor(l*.15),date:o.toISOString()}]:a%3==0?[{sessionId:`child-${a}-1`,role:`backend-dev`,durationMinutes:Math.floor(s*.7),linesOfCode:Math.floor(l*.4),date:o.toISOString()}]:void 0;i.push({id:`mock-session-${a}`,title:e[a],date:o.toISOString(),endTime:c.toISOString(),durationMinutes:s,wallClockMinutes:s+Math.floor(Math.random()*30),turns:10+Math.floor(Math.random()*60),linesOfCode:l+u,status:`draft`,projectName:`heyi-am`,rawLog:[],skills:[t[a%t.length],t[(a+3)%t.length]],source:n[a%n.length],filesChanged:[[`src/sync.ts`,`src/db.ts`,`src/parsers/index.ts`,`src/server.ts`,`src/bridge.ts`],[`src/analyzer.ts`,`src/search.ts`,`src/settings.ts`,`src/export.ts`],[`app/src/components/ProjectDetail.tsx`,`app/src/components/WorkTimeline.tsx`,`app/src/api.ts`],[`src/routes/projects.ts`,`src/routes/sessions.ts`,`src/routes/dashboard.ts`,`app/src/types.ts`],[`src/parsers/claude.ts`,`src/parsers/cursor.ts`,`src/parsers/codex.ts`,`src/parsers/gemini.ts`],[`app/src/components/FirstRun.tsx`,`app/src/index.css`,`src/routes/export.ts`],[`src/archive.ts`,`src/context-export.ts`,`app/src/components/Search.tsx`],[`app/src/components/GrowthChart.tsx`,`app/src/components/SessionView.tsx`,`src/transcript.ts`]][a%8].map((e,t)=>({path:e,additions:Math.floor(l/(t+1.5)),deletions:Math.floor(u/(t+2))})),toolBreakdown:[{tool:`Read`,count:15+Math.floor(Math.random()*30)},{tool:`Edit`,count:8+Math.floor(Math.random()*25)},{tool:`Bash`,count:5+Math.floor(Math.random()*20)},{tool:`Write`,count:2+Math.floor(Math.random()*10)},{tool:`Grep`,count:3+Math.floor(Math.random()*8)},{tool:`Glob`,count:1+Math.floor(Math.random()*5)}],children:d,childCount:d?.length??0,isOrchestrated:!!d})}return i}var qi=Ki();function Ji({enhanced:e,onScrollSection:t,selectedSession:n,onSelectSession:r}){let i=(0,_.useRef)([]);(0,_.useEffect)(()=>{let e=[];return i.current.forEach((n,r)=>{if(!n)return;let i=new IntersectionObserver(([e])=>{e.isIntersecting&&t(r)},{threshold:.3});i.observe(n),e.push(i)}),()=>e.forEach(e=>e.disconnect())},[t]);let a=qi.reduce((e,t)=>e+t.linesOfCode,0);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Zi,{url:`localhost:17845/project/heyi-am`,children:(0,L.jsxs)(`div`,{className:`bg-surface-mid`,children:[(0,L.jsxs)(`div`,{ref:e=>{i.current[0]=e},className:`p-5 pb-0`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`font-display text-xl font-bold text-on-surface`,children:`heyi-am`}),(0,L.jsx)(`span`,{className:`text-on-surface-variant text-[0.8125rem]`,children:`Feb 15 – Mar 25, 2026`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(R,{variant:e?`green`:`primary`,children:e?`Enhanced`:`Draft`}),(0,L.jsx)(R,{variant:`primary`,children:`16 sessions`})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-4 mt-1 mb-2`,children:[(0,L.jsxs)(`a`,{href:`https://heyi.am`,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-xs text-primary hover:underline flex items-center gap-1`,children:[(0,L.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`currentColor`,children:(0,L.jsx)(`path`,{d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z`})}),`github.com/interactivecats/heyi.am`]}),(0,L.jsxs)(`a`,{href:`https://heyi.am`,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-xs text-primary hover:underline flex items-center gap-1`,children:[(0,L.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:(0,L.jsx)(`path`,{d:`M6.5 10.5l3-3m-1.5-2a2.5 2.5 0 013.54 3.54l-1.5 1.5m-4.08-1.08a2.5 2.5 0 01-3.54-3.54l1.5-1.5`})}),`heyi.am`]})]}),(0,L.jsxs)(`div`,{className:`rounded-md border border-ghost overflow-hidden shadow-sm mb-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 py-2 bg-surface-low border-b border-ghost`,children:[(0,L.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#ff5f57]`}),(0,L.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#febc2e]`}),(0,L.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#28c840]`})]}),(0,L.jsx)(`div`,{className:`max-h-96 overflow-y-auto`,children:(0,L.jsx)(`img`,{src:`/heyi-am-screenshot.png`,alt:`heyi.am — proof-of-work for AI-native developers`,className:`w-full h-auto`})})]}),e&&(0,L.jsxs)(z,{className:`my-3`,children:[(0,L.jsx)(V,{title:`Narrative summary`,meta:`AI-generated`}),(0,L.jsx)(`p`,{className:`leading-relaxed text-on-surface border-l-[3px] border-primary pl-3`,style:{fontSize:`clamp(0.8125rem, 1.2vw, 1rem)`},children:`Built a local-first developer portfolio tool that indexes AI coding sessions across Claude Code, Cursor, Codex, and Gemini CLI. Designed a real-time sync pipeline with SQLite indexing, implemented multi-agent session visualization, and shipped a guided onboarding flow.`})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-4`,children:[(0,L.jsx)(Nr,{label:`Sessions`,value:16}),(0,L.jsx)(Nr,{label:`Human / Agents`,value:`52h / 78h`}),(0,L.jsx)(Nr,{label:`Lines changed`,value:Ui(a)}),(0,L.jsx)(Nr,{label:`Files`,value:847})]})]}),e&&(0,L.jsx)(`div`,{className:`px-5 pb-4`,children:(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Project arc`,meta:`AI-generated`}),(0,L.jsxs)(`div`,{className:`relative pl-5`,children:[(0,L.jsx)(`div`,{className:`absolute left-1 top-1.5 bottom-1.5 w-0.5 bg-ghost rounded-full`}),[{title:`Foundation`,desc:`Set up project scaffolding, parser pipeline, and SQLite schema`},{title:`Core features`,desc:`Built sync engine, search, work timeline, and growth chart`},{title:`Polish`,desc:`Onboarding flow, subagent visualization, export pipeline`}].map(e=>(0,L.jsxs)(`div`,{className:`relative pb-3 last:pb-0`,children:[(0,L.jsx)(`div`,{className:`absolute -left-5 top-1.5 w-2 h-2 rounded-full bg-primary shadow-[0_0_0_3px_rgba(8,68,113,0.1)]`}),(0,L.jsx)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant`,children:e.title}),(0,L.jsx)(B,{children:(0,L.jsx)(`span`,{className:`text-on-surface-variant`,children:e.desc})})]},e.title))]})]})}),e&&(0,L.jsx)(`div`,{className:`px-5 pb-4`,children:(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Skills extracted`,meta:`14 skills`}),(0,L.jsx)(`div`,{className:`flex gap-1.5 flex-wrap`,children:[`TypeScript`,`React`,`SQLite`,`Node.js`,`CSS`,`Vite`,`Vitest`,`Shell`,`HTML`,`Express`,`SSE`,`FTS5`,`Ed25519`,`Docker`].map(e=>(0,L.jsx)(R,{variant:`violet`,children:e},e))})]})}),(0,L.jsx)(`div`,{ref:e=>{i.current[1]=e},className:`px-5 pb-4`,children:(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Work timeline`,meta:`sessions over time`}),(0,L.jsx)(Di,{sessions:qi,maxHeight:280})]})}),(0,L.jsx)(`div`,{ref:e=>{i.current[2]=e},className:`px-5 pb-4`,children:(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Project growth`,meta:`lines changed`}),(0,L.jsx)(Bi,{sessions:qi,totalLoc:a,totalFiles:847})]})}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 px-5 pb-4`,children:[(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Key decisions`,meta:`signal`}),(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:e?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(B,{title:`SQLite over filesystem`,children:`Chose SQLite for session indexing over raw filesystem scans — 10x faster project listing.`}),(0,L.jsx)(B,{title:`Local-first architecture`,children:`All data stays on the user's machine. No cloud dependency for core features.`}),(0,L.jsx)(B,{title:`Multi-parser pipeline`,children:`One bridge layer normalizes data from Claude, Cursor, Codex, and Gemini into a shared schema.`})]}):(0,L.jsx)(B,{children:`Enhance this project to extract key decisions.`})})]}),(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Source breakdown`,meta:`provenance`}),(0,L.jsxs)(`table`,{className:`w-full border-collapse text-[0.8125rem]`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Source`}),(0,L.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Count`})]})}),(0,L.jsx)(`tbody`,{children:[{source:`claude`,count:10},{source:`cursor`,count:3},{source:`codex`,count:2},{source:`gemini`,count:1}].map(e=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.source}),(0,L.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.count})]},e.source))})]})]})]}),(0,L.jsx)(`div`,{ref:e=>{i.current[3]=e},className:`px-5 pb-5`,children:(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:e?`Featured sessions`:`Sessions`,meta:`${qi.length} total`}),(0,L.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:qi.slice(0,6).map((e,t)=>(0,L.jsxs)(`button`,{type:`button`,onClick:()=>r(e),className:`text-left bg-surface-lowest border border-ghost rounded-sm p-4 cursor-pointer transition-shadow hover:shadow-md`,children:[(0,L.jsx)(`div`,{className:`h-1 rounded-full mb-3 ${Gi[t%Gi.length]}`}),(0,L.jsx)(`h4`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface mb-1 line-clamp-2`,children:e.title}),(0,L.jsxs)(`span`,{className:`text-on-surface-variant text-xs`,children:[Hi(e.durationMinutes),` · `,e.turns,` turns · `,Ui(e.linesOfCode),` lines`]}),e.skills?.[0]&&(0,L.jsx)(`div`,{className:`mt-2`,children:(0,L.jsx)(R,{variant:`violet`,children:e.skills[0]})})]},e.id))})]})})]})}),n&&(0,L.jsx)(`div`,{className:`fixed inset-0 z-50 flex justify-end bg-black/40`,onClick:e=>{e.target===e.currentTarget&&r(null)},children:(0,L.jsx)(`div`,{className:`w-[600px] max-w-full h-full bg-surface overflow-y-auto shadow-[-8px_0_32px_rgba(25,28,30,0.1)] animate-[slideIn_0.3s_ease_forwards]`,children:(0,L.jsxs)(`div`,{className:`p-8`,children:[(0,L.jsx)(`div`,{className:`flex items-center gap-3 mb-6`,children:(0,L.jsx)(`button`,{type:`button`,onClick:()=>r(null),className:`font-mono text-[0.8125rem] text-on-surface-variant bg-surface-low border border-surface-high rounded-md px-3 py-1 cursor-pointer hover:text-on-surface`,children:`ESC · Close`})}),(0,L.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface mb-2`,children:n.title}),(0,L.jsxs)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant mb-4`,children:[new Date(n.date).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),n.source&&` · ${n.source}`]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-5`,children:[(0,L.jsx)(Yi,{label:`Active Time`,value:Hi(n.durationMinutes),primary:!0}),(0,L.jsx)(Yi,{label:`Turns`,value:n.turns}),(0,L.jsx)(Yi,{label:`Files`,value:n.filesChanged?.length??`—`}),(0,L.jsx)(Yi,{label:`Lines changed`,value:Ui(n.linesOfCode)})]}),e&&(0,L.jsx)(`p`,{className:`text-[0.9375rem] leading-relaxed text-on-surface border-l-[3px] border-primary pl-3 mb-5`,children:`Implemented the core sync pipeline that discovers sessions from the filesystem, checks staleness against SQLite, and indexes new or changed sessions with full text search support.`}),n.skills&&n.skills.length>0&&(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mb-5`,children:n.skills.map(e=>(0,L.jsx)(R,{variant:`violet`,children:e},e))}),n.turns>=50&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsxs)(Xi,{children:[`Session Activity · `,n.turns,` turns over `,Hi(n.durationMinutes)]}),(0,L.jsx)(Di,{sessions:[n],maxHeight:200})]}),(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsx)(Xi,{children:`Execution Path`}),(e?[{n:1,title:`Read existing parsers and DB schema`,desc:`Analyzed the current session discovery pipeline and SQLite schema to understand the data flow`},{n:2,title:`Build staleness checker`,desc:`Compared file mtime/size against DB records to skip unchanged sessions`},{n:3,title:`Implement indexing loop`,desc:`Parse → bridge → analyze → upsert for each stale session, with progress reporting`}]:(()=>{let e=n.filesChanged??[],t=[],r=Math.max(1,Math.ceil(e.length/3));for(let n=0;n<e.length;n+=r){let i=e.slice(n,n+r);t.push({n:t.length+1,title:`Modified ${i.map(e=>e.path.split(`/`).pop()).join(`, `)}`,desc:``})}return t.length>0?t:[{n:1,title:`Modified multiple files`,desc:``}]})()).map(e=>(0,L.jsxs)(`div`,{className:`flex gap-3 items-start py-2.5 border-b border-ghost last:border-b-0`,children:[(0,L.jsx)(`div`,{className:`w-6 h-6 rounded-full bg-primary text-white font-mono text-[0.625rem] font-bold flex items-center justify-center flex-shrink-0`,children:e.n}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-0.5`,children:e.title}),e.desc&&(0,L.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.desc})]})]},e.n))]}),n.toolBreakdown&&n.toolBreakdown.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsx)(Xi,{children:`Tool Usage`}),n.toolBreakdown.map(e=>(0,L.jsxs)(`div`,{className:`flex justify-between items-center py-1.5 border-b border-ghost last:border-b-0 font-mono text-xs`,children:[(0,L.jsx)(`span`,{className:`text-on-surface`,children:e.tool}),(0,L.jsx)(`span`,{className:`text-on-surface-variant`,children:e.count})]},e.tool))]}),n.filesChanged&&n.filesChanged.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsx)(Xi,{children:`Top Files`}),n.filesChanged.slice(0,10).map(e=>(0,L.jsxs)(`div`,{className:`flex justify-between items-center py-1.5 border-b border-ghost last:border-b-0 font-mono text-xs`,children:[(0,L.jsx)(`span`,{className:`text-on-surface truncate min-w-0`,children:e.path}),(0,L.jsxs)(`span`,{className:`flex-shrink-0 ml-2 whitespace-nowrap`,children:[(0,L.jsxs)(`span`,{className:`text-green-600 font-semibold`,children:[`+`,e.additions]}),(0,L.jsxs)(`span`,{className:`text-red-600 font-semibold ml-1`,children:[`-`,e.deletions]})]})]},e.path))]})]})})})]})}function Yi({label:e,value:t,primary:n}){return(0,L.jsxs)(`div`,{className:`text-center p-3 border border-ghost rounded-sm bg-surface-lowest`,children:[(0,L.jsx)(`div`,{className:`font-mono text-xl font-bold ${n?`text-primary`:`text-on-surface`}`,children:t}),(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mt-1`,children:e})]})}function Xi({children:e}){return(0,L.jsx)(`div`,{className:`font-mono text-[0.625rem] font-semibold uppercase tracking-wider text-on-surface-variant mb-2.5`,children:e})}function Zi({url:e,children:t}){return(0,L.jsxs)(`div`,{className:`rounded-lg border border-[#d1d5db] bg-white shadow-xl overflow-hidden`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-[#f1f3f5] border-b border-[#d1d5db]`,children:[(0,L.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,L.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#ff5f57]`}),(0,L.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#febc2e]`}),(0,L.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#28c840]`})]}),(0,L.jsx)(`div`,{className:`flex-1 mx-2`,children:(0,L.jsx)(`div`,{className:`bg-white rounded-md border border-[#d1d5db] px-3 py-1 text-[10px] text-[#6b7280] font-mono`,children:e})})]}),(0,L.jsx)(`div`,{className:`bg-[#f1f5f9] max-h-[70vh] overflow-y-auto`,children:t})]})}function Qi({children:e,compact:t}){let n=(0,_.useRef)(null);return(0,_.useEffect)(()=>{n.current?.scrollTo({top:n.current.scrollHeight})}),(0,L.jsxs)(`div`,{className:`triage-terminal`,style:{maxWidth:t?340:680,margin:`0 auto`,padding:t?`0.875rem 1rem 0.625rem`:`1.5rem 1.5rem 1rem`,fontSize:t?`0.6875rem`:`0.8125rem`},children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-3`,children:[(0,L.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#ff5f57]`}),(0,L.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#febc2e]`}),(0,L.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#28c840]`})]}),(0,L.jsx)(`div`,{ref:n,className:`triage-terminal__feed`,children:e})]})}function W({variant:e,children:t}){return(0,L.jsx)(`div`,{className:`triage-terminal__line ${e===`prompt`?`triage-terminal__prompt`:e===`passed`?`triage-terminal__line--passed`:e===`active`?`triage-terminal__line--active`:e===`section`?`triage-terminal__section`:e===`reveal`?`triage-terminal__line--passed opacity-0 animate-[fadeIn_0.3s_ease_forwards]`:e===`info`?`opacity-80`:``}`,children:t})}function $i({question:e,onYes:t,onNo:n,defaultNo:r,yesLabel:i,noLabel:a}){let o=(0,_.useRef)(null),[s,c]=(0,_.useState)(r?``:`Y`);return(0,_.useEffect)(()=>{let e=setTimeout(()=>o.current?.focus(),100);return()=>clearTimeout(e)},[]),(0,L.jsxs)(`div`,{className:`mt-1`,children:[(0,L.jsxs)(`div`,{className:`triage-terminal__line flex items-center gap-0 flex-wrap`,children:[(0,L.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:` > `}),(0,L.jsxs)(`span`,{children:[e,` `]}),(0,L.jsxs)(`span`,{className:`text-white/40`,children:[r?`[y/N]`:`[Y/n]`,` `]}),(0,L.jsx)(`input`,{ref:o,type:`text`,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let r=s.trim().toLowerCase();r===``||r===`y`||r===`yes`?t():n()}},className:`bg-transparent border-none outline-none text-[#34d399] font-mono w-12 caret-[#34d399]`,style:{fontSize:`inherit`,lineHeight:`inherit`,padding:0}})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 mt-2 ml-4`,children:[(0,L.jsxs)(`button`,{onClick:t,className:`text-[10px] font-mono px-2.5 py-1 rounded bg-white/10 text-white/90 hover:bg-white/20 transition-colors`,children:[i??`Yes`,` `,(0,L.jsx)(`span`,{className:`text-white/30 ml-0.5`,children:`↵`})]}),(0,L.jsx)(`button`,{onClick:n,className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:a??`No`})]})]})}function ea({dashboard:e,stats:t,projects:n}){let r=n.slice(0,4),i=t?.enhancedCount??0;return(0,L.jsxs)(`div`,{className:`p-6`,children:[(0,L.jsx)(`h1`,{className:`font-display text-[1.75rem] leading-[1.1] font-bold text-on-surface`,children:`Turn your AI sessions into a dev portfolio.`}),t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`h-6`}),(0,L.jsxs)(`div`,{className:`grid grid-cols-4 gap-4`,children:[(0,L.jsx)(na,{label:`Sessions indexed`,value:t.sessionCount,to:`/archive`,color:`var(--primary)`}),(0,L.jsx)(na,{label:`Projects`,value:t.projectCount,to:`/projects`}),(0,L.jsx)(na,{label:`Enhanced`,value:i,to:`/projects`,color:i>0?`#34d399`:void 0}),(0,L.jsx)(na,{label:`Sources`,value:t.sourceCount,to:`/sources`})]})]}),(0,L.jsx)(`div`,{className:`h-6`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,L.jsx)(I,{to:`/sources`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-4 py-2 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,children:`Sync new sessions`}),(0,L.jsx)(I,{to:`/projects`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-4 py-2 rounded-sm text-primary border border-ghost hover:border-outline transition-colors`,children:`View projects`}),(0,L.jsx)(I,{to:`/search`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-4 py-2 rounded-sm text-primary border border-ghost hover:border-outline transition-colors`,children:`Search sessions`}),e?.sync.status===`syncing`&&(0,L.jsxs)(`span`,{className:`text-xs text-on-surface-variant`,children:[`syncing `,e.sync.current,`/`,e.sync.total,e.sync.currentProject?` — ${e.sync.currentProject}`:``,`...`]})]}),(0,L.jsx)(`div`,{className:`h-10`}),r.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-baseline justify-between mb-3`,children:[(0,L.jsx)(`h2`,{className:`font-semibold text-sm text-on-surface`,children:`Recent projects`}),(0,L.jsx)(I,{to:`/projects`,className:`text-xs text-primary hover:underline`,children:`View all →`})]}),(0,L.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:r.map(e=>(0,L.jsx)(ta,{project:e},e.projectDir))}),(0,L.jsx)(`div`,{className:`h-10`})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,L.jsx)(ra,{to:`/archive`,label:`Archive`,title:`Back up sessions`,desc:`Import from local AI tools before they expire. Everything stays on your machine.`}),(0,L.jsx)(ra,{to:`/projects`,label:`Build`,title:`AI case studies`,desc:`AI reads your sessions, extracts skills, and drafts a narrative for each project.`}),(0,L.jsx)(ra,{to:`/search`,label:`Search`,title:`Find past work`,desc:`Full-text search across all sessions. Filter by tool, project, or skill.`}),(0,L.jsx)(ra,{to:`/projects`,label:`Export`,title:`HTML, markdown, or publish`,desc:`Save locally, export markdown, or publish a public portfolio on heyi.am.`})]}),(0,L.jsx)(`div`,{className:`h-8`}),(0,L.jsxs)(`div`,{className:`border-t border-ghost pt-4 flex items-start gap-6 text-xs text-on-surface-variant`,children:[(0,L.jsx)(`span`,{children:`Everything is local by default.`}),(0,L.jsx)(`span`,{children:`Nothing is published unless you choose to.`}),(0,L.jsx)(`span`,{children:`No account required to archive or export.`})]})]})}function ta({project:e}){return(0,L.jsxs)(I,{to:`/project/${encodeURIComponent(e.projectDir)}`,className:`group block bg-white border border-ghost rounded-sm p-3.5 hover:border-outline transition-colors`,children:[(0,L.jsx)(`div`,{className:`font-semibold text-sm text-on-surface truncate`,children:e.projectName}),(0,L.jsxs)(`div`,{className:`text-xs text-on-surface-variant mt-0.5`,children:[e.sessionCount,` session`,e.sessionCount===1?``:`s`,e.enhancedAt&&(0,L.jsx)(`span`,{className:`ml-2`,style:{color:`#34d399`},children:`enhanced`})]}),e.skills.length>0&&(0,L.jsx)(`div`,{className:`flex gap-1 mt-2 flex-wrap`,children:e.skills.slice(0,3).map(e=>(0,L.jsx)(R,{children:e},e))})]})}function na({label:e,value:t,to:n,color:r}){return(0,L.jsxs)(I,{to:n,className:`block bg-white border border-ghost rounded-sm px-4 py-3 hover:border-outline transition-colors`,children:[(0,L.jsx)(`div`,{className:`text-2xl font-bold`,style:r?{color:r}:{color:`var(--on-surface)`},children:t}),(0,L.jsx)(`div`,{className:`text-xs text-on-surface-variant mt-0.5`,children:e})]})}function ra({to:e,label:t,title:n,desc:r}){return(0,L.jsxs)(I,{to:e,className:`group block bg-white border border-ghost rounded-sm p-4 hover:border-outline transition-colors`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-primary mb-1.5`,children:t}),(0,L.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-1`,children:n}),(0,L.jsx)(`div`,{className:`text-xs text-on-surface-variant leading-relaxed`,children:r})]})}function ia(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{Zn().then(e=>{t(e.sources.map(e=>({tool:e.name,path:e.path+(e.dateRange?` · ${e.dateRange}`:``),live:e.liveCount,archived:e.archivedCount,chips:[{label:`${e.liveCount} live`,variant:`primary`},{label:`${e.archivedCount} archived`,variant:`green`},...e.retentionRisk?[{label:e.retentionRisk,variant:`amber`}]:[]],kpis:[{label:`Health`,value:e.health}]})))}).catch(()=>{a(!0)}).finally(()=>r(!1))},[]),n)return(0,L.jsx)(Ar,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],children:(0,L.jsx)(`div`,{className:`p-6`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Scanning sources...`})})});if(i)return(0,L.jsx)(Ar,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],children:(0,L.jsx)(`div`,{className:`p-6`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Scan failed. Could not load source data.`})})});let o=e.reduce((e,t)=>e+t.live,0),s=e.reduce((e,t)=>e+t.archived,0),c=e.some(e=>e.chips.some(e=>e.variant===`amber`));return(0,L.jsx)(Ar,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],actions:(0,L.jsx)(`button`,{className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors bg-transparent`,children:`Rescan all`}),children:(0,L.jsxs)(`div`,{className:`p-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`font-display text-xl font-semibold text-on-surface`,children:`What we found, what we archived, and what we skipped`}),(0,L.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`The ingestion layer should feel inspectable, not magical.`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,L.jsxs)(R,{variant:`green`,children:[s,` archived`]}),c&&(0,L.jsx)(R,{variant:`amber`,children:`Claude retention risk detected`})]})]}),(0,L.jsx)(`div`,{className:`h-4`}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,L.jsx)(Nr,{label:`Sources scanned`,value:e.length}),(0,L.jsx)(Nr,{label:`Live sessions`,value:o}),(0,L.jsx)(Nr,{label:`Archived`,value:s})]}),(0,L.jsx)(`div`,{className:`h-5`}),(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map(e=>(0,L.jsxs)(z,{children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between mb-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`font-display text-[0.9375rem] font-semibold text-on-surface`,children:e.tool}),(0,L.jsx)(`span`,{className:`font-mono text-xs text-outline`,children:e.path})]}),(0,L.jsx)(`div`,{className:`flex items-center gap-1`,children:e.chips.map(e=>(0,L.jsx)(R,{variant:e.variant,children:e.label},e.label))})]}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-4 text-[0.8125rem] text-on-surface-variant mt-2`,children:e.kpis.map(e=>(0,L.jsxs)(`span`,{children:[(0,L.jsxs)(`strong`,{className:`text-on-surface`,children:[e.label,`:`]}),` `,e.value]},e.label))})]},e.tool))}),(0,L.jsx)(`div`,{className:`h-5`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(I,{to:`/archive`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,children:`Review archive`}),(0,L.jsx)(I,{to:`/projects`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors`,children:`Continue to projects`}),(0,L.jsx)(`button`,{className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors bg-transparent border-none`,children:`Add custom path`})]})]})})}function aa(e){switch(e){case`healthy`:return{status:`healthy`,statusVariant:`green`};case`warning`:return{status:`partial`,statusVariant:`default`};case`error`:return{status:`filtered`,statusVariant:`violet`}}}function oa(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(!0),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(null);function x(){return Promise.all([Qn(),Zn()]).then(([e,n])=>{t({archived:e.total,oldest:e.oldest,sources:e.sourcesCount,lastSync:e.lastSync}),r(n.sources.map(e=>({source:e.name,archived:e.archivedCount,...aa(e.health)})))})}(0,_.useEffect)(()=>{x().catch(()=>s(!0)).finally(()=>a(!1))},[]);async function S(){l(!0),d(null);try{let e=await $n();e.archived===0?d(`Archive is up to date — no new sessions to sync.`):d(`Archived ${e.archived} new session${e.archived===1?``:`s`}.`),await x()}catch{d(`Sync failed. Check the console for details.`)}finally{l(!1)}}async function C(){p(!0),h(null);try{h(await tr())}catch{h({total:0,verified:0,missing:0,errors:[`Verification failed. Check the console for details.`]})}finally{p(!1)}}async function w(){v(!0),b(null);try{await er()}catch(e){b(e.message)}finally{v(!1)}}return i?(0,L.jsx)(Ar,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],children:(0,L.jsx)(`div`,{className:`p-6`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading archive...`})})}):o||!e?(0,L.jsx)(Ar,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],children:(0,L.jsx)(`div`,{className:`p-6`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Failed to load archive data.`})})}):(0,L.jsx)(Ar,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],actions:(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`button`,{onClick:S,disabled:c,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors bg-transparent disabled:opacity-50 disabled:cursor-not-allowed`,children:c?`Syncing…`:`Archive now`}),(0,L.jsx)(`button`,{onClick:w,disabled:g,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors bg-transparent disabled:opacity-50 disabled:cursor-not-allowed`,children:g?`Exporting…`:`Export archive`})]}),children:(0,L.jsxs)(`div`,{className:`p-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`font-display text-xl font-semibold text-on-surface`,children:`Your preserved AI work history`}),(0,L.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`A durable library across tools, with clear ownership and visible coverage.`})]}),(0,L.jsx)(R,{variant:`green`,children:`under your control`})]}),(0,L.jsx)(`div`,{className:`h-4`}),(0,L.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[(0,L.jsx)(Nr,{label:`Archived sessions`,value:e.archived}),(0,L.jsx)(Nr,{label:`Oldest saved`,value:e.oldest}),(0,L.jsx)(Nr,{label:`Sources covered`,value:e.sources}),(0,L.jsx)(Nr,{label:`Last sync`,value:e.lastSync})]}),u&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`h-3`}),(0,L.jsx)(B,{children:u})]}),y&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`h-3`}),(0,L.jsxs)(B,{children:[`Export failed: `,y]})]}),(0,L.jsx)(`div`,{className:`h-5`}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,L.jsxs)(z,{className:`bg-white`,children:[(0,L.jsx)(V,{title:`By source`,meta:`coverage`}),(0,L.jsxs)(`table`,{className:`w-full border-collapse text-[0.8125rem]`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Source`}),(0,L.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Archived`}),(0,L.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Status`})]})}),(0,L.jsx)(`tbody`,{children:n.map(e=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.source}),(0,L.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.archived}),(0,L.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:(0,L.jsx)(R,{variant:e.statusVariant,children:e.status})})]},e.source))})]})]}),(0,L.jsxs)(z,{className:`bg-white`,children:[(0,L.jsx)(V,{title:`Archive posture`,meta:`ops`}),(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[n.some(e=>e.status===`partial`)&&(0,L.jsxs)(B,{children:[n.filter(e=>e.status===`partial`).length,` source`,n.filter(e=>e.status===`partial`).length===1?``:`s`,` with partial coverage — consider a manual sync.`]}),n.every(e=>e.status===`healthy`)&&n.length>0&&(0,L.jsx)(B,{children:`All sources healthy. Archive coverage is complete.`}),(0,L.jsx)(B,{children:(0,L.jsx)(`span`,{className:`font-mono text-xs`,children:`Archive path: ~/.config/heyiam/sessions/`})})]}),(0,L.jsx)(`div`,{className:`h-4`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(I,{to:`/projects`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,children:`Go to projects`}),(0,L.jsx)(`button`,{onClick:C,disabled:f,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors bg-transparent disabled:opacity-50 disabled:cursor-not-allowed`,children:f?`Verifying…`:`Verify integrity`})]}),m&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`h-3`}),m.missing===0&&m.errors.length===0?(0,L.jsxs)(B,{children:[`All `,m.verified,` archived file`,m.verified===1?``:`s`,` verified.`]}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsxs)(B,{children:[`Verified `,m.verified,`/`,m.total,` — `,m.missing,` missing.`]}),m.errors.map((e,t)=>(0,L.jsx)(`span`,{className:`text-xs text-on-surface-variant font-mono break-all`,children:e},t))]})]})]})]})]})})}function sa(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function ca(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function la(e){if(!e)return``;let[t,n]=e.split(`|`),r=e=>{try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,year:`numeric`})}catch{return``}},i=r(t),a=r(n);return i?i===a?i:`${i} — ${a}`:``}function ua(e){let t=[];return e.enhancedAt&&t.push({variant:`refined`,label:`Refined`}),e.isUploaded?t.push({variant:`exported`,label:`Exported`}):t.push({variant:`local`,label:`Local only`}),t}function da(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(``);(0,_.useEffect)(()=>{Jn().then(t).catch(()=>{}).finally(()=>r(!1))},[]);let o=i?e.filter(e=>{let t=i.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.skills.some(e=>e.toLowerCase().includes(t))}):e;return(0,L.jsx)(Ar,{chips:[{label:`Projects`}],actions:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(I,{to:`/search`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Search`}),(0,L.jsx)(I,{to:`/archive`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Archive`}),(0,L.jsx)(I,{to:`/settings`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Settings`})]}),children:(0,L.jsxs)(`div`,{className:`p-6`,children:[(0,L.jsx)(V,{title:`Your projects`,meta:`Local project memory built from both live and archived history.`,children:(0,L.jsx)(R,{variant:`green`,children:`Local-only is a complete state`})}),e.length>3&&(0,L.jsx)(`div`,{className:`mt-3`,children:(0,L.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:`Filter projects...`,className:`w-full max-w-sm bg-surface-low border border-ghost rounded-md font-mono text-xs text-on-surface placeholder:text-outline px-3 py-1.5 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20`})}),(0,L.jsx)(`div`,{className:`h-4`}),n?(0,L.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:`Loading projects...`}):o.length===0?(0,L.jsx)(z,{children:(0,L.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:i?`No projects match your filter.`:`No projects found. Run a source scan to get started.`})}):(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:o.map(e=>(0,L.jsx)(I,{to:`/project/${encodeURIComponent(e.dirName)}`,className:`no-underline`,children:(0,L.jsxs)(z,{hover:!0,children:[(0,L.jsx)(`div`,{className:`flex items-center justify-between mb-1`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`h3`,{className:`font-display text-[0.9375rem] font-semibold text-on-surface`,children:e.name}),ua(e).map(e=>(0,L.jsx)(Mr,{variant:e.variant,children:e.label},e.label))]}),(0,L.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:e.description})]})}),(e.dateRange||e.skills.length>0)&&(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 mt-2`,children:[e.dateRange&&(0,L.jsx)(`span`,{className:`font-mono text-[0.6875rem] text-outline`,children:la(e.dateRange)}),e.skills.length>0&&(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.skills.slice(0,8).map(e=>(0,L.jsx)(R,{variant:`violet`,children:e},e)),e.skills.length>8&&(0,L.jsxs)(`span`,{className:`font-mono text-[10px] text-outline`,children:[`+`,e.skills.length-8]})]})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mt-3`,children:[(0,L.jsx)(Nr,{label:`Sessions`,value:e.sessionCount,valueSize:`text-lg`}),(0,L.jsx)(Nr,{label:`Time`,value:sa(e.totalDuration),valueSize:`text-lg`}),(0,L.jsx)(Nr,{label:`Lines changed`,value:ca(e.totalLoc),valueSize:`text-lg`}),(0,L.jsx)(Nr,{label:`Files`,value:e.totalFiles,valueSize:`text-lg`})]})]})},e.dirName))})]})})}function fa(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function pa(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function ma(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function ha({session:e,projectDirName:t,onClose:n}){let[r,i]=(0,_.useState)(e),[a,o]=(0,_.useState)(!0),s=at();(0,_.useEffect)(()=>{Xn(t,e.id).then(e=>i(e)).catch(()=>{}).finally(()=>o(!1))},[t,e.id]);let c=(0,_.useCallback)(e=>{e.key===`Escape`&&n()},[n]);(0,_.useEffect)(()=>(document.addEventListener(`keydown`,c),()=>document.removeEventListener(`keydown`,c)),[c]);let l=r.children&&r.children.length>0;return(0,L.jsx)(`div`,{className:`fixed inset-0 z-50 flex justify-end bg-black/40`,onClick:e=>{e.target===e.currentTarget&&n()},children:(0,L.jsx)(`div`,{className:`w-[600px] max-w-full h-full bg-surface overflow-y-auto shadow-[-8px_0_32px_rgba(25,28,30,0.1)]`,children:(0,L.jsxs)(`div`,{className:`p-8`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:n,className:`font-mono text-[0.8125rem] text-on-surface-variant bg-surface-low border border-surface-high rounded-md px-3 py-1 cursor-pointer hover:text-on-surface`,children:`ESC · Close`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>{n(),s(`/session/${encodeURIComponent(r.id)}`)},className:`font-mono text-[0.8125rem] text-primary bg-primary/5 border border-primary/20 rounded-md px-3 py-1 cursor-pointer hover:bg-primary/10 transition-colors`,children:`View full session →`})]}),(0,L.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface mb-2`,children:r.title}),(0,L.jsxs)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant mb-4`,children:[ma(r.date),r.source&&` · ${r.source}`,r.context&&` · ${r.context}`]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-5`,children:[(0,L.jsx)(_a,{label:`Active Time`,value:fa(r.durationMinutes),primary:!0,children:l&&(0,L.jsx)(va,{you:fa(Math.max(0,r.durationMinutes-r.children.reduce((e,t)=>e+t.durationMinutes,0))),agent:fa(r.children.reduce((e,t)=>e+t.durationMinutes,0))})}),(0,L.jsx)(_a,{label:`Turns`,value:r.turns,children:l&&(0,L.jsx)(va,{you:`Human`,agent:`${r.childCount??r.children.length} agents`})}),(0,L.jsx)(_a,{label:`Files`,value:r.filesChanged?.length===1&&r.filesChanged[0]?.path===`(aggregate)`?`—`:r.filesChanged?.length??`—`}),(0,L.jsx)(_a,{label:`Lines changed`,value:pa(r.linesOfCode),children:l&&(0,L.jsx)(va,{you:pa(Math.max(0,r.linesOfCode-r.children.reduce((e,t)=>e+t.linesOfCode,0))),agent:pa(r.children.reduce((e,t)=>e+t.linesOfCode,0))})})]}),r.developerTake&&(0,L.jsx)(`p`,{className:`text-[0.9375rem] leading-relaxed text-on-surface border-l-[3px] border-primary pl-3 mb-5`,children:r.developerTake}),r.skills&&r.skills.length>0&&(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mb-5`,children:r.skills.map(e=>(0,L.jsx)(R,{variant:`violet`,children:e},e))}),r.turns>=50&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsxs)(ga,{children:[`Session Activity · `,r.turns,` turns over `,fa(r.durationMinutes)]}),(0,L.jsx)(Di,{sessions:[r],maxHeight:200})]}),a&&(0,L.jsx)(`p`,{className:`text-sm text-on-surface-variant mb-4`,children:`Loading full session data...`}),r.executionPath&&r.executionPath.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsx)(ga,{children:`Execution Path`}),r.executionPath.map(e=>(0,L.jsxs)(`div`,{className:`flex gap-3 items-start py-2.5 border-b border-ghost last:border-b-0`,children:[(0,L.jsx)(`div`,{className:`w-6 h-6 rounded-full bg-primary text-white font-mono text-[0.625rem] font-bold flex items-center justify-center flex-shrink-0`,children:e.stepNumber}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-0.5`,children:e.title}),(0,L.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.description})]})]},e.stepNumber))]}),r.toolBreakdown&&r.toolBreakdown.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsx)(ga,{children:`Tool Usage`}),r.toolBreakdown.map(e=>(0,L.jsxs)(`div`,{className:`flex justify-between items-center py-1.5 border-b border-ghost last:border-b-0 font-mono text-xs`,children:[(0,L.jsx)(`span`,{className:`text-on-surface truncate min-w-0`,children:e.tool}),(0,L.jsx)(`span`,{className:`text-on-surface-variant flex-shrink-0 ml-3`,children:e.count})]},e.tool))]}),r.filesChanged&&r.filesChanged.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsx)(ga,{children:`Top Files`}),r.filesChanged.slice(0,10).map(e=>(0,L.jsxs)(`div`,{className:`flex justify-between items-center py-1.5 border-b border-ghost last:border-b-0 font-mono text-xs`,children:[(0,L.jsx)(`span`,{className:`text-on-surface truncate min-w-0`,children:e.path}),(0,L.jsxs)(`span`,{className:`flex-shrink-0 ml-2 whitespace-nowrap`,children:[(0,L.jsxs)(`span`,{className:`text-green-600 font-semibold`,children:[`+`,e.additions]}),(0,L.jsxs)(`span`,{className:`text-red-600 font-semibold ml-1`,children:[`-`,e.deletions]})]})]},e.path))]}),r.qaPairs&&r.qaPairs.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsx)(ga,{children:`Questions & Answers`}),r.qaPairs.map((e,t)=>(0,L.jsxs)(`div`,{className:`py-3 border-b border-ghost last:border-b-0`,children:[(0,L.jsx)(`div`,{className:`font-semibold text-[0.9375rem] text-on-surface mb-2`,children:e.question}),(0,L.jsx)(`div`,{className:`text-sm text-on-surface-variant leading-relaxed`,children:e.answer})]},t))]})]})})})}function ga({children:e}){return(0,L.jsx)(`div`,{className:`font-mono text-[0.625rem] font-semibold uppercase tracking-wider text-on-surface-variant mb-2.5`,children:e})}function _a({label:e,value:t,primary:n,children:r}){return(0,L.jsxs)(`div`,{className:`text-center p-3 border border-ghost rounded-sm bg-surface-lowest`,children:[(0,L.jsx)(`div`,{className:`font-mono text-xl font-bold ${n?`text-primary`:`text-on-surface`}`,children:t}),(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mt-1`,children:e}),r]})}function va({you:e,agent:t}){return(0,L.jsxs)(`div`,{className:`flex justify-center gap-2 mt-1 font-mono text-[9px] text-on-surface-variant`,children:[(0,L.jsx)(`span`,{className:`text-primary font-semibold`,children:e}),(0,L.jsx)(`span`,{className:`text-green font-semibold`,children:t})]})}function ya(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function ba(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function xa(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}k`:String(e)}function Sa(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function Ca(e){let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/36e5);return n<1?`just now`:n<24?`${n}h ago`:`${Math.floor(n/24)}d ago`}var wa=[`bg-primary`,`bg-green`,`bg-violet`];function Ta({narrative:e,screenshotSrc:t,projectName:n,humanTime:r,agentTime:i,stats:a}){let o=i?parseFloat(i)/parseFloat(r):void 0,s=o&&o>1?`${o.toFixed(1)}x`:void 0;return(0,L.jsxs)(`div`,{className:`flex flex-col gap-4 mb-4`,children:[t&&(0,L.jsxs)(`div`,{className:`rounded-md border border-ghost overflow-hidden shadow-sm`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 py-2 bg-surface-low border-b border-ghost`,children:[(0,L.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#ff5f57]`}),(0,L.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#febc2e]`}),(0,L.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#28c840]`})]}),(0,L.jsx)(`div`,{className:`max-h-96 overflow-y-auto`,children:(0,L.jsx)(`img`,{src:t,alt:`${n} screenshot`,className:`w-full h-auto`})})]}),e&&(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Narrative summary`,meta:`editable`}),(0,L.jsx)(`p`,{className:`leading-relaxed text-on-surface border-l-[3px] border-primary pl-3`,style:{fontSize:`clamp(0.8125rem, 1.2vw, 1rem)`},children:e})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-3`,children:[(0,L.jsxs)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md p-4 flex flex-col justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mb-1`,children:i?`Human / Agents`:`Time`}),(0,L.jsx)(`div`,{className:`font-display font-bold text-on-surface text-2xl`,children:i?`${r} / ${i}`:r})]}),s&&(0,L.jsxs)(`div`,{className:`mt-2 pt-2 border-t border-ghost`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mb-0.5`,children:`Efficiency multiplier`}),(0,L.jsx)(`div`,{className:`font-display font-bold text-on-surface text-lg`,children:s})]})]}),(0,L.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-2 gap-3`,children:a.map(e=>(0,L.jsx)(Nr,{label:e.label,value:e.value},e.label))})]})]})}function Ea(){let{dirName:e}=st(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(!0),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(!1),b=(0,_.useRef)(null),x=(0,_.useRef)(null);(0,_.useEffect)(()=>{e&&(nr(e).then(e=>{n(e),e.enhanceCache?.title&&c(e.enhanceCache.title),e.enhanceCache?.repoUrl&&u(e.enhanceCache.repoUrl),e.enhanceCache?.projectUrl&&f(e.enhanceCache.projectUrl),e.enhanceCache?.screenshotBase64&&m(e.enhanceCache.screenshotBase64)}).catch(()=>{}).finally(()=>i(!1)),_r(e).then(({url:e})=>{e&&u(t=>t||(e.startsWith(`http`)?e:`https://${e}`))}).catch(()=>{}))},[e]);let S=(0,_.useCallback)(()=>{if(!e||!t)return;let n=t.enhanceCache;gr(e,n?.selectedSessionIds??[],n?.result??{narrative:``,arc:[],skills:[],timeline:[],questions:[]},{title:s||void 0,repoUrl:l||void 0,projectUrl:d||void 0,screenshotBase64:p??void 0}).then(()=>y(!1)).catch(()=>{})},[e,t,s,l,d,p]);if((0,_.useEffect)(()=>{if(v)return b.current&&clearTimeout(b.current),b.current=setTimeout(S,800),()=>{b.current&&clearTimeout(b.current)}},[v,S]),r)return(0,L.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading project...`})});if(!t)return(0,L.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Project not found.`})});let{project:C,sessions:w,enhanceCache:T}=t,E=T??null,D=E?.result?.narrative??C.description,O=E?.result?.arc??[],k=[...new Set(w.map(e=>e.source??`unknown`))],A=E?.screenshotBase64?`data:image/png;base64,${E.screenshotBase64}`:void 0,j=[],ee=new Set;if(E?.result?.timeline)for(let e of E.result.timeline)for(let t of e.sessions)t.featured&&(ee.add(t.sessionId),t.tag?j.push({sessionId:t.sessionId,label:t.tag}):j.push({sessionId:t.sessionId,label:t.title.slice(0,18)}));let te=(()=>{let e=w.filter(e=>ee.has(e.id));if(e.length>=6)return e.slice(0,6);let t=w.filter(e=>e.status===`enhanced`||e.status===`uploaded`),n=w.filter(e=>e.status===`draft`&&!ee.has(e.id)),r=[...e,...t.filter(e=>!ee.has(e.id)).sort((e,t)=>t.linesOfCode-e.linesOfCode),...n],i=new Set;return r.filter(e=>i.has(e.id)?!1:(i.add(e.id),!0)).slice(0,6)})();return(0,L.jsxs)(`div`,{className:`grid grid-cols-[240px_1fr] min-h-[calc(100vh-48px)]`,children:[(0,L.jsxs)(`aside`,{className:`border-r border-ghost bg-surface-low p-4`,children:[(0,L.jsxs)(`div`,{className:`mb-4`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:`Source mix`}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:k.map(e=>(0,L.jsx)(R,{children:e},e))})]}),(0,L.jsxs)(`div`,{className:`mb-4`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:`Status`}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:[(0,L.jsx)(R,{variant:`primary`,children:C.enhancedAt?`Refined`:`Unrefined`}),(0,L.jsx)(R,{variant:`green`,children:C.isUploaded?`Uploaded`:`Local only`})]})]}),(0,L.jsx)(B,{children:`The local project page is the main object. Public pages are just one projection of it.`}),(0,L.jsxs)(`div`,{className:`mt-6 pt-4 border-t border-ghost`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-3`,children:`Project links`}),(0,L.jsxs)(`label`,{className:`block mb-3`,children:[(0,L.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Repo URL`}),(0,L.jsx)(`input`,{type:`url`,value:l,onChange:e=>{u(e.target.value),y(!0)},placeholder:`https://github.com/...`,className:`w-full text-xs font-mono px-2 py-1.5 rounded-sm border border-ghost bg-surface-lowest text-on-surface placeholder:text-outline`})]}),(0,L.jsxs)(`label`,{className:`block mb-3`,children:[(0,L.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Project URL`}),(0,L.jsx)(`input`,{type:`url`,value:d,onChange:e=>{f(e.target.value),y(!0)},placeholder:`https://example.com`,className:`w-full text-xs font-mono px-2 py-1.5 rounded-sm border border-ghost bg-surface-lowest text-on-surface placeholder:text-outline`})]}),(0,L.jsxs)(`div`,{className:`mb-2`,children:[(0,L.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Screenshot`}),p?(0,L.jsxs)(`div`,{className:`relative rounded-sm overflow-hidden border border-ghost`,children:[(0,L.jsx)(`img`,{src:p.startsWith(`data:`)?p:`data:image/png;base64,${p}`,alt:`Project screenshot`,className:`w-full h-auto max-h-32 object-cover object-top`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>{m(null),y(!0)},className:`absolute top-1 right-1 w-5 h-5 rounded-full bg-black/60 text-white text-[10px] flex items-center justify-center hover:bg-black/80`,children:`×`})]}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>x.current?.click(),className:`text-xs font-mono text-primary hover:underline text-left`,children:`Upload image...`}),d&&(0,L.jsx)(`button`,{type:`button`,onClick:async()=>{if(!e)return;g(!0);let t=C.name.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``);try{let n=await vr(e,t,d);n.ok&&n.preview&&(m(n.preview),y(!0))}catch{}finally{g(!1)}},disabled:h,className:`text-xs font-mono text-primary hover:underline text-left`,children:h?`Capturing...`:`Auto-capture from URL`})]}),(0,L.jsx)(`input`,{ref:x,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{m(n.result),y(!0)},n.readAsDataURL(t)}})]}),v&&(0,L.jsx)(`div`,{className:`text-[9px] font-mono text-outline mt-2`,children:`Saving...`})]})]}),(0,L.jsxs)(`main`,{className:`p-6 overflow-y-auto max-w-[1200px] mx-auto`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`input`,{type:`text`,value:s,placeholder:C.name,onChange:e=>{c(e.target.value),y(!0)},className:`font-display text-xl font-bold text-on-surface bg-transparent border-none outline-none w-full hover:bg-surface-low focus:bg-surface-low rounded px-1 -ml-1 transition-colors placeholder:text-on-surface-variant/50`}),(0,L.jsxs)(`span`,{className:`text-on-surface-variant text-[0.8125rem]`,children:[C.dateRange?typeof C.dateRange==`string`?C.dateRange:`${Sa(C.dateRange.start)} – ${Sa(C.dateRange.end)}`:``,C.enhancedAt&&` · last refined ${Ca(C.enhancedAt)}`]})]}),(0,L.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,L.jsxs)(R,{variant:`primary`,children:[C.sessionCount,` sessions`]})})]}),(l||d)&&(0,L.jsxs)(`div`,{className:`flex items-center gap-4 mt-1 mb-1`,children:[l&&(0,L.jsxs)(`a`,{href:l,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-xs text-primary hover:underline flex items-center gap-1`,children:[(0,L.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`currentColor`,children:(0,L.jsx)(`path`,{d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z`})}),l.replace(/^https?:\/\/(www\.)?/,``).replace(/\.git$/,``)]}),d&&(0,L.jsxs)(`a`,{href:d,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-xs text-primary hover:underline flex items-center gap-1`,children:[(0,L.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:(0,L.jsx)(`path`,{d:`M6.5 10.5l3-3m-1.5-2a2.5 2.5 0 013.54 3.54l-1.5 1.5m-4.08-1.08a2.5 2.5 0 01-3.54-3.54l1.5-1.5`})}),d.replace(/^https?:\/\/(www\.)?/,``)]})]}),(0,L.jsx)(`div`,{className:`h-4`}),(0,L.jsx)(Ta,{narrative:D,screenshotSrc:p?p.startsWith(`data:`)?p:`data:image/png;base64,${p}`:A,projectName:C.name,humanTime:ya(C.totalDuration),agentTime:C.totalAgentDuration?ya(C.totalAgentDuration):void 0,stats:[{label:`Sessions`,value:C.sessionCount},{label:`Lines changed`,value:ba(C.totalLoc)},{label:`Files`,value:C.totalFiles},...C.totalInputTokens||C.totalOutputTokens?[{label:`Tokens`,value:xa((C.totalInputTokens??0)+(C.totalOutputTokens??0))}]:[]]}),(0,L.jsxs)(z,{className:`mb-4`,children:[(0,L.jsx)(V,{title:`Work timeline`,meta:`sessions over time`}),(0,L.jsx)(Di,{sessions:w,maxHeight:300})]}),(0,L.jsxs)(z,{className:`mb-4`,children:[(0,L.jsx)(V,{title:`Project growth`,meta:`lines changed`}),(0,L.jsx)(Bi,{sessions:w,totalLoc:C.totalLoc,totalFiles:C.totalFiles,keyMoments:j})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 mb-4`,children:[(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Key decisions`,meta:`signal`}),(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:O.length>0?O.slice(0,3).map(e=>(0,L.jsx)(B,{title:e.title,children:e.description},e.phase)):(0,L.jsx)(B,{children:`Enhance this project to extract key decisions.`})})]}),(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Source breakdown`,meta:`provenance`}),(0,L.jsx)(Da,{sessions:w})]})]}),O.length>0&&(0,L.jsxs)(z,{className:`mb-4`,children:[(0,L.jsx)(V,{title:`Project phases`,meta:`timeline`}),(0,L.jsxs)(`div`,{className:`relative pl-5`,children:[(0,L.jsx)(`div`,{className:`absolute left-1 top-1.5 bottom-1.5 w-0.5 bg-ghost rounded-full`}),O.map(e=>(0,L.jsxs)(`div`,{className:`relative pb-4 last:pb-0`,children:[(0,L.jsx)(`div`,{className:`absolute -left-5 top-1.5 w-2 h-2 rounded-full bg-primary shadow-[0_0_0_3px_rgba(8,68,113,0.1)]`}),(0,L.jsx)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant`,children:e.title}),(0,L.jsx)(B,{children:(0,L.jsx)(`span`,{className:`text-on-surface-variant`,children:e.description})})]},e.phase))]})]}),(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Featured sessions`,children:(0,L.jsxs)(I,{to:`/project/${encodeURIComponent(e??``)}/sessions`,className:`font-mono text-[11px] text-primary hover:underline`,children:[`All `,w.length,` sessions →`]})}),(0,L.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:te.map((e,t)=>(0,L.jsxs)(`button`,{type:`button`,onClick:()=>o(e),className:`text-left bg-surface-lowest border border-ghost rounded-sm p-4 cursor-pointer transition-shadow hover:shadow-md`,children:[(0,L.jsx)(`div`,{className:`h-1 rounded-full mb-3 ${wa[t%wa.length]}`}),(0,L.jsx)(`h4`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface mb-1 line-clamp-2`,children:e.title}),(0,L.jsxs)(`span`,{className:`text-on-surface-variant text-xs`,children:[ya(e.durationMinutes),` · `,e.turns,` turns · `,ba(e.linesOfCode),` lines`]}),e.skills?.[0]&&(0,L.jsx)(`div`,{className:`mt-2`,children:(0,L.jsx)(R,{variant:`violet`,children:e.skills[0]})})]},e.id))})]})]}),a&&e&&(0,L.jsx)(ha,{session:a,projectDirName:e,onClose:()=>o(null)})]})}function Da({sessions:e}){let t=e.reduce((e,t)=>(e[t.source??`unknown`]=(e[t.source??`unknown`]??0)+1,e),{});return(0,L.jsxs)(`table`,{className:`w-full border-collapse text-[0.8125rem]`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Source`}),(0,L.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Count`})]})}),(0,L.jsx)(`tbody`,{children:Object.entries(t).map(([e,t])=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e}),(0,L.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:t})]},e))})]})}function Oa(){let{dirName:e}=st(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(!1);(0,_.useEffect)(()=>{e&&Promise.all([rr(e).catch(()=>null),Yn(e).catch(()=>[])]).then(([e,t])=>{e&&n(e),i(t)}).finally(()=>o(!1))},[e]);let l=r.filter(e=>t?.selectedSessionIds?.includes(e.id)),u=t?.skippedSessions??[];async function d(){if(!(!e||!t)){c(!0);try{await ir(e,t)}catch{}finally{c(!1)}}}return a?(0,L.jsx)(Ar,{back:{label:e??`Project`,to:`/project/${encodeURIComponent(e??``)}`},chips:[{label:`Project boundaries`}],children:(0,L.jsx)(`div`,{className:`p-6`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading boundaries...`})})}):(0,L.jsx)(Ar,{back:{label:e??`Project`,to:`/project/${encodeURIComponent(e??``)}`},chips:[{label:`Project boundaries`}],actions:(0,L.jsx)(`button`,{onClick:d,disabled:s,className:`bg-primary text-on-primary font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm hover:bg-primary-hover transition-colors disabled:opacity-50`,children:s?`Saving...`:`Save boundaries`}),children:(0,L.jsxs)(`div`,{className:`p-6`,children:[(0,L.jsx)(`h2`,{className:`font-display text-xl font-bold text-on-surface`,children:`Shape what this project actually contains`}),(0,L.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`Clustering gets you close. This screen makes it trustworthy.`}),(0,L.jsx)(`div`,{className:`h-4`}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Included sessions`,meta:`${l.length} total`}),(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:l.length===0?(0,L.jsx)(B,{children:`No sessions included yet.`}):l.map(e=>(0,L.jsx)(B,{title:e.title,children:(0,L.jsxs)(`span`,{className:`font-mono text-xs text-on-surface-variant`,children:[e.source??`unknown`,` · `,e.filesChanged?.length??0,` files · `,e.linesOfCode,` lines`]})},e.id))})]}),(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Nearby / excluded`,meta:`needs review`}),(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:u.length===0?(0,L.jsx)(B,{children:`No excluded sessions.`}):u.map(e=>(0,L.jsx)(B,{title:r.find(t=>t.id===e.sessionId)?.title??e.sessionId,children:(0,L.jsxs)(`span`,{className:`font-mono text-xs text-on-surface-variant`,children:[`excluded · `,e.reason]})},e.sessionId))})]})]})]})})}function ka(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function Aa(e){return e<1e3?String(e):`${(e/1e3).toFixed(1)}k`}function ja(e){return e?new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):``}function Ma(e){if(!e)return``;let[t,n]=e.split(`|`);if(!t||!n)return``;let r=new Date(t),i=new Date(n),a=e=>e.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}),o=i.getFullYear();return`${a(r)}\u2013${a(i)}, ${o}`}var Na=[`overview`,`triage`,`enhance`,`questions`,`timeline`];function Pa({current:e}){let t=Na.indexOf(e);return(0,L.jsx)(`div`,{className:`phase-bar`,children:Na.slice(0,-1).map((e,n)=>(0,L.jsx)(`div`,{className:`phase-bar__segment ${n<=t?`phase-bar__segment--active`:``}`},n))})}function Fa({project:e,sessions:t,onTriage:n,onCancel:r}){let i=[...t].sort((e,t)=>{let n=e.date?new Date(e.date).getTime():0;return(t.date?new Date(t.date).getTime():0)-n});return(0,L.jsxs)(`div`,{className:`upload-flow`,children:[(0,L.jsx)(`div`,{className:`upload-flow__label`,children:`Upload Project`}),(0,L.jsx)(`h2`,{className:`upload-flow__title`,children:e.name}),(0,L.jsx)(`div`,{className:`upload-flow__date`,children:Ma(e.dateRange)}),(0,L.jsxs)(`p`,{className:`upload-flow__desc`,children:[`The AI will scan all `,e.sessionCount,` sessions, pick the ones worth showcasing, and build a project narrative. Small or trivial sessions are skipped automatically.`]}),(0,L.jsxs)(`div`,{className:`upload-flow__stat-grid`,children:[(0,L.jsx)(Ia,{label:`Sessions`,value:String(e.sessionCount)}),(0,L.jsx)(Ia,{label:e.totalAgentDuration?`Human / Agents`:`Total Time`,value:e.totalAgentDuration?`${ka(e.totalDuration)} / ${ka(e.totalAgentDuration)}`:ka(e.totalDuration)}),(0,L.jsx)(Ia,{label:`Lines changed`,value:Aa(e.totalLoc)}),(0,L.jsx)(Ia,{label:`Files`,value:String(e.totalFiles)})]}),(0,L.jsxs)(`div`,{className:`upload-flow__section-label`,children:[`All Sessions (`,t.length,`)`]}),(0,L.jsxs)(`div`,{className:`session-table`,children:[(0,L.jsxs)(`div`,{className:`session-table__header`,children:[(0,L.jsx)(`span`,{children:`Session`}),(0,L.jsx)(`span`,{style:{textAlign:`right`},children:`Date`}),(0,L.jsx)(`span`,{style:{textAlign:`right`},children:`Time`}),(0,L.jsx)(`span`,{style:{textAlign:`right`},children:`LOC`}),(0,L.jsx)(`span`,{style:{textAlign:`right`},children:`Turns`})]}),(0,L.jsx)(`div`,{className:`session-table__body`,children:i.map(e=>(0,L.jsxs)(`div`,{className:`session-table__row`,children:[(0,L.jsx)(`span`,{className:`session-table__name`,children:e.title}),(0,L.jsx)(`span`,{className:`session-table__cell`,children:ja(e.date)}),(0,L.jsx)(`span`,{className:`session-table__cell`,children:ka(e.durationMinutes)}),(0,L.jsx)(`span`,{className:`session-table__cell`,children:Aa(e.linesOfCode)}),(0,L.jsx)(`span`,{className:`session-table__cell`,children:e.turns})]},e.id))})]}),(0,L.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,L.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:r,children:`Cancel`}),(0,L.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:n,children:[e.sessionCount<5?`Enhance all ${e.sessionCount} sessions`:`Let AI pick sessions`,` →`]})]})]})}function Ia({label:e,value:t}){return(0,L.jsxs)(`div`,{className:`stat-card`,children:[(0,L.jsx)(`div`,{className:`stat-card__label`,children:e}),(0,L.jsx)(`div`,{className:`stat-card__value`,children:t})]})}var La=[`◐`,`◑`,`◒`,`◓`];function Ra(){let[e,t]=(0,_.useState)(0);return(0,_.useEffect)(()=>{let e=setInterval(()=>t(e=>(e+1)%La.length),120);return()=>clearInterval(e)},[]),La[e]}function za(e,t){let n=[{id:`prompt`,text:`$ heyiam triage`,variant:`prompt`}],r=0,i=0,a=0,o=!1,s=!1,c=!1;for(let l of e)switch(l.type){case`scanning`:r=l.total,n.push({id:`scanning`,text:` Loading session stats... (${l.total} sessions)`,variant:`active`});break;case`loading_stats`:l.index;break;case`hard_floor`:{if(!o){let e=n.findIndex(e=>e.id===`scanning`);e!==-1&&(n[e]={id:`scanning-done`,text:` \u2713 Loaded ${r} sessions`,variant:`passed`}),n.push({id:`hf-header`,text:``,variant:`default`}),n.push({id:`hf-section`,text:` ── Hard floor filter ──`,variant:`section`}),o=!0}let e=l.sessionId.slice(0,8);l.passed?(i++,n.push({id:`hf-${l.sessionId}`,text:` \u2713 ${l.title||e} \u2192 passed`,variant:`passed`})):(a++,n.push({id:`hf-${l.sessionId}`,text:` \u2717 ${l.title||e} \u2192 skipped${l.reason?` (${l.reason})`:``}`,variant:`skipped`}));break}case`extracting_signals`:{s||=(o&&n.push({id:`hf-summary`,text:` \u2713 ${i} passed, ${a} filtered`,variant:`passed`}),n.push({id:`sig-header`,text:``,variant:`default`}),n.push({id:`sig-section`,text:` ── Signal extraction ──`,variant:`section`}),!0);let e=l.sessionId.slice(0,8);n.push({id:`sig-${l.sessionId}`,text:` ${t} Scanning ${l.title||e}...`,variant:`active`});break}case`signals_done`:{let e=n.findIndex(e=>e.id===`sig-${l.sessionId}`);if(e!==-1){let t=l.sessionId.slice(0,8);n[e]={id:`sig-done-${l.sessionId}`,text:` \u2713 ${t}: signals extracted`,variant:`passed`}}break}case`llm_ranking`:c||=(n.push({id:`rank-header`,text:``,variant:`default`}),n.push({id:`rank-section`,text:` ── AI ranking ──`,variant:`section`}),!0),n.push({id:`llm-ranking`,text:` ${t} Sending ${l.sessionCount} sessions to AI...`,variant:`active`});break;case`scoring_fallback`:c||=(n.push({id:`rank-header`,text:``,variant:`default`}),n.push({id:`rank-section`,text:` ── Scoring ──`,variant:`section`}),!0),n.push({id:`scoring-fallback`,text:` ${t} Scoring ${l.sessionCount} sessions...`,variant:`active`});break;case`done`:let e=n.findIndex(e=>e.id===`llm-ranking`||e.id===`scoring-fallback`);e!==-1&&(n[e]={id:`rank-done`,text:` \u2713 AI selected ${l.selected} sessions`,variant:`passed`});break;case`result`:break}return n}function Ba({events:e,dirName:t}){let n=Ra(),r=(0,_.useRef)(null),i=za(e,n);return(0,_.useEffect)(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},[i.length]),(0,L.jsx)(`div`,{className:`triage-terminal`,role:`log`,"aria-live":`polite`,"aria-label":`Triage progress`,children:(0,L.jsx)(`div`,{className:`triage-terminal__feed`,ref:r,children:i.map(e=>(0,L.jsx)(`div`,{className:`triage-terminal__line${e.variant===`prompt`?` triage-terminal__prompt`:e.variant===`section`?` triage-terminal__section`:e.variant===`passed`?` triage-terminal__line--passed`:e.variant===`skipped`?` triage-terminal__line--skipped`:e.variant===`active`?` triage-terminal__line--active`:``}`,children:e.text},e.id))})})}function Va({sessionId:e,title:t,stats:n,reason:r,variant:i,checked:a,onToggle:o,dimTitle:s,previouslyUploaded:c}){let[l,u]=(0,_.useState)(!1),d=r.length>(i===`selected`?60:40),f=i===`selected`?r.length>60?r.slice(0,57)+`...`:r:r.length>40?r.slice(0,37)+`...`:r;return(0,L.jsxs)(`div`,{className:`triage-item ${a?`triage-item--selected`:`triage-item--skipped`}`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:a,onChange:o,className:`triage-item__checkbox`}),(0,L.jsxs)(`div`,{className:`triage-item__info`,children:[(0,L.jsxs)(`div`,{className:`triage-item__name`,style:s?{color:`var(--on-surface-variant)`}:void 0,children:[t,c&&(0,L.jsx)(`span`,{className:`triage-item__uploaded-badge`,children:`previously uploaded`})]}),(0,L.jsx)(`div`,{className:`triage-item__stats`,children:n})]}),(0,L.jsx)(`div`,{className:`triage-item__reason triage-item__reason--${i} ${d?`triage-item__reason--expandable`:``}`,onClick:d?()=>u(!l):void 0,role:d?`button`:void 0,tabIndex:d?0:void 0,onKeyDown:d?e=>{e.key===`Enter`&&u(!l)}:void 0,children:l?r:f})]})}function Ha({project:e,sessions:t,triageResult:n,selectedIds:r,onToggle:i,onEnhance:a,onBack:o,uploadedSessionIds:s}){let c=new Map(t.map(e=>[e.id,e])),l=r.size,u=t.length-l;return(0,L.jsxs)(`div`,{className:`upload-flow`,children:[(0,L.jsx)(Pa,{current:`triage`}),(0,L.jsxs)(`div`,{className:`upload-flow__scan-status`,children:[`✓ Scanned `,t.length,` sessions · `,ka(e.totalDuration),` · `,Aa(e.totalLoc),` lines`]}),(0,L.jsxs)(`h2`,{className:`upload-flow__title`,children:[`AI selected `,l,` sessions to showcase`]}),(0,L.jsxs)(`p`,{className:`upload-flow__desc`,children:[`Skipped `,u,` sessions that were too small, purely mechanical, or redundant. You can override any selection.`]}),n.triageMethod===`scoring`&&(0,L.jsxs)(`div`,{className:`triage-method-banner`,children:[(0,L.jsx)(`span`,{className:`triage-method-banner__icon`,"aria-hidden":`true`,children:`ⓘ`}),(0,L.jsx)(`span`,{children:`Sessions selected by signal analysis (no API key configured). `}),(0,L.jsx)(`a`,{href:`/settings`,className:`triage-method-banner__link`,children:`Go to Settings`})]}),(0,L.jsxs)(`div`,{className:`upload-flow__section-label upload-flow__section-label--selected`,children:[`✓ Selected for showcase (`,l,`)`]}),(0,L.jsx)(`div`,{className:`triage-list`,children:n.selected.map(e=>{let t=c.get(e.sessionId),n=r.has(e.sessionId);return(0,L.jsx)(Va,{sessionId:e.sessionId,title:t?.title??e.sessionId,stats:t?`${ka(t.durationMinutes)} \u00b7 ${Aa(t.linesOfCode)} lines \u00b7 ${t.turns} turns`:``,reason:e.reason,variant:`selected`,checked:n,onToggle:()=>i(e.sessionId),previouslyUploaded:s?.has(e.sessionId)},e.sessionId)})}),(0,L.jsxs)(`details`,{className:`triage-skipped`,children:[(0,L.jsxs)(`summary`,{className:`triage-skipped__summary`,children:[(0,L.jsx)(`span`,{children:`▶`}),` Skipped (`,n.skipped.length,`) — click to override`]}),(0,L.jsx)(`div`,{className:`triage-list`,style:{marginTop:`var(--spacing-3)`},children:n.skipped.map(e=>{let t=c.get(e.sessionId),n=r.has(e.sessionId);return(0,L.jsx)(Va,{sessionId:e.sessionId,title:t?.title??e.sessionId,stats:t?`${ka(t.durationMinutes)} \u00b7 ${Aa(t.linesOfCode)} lines \u00b7 ${t.turns} turns`:``,reason:e.reason,variant:`skipped`,checked:n,onToggle:()=>i(e.sessionId),dimTitle:!n,previouslyUploaded:s?.has(e.sessionId)},e.sessionId)})})]}),(0,L.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,L.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:o,children:`Back`}),(0,L.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:a,disabled:l===0,children:`Enhance project →`})]})]})}function Ua({project:e,sessions:t,selectedIds:n,triageResult:r,onComplete:i,onBack:a}){let o=new Map(t.map(e=>[e.id,e])),[s,c]=(0,_.useState)(()=>{let e=r.selected.filter(e=>n.has(e.sessionId)),t=r.skipped.filter(e=>n.has(e.sessionId));return[...e,...t].map(e=>({sessionId:e.sessionId,title:o.get(e.sessionId)?.title??e.sessionId,status:`pending`}))}),[l,u]=(0,_.useState)(`waiting`),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)([]),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(null),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(!1),w=(0,_.useRef)(null),T=(0,_.useRef)(null),E=(0,_.useCallback)(t=>{if(!e.dirName)return;t&&(x(null),f(null),u(`waiting`),g(``),m([]),y(null),c(e=>e.map(e=>({...e,status:`pending`}))));let i=r.skipped.filter(e=>!n.has(e.sessionId)).map(e=>{let t=o.get(e.sessionId);return{title:t?.title??e.sessionId,duration:t?.durationMinutes??0,loc:t?.linesOfCode??0}}),a=or(e.dirName,Array.from(n),i,e=>{switch(e.type){case`session_progress`:c(t=>t.map(t=>t.sessionId===e.sessionId?{...t,status:e.status,title:e.title||t.title,detail:e.detail}:t)),(e.status===`done`||e.status===`skipped`)&&e.skills&&m(t=>{let n=new Set(t);for(let t of e.skills)n.add(t);return[...n]});break;case`project_enhance`:u(`generating`);break;case`narrative_chunk`:g(t=>t+e.text);break;case`cached`:x(e.enhancedAt),c(e=>e.map(e=>({...e,status:`done`}))),u(`done`);break;case`done`:u(`done`),f(e.result);break;case`error`:y(e.message);break}},t);return w.current=a,a},[e.dirName,n,r,o]);(0,_.useEffect)(()=>{let e=E(S);return()=>e?.abort()},[S]);let D=s.filter(e=>e.status!==`pending`).length;(0,_.useEffect)(()=>{if(!T.current||D===0)return;let e=T.current.querySelectorAll(`.enhance-feed-item:not(.enhance-feed-item--pending)`),t=e[e.length-1];t&&t.scrollIntoView({block:`nearest`,behavior:`smooth`})},[D]);let O=d!==null,k=d?.skills??p,A=s.filter(e=>e.status===`failed`),j=s.filter(e=>e.status===`done`||e.status===`skipped`),ee=s.every(e=>e.status!==`pending`&&e.status!==`enhancing`),te=A.length>0,M=j.length>0,ne=(0,_.useCallback)(()=>{c(e=>e.map(e=>e.status===`failed`?{...e,status:`pending`,detail:void 0}:e)),y(null),w.current?.abort(),C(e=>!e)},[]),N=(0,_.useCallback)(()=>{i({narrative:``,arc:[],skills:p,timeline:[],questions:[]})},[p,i]);return(0,L.jsxs)(`div`,{className:`enhance-split`,children:[(0,L.jsxs)(`div`,{className:`enhance-split__left`,children:[(0,L.jsx)(`div`,{className:`enhance-split__left-header`,children:`Session Processing`}),(0,L.jsx)(`div`,{className:`enhance-split__feed`,ref:T,children:s.map(e=>(0,L.jsxs)(`div`,{className:`enhance-feed-item ${e.status===`pending`?`enhance-feed-item--pending`:``} ${e.status===`failed`?`enhance-feed-item--failed`:``}`,children:[(0,L.jsxs)(`div`,{className:`enhance-feed-item__row`,children:[e.status===`done`||e.status===`skipped`?(0,L.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}):e.status===`failed`?(0,L.jsx)(`span`,{className:`enhance-feed-item__fail`,children:`✗`}):e.status===`enhancing`?(0,L.jsx)(`span`,{className:`enhance-feed-item__spinner`}):(0,L.jsx)(`span`,{className:`enhance-feed-item__circle`,children:`◯`}),(0,L.jsx)(`span`,{className:`enhance-feed-item__title ${e.status===`enhancing`?`enhance-feed-item__title--active`:``} ${e.status===`failed`?`enhance-feed-item__title--failed`:``}`,children:e.title})]}),e.detail&&e.status!==`pending`&&(0,L.jsx)(`div`,{className:`enhance-feed-item__detail ${e.status===`failed`?`enhance-feed-item__detail--failed`:``}`,children:e.detail})]},e.sessionId))}),(0,L.jsxs)(`div`,{className:`enhance-split__narrative-box`,children:[(0,L.jsx)(`div`,{className:`enhance-split__narrative-label`,children:`PROJECT NARRATIVE`}),(0,L.jsx)(`div`,{className:`enhance-split__narrative-status`,children:b&&l===`done`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}),(0,L.jsxs)(`span`,{children:[`Loaded from cache (`,new Date(b).toLocaleDateString(),`)`]})]}):l===`done`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}),(0,L.jsx)(`span`,{children:`Project story complete`})]}):l===`generating`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`enhance-split__blink-dot`}),(0,L.jsxs)(`span`,{children:[`Building project story from `,n.size,` sessions...`]})]}):(0,L.jsx)(`span`,{children:`Waiting for session processing...`})})]})]}),(0,L.jsxs)(`div`,{className:`enhance-split__right`,children:[(0,L.jsx)(Pa,{current:`enhance`}),v?(0,L.jsxs)(`div`,{className:`enhance-error`,style:{marginTop:`var(--spacing-4)`},children:[(0,L.jsx)(`div`,{className:`enhance-error__message`,children:v}),(0,L.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,L.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:a,children:`Back`}),(0,L.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:ne,children:`Retry`}),M&&(0,L.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:N,children:`Continue without narrative`})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`upload-flow__label`,children:`Project Story`}),(0,L.jsx)(`h2`,{className:`upload-flow__title`,children:e.name}),!h&&!d?.narrative&&(0,L.jsxs)(`div`,{className:`enhance-split__narrative-placeholder`,children:[(0,L.jsx)(`span`,{className:`enhance-split__blink-dot`}),(0,L.jsx)(`span`,{children:l===`generating`?`Writing project narrative...`:`Analyzing sessions — narrative will appear here...`})]}),(h||d?.narrative)&&(0,L.jsxs)(`div`,{className:`enhance-split__narrative-text`,children:[d?.narrative??h,l===`generating`&&(0,L.jsx)(`span`,{className:`typewriter-cursor`,"aria-hidden":`true`})]}),k.length>0&&(0,L.jsx)(`div`,{className:`enhance-split__skills`,children:k.map(e=>(0,L.jsx)(`span`,{className:`chip`,children:e},e))}),d?.arc&&d.arc.length>0&&(()=>{let e=d.arc;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`upload-flow__section-label`,style:{marginTop:`var(--spacing-6)`},children:`Project Arc`}),(0,L.jsx)(`div`,{className:`enhance-split__arc`,children:e.map((t,n)=>(0,L.jsxs)(`div`,{className:`enhance-split__arc-item ${!O&&n===e.length-1?`enhance-split__arc-item--generating`:``}`,children:[(0,L.jsx)(`div`,{className:`enhance-split__arc-num`,children:String(t.phase).padStart(2,`0`)}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`enhance-split__arc-title`,children:t.title}),(0,L.jsx)(`div`,{className:`enhance-split__arc-desc`,children:t.description})]})]},n))})]})})(),ee&&te&&!O&&(0,L.jsxs)(`div`,{className:`enhance-split__failure-recovery`,children:[(0,L.jsxs)(`p`,{className:`enhance-split__failure-text`,children:[A.length,` session`,A.length===1?``:`s`,` failed to enhance.`]}),(0,L.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,L.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:ne,children:`Retry failed`}),M&&(0,L.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:N,children:[`Continue with `,j.length,` successful →`]})]})]}),O&&(0,L.jsxs)(`div`,{className:`upload-flow__actions`,children:[b&&(0,L.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:()=>{w.current?.abort(),C(!0)},children:`Re-enhance`}),(0,L.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:()=>i(d),children:[d.questions.length>0?`Answer a few questions`:`Continue`,` →`]})]})]})]})]})}var Wa={pattern:`Pattern detected`,architecture:`Architecture`,evolution:`Evolution`};function Ga({enhanceResult:e,onSkip:t,onWeave:n}){let[r,i]=(0,_.useState)(new Map),[a,o]=(0,_.useState)(!1),s=(0,_.useCallback)((e,t)=>{i(n=>{let r=new Map(n);return r.set(e,t),r})},[]),c=Array.from(r.values()).some(e=>e.trim().length>0),l=(0,_.useCallback)(()=>{let t=e.questions.filter(e=>(r.get(e.id)??``).trim().length>0).map(e=>({questionId:e.id,question:e.question,answer:r.get(e.id).trim()}));o(!0),n(t)},[r,e.questions,n]);return(0,L.jsxs)(`div`,{className:`upload-flow`,children:[(0,L.jsx)(Pa,{current:`questions`}),(0,L.jsxs)(`div`,{className:`upload-flow__scan-status`,children:[`✓ `,e.timeline.reduce((e,t)=>e+t.sessions.length,0),` sessions enhanced · Project narrative generated`]}),(0,L.jsx)(`h2`,{className:`upload-flow__title`,children:`A few things we noticed`}),(0,L.jsx)(`p`,{className:`upload-flow__desc`,children:`Your answers get woven into the narrative. Skip any you don't want to answer.`}),(0,L.jsx)(`div`,{className:`questions-list`,children:e.questions.map(e=>(0,L.jsxs)(`div`,{className:`question-card`,children:[(0,L.jsx)(`div`,{className:`question-card__tag-row`,children:(0,L.jsx)(`span`,{className:`question-card__tag question-card__tag--${e.category}`,children:Wa[e.category]??e.category})}),(0,L.jsx)(`div`,{className:`question-card__text`,children:e.question}),(0,L.jsx)(`textarea`,{className:`question-card__textarea`,value:r.get(e.id)??``,onChange:t=>s(e.id,t.target.value),placeholder:e.context||``,rows:3})]},e.id))}),(0,L.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,L.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:t,disabled:a,children:`Skip questions`}),(0,L.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:l,disabled:!c||a,children:a?`Weaving...`:`Weave into narrative →`})]})]})}function Ka({project:e,timeline:t,onBack:n,onViewProject:r}){let i=t.reduce((e,t)=>e+t.sessions.length,0);return(0,L.jsxs)(`div`,{className:`upload-flow`,children:[(0,L.jsx)(Pa,{current:`timeline`}),(0,L.jsx)(`div`,{className:`upload-flow__label`,children:`Project Timeline`}),(0,L.jsxs)(`h2`,{className:`upload-flow__title`,children:[e.name,` `,(0,L.jsxs)(`span`,{style:{fontWeight:400,fontSize:`1rem`,color:`var(--on-surface-variant)`},children:[i,` sessions`]})]}),(0,L.jsx)(`p`,{className:`upload-flow__desc`,children:e.description}),(0,L.jsxs)(`div`,{className:`timeline`,children:[(0,L.jsx)(`div`,{className:`timeline__line`}),t.map((e,t)=>{let n=e.sessions.filter(e=>e.featured),r=e.sessions.filter(e=>!e.featured);return(0,L.jsxs)(`div`,{className:`timeline__period`,children:[(0,L.jsxs)(`div`,{className:`timeline__period-header`,children:[(0,L.jsx)(`span`,{className:`timeline__period-date`,children:e.period}),(0,L.jsx)(`span`,{className:`timeline__period-sep`,children:`—`}),(0,L.jsx)(`span`,{className:`timeline__period-label`,children:e.label})]}),n.map(e=>(0,L.jsxs)(`div`,{className:`timeline__featured`,children:[(0,L.jsx)(`div`,{className:`timeline__dot--large`}),(0,L.jsxs)(`div`,{className:`timeline__card`,children:[(0,L.jsxs)(`div`,{className:`timeline__card-header`,children:[(0,L.jsx)(`span`,{className:`timeline__card-title`,children:e.title}),e.tag&&(0,L.jsx)(`span`,{className:`timeline__card-tag`,children:e.tag})]}),(0,L.jsxs)(`div`,{className:`timeline__card-meta`,children:[(0,L.jsx)(`span`,{children:ka(e.duration)}),e.date&&(0,L.jsx)(`span`,{children:ja(e.date)})]}),e.description&&(0,L.jsx)(`p`,{className:`timeline__card-desc`,children:e.description}),e.skills&&e.skills.length>0&&(0,L.jsx)(`div`,{className:`timeline__card-skills`,children:e.skills.map(e=>(0,L.jsx)(`span`,{className:`chip`,children:e},e))})]})]},e.sessionId)),r.length>0&&(0,L.jsxs)(`div`,{className:`timeline__collapsed`,children:[(0,L.jsx)(`div`,{className:`timeline__dot--small`}),(0,L.jsx)(qa,{sessions:r})]})]},t)})]}),(0,L.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,L.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:n,children:`Back`}),(0,L.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:r,children:`View updated project →`})]})]})}function qa({sessions:e}){let t=e.map(e=>e.title.toLowerCase()).join(`, `),n=e.filter(e=>e.date).map(e=>e.date).sort(),r=n.length>=2?`${ja(n[0])} \u2013 ${ja(n[n.length-1])}`:n.length===1?ja(n[0]):``;return(0,L.jsxs)(`span`,{className:`timeline__collapsed-text`,children:[e.length,` smaller session`,e.length===1?``:`s`,` — `,t,r&&(0,L.jsxs)(L.Fragment,{children:[` · `,r]})]})}var Ja=[{period:`Mar 3–7`,label:`Foundation`,sessions:[{sessionId:`placeholder-1`,title:`Project scaffolding & architecture`,description:`Set up the monorepo structure, CI pipeline, and core abstractions.`,duration:145,featured:!0,tag:`KEY DECISION`,skills:[`Architecture`,`CI/CD`],date:`2026-03-03`},{sessionId:`placeholder-2`,title:`Dependency setup`,duration:30,featured:!1,date:`2026-03-04`},{sessionId:`placeholder-3`,title:`Initial config`,duration:15,featured:!1,date:`2026-03-05`}]},{period:`Mar 10–14`,label:`Core Implementation`,sessions:[{sessionId:`placeholder-4`,title:`Data model & API design`,description:`Designed the schema and REST endpoints for the core domain.`,duration:210,featured:!0,skills:[`API Design`,`PostgreSQL`],date:`2026-03-10`},{sessionId:`placeholder-5`,title:`Frontend component library`,description:`Built reusable components following the design system.`,duration:180,featured:!0,skills:[`React`,`CSS`],date:`2026-03-12`}]}];function Ya(){let{dirName:e}=st(),[t,n]=Mn(),r=at(),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(!0);(0,_.useEffect)(()=>{Jn().then(a).catch(()=>{}).finally(()=>s(!1))},[]);let c=i.find(t=>t.dirName===e),[l,u]=(0,_.useState)(`overview`),d=(0,_.useCallback)(e=>{u(e),window.scrollTo(0,0)},[]),[f,p]=(0,_.useState)([]),[m,h]=(0,_.useState)(!0),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(new Set),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)([]),[T,E]=(0,_.useState)(null),D=(0,_.useRef)(null),[O,k]=(0,_.useState)(null),[A,j]=(0,_.useState)(null);A?.narrative,A?.skills;let ee=A?.timeline??[],te=(0,_.useCallback)(()=>{f.length>0||!e||Yn(e).then(e=>{p(e),h(!1)}).catch(e=>{k(e.message),h(!1)})},[e,f.length]);(0,_.useEffect)(()=>{[`overview`,`triage`,`enhance`].includes(l)&&te()},[l,te]),(0,_.useEffect)(()=>{let i=t.get(`view`)||t.get(`preview`);!e||i!==`1`||(n({},{replace:!0}),r(`/project/${e}`))},[e]);let M=(0,_.useCallback)(()=>{e&&(S(!0),k(null),w([]),D.current=ar(e,e=>{if(w(t=>[...t,e]),e.type===`error`){k(e.message),S(!1);return}if(e.type===`result`){let t={selected:e.selected,skipped:e.skipped,autoSelected:e.autoSelected,triageMethod:e.triageMethod};v(t);let n=new Set(t.selected.map(e=>e.sessionId));if(c?.uploadedSessions)for(let e of c.uploadedSessions)n.add(e);b(n),setTimeout(()=>{S(!1),t.autoSelected?(E(`All ${n.size} sessions selected (small project)`),d(`enhance`)):d(`triage`)},1200)}}))},[e]);(0,_.useEffect)(()=>()=>{D.current?.abort()},[]);let ne=(0,_.useCallback)(e=>{j(e),e.questions.length>0?d(`questions`):d(`timeline`)},[]),N=(0,_.useCallback)(()=>{d(`timeline`)},[]),P=(0,_.useCallback)(async t=>{if(!(!e||!A))try{let n=await sr(e,A.narrative,A.timeline,t);j(e=>e&&{...e,narrative:n.narrative,timeline:n.timeline}),d(`timeline`)}catch(e){k(e.message)}},[e,A]),re=(0,_.useCallback)(e=>{b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return o?(0,L.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},children:(0,L.jsx)(`div`,{className:`dashboard-loading`,children:`Loading project...`})}):c?(0,L.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},children:m&&l===`overview`?(0,L.jsx)(`div`,{className:`dashboard-loading`,children:`Loading sessions...`}):O&&l===`overview`?(0,L.jsx)(`div`,{className:`dashboard-error`,children:O}):l===`overview`?x?(0,L.jsx)(Ba,{events:C,dirName:e??``}):(0,L.jsx)(Fa,{project:c,sessions:f,onTriage:M,onCancel:()=>r(`/`)}):l===`triage`&&g?(0,L.jsx)(Ha,{project:c,sessions:f,triageResult:g,selectedIds:y,onToggle:re,onEnhance:()=>d(`enhance`),onBack:()=>d(`overview`),uploadedSessionIds:c.uploadedSessions?new Set(c.uploadedSessions):void 0}):l===`enhance`&&g?(0,L.jsxs)(L.Fragment,{children:[T&&(0,L.jsxs)(`div`,{className:`upload-flow__auto-select-banner`,children:[`✓ `,T]}),(0,L.jsx)(Ua,{project:c,sessions:f,selectedIds:y,triageResult:g,onComplete:ne,onBack:()=>d(`triage`)})]}):l===`questions`&&A?(0,L.jsx)(Ga,{enhanceResult:A,onSkip:N,onWeave:P}):l===`timeline`?(0,L.jsx)(Ka,{project:c,timeline:ee.length>0?ee.map(e=>({...e,sessions:e.sessions.map(e=>({sessionId:e.sessionId,title:e.title,featured:e.featured,tag:e.tag,duration:f.find(t=>t.id===e.sessionId)?.durationMinutes??0,date:f.find(t=>t.id===e.sessionId)?.date}))})):Ja,onBack:()=>A?.questions.length?d(`questions`):d(`enhance`),onViewProject:()=>{e&&A&&gr(e,Array.from(y),A).catch(()=>{}),r(`/project/${e}`)}}):null}):(0,L.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},children:(0,L.jsx)(`div`,{className:`dashboard-error`,children:`Project not found`})})}function Xa(e){let t=e.indexOf(`-Dev-`);if(t!==-1)return e.slice(t+5);let n=e.split(`-`).filter(Boolean);return n.length>0?n[n.length-1]:e}function Za(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``)}function Qa(){let{dirName:e=``}=st(),[t,n]=(0,_.useState)({step:`review`}),[r,i]=(0,_.useState)(null);(0,_.useEffect)(()=>{e&&nr(e).then(i).catch(()=>{})},[e]);let a=(0,_.useCallback)(()=>{n({step:`uploading`,messages:[]});let t=r?.enhanceCache,i=r?.project,a=t?.title||i?.name||Xa(e);cr(e,{title:a,slug:Za(a),narrative:t?.result?.narrative??``,repoUrl:t?.repoUrl??``,projectUrl:t?.projectUrl??``,timeline:t?.result?.timeline??[],skills:t?.result?.skills??[],totalSessions:i?.sessionCount??0,totalLoc:i?.totalLoc??0,totalDurationMinutes:i?.totalDuration??0,totalAgentDurationMinutes:i?.totalAgentDuration,totalFilesChanged:i?.totalFiles??0,totalInputTokens:i?.totalInputTokens??0,totalOutputTokens:i?.totalOutputTokens??0,skippedSessions:[],selectedSessionIds:t?.selectedSessionIds??[],screenshotBase64:t?.screenshotBase64??void 0},e=>{switch(e.type){case`project`:n(t=>t.step===`uploading`?{...t,messages:[...t.messages,`Project ${e.status}`]}:t);break;case`session`:n(t=>t.step===`uploading`?{...t,messages:[...t.messages,`Session ${e.sessionId}: ${e.status}`]}:t);break;case`done`:n({step:`done`,projectUrl:e.projectUrl,uploaded:e.uploaded,failed:e.failed});break;case`error`:e.message===`AUTH_REQUIRED`?o():n({step:`error`,message:e.message});break}})},[e,r]),o=(0,_.useCallback)(async()=>{n({step:`auth`,status:`opening`});try{let e=await Sr();window.open(e.verification_uri,`_blank`),n({step:`auth`,status:`waiting`});let t=Date.now(),r=async()=>{try{if((await yr(e.device_code)).authenticated){n({step:`auth`,status:`done`}),setTimeout(()=>a(),500);return}}catch{}Date.now()-t<3e5?setTimeout(r,5e3):n({step:`auth`,status:`error`,error:`Timed out. Try again.`})};setTimeout(r,5e3)}catch{n({step:`auth`,status:`error`,error:`Could not connect. Try again later.`})}},[a]),s=(0,L.jsx)(`button`,{className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:a,disabled:t.step===`uploading`,children:`Upload to heyiam.com`});return(0,L.jsx)(Ar,{back:{label:`Project`,to:`/project/${e}`},chips:[{label:`Upload to heyiam.com`}],actions:t.step===`review`?s:void 0,children:(0,L.jsxs)(`div`,{className:`p-6`,children:[t.step===`uploading`&&(0,L.jsxs)(z,{className:`max-w-2xl mx-auto`,children:[(0,L.jsx)(V,{title:`Uploading...`,meta:`in progress`}),(0,L.jsxs)(`div`,{className:`space-y-1.5 mt-3`,children:[t.messages.map((e,t)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,L.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),e]},t)),t.messages.length===0&&(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,L.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),`Connecting...`]})]})]}),t.step===`done`&&(0,L.jsxs)(z,{className:`max-w-2xl mx-auto`,children:[(0,L.jsx)(V,{title:`Uploaded`,meta:`on heyi.am`}),(0,L.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-green shrink-0`}),(0,L.jsxs)(`span`,{className:`text-sm text-on-surface font-medium`,children:[t.uploaded,` session`,t.uploaded===1?``:`s`,` uploaded`]})]}),(0,L.jsx)(`p`,{className:`text-xs text-on-surface-variant`,children:`Sessions are unlisted by default. Go to the dashboard to publish them.`}),(0,L.jsx)(`a`,{href:t.projectUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors mt-1`,children:`Open dashboard`})]})]}),t.step===`auth`&&(0,L.jsxs)(z,{className:`max-w-2xl mx-auto`,children:[t.status===`opening`&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(V,{title:`Opening browser...`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 mt-3 text-sm text-on-surface-variant`,children:[(0,L.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),`Starting login...`]})]}),t.status===`waiting`&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(V,{title:`Log in to heyiam.com`}),(0,L.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,L.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),`Waiting for you to finish in the browser...`]}),(0,L.jsx)(`p`,{className:`text-xs text-on-surface-variant`,children:`Log in or create an account in the browser window that opened, then come back here.`})]})]}),t.status===`done`&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(V,{title:`Logged in`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 mt-3 text-sm text-on-surface`,children:[(0,L.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-green shrink-0`}),`Uploading...`]})]}),t.status===`error`&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(V,{title:`Login failed`}),(0,L.jsx)(`p`,{className:`text-error text-sm mt-2`,children:t.error}),(0,L.jsx)(`button`,{className:`mt-3 inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:o,children:`Try again`})]})]}),t.step===`error`&&(0,L.jsxs)(z,{className:`max-w-2xl mx-auto`,children:[(0,L.jsx)(V,{title:`Upload failed`}),(0,L.jsx)(`p`,{className:`text-error text-sm mt-2`,children:t.message}),(0,L.jsx)(`button`,{className:`mt-3 inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:a,children:`Retry`})]}),t.step===`review`&&(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-6`,children:[(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`What gets uploaded`,meta:`review`}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(B,{children:`Project title and narrative summary`}),(0,L.jsx)(B,{children:`Selected sessions and stats`}),(0,L.jsx)(B,{children:`Curated decisions, phases, and rendered templates`})]})]}),(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`What stays local`,meta:`safety`}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(B,{children:`Excluded sessions and private notes`}),(0,L.jsx)(B,{children:`Source audit details and archive metadata`}),(0,L.jsx)(B,{children:`Sensitive flagged terms and personal data`})]}),(0,L.jsx)(`div`,{className:`flex items-center gap-3 mt-4`,children:(0,L.jsx)(`button`,{className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:a,children:`Upload to heyiam.com`})})]})]})]})})}function $a(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!0),[m,h]=(0,_.useState)({localOnly:!0,requireReview:!0,excludeOpenClaw:!1});(0,_.useEffect)(()=>{Promise.all([lr().catch(()=>({hasKey:!1})),dr().catch(()=>({authenticated:!1}))]).then(([e,n])=>{t(e),r(n)}).finally(()=>p(!1))},[]);async function g(){if(i.trim()){l(!0);try{await ur(i.trim()),t({hasKey:!0,keyPrefix:i.trim().slice(0,16)}),a(``)}finally{l(!1)}}}async function v(){l(!0);try{await ur(``),t({hasKey:!1}),a(``),s(!1)}finally{l(!1)}}async function y(){d(!0);try{await Cr(),r({authenticated:!1})}finally{d(!1)}}function b(e){h(t=>({...t,[e]:!t[e]}))}return f||!e||!n?(0,L.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},chips:[{label:`Settings`}],children:(0,L.jsx)(`div`,{className:`max-w-3xl mx-auto p-6`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading settings...`})})}):(0,L.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},chips:[{label:`Settings`}],children:(0,L.jsxs)(`div`,{className:`max-w-3xl mx-auto p-6`,children:[(0,L.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface`,children:`Settings`}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 mt-6`,children:[(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`API configuration`,meta:`local only`}),(0,L.jsx)(`label`,{className:`font-mono text-[11px] uppercase tracking-wider text-on-surface-variant block mb-1.5`,children:`Anthropic API Key`}),e.hasKey&&!i?(0,L.jsx)(`input`,{type:o?`text`:`password`,value:e.keyPrefix?`${e.keyPrefix}...`:`••••••••••••`,readOnly:!0,className:`w-full bg-surface-low border border-ghost rounded-md px-3 py-1.5 text-sm font-mono text-on-surface mb-2`}):(0,L.jsx)(`input`,{type:`password`,value:i,onChange:e=>a(e.target.value),placeholder:`sk-ant-api03-...`,className:`w-full bg-surface-low border border-ghost rounded-md px-3 py-1.5 text-sm font-mono text-on-surface mb-2`,onKeyDown:e=>{e.key===`Enter`&&g()}}),(0,L.jsx)(`p`,{className:`text-on-surface-variant text-xs mb-3`,children:`Used for project refinement. Keys stay on your machine.`}),(0,L.jsx)(`div`,{className:`flex items-center gap-2`,children:e.hasKey&&!i?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{className:`text-xs font-medium px-2.5 py-1 rounded-md border border-outline text-on-surface hover:bg-surface-low transition-colors`,onClick:()=>s(!o),children:o?`Hide`:`Show`}),(0,L.jsx)(`button`,{className:`text-xs font-medium px-2.5 py-1 rounded-md text-on-surface-variant hover:text-on-surface transition-colors`,onClick:v,disabled:c,children:`Remove`})]}):i?(0,L.jsx)(`button`,{className:`text-xs font-medium px-2.5 py-1 rounded-md bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:g,disabled:c,children:c?`Saving...`:`Save key`}):null})]}),(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Privacy defaults`,meta:`recommended`}),(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsx)(eo,{label:`Mark new projects local only by default`,checked:m.localOnly,onChange:()=>b(`localOnly`)}),(0,L.jsx)(eo,{label:`Require review before publish`,checked:m.requireReview,onChange:()=>b(`requireReview`)}),(0,L.jsx)(eo,{label:`Exclude personal OpenClaw sessions by default`,checked:m.excludeOpenClaw,onChange:()=>b(`excludeOpenClaw`)})]})]})]}),(0,L.jsx)(`div`,{className:`mt-4`,children:(0,L.jsxs)(z,{children:[(0,L.jsx)(V,{title:`Authentication`,meta:`optional`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`w-2 h-2 rounded-full shrink-0 ${n.authenticated?`bg-green`:`bg-outline`}`}),n.authenticated?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`span`,{className:`text-[13px] text-on-surface`,children:[`Connected as `,(0,L.jsxs)(`strong`,{children:[`@`,n.username]})]}),(0,L.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:`Authenticated via device auth. Required for publishing.`}),(0,L.jsx)(`button`,{className:`ml-auto text-xs font-medium px-2.5 py-1 rounded-md text-on-surface-variant hover:text-on-surface transition-colors`,onClick:y,disabled:u,children:u?`Disconnecting...`:`Disconnect`})]}):(0,L.jsx)(`span`,{className:`text-[13px] text-on-surface-variant`,children:`Not connected. Authentication is required for publishing.`})]})]})})]})})}function eo({label:e,checked:t,onChange:n}){return(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`span`,{className:`text-sm text-on-surface`,children:e}),(0,L.jsx)(`button`,{role:`switch`,"aria-checked":t,onClick:n,className:`relative w-[40px] h-[22px] rounded-full transition-colors ${t?`bg-green`:`bg-surface-high`}`,children:(0,L.jsx)(`span`,{className:`absolute top-[3px] w-4 h-4 rounded-full bg-surface-lowest shadow-sm transition-transform ${t?`left-[21px]`:`left-[3px]`}`})})]})}var to=[`Claude`,`Cursor`,`Codex`,`Gemini`];function no(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function ro(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function io(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}catch{return e}}function ao(){let[e,t]=Mn(),n=at(),r=e.get(`q`)??``,i=e.get(`source`)??``,a=e.get(`project`)??``,o=e.get(`skill`)??``,[s,c]=(0,_.useState)(r),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)(0),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(!1),v=i,y=a,b=o,[x,S]=(0,_.useState)([]),[C,w]=(0,_.useState)([]),T=(0,_.useCallback)(async(e,t,n,r)=>{if(!e&&!t&&!n&&!r){u([]),f(0),g(!1);return}m(!0),g(!0);try{let i=await fr(e,{source:t||void 0,project:n||void 0,skill:r||void 0});u(i.results),f(i.total);let a=[...new Set(i.results.map(e=>e.projectName))].sort(),o=[...new Set(i.results.flatMap(e=>e.skills))].sort();S(a),w(o)}catch{u([]),f(0)}finally{m(!1)}},[]);(0,_.useEffect)(()=>{let e=setTimeout(()=>{let e=new URLSearchParams;s&&e.set(`q`,s),v&&e.set(`source`,v),y&&e.set(`project`,y),b&&e.set(`skill`,b),t(e,{replace:!0}),T(s,v,y,b)},300);return()=>clearTimeout(e)},[s,v,y,b,t,T]),(0,_.useEffect)(()=>{(r||i||a||o)&&(c(r),T(r,i,a,o))},[]);function E(n,r){let i=new URLSearchParams(e);i.get(n)===r?i.delete(n):i.set(n,r),t(i,{replace:!0})}return(0,L.jsx)(Ar,{chips:[{label:`Search`}],children:(0,L.jsxs)(`div`,{className:`p-6 max-w-3xl mx-auto`,children:[(0,L.jsx)(kr,{value:s,onChange:c,autoFocus:!0,placeholder:`Search sessions...`}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 mt-3`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mr-1`,children:`Source`}),to.map(e=>(0,L.jsx)(`button`,{onClick:()=>E(`source`,e.toLowerCase()),className:[`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm border transition-colors cursor-pointer`,v===e.toLowerCase()?`bg-primary/10 text-primary border-primary/30`:`bg-surface-low text-on-surface-variant border-ghost hover:border-outline`].join(` `),children:e},e)),x.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline ml-3 mr-1`,children:`Project`}),x.slice(0,5).map(e=>(0,L.jsx)(`button`,{onClick:()=>E(`project`,e),className:[`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm border transition-colors cursor-pointer`,y===e?`bg-primary/10 text-primary border-primary/30`:`bg-surface-low text-on-surface-variant border-ghost hover:border-outline`].join(` `),children:e},e))]}),C.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline ml-3 mr-1`,children:`Skill`}),C.slice(0,5).map(e=>(0,L.jsx)(`button`,{onClick:()=>E(`skill`,e),className:[`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm border transition-colors cursor-pointer`,b===e?`bg-violet-bg text-violet border-violet/30`:`bg-surface-low text-on-surface-variant border-ghost hover:border-outline`].join(` `),children:e},e))]})]}),(0,L.jsx)(`div`,{className:`h-4`}),p?(0,L.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:`Searching...`}):h?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`font-mono text-[11px] text-on-surface-variant mb-3`,children:[d,` result`,d===1?``:`s`,s?` for '${s}'`:``]}),l.length===0?(0,L.jsx)(z,{children:(0,L.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:`No sessions found. Try a different query or adjust filters.`})}):(0,L.jsx)(`div`,{className:`flex flex-col gap-2`,children:l.map(e=>(0,L.jsx)(`button`,{onClick:()=>n(`/session/${encodeURIComponent(e.sessionId)}${s?`?q=${encodeURIComponent(s)}`:``}`),className:`text-left w-full cursor-pointer`,children:(0,L.jsxs)(z,{hover:!0,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,L.jsx)(`h4`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface truncate`,children:e.title}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,L.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:e.projectName}),(0,L.jsx)(R,{children:e.source}),(0,L.jsx)(`span`,{className:`text-xs text-outline`,children:io(e.date)})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 font-mono text-[0.6875rem] text-outline shrink-0`,children:[(0,L.jsx)(`span`,{children:no(e.durationMinutes)}),(0,L.jsxs)(`span`,{children:[e.turns,` turns`]}),(0,L.jsxs)(`span`,{children:[ro(e.linesOfCode),` lines`]})]})]}),e.snippet&&(0,L.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-2 line-clamp-2 font-mono`,children:e.snippet}),e.skills.length>0&&(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:e.skills.map(e=>(0,L.jsx)(R,{variant:`violet`,children:e},e))})]})},e.sessionId))})]}):(0,L.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,L.jsxs)(`svg`,{className:`w-12 h-12 text-outline mb-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,L.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,L.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,L.jsx)(`p`,{className:`font-display text-sm font-semibold text-on-surface`,children:`Search across all your AI sessions`}),(0,L.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-1`,children:`Full-text search with source, project, and skill filters`})]})]})})}var oo={Read:`📄`,Write:`✏️`,Edit:`✏️`,Bash:`▶`,Grep:`🔍`,Glob:`📂`,Agent:`🤖`,WebSearch:`🌐`,WebFetch:`🌐`};function so(e){return oo[e]??`⚙`}function G(e){let{toolName:t,input:n}=e;if(!n)return t;switch(t){case`Read`:return n;case`Write`:return n;case`Edit`:return n;case`Bash`:return n.length>80?n.slice(0,77)+`...`:n;case`Grep`:case`Glob`:return n;case`Agent`:return n;default:return n.length>60?n.slice(0,57)+`...`:n}}function K({block:e}){let[t,n]=(0,_.useState)(!1),r=!!e.output,i=e.toolName===`Edit`,a=e.toolName===`Bash`;return(0,L.jsxs)(`div`,{className:`my-1.5 border border-ghost rounded-md bg-surface-lowest overflow-hidden`,children:[(0,L.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-surface-low transition-colors cursor-pointer`,children:[(0,L.jsx)(`span`,{className:`text-xs shrink-0 w-4 text-center`,children:so(e.toolName)}),(0,L.jsx)(`span`,{className:`font-mono text-[11px] font-semibold text-primary shrink-0`,children:e.toolName}),(0,L.jsx)(`span`,{className:`font-mono text-[11px] text-on-surface-variant truncate flex-1`,children:G(e)}),e.isError&&(0,L.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-error shrink-0`,children:`error`}),(0,L.jsx)(`span`,{className:`text-[10px] text-outline shrink-0 transition-transform`,style:{transform:t?`rotate(90deg)`:`rotate(0deg)`},children:`▸`})]}),t&&(0,L.jsxs)(`div`,{className:`border-t border-ghost`,children:[i&&e.inputData&&(0,L.jsxs)(`div`,{className:`px-3 py-2 border-b border-ghost`,children:[typeof e.inputData.old_string==`string`&&(0,L.jsxs)(`div`,{className:`mb-2`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1`,children:`old`}),(0,L.jsx)(`pre`,{className:`font-mono text-[11px] text-error/80 bg-error/5 rounded px-2 py-1.5 overflow-x-auto whitespace-pre-wrap break-all max-h-40 overflow-y-auto`,children:e.inputData.old_string})]}),typeof e.inputData.new_string==`string`&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1`,children:`new`}),(0,L.jsx)(`pre`,{className:`font-mono text-[11px] text-green/80 bg-green/5 rounded px-2 py-1.5 overflow-x-auto whitespace-pre-wrap break-all max-h-40 overflow-y-auto`,children:e.inputData.new_string})]})]}),a&&e.input&&(0,L.jsx)(`div`,{className:`px-3 py-2 border-b border-ghost bg-[var(--inverse-surface)]`,children:(0,L.jsxs)(`pre`,{className:`font-mono text-[11px] text-[var(--inverse-on-surface)] whitespace-pre-wrap break-all`,children:[`$ `,e.input]})}),r&&(0,L.jsxs)(`div`,{className:`px-3 py-2 max-h-64 overflow-y-auto`,children:[(0,L.jsx)(`pre`,{className:`font-mono text-[11px] whitespace-pre-wrap break-all ${e.isError?`text-error`:`text-on-surface-variant`}`,children:e.output}),e.outputTruncated&&(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mt-2`,children:`output truncated`})]}),!r&&!i&&!a&&(0,L.jsx)(`div`,{className:`px-3 py-2 text-[11px] text-outline italic`,children:`no output`})]})]})}function co({text:e}){let[t,n]=(0,_.useState)(!1),r=e.slice(0,80).replace(/\n/g,` `);return(0,L.jsxs)(`div`,{className:`my-1`,children:[(0,L.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-2 text-left cursor-pointer group`,children:[(0,L.jsx)(`span`,{className:`text-[10px] text-outline transition-transform shrink-0`,style:{transform:t?`rotate(90deg)`:`rotate(0deg)`},children:`▸`}),(0,L.jsx)(`span`,{className:`font-mono text-[11px] text-outline italic group-hover:text-on-surface-variant transition-colors`,children:t?`thinking`:`thinking: ${r}${e.length>80?`...`:``}`})]}),t&&(0,L.jsx)(`div`,{className:`ml-5 mt-1.5 pl-3 border-l-2 border-ghost`,children:(0,L.jsx)(`pre`,{className:`font-mono text-[11px] text-on-surface-variant/70 whitespace-pre-wrap break-words max-h-96 overflow-y-auto`,children:e})})]})}var lo=300;function uo({text:e,highlights:t}){let[n,r]=(0,_.useState)(e.length<=lo),i=e.length>lo,a=(()=>{if(!i)return e.length;let t=e.slice(0,lo+50),n=t.lastIndexOf(`. `,lo);if(n>lo*.6)return n+1;let r=t.lastIndexOf(` `,lo);return r>lo*.6?r:lo})(),o=n?e:e.slice(0,a);if(t){let e=RegExp(`(${_o(t)})`,`gi`);return(0,L.jsxs)(`div`,{className:`text-[0.8125rem] leading-relaxed whitespace-pre-wrap break-words`,children:[o.split(e).map((t,n)=>e.test(t)?(0,L.jsx)(`mark`,{className:`bg-amber/30 text-on-surface rounded-sm px-0.5`,children:t},n):(0,L.jsx)(`span`,{children:t},n)),i&&(0,L.jsx)(fo,{expanded:n,onToggle:()=>r(!n)})]})}return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(po,{text:o}),i&&(0,L.jsx)(fo,{expanded:n,onToggle:()=>r(!n)})]})}function fo({expanded:e,onToggle:t}){return(0,L.jsx)(`button`,{type:`button`,onClick:t,className:`inline-block mt-1 font-mono text-[11px] text-primary hover:underline cursor-pointer`,children:e?`▴ Show less`:`▾ Show more`})}function po({text:e}){return(0,L.jsx)(`div`,{className:`text-[0.8125rem] leading-relaxed whitespace-pre-wrap break-words`,children:e.split(/(```[\s\S]*?```)/g).map((e,t)=>{if(e.startsWith("```")&&e.endsWith("```")){let n=e.slice(3,-3),r=n.indexOf(`
21
+ `),i=r>0?n.slice(0,r).trim():``,a=r>0?n.slice(r+1):n;return(0,L.jsxs)(`pre`,{className:`my-2 bg-surface-lowest border border-ghost rounded-md px-3 py-2 font-mono text-[11px] overflow-x-auto`,children:[i&&(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:i}),a]},t)}return(0,L.jsx)(`span`,{children:e.split(/(`[^`]+`)/g).map((e,t)=>e.startsWith("`")&&e.endsWith("`")?(0,L.jsx)(`code`,{className:`bg-surface-low rounded px-1 py-0.5 font-mono text-[11px]`,children:e.slice(1,-1)},t):(0,L.jsx)(`span`,{children:e},t))},t)})})}function mo({message:e,searchQuery:t,messageIndex:n,showRoleBadge:r=!0}){let i=e.role===`user`,a=e.blocks.filter(e=>e.type===`tool_call`),o=e.blocks.filter(e=>e.type===`text`),s=e.blocks.filter(e=>e.type===`thinking`),[c,l]=(0,_.useState)(a.length<=3);return(0,L.jsxs)(`div`,{className:`relative`,"data-message-index":n,children:[r&&(0,L.jsx)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:(0,L.jsx)(`span`,{className:`inline-flex items-center font-mono text-[11px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-sm ${i?`bg-primary/10 text-primary`:`bg-green/10 text-green`}`,children:i?`you`:`assistant`})}),(0,L.jsxs)(`div`,{className:`${i?`bg-primary/5 border-l-[3px] border-primary pl-3 py-2 rounded-r-md`:`pl-0.5`}`,children:[s.map((e,n)=>(0,L.jsx)(ho,{block:e,searchQuery:t},`t-${n}`)),o.map((e,n)=>(0,L.jsx)(ho,{block:e,searchQuery:t},`x-${n}`)),a.length>3&&!c?(0,L.jsxs)(`button`,{type:`button`,onClick:()=>l(!0),className:`mt-1.5 flex items-center gap-2 font-mono text-[11px] text-on-surface-variant hover:text-on-surface cursor-pointer transition-colors`,children:[(0,L.jsx)(`span`,{className:`text-[10px] text-outline`,children:`▸`}),(0,L.jsxs)(`span`,{children:[a.length,` tool calls`]}),(0,L.jsxs)(`span`,{className:`text-outline`,children:[`(`,[...new Set(a.map(e=>e.type===`tool_call`?e.toolName:``))].join(`, `),`)`]})]}):a.map((e,n)=>(0,L.jsx)(ho,{block:e,searchQuery:t},`tc-${n}`)),a.length>3&&c&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>l(!1),className:`mt-1 font-mono text-[10px] text-outline hover:text-on-surface-variant cursor-pointer`,children:[`▾ Collapse `,a.length,` tool calls`]})]})]})}function ho({block:e,searchQuery:t}){switch(e.type){case`text`:return(0,L.jsx)(uo,{text:e.text,highlights:t});case`thinking`:return(0,L.jsx)(co,{text:e.text});case`tool_call`:return(0,L.jsx)(K,{block:e})}}function go({query:e,onQueryChange:t,matchCount:n,currentMatch:r,onNext:i,onPrev:a,onClose:o}){let s=(0,_.useRef)(null);return(0,_.useEffect)(()=>{s.current?.focus()},[]),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 bg-surface-lowest border border-ghost rounded-md px-3 py-1.5 shadow-sm`,children:[(0,L.jsxs)(`svg`,{className:`w-3.5 h-3.5 text-outline shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,L.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,L.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,L.jsx)(`input`,{ref:s,type:`text`,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.shiftKey?a():i()),e.key===`Escape`&&o()},placeholder:`Search in session...`,className:`bg-transparent text-sm text-on-surface outline-none flex-1 min-w-0`}),e&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`font-mono text-[10px] text-outline shrink-0`,children:n>0?`${r+1}/${n}`:`no matches`}),(0,L.jsx)(`button`,{type:`button`,onClick:a,disabled:n===0,className:`text-xs text-on-surface-variant hover:text-on-surface disabled:opacity-30 cursor-pointer`,children:`↑`}),(0,L.jsx)(`button`,{type:`button`,onClick:i,disabled:n===0,className:`text-xs text-on-surface-variant hover:text-on-surface disabled:opacity-30 cursor-pointer`,children:`↓`})]}),(0,L.jsx)(`button`,{type:`button`,onClick:o,className:`text-xs text-outline hover:text-on-surface cursor-pointer ml-1`,children:`✕`})]})}function _o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function vo({messages:e,initialSearchQuery:t,compact:n}){let[r,i]=(0,_.useState)(!!t),[a,o]=(0,_.useState)(t??``),[s,c]=(0,_.useState)(0),l=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(n)return;function e(e){(e.metaKey||e.ctrlKey)&&e.key===`f`&&(e.preventDefault(),i(!0))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n]);let u=(0,_.useMemo)(()=>{if(!a)return 0;let t=new RegExp(_o(a),`gi`),n=0;for(let r of e)for(let e of r.blocks)if(e.type===`text`){let r=e.text.match(t);r&&(n+=r.length)}return n},[e,a]),d=(0,_.useCallback)(()=>{c(e=>(e+1)%Math.max(1,u))},[u]),f=(0,_.useCallback)(()=>{c(e=>(e-1+Math.max(1,u))%Math.max(1,u))},[u]),p=(0,_.useCallback)(()=>{i(!1),o(``),c(0)},[]);return e.length===0?(0,L.jsx)(`div`,{className:`text-center ${n?`py-4`:`py-12`}`,children:(0,L.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:`No conversation data available.`})}):(0,L.jsxs)(`div`,{ref:l,className:`relative`,children:[!n&&r&&(0,L.jsx)(`div`,{className:`sticky top-12 z-40 mb-4`,children:(0,L.jsx)(go,{query:a,onQueryChange:e=>{o(e),c(0)},matchCount:u,currentMatch:s,onNext:d,onPrev:f,onClose:p})}),(0,L.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.map((t,n)=>{let r=n>0?e[n-1].role:null,i=r!==t.role;return(0,L.jsxs)(`div`,{children:[r!==null&&r!==t.role&&t.role===`user`&&(0,L.jsx)(`div`,{className:`border-t border-ghost/60 mb-4 mt-1`}),(0,L.jsx)(mo,{message:t,messageIndex:n,searchQuery:a||void 0,showRoleBadge:i})]},t.id)})}),!n&&!r&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>i(!0),className:`fixed bottom-6 right-6 z-40 bg-surface-lowest border border-ghost rounded-full w-10 h-10 flex items-center justify-center shadow-lg hover:shadow-xl transition-shadow cursor-pointer group`,title:`Search in session (Cmd+F)`,children:(0,L.jsxs)(`svg`,{className:`w-4 h-4 text-on-surface-variant group-hover:text-on-surface transition-colors`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,L.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,L.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})})]})}function yo(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function bo(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function xo(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}catch{return e}}function So(e){let t=e.replace(/^#+\s*/gm,``).replace(/\*\*/g,``).replace(/\n.*/s,``);return t.length>120&&(t=t.slice(0,117)+`...`),t}function Co(){let{sessionId:e}=st(),[t]=Mn(),n=at(),r=t.get(`q`)??``,[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(!0),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)([]),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(null),[C,w]=(0,_.useState)(!1);(0,_.useEffect)(()=>{e&&(s(!0),pr(e).then(a).catch(e=>l(e.message)).finally(()=>s(!1)))},[e]),(0,_.useEffect)(()=>{!e||m||(p(!0),hr(e).then(e=>{d(e.messages),h(!0)}).catch(()=>{}).finally(()=>p(!1)))},[e,m]),(0,_.useEffect)(()=>{if(!x)return;let e=setTimeout(()=>S(null),3e3);return()=>clearTimeout(e)},[x]);async function T(t){if(!(!e||y)){b(!0),v(!1);try{let n=await mr(e,t);await navigator.clipboard.writeText(n.content),S(`Context copied (${n.tokens.toLocaleString()} tokens)`)}catch{S(`Failed to copy context`)}finally{b(!1)}}}async function E(){if(!(!e||C)){w(!0);try{let t=await mr(e,`summary`),n=new Blob([t.content],{type:`text/markdown`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`session-${e.slice(0,8)}.md`,i.click(),URL.revokeObjectURL(r),S(`Downloaded summary (${t.tokens.toLocaleString()} tokens)`)}catch{S(`Failed to download summary`)}finally{w(!1)}}}if(o)return(0,L.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-surface-mid`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading session...`})});if(c||!i)return(0,L.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center bg-surface-mid gap-3`,children:[(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:c??`Session not found.`}),(0,L.jsx)(`button`,{onClick:()=>n(-1),className:`text-xs text-primary hover:underline cursor-pointer`,children:`Go back`})]});let D=i.filesChanged??[],O=i.toolBreakdown??[],k=Math.max(...O.map(e=>e.count),1),A=(()=>{if(u.length>0&&u[0].role===`user`)return u;let e=i.title.replace(/\.\.\.$/,``).replace(/\s*##\s*$/,``).trim();return[{id:`first-prompt`,timestamp:i.date,role:`user`,blocks:[{type:`text`,text:e}]},...u]})();return(0,L.jsxs)(`div`,{className:`min-h-screen bg-surface-mid`,children:[(0,L.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,L.jsx)(`button`,{onClick:()=>n(-1),className:`text-sm text-on-surface-variant hover:text-on-surface transition-colors cursor-pointer shrink-0`,children:`← Back`}),(0,L.jsx)(`span`,{className:`text-outline text-xs shrink-0`,children:`/`}),(0,L.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface truncate`,children:So(i.title)})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,L.jsx)(`button`,{onClick:E,disabled:C,className:`inline-flex items-center gap-1.5 text-[0.8125rem] px-3 py-1.5 rounded-sm border border-ghost text-on-surface-variant hover:text-on-surface hover:border-outline transition-colors cursor-pointer disabled:opacity-50`,children:C?`Downloading...`:`↓ Summary`}),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`button`,{onClick:()=>v(!g),disabled:y,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors cursor-pointer disabled:opacity-50`,children:y?`Copying...`:`Copy for AI`}),g&&(0,L.jsx)(`div`,{className:`absolute right-0 top-full mt-1 bg-surface-lowest border border-ghost rounded-md shadow-lg z-50 py-1 min-w-[160px]`,children:[`compact`,`summary`,`full`].map(e=>(0,L.jsxs)(`button`,{onClick:()=>T(e),className:`w-full text-left px-3 py-1.5 text-sm text-on-surface hover:bg-surface-low transition-colors cursor-pointer`,children:[(0,L.jsx)(`span`,{className:`font-semibold capitalize`,children:e}),(0,L.jsx)(`span`,{className:`text-on-surface-variant text-xs ml-1.5`,children:e===`compact`?`~500 tokens`:e===`summary`?`~2k tokens`:`~5k+ tokens`})]},e))})]})]})]})}),x&&(0,L.jsx)(`div`,{className:`fixed bottom-4 right-4 z-50 bg-surface-dark text-on-primary font-mono text-xs px-4 py-2.5 rounded-md shadow-lg`,children:x}),(0,L.jsxs)(`div`,{className:`p-6 max-w-3xl mx-auto`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 mb-2`,children:[i.source&&(0,L.jsx)(R,{children:i.source}),(0,L.jsx)(R,{children:xo(i.date)}),i.projectName&&(0,L.jsx)(R,{variant:`primary`,children:i.projectName})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-4 font-mono text-[11px] text-on-surface-variant mb-4`,children:[(0,L.jsxs)(`span`,{children:[yo(i.durationMinutes),` active`]}),(0,L.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,L.jsxs)(`span`,{children:[i.turns,` turns`]}),(0,L.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,L.jsxs)(`span`,{children:[D.length,` files`]}),(0,L.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,L.jsxs)(`span`,{children:[bo(i.linesOfCode),` lines`]})]}),i.developerTake&&(0,L.jsx)(`div`,{className:`mb-5`,children:(0,L.jsx)(`p`,{className:`text-[0.9375rem] leading-relaxed text-on-surface border-l-[3px] border-primary pl-3`,children:i.developerTake})}),i.skills&&i.skills.length>0&&(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1 mb-5`,children:i.skills.map(e=>(0,L.jsx)(R,{variant:`violet`,children:e},e))}),f?(0,L.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`span`,{className:`w-4 h-4 border-2 border-primary border-t-transparent rounded-full animate-spin`}),(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading transcript...`})]})}):(0,L.jsx)(vo,{messages:A,initialSearchQuery:r}),(O.length>0||D.length>0||i.qaPairs&&i.qaPairs.length>0)&&(0,L.jsxs)(`div`,{className:`mt-8 pt-6 border-t border-ghost`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-4`,children:`Supporting detail`}),D.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsxs)(`div`,{className:`font-mono text-[10px] uppercase tracking-wider text-on-surface-variant mb-2`,children:[`Files changed · `,D.length]}),(0,L.jsx)(`div`,{className:`flex flex-col divide-y divide-ghost bg-surface-lowest border border-ghost rounded-md`,children:D.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,L.jsx)(`span`,{className:`font-mono text-xs text-on-surface truncate flex-1 mr-3`,children:e.path}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-[11px] shrink-0`,children:[e.additions>0&&(0,L.jsxs)(`span`,{className:`text-green`,children:[`+`,e.additions]}),e.deletions>0&&(0,L.jsxs)(`span`,{className:`text-error`,children:[`-`,e.deletions]})]})]},e.path))})]}),O.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsxs)(`div`,{className:`font-mono text-[10px] uppercase tracking-wider text-on-surface-variant mb-2`,children:[`Tool breakdown · `,O.reduce((e,t)=>e+t.count,0),` calls`]}),(0,L.jsx)(`div`,{className:`flex flex-col gap-2`,children:O.sort((e,t)=>t.count-e.count).map(e=>(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[11px] text-on-surface-variant w-28 truncate shrink-0`,children:e.tool}),(0,L.jsx)(`div`,{className:`flex-1 h-4 bg-surface-low rounded-sm overflow-hidden`,children:(0,L.jsx)(`div`,{className:`h-full bg-primary/20 rounded-sm`,style:{width:`${e.count/k*100}%`}})}),(0,L.jsx)(`span`,{className:`font-mono text-[11px] text-outline w-8 text-right shrink-0`,children:e.count})]},e.tool))})]}),i.qaPairs&&i.qaPairs.length>0&&(0,L.jsxs)(`div`,{className:`mb-5`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[10px] uppercase tracking-wider text-on-surface-variant mb-2`,children:`Questions & Answers`}),(0,L.jsx)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md divide-y divide-ghost`,children:i.qaPairs.map((e,t)=>(0,L.jsxs)(`div`,{className:`px-3 py-3`,children:[(0,L.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-1`,children:e.question}),(0,L.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.answer})]},t))})]})]})]})]})}function wo(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function To(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Eo(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function Do(){let{dirName:e}=st(),t=at(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!0),[o,s]=(0,_.useState)(`date`),[c,l]=(0,_.useState)(!0),[u,d]=(0,_.useState)(``);if((0,_.useEffect)(()=>{e&&nr(e).then(r).catch(()=>{}).finally(()=>a(!1))},[e]),i)return(0,L.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-surface-mid`,children:(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading sessions...`})});if(!n)return(0,L.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center bg-surface-mid gap-3`,children:[(0,L.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Project not found.`}),(0,L.jsx)(`button`,{onClick:()=>t(-1),className:`text-xs text-primary hover:underline cursor-pointer`,children:`Go back`})]});let{sessions:f}=n,p=[...u?f.filter(e=>e.title.toLowerCase().includes(u.toLowerCase())||(e.skills??[]).some(e=>e.toLowerCase().includes(u.toLowerCase()))||(e.source??``).toLowerCase().includes(u.toLowerCase())):f].sort((e,t)=>{let n=0;switch(o){case`date`:n=new Date(e.date).getTime()-new Date(t.date).getTime();break;case`duration`:n=e.durationMinutes-t.durationMinutes;break;case`loc`:n=e.linesOfCode-t.linesOfCode;break;case`turns`:n=e.turns-t.turns;break}return c?-n:n});function m(e){o===e?l(!c):(s(e),l(!0))}function h({label:e,sortKey:t}){let n=o===t;return(0,L.jsxs)(`button`,{type:`button`,onClick:()=>m(t),className:`font-mono text-[9px] uppercase tracking-wider cursor-pointer transition-colors ${n?`text-primary font-bold`:`text-outline hover:text-on-surface-variant`}`,children:[e,` `,n?c?`↓`:`↑`:``]})}return(0,L.jsxs)(`div`,{className:`min-h-screen bg-surface-mid`,children:[(0,L.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,L.jsxs)(`button`,{onClick:()=>t(`/project/${encodeURIComponent(e??``)}`),className:`text-sm text-on-surface-variant hover:text-on-surface transition-colors cursor-pointer shrink-0`,children:[`← `,n.project.name]}),(0,L.jsx)(`span`,{className:`text-outline text-xs shrink-0`,children:`/`}),(0,L.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface`,children:`All sessions`})]}),(0,L.jsxs)(R,{variant:`primary`,children:[f.length,` sessions`]})]})}),(0,L.jsxs)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-4 mb-4`,children:[(0,L.jsx)(`input`,{type:`text`,value:u,onChange:e=>d(e.target.value),placeholder:`Filter by title, skill, or source...`,className:`flex-1 bg-surface-lowest border border-ghost rounded-md px-3 py-2 text-sm text-on-surface placeholder:text-outline outline-none focus:border-primary transition-colors`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline`,children:`Sort:`}),(0,L.jsx)(h,{label:`Date`,sortKey:`date`}),(0,L.jsx)(h,{label:`Duration`,sortKey:`duration`}),(0,L.jsx)(h,{label:`Lines`,sortKey:`loc`}),(0,L.jsx)(h,{label:`Turns`,sortKey:`turns`})]})]}),(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[p.map(e=>(0,L.jsxs)(I,{to:`/session/${encodeURIComponent(e.id)}`,className:`flex items-start gap-4 bg-surface-lowest border border-ghost rounded-md px-4 py-3 hover:shadow-md transition-shadow`,children:[(0,L.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,L.jsx)(`div`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface mb-0.5 truncate`,children:e.title}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 font-mono text-[10px] text-on-surface-variant`,children:[(0,L.jsx)(`span`,{children:Eo(e.date)}),(0,L.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,L.jsx)(`span`,{children:wo(e.durationMinutes)}),(0,L.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,L.jsxs)(`span`,{children:[e.turns,` turns`]}),(0,L.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,L.jsxs)(`span`,{children:[To(e.linesOfCode),` lines`]})]}),e.developerTake&&(0,L.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-1 line-clamp-1`,children:e.developerTake})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0 pt-0.5`,children:[e.source&&(0,L.jsx)(R,{children:e.source}),e.skills?.[0]&&(0,L.jsx)(R,{variant:`violet`,children:e.skills[0]}),(e.skills?.length??0)>1&&(0,L.jsxs)(`span`,{className:`font-mono text-[9px] text-outline`,children:[`+`,e.skills.length-1]})]})]},e.id)),p.length===0&&(0,L.jsx)(`div`,{className:`text-center py-12`,children:(0,L.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:u?`No sessions match your filter.`:`No sessions in this project.`})})]})]})]})}function Oo({dirName:e}){let[t,n]=(0,_.useState)(!1),r=(0,_.useRef)(null);(0,_.useEffect)(()=>{function e(e){r.current&&!r.current.contains(e.target)&&n(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let i=encodeURIComponent(e),a=[{label:`HTML (.zip)`,href:`/api/projects/${i}/download-html`},{label:`Markdown (.zip)`,href:`/api/projects/${i}/download-markdown`},{label:`JSON`,href:`/api/projects/${i}/download-json`}];return(0,L.jsxs)(`div`,{className:`relative`,ref:r,children:[(0,L.jsxs)(`button`,{onClick:()=>n(e=>!e),className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm border border-ghost text-primary hover:border-outline transition-colors`,children:[`Export`,(0,L.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,className:`transition-transform ${t?`rotate-180`:``}`,children:(0,L.jsx)(`path`,{d:`M3 4.5L6 7.5L9 4.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),t&&(0,L.jsx)(`div`,{className:`absolute right-0 top-full mt-1 z-50 min-w-[160px] rounded-md border border-outline bg-surface py-1 shadow-lg`,children:a.map(e=>(0,L.jsx)(`a`,{href:e.href,className:`block px-3 py-1.5 text-[0.8125rem] text-on-surface hover:bg-surface-low transition-colors`,onClick:()=>n(!1),children:e.label},e.label))})]})}function ko(){let{dirName:e}=st(),[t,n]=(0,_.useState)(null);return(0,_.useEffect)(()=>{e&&nr(e).then(e=>{n(e.project.name)}).catch(()=>{})},[e]),(0,L.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},chips:[{label:t??`...`}],actions:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(I,{to:`/project/${encodeURIComponent(e??``)}/enhance`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,children:`Enhance project`}),(0,L.jsx)(Oo,{dirName:e??``}),(0,L.jsx)(I,{to:`/project/${encodeURIComponent(e??``)}/publish`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Upload to heyiam.com`})]}),children:(0,L.jsx)(Ea,{})})}function Ao(){return(0,L.jsx)(Sn,{children:(0,L.jsxs)(Nt,{children:[(0,L.jsx)(jt,{path:`/`,element:(0,L.jsx)(Wi,{})}),(0,L.jsx)(jt,{path:`/sources`,element:(0,L.jsx)(ia,{})}),(0,L.jsx)(jt,{path:`/archive`,element:(0,L.jsx)(oa,{})}),(0,L.jsx)(jt,{path:`/projects`,element:(0,L.jsx)(da,{})}),(0,L.jsx)(jt,{path:`/project/:dirName`,element:(0,L.jsx)(ko,{})}),(0,L.jsx)(jt,{path:`/project/:dirName/sessions`,element:(0,L.jsx)(Do,{})}),(0,L.jsx)(jt,{path:`/project/:dirName/boundaries`,element:(0,L.jsx)(Oa,{})}),(0,L.jsx)(jt,{path:`/project/:dirName/enhance`,element:(0,L.jsx)(Ya,{})}),(0,L.jsx)(jt,{path:`/search`,element:(0,L.jsx)(ao,{})}),(0,L.jsx)(jt,{path:`/session/:sessionId`,element:(0,L.jsx)(Co,{})}),(0,L.jsx)(jt,{path:`/project/:dirName/publish`,element:(0,L.jsx)(Qa,{})}),(0,L.jsx)(jt,{path:`/settings`,element:(0,L.jsx)($a,{})})]})})}(0,g.createRoot)(document.getElementById(`root`)).render((0,L.jsx)(_.StrictMode,{children:(0,L.jsx)(Ao,{})}));