heyiam 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,37 @@
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 M(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 N(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,N(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,`$&/`)+`/`),N(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+=N(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+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(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 F=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)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(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=I,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:ee}},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,F)}catch(e){F(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 M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?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?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},L=[],ne=-1;function re(e){return{current:e}}function ie(e){0>ne||(e.current=L[ne],L[ne]=null,ne--)}function R(e,t){ne++,L[ne]=e.current,e.current=t}var ae=re(null),oe=re(null),se=re(null),ce=re(null);function le(e,t){switch(R(se,t),R(oe,e),R(ae,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}}ie(ae),R(ae,e)}function ue(){ie(ae),ie(oe),ie(se)}function de(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=Hd(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function fe(e){oe.current===e&&(ie(ae),ie(oe)),ce.current===e&&(ie(ce),Qf._currentValue=te)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!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{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(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 Ge(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=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(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 Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(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 Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(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-Le(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&&Qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function $e(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function et(e,t){var n=t&-t;return n=n&42?1:tt(n),(n&(e.suspendedLanes|t))===0?n:0}function tt(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 nt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function rt(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function it(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var at=Math.random().toString(36).slice(2),ot=`__reactFiber$`+at,st=`__reactProps$`+at,ct=`__reactContainer$`+at,lt=`__reactEvents$`+at,ut=`__reactListeners$`+at,dt=`__reactHandles$`+at,ft=`__reactResources$`+at,pt=`__reactMarker$`+at;function mt(e){delete e[ot],delete e[st],delete e[lt],delete e[ut],delete e[dt]}function ht(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ot])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function gt(e){if(e=e[ot]||e[ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _t(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vt(e){var t=e[ft];return t||=e[ft]={hoistableStyles:new Map,hoistableScripts:new Map},t}function yt(e){e[pt]=!0}var bt=new Set,xt={};function St(e,t){Ct(e,t),Ct(e+`Capture`,t)}function Ct(e,t){for(xt[e]=t,e=0;e<t.length;e++)bt.add(t[e])}var wt=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]*$`),Tt={},Et={};function Dt(e){return be.call(Et,e)?!0:be.call(Tt,e)?!1:wt.test(e)?Et[e]=!0:(Tt[e]=!0,!1)}function Ot(e,t,n){if(Dt(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 kt(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 At(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 jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Mt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Nt(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 Pt(e){if(!e._valueTracker){var t=Mt(e)?`checked`:`value`;e._valueTracker=Nt(e,t,``+e[t])}}function Ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Mt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function It(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 Lt=/[\n"\\]/g;function Rt(e){return e.replace(Lt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function zt(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=``+jt(t)):e.value!==``+jt(t)&&(e.value=``+jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Vt(e,o,jt(n)):Vt(e,o,jt(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=``+jt(s):e.removeAttribute(`name`)}function Bt(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)){Pt(e);return}n=n==null?``:``+jt(n),t=t==null?n:``+jt(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),Pt(e)}function Vt(e,t,n){t===`number`&&It(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ht(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=``+jt(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 Ut(e,t,n){if(t!=null&&(t=``+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+jt(n)}function Wt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Pt(e)}function Gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kt=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 qt(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||Kt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Jt(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&&qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&qt(e,o,t[o])}function Yt(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 Xt=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`]]),Zt=/^[\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 Qt(e){return Zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function $t(){}var en=null;function tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,rn=null;function an(e){var t=gt(e);if(t&&(e=t.stateNode)){var n=e[st]||null;a:switch(e=t.stateNode,t.type){case`input`:if(zt(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="`+Rt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[st]||null;if(!a)throw Error(i(90));zt(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&&Ft(r)}break a;case`textarea`:Ut(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ht(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(nn!==null||rn!==null)&&(bu(),nn&&(t=nn,e=rn,rn=nn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[st]||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 ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,`passive`,{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.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 mn=i.slice(e,1<r?1-r:void 0)}function gn(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 _n(){return!0}function vn(){return!1}function yn(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)?_n:vn,this.isPropagationStopped=vn,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=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=h({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=h({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,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!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(h({},Dn,{dataTransfer:0})),An=yn(h({},Sn,{relatedTarget:0})),jn=yn(h({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(h({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(h({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={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`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(h({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(h({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(h({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(h({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(h({},Dn,{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})),Wn=yn(h({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!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 Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={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 ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){nn?rn?rn.push(r):rn=[r]:nn=r,t=Ed(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){yd(e,0)}function lr(e){if(Ft(_t(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(ln){var fr;if(ln){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){or&&(or.detachEvent(`onpropertychange`,gr),sr=or=null)}function gr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,tn(e)),sn(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),or=t,sr=n,or.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(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(!be.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(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=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=It(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=It(e.document)}return t}function Or(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=ln&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==It(r)||(r=Ar,`selectionStart`in r&&Or(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}),Mr&&Cr(Mr,r)||(Mr=r,r=Ed(jr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};ln&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),Kr=zr(`transitionend`),qr=new Map,Jr=`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(` `);Jr.push(`scrollEnd`);function Yr(e,t){qr.set(e,t),St(t,[e])}var Xr=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)},Zr=[],Qr=0,z=0;function $r(){for(var e=Qr,t=z=Qr=0;t<e;){var n=Zr[t];Zr[t++]=null;var r=Zr[t];Zr[t++]=null;var i=Zr[t];Zr[t++]=null;var a=Zr[t];if(Zr[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&&ri(n,i,a)}}function ei(e,t,n,r){Zr[Qr++]=e,Zr[Qr++]=t,Zr[Qr++]=n,Zr[Qr++]=r,z|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ti(e,t,n,r){return ei(e,t,n,r),ii(e)}function ni(e,t){return ei(e,null,null,t),ii(e)}function ri(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-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ii(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 ai={};function oi(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 si(e,t,n,r){return new oi(e,t,n,r)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function li(e,t){var n=e.alternate;return n===null?(n=si(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 ui(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 di(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ci(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=si(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return fi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=si(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=si(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=si(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=si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function pi(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function mi(e){var t=si(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var vi=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,Ei=``;function Di(e,t){vi[yi++]=xi,vi[yi++]=bi,bi=e,xi=t}function Oi(e,t,n){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,wi=e;var r=Ti;e=Ei;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Le(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===bi;)bi=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ei=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,Pi=!1,Fi=null,Ii=!1,Li=Error(i(519));function Ri(e){throw Wi(_i(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Li}function zi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ot]=e,t[st]=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),Bt(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),Wt(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=$t),t=!0):t=!1,t||Ri(e,!0)}function Bi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:Mi=Mi.return}}function Vi(e){if(e!==Mi)return!1;if(!Pi)return Bi(e),Pi=!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&&Ni&&Ri(e),Bi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=uf(e)}else t===27?(t=Ni,Zd(e.type)?(e=lf,lf=null,Ni=e):Ni=t):Ni=Mi?cf(e.stateNode.nextSibling):null;return!0}function Hi(){Ni=Mi=null,Pi=!1}function Ui(){var e=Fi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Fi=null),e}function Wi(e){Fi===null?Fi=[e]:Fi.push(e)}var Gi=re(null),Ki=null,qi=null;function Ji(e,t,n){R(Gi,t._currentValue),t._currentValue=n}function Yi(e){e._currentValue=Gi.current,ie(Gi)}function Xi(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 Zi(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),Xi(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),Xi(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 Qi(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;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ce.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&&Zi(t,e,n,r),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){Ki=e,qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return ra(Ki,e)}function na(e,t){return Ki===null&&ea(e),ra(e,t)}function ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qi===null){if(e===null)throw Error(i(308));qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qi=qi.next=t;return n}var ia=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()})}},aa=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new ia,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&aa(oa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=dd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(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 _a=F.S;F.S=function(e,t){eu=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=re(null);function ya(){var e=va.current;return e===null?q.pooledCache:e}function ba(e,t){t===null?R(va,va.current):R(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:sa._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($t,$t),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then($t,$t);else{if(e=q,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,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function B(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Pa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Fa(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 Ia(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=li(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=pi(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&&Oa(i)===t.type)?(t=a(t,n.props),Pa(t,n),t.return=e,t):(t=di(n.type,n.key,n.props,null,e.mode,r),Pa(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=hi(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=fi(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=pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=di(t.type,t.key,t.props,null,e.mode,n),Pa(n,t),n.return=e,n;case v:return t=hi(t,e.mode,n),t.return=e,t;case O:return t=Oa(t),f(e,t,n)}if(ee(t)||M(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,B(t),n);if(t.$$typeof===C)return f(e,na(e,t),n);Fa(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=Oa(n),p(e,t,n,r)}if(ee(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,B(n),r);if(n.$$typeof===C)return p(e,t,na(e,n),r);Fa(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=Oa(r),m(e,t,n,r,i)}if(ee(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,B(r),i);if(r.$$typeof===C)return m(e,t,n,na(t,r),i);Fa(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),Pi&&Di(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 Pi&&Di(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)}),Pi&&Di(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),Pi&&Di(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 Pi&&Di(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)}),Pi&&Di(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&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=di(o.type,o.key,o.props,null,e.mode,c),Pa(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=hi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Oa(o),b(e,r,o,c)}if(ee(o))return h(e,r,o,c);if(M(o)){if(l=M(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,B(o),c);if(o.$$typeof===C)return b(e,r,na(e,o),c);Fa(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=pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(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 Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ii(e),ri(e,null,n),t}return ei(e,r,t,n),ii(e)}function Wa(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,$e(e,n)}}function Ga(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 Ka=!1;function qa(){if(Ka){var e=pa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!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===fa&&(Ka=!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:za=!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 Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ya(n[e],t)}var Za=re(null),Qa=re(0);function $a(e,t){e=Ul,R(Qa,e),R(Za,t),Ul=e|t.baseLanes}function eo(){R(Qa,Ul),R(Za,Za.current)}function to(){Ul=Qa.current,ie(Za),ie(Qa)}var no=re(null),ro=null;function io(e){var t=e.alternate;R(co,co.current&1),R(no,e),ro===null&&(t===null||Za.current!==null||t.memoizedState!==null)&&(ro=e)}function ao(e){R(co,co.current),R(no,e),ro===null&&(ro=e)}function V(e){e.tag===22?(R(co,co.current),R(no,e),ro===null&&(ro=e)):oo(e)}function oo(){R(co,co.current),R(no,no.current)}function so(e){ie(no),ro===e&&(ro=null),ie(co)}var co=re(0);function H(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 lo=0,U=null,uo=null,fo=null,po=!1,mo=!1,ho=!1,go=0,_o=0,vo=null,yo=0;function bo(){throw Error(i(321))}function xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,a){return lo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?zs:Bs,ho=!1,a=n(r,i),ho=!1,mo&&(a=wo(t,n,r,i)),Co(e),a}function Co(e){F.H=Rs;var t=uo!==null&&uo.next!==null;if(lo=0,fo=uo=U=null,po=!1,_o=0,vo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&$i(e)&&(rc=!0))}function wo(e,t,n,r){U=e;var a=0;do{if(mo&&(vo=null),_o=0,mo=!1,25<=a)throw Error(i(301));if(a+=1,fo=uo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Vs,o=t(n,r)}while(mo);return o}function To(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Mo(t):t,e=e.useState()[0],(uo===null?null:uo.memoizedState)!==e&&(U.flags|=1024),t}function Eo(){var e=go!==0;return go=0,e}function Do(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Oo(e){if(po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}po=!1}lo=0,fo=uo=U=null,mo=!1,_o=go=0,vo=null}function ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fo===null?U.memoizedState=fo=e:fo=fo.next=e,fo}function Ao(){if(uo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=uo.next;var t=fo===null?U.memoizedState:fo.next;if(t!==null)fo=t,uo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));uo=e,e={memoizedState:uo.memoizedState,baseState:uo.baseState,baseQueue:uo.baseQueue,queue:uo.queue,next:null},fo===null?U.memoizedState=fo=e:fo=fo.next=e}return fo}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mo(e){var t=_o;return _o+=1,vo===null&&(vo=[]),e=Da(vo,e,t),t=U,(fo===null?t.memoizedState:fo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?zs:Bs),e}function No(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Mo(e);if(e.$$typeof===C)return ta(e)}throw Error(i(438,String(e)))}function Po(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.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=jo(),U.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 Fo(e,t){return typeof t==`function`?t(e):t}function Io(e){return Lo(Ao(),uo,e)}function Lo(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?(lo&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===fa&&(d=!0);else if((lo&p)===p){u=u.next,p===fa&&(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,U.lanes|=p,Gl|=p;f=u.action,ho&&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,U.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&(rc=!0,d&&(n=pa,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 Ro(e){var t=Ao(),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);Sr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function zo(e,t,n){var r=U,a=Ao(),o=Pi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((uo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,us(Ho.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||fo!==null&&fo.memoizedState.tag&1){if(r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||lo&127||Bo(r,t,n)}return n}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=jo(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Wo(e){var t=ni(e,2);t!==null&&hu(t,e,2)}function Go(e){var t=ko();if(typeof e==`function`){var n=e;if(e=n(),ho){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Lo(e,uo,typeof r==`function`?r:Fo)}function qo(e,t,n,r,a){if(Fs(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)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function es(e,t){if(Pi){var n=q.formState;if(n!==null){a:{var r=U;if(Pi){if(Ni){b:{for(var i=Ni,a=Ii;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){Ni=cf(i.nextSibling),r=i.data===`F!`;break a}}Ri(r)}r=!1}r&&(t=n[0])}}return n=ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=Ms.bind(null,U,r),r.dispatch=n,r=Go(!1),a=Ps.bind(null,U,!1,r.queue),r=ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ts(e){return ns(Ao(),uo,e)}function ns(e,t,n){if(t=Lo(e,t,$o)[0],e=Io(Fo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Mo(t)}catch(e){throw e===Sa?wa:e}else r=t;t=Ao();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,as(9,{destroy:void 0},rs.bind(null,i,n),null)),[r,a,e]}function rs(e,t){e.action=t}function is(e){var t=Ao(),n=uo;if(n!==null)return ns(t,n,e);Ao(),t=t.memoizedState,n=Ao();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function as(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=jo(),U.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 os(){return Ao().memoizedState}function ss(e,t,n,r){var i=ko();U.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,r===void 0?null:r)}function cs(e,t,n,r){var i=Ao();r=r===void 0?null:r;var a=i.memoizedState.inst;uo!==null&&r!==null&&xo(r,uo.memoizedState.deps)?i.memoizedState=as(t,a,n,r):(U.flags|=e,i.memoizedState=as(1|t,a,n,r))}function ls(e,t){ss(8390656,8,e,t)}function us(e,t){cs(2048,8,e,t)}function ds(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=jo(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=Ao().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return cs(4,2,e,t)}function ms(e,t){return cs(4,4,e,t)}function hs(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 gs(e,t,n){n=n==null?null:n.concat([e]),cs(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&xo(t,r[1]))return r[0];if(r=e(),ho){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||lo&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),U.lanes|=e,Gl|=e,n)}function xs(e,t,n,r){return Sr(n,t)?n:Za.current===null?!(lo&42)||lo&1073741824&&!(Y&261930)?(rc=!0,e.memoizedState=n):(e=mu(),U.lanes|=e,Gl|=e,t):(e=bs(e,n,r),Sr(e,t)||(rc=!0),e)}function Ss(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Ps(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,ga(c,r),pu(e)):Ns(e,t,r,pu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,te,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},pu())}function Ds(){return ta(Qf)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(hu(r,t,n),Wa(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ti(e,t,n,r),n!==null&&(hu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,pu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(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,Sr(s,o))return ei(e,t,i,0),q===null&&$r(),!1}catch{}if(n=ti(e,t,i,r),n!==null)return hu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=ti(e,n,r,2),t!==null&&hu(t,e,2)}function Fs(e){var t=e.alternate;return e===U||t!==null&&t===U}function Is(e,t){mo=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Rs={readContext:ta,use:No,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo};Rs.useEffectEvent=bo;var zs={readContext:ta,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(ho){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(ho){Ie(!0);try{n(t)}finally{Ie(!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=js.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,U,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=ko();if(Pi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=q.identifierPrefix;if(Pi){var n=Ei,r=Ti;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:es,useActionState:es,useOptimistic:function(e){var t=ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return ko().memoizedState=As.bind(null,U)},useEffectEvent:function(e){var t=ko(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:ta,use:No,useCallback:vs,useContext:ta,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Io,useRef:os,useState:function(){return Io(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(Ao(),uo.memoizedState,e,t)},useTransition:function(){var e=Io(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){return Ko(Ao(),uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Bs.useEffectEvent=fs;var Vs={readContext:ta,use:No,useCallback:vs,useContext:ta,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Ro,useRef:os,useState:function(){return Ro(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){var n=Ao();return uo===null?bs(n,e,t):xs(n,uo.memoizedState,e,t)},useTransition:function(){var e=Ro(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:is,useActionState:is,useOptimistic:function(e,t){var n=Ao();return uo===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Vs.useEffectEvent=fs;function Hs(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 Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ha(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(hu(t,e,r),Wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ha(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(hu(t,e,r),Wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ha(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(hu(t,e,n),Wa(t,e,n))}};function Ws(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?!Cr(n,r)||!Cr(i,a):!0}function Gs(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&&Us.enqueueReplaceState(t,t.state,null)}function Ks(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 qs(e){Xr(e)}function Js(e){console.error(e)}function Ys(e){Xr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(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 Qs(e,t,n){return n=Ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ha(e),e.tag=3,e}function ec(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(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(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 tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Qi(t,n,a,!0),n=no.current,n!==null){switch(n.tag){case 31:case 13:return ro===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?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===Ta?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(Pi)return t=no.current,t===null?(r!==Li&&(t=Error(i(423),{cause:r}),Wi(_i(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=_i(r,n),a=Qs(e.stateNode,r,a),Ga(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Li&&(e=Error(i(422),{cause:r}),Wi(_i(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=_i(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=_i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ga(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=$s(a),ec(a,e,n,r),Ga(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function ac(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 ea(t),r=So(e,t,n,o,a,i),s=Eo(),e!==null&&!rc?(Do(e,t,i),kc(e,t,i)):(Pi&&s&&ki(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=li(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}return hc(e,t,n,r,i)}function cc(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 uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?eo():$a(t,a),V(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),eo(),oo(t)):(ba(t,a.cachePool),$a(t,a),oo(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),eo(),V(t),e!==null&&Qi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return La(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,so(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Pi){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ao(t),(e=Ni)?(e=rf(e,Ii),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ao(t),a)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(rc||Qi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=q,r!==null&&(s=et(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ni(e,s),hu(r,e,s),nc;Du(),t=fc(e,t,n)}else e=o.treeContext,Ni=cf(s.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=dc(t,r),t.flags|=4096;return t}return e=li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(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 hc(e,t,n,r,i){return ea(t),n=So(e,t,n,r,void 0,i),r=Eo(),e!==null&&!rc?(Do(e,t,i),kc(e,t,i)):(Pi&&r&&ki(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return ea(t),t.updateQueue=null,n=wo(t,r,n,i),Co(e),r=Eo(),e!==null&&!rc?(Do(e,t,a),kc(e,t,a)):(Pi&&r&&ki(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(ea(t),t.stateNode===null){var a=ai,o=n.contextType;typeof o==`object`&&o&&(a=ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ba(t),o=n.contextType,a.context=typeof o==`object`&&o?ta(o):ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(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&&Us.enqueueReplaceState(a,a.state,null),Ja(t,r,a,i),qa(),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=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ai,typeof u==`object`&&u&&(o=ta(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)&&Gs(t,a,r,o),za=!1;var f=t.memoizedState;a.state=f,Ja(t,r,a,i),qa(),l=t.memoizedState,s||f!==l||za?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=za||Ws(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,Va(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ai,typeof l==`object`&&l&&(c=ta(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)&&Gs(t,a,r,c),za=!1,f=t.memoizedState,a.state=f,Ja(t,r,a,i),qa();var p=t.memoizedState;o!==d||f!==p||za||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=za||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&$i(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,mc(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=La(t,e.child,null,i),t.child=La(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return Hi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:xa()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function Sc(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:(co.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Pi){if(a?io(t):oo(t),(e=Ni)?(e=rf(e,Ii),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(oo(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=fi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(io(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(io(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(oo(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,La(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(oo(t),t.child=e.child,t.flags|=128,t=null);else if(io(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,Wi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Qi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=q,s!==null&&(r=et(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ni(e,r),hu(s,e,r),nc;af(c)||Du(),t=Tc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ni=cf(c.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(oo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=li(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=li(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=xa():(l=sa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(io(t),n=e.child,e=n.sibling,n=li(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 Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=si(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return La(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xi(e.return,t,n)}function Dc(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 Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=co.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(co,o),ic(e,t,r,n),r=Pi?xi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(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&&H(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(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&&H(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Qi(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=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&$i(e))):!0}function jc(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Ji(t,sa,e.memoizedState.cache),Hi();break;case 27:case 5:de(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(io(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(io(t),t.flags|=128,null);io(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(co,co.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Ji(t,sa,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}else rc=!1,Pi&&t.flags&1048576&&Oi(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)ci(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Va(e,t),Ja(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ji(t,sa,r),r!==o.cache&&Zi(t,[sa],n,!0),qa(),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=vc(e,t,r,n);break a}else if(r!==a){a=_i(Error(i(424)),t),Wi(a),t=vc(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(Ni=cf(e.firstChild),Mi=t,Pi=!0,Fi=null,Ii=!0,n=Ra(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Hi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Pi||(n=t.type,e=t.pendingProps,r=Bd(se.current).createElement(n),r[ot]=t,r[st]=e,Pd(r,n,e),yt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&Pi&&(r=t.stateNode=ff(t.type,t.pendingProps,se.current),Mi=t,Ii=!0,a=Ni,Zd(t.type)?(lf=a,Ni=cf(r.firstChild)):Ni=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pi&&((a=r=Ni)&&(r=tf(r,t.type,t.pendingProps,Ii),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=cf(r.firstChild),Ii=!1,a=!0)),a||Ri(t)),de(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=So(e,t,To,null,null,n),Qf._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&Pi&&((e=n=Ni)&&(n=nf(n,t.pendingProps,Ii),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Ri(t)),null;case 13:return Sc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ji(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ea(t),a=ta(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return ea(t),r=ta(sa),e===null?(a=ya(),a===null&&(a=q,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ba(t),Ji(t,sa,a)):((e.lanes&n)!==0&&(Va(e,t),Ja(t,null,null,n),qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ji(t,sa,r),r!==a.cache&&Zi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ji(t,sa,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(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 ka=Ta,Ca}else e.flags&=-16777217}function Fc(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 ka=Ta,Ca}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Je(),e.lanes|=t,Yl|=t)}function Lc(e,t){if(!Pi)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 W(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 Rc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(t),null;case 1:return W(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Yi(sa),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vi(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ui())),W(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(W(t),Pc(t,a,null,r,n)):(W(t),Fc(t,o))):o?o===e.memoizedState?(W(t),t.flags&=-16777217):(Nc(t),W(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),W(t),Pc(t,a,e,r,n)),null;case 27:if(fe(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return W(t),null}e=ae.current,Vi(t)?zi(t,e):(e=ff(a,r,n),t.stateNode=e,Nc(t))}return W(t),null;case 5:if(fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return W(t),null}if(o=ae.current,Vi(t))zi(t,o);else{var s=Bd(se.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[ot]=t,o[st]=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&&Nc(t)}}return W(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,Vi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ri(t,!0)}else e=Bd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Vi(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[ot]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(so(t),t):(so(t),null);if(t.flags&128)throw Error(i(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Vi(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[ot]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),a=!1}else a=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(so(t),t):(so(t),null)}return so(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),Ic(t,t.updateQueue),W(t),null);case 4:return ue(),e===null&&Sd(t.stateNode.containerInfo),W(t),null;case 10:return Yi(t.type),W(t),null;case 19:if(ie(co),r=t.memoizedState,r===null)return W(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=H(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ui(n,e),n=n.sibling;return R(co,co.current&1|2),Pi&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>tu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=H(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Pi)return W(t),null}else 2*Te()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Lc(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?(W(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=co.current,R(co,a?n&1|2:n&1),Pi&&Di(t,r.treeForkCount),e);case 22:case 23:return so(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&Ic(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&&ie(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),W(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(so(t),t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(so(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(co),null;case 4:return ue(),null;case 10:return Yi(t.type),null;case 22:case 23:return so(t),to(),e!==null&&ie(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function Bc(e,t){switch(Ai(t),t.tag){case 3:Yi(sa),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&so(t);break;case 13:so(t);break;case 19:ie(co);break;case 10:Yi(t.type);break;case 22:case 23:so(t),to(),e!==null&&ie(va);break;case 24:Yi(sa)}}function Vc(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 Hc(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 Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Z(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Gc(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 Kc(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 qc(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 Jc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[st]=t}catch(t){Z(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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 Zc(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=$t));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(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(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(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[ot]=e,t[st]=n}catch(t){Z(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=Dr(e),Or(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,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,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=Ks(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,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Vc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(bl(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{Xa(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:bl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(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||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),el=i,tl=a}break;case 30:break;default:bl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mt(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 G=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount==`function`)try{Fe.onCommitFiberUnmount(Pe,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=G,i=cl;Zd(n.type)&&(G=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),G=r,cl=i;break;case 5:tl||Kc(n,t);case 6:if(r=G,i=cl,G=null,ll(e,t,n),G=r,cl=i,G!==null)if(cl)try{(G.nodeType===9?G.body:G.nodeName===`HTML`?G.ownerDocument.body:G).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{G.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:G!==null&&(cl?(e=G,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(G,n.stateNode));break;case 4:r=G,i=cl,G=n.stateNode.containerInfo,cl=!0,ll(e,t,n),G=r,cl=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ll(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ll(e,t,n),tl=r;break;default:ll(e,t,n)}}function dl(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 fl(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 pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(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)){G=c.stateNode,cl=!1;break a}break;case 5:G=c.stateNode,cl=!1;break a;case 3:case 4:G=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(G===null)throw Error(i(160));ul(o,s,a),G=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(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=gl;if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(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[pt]||o[ot]||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[ot]=e,yt(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[ot]=e,yt(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&&Jc(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:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{Gt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(hl(t,e),vl(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=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}nl&&(nl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,hl(t,e),tl=d,el=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||xl(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,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Gt(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),xl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Kc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(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:Sl(i,a,n),Vc(4,a);break;case 1:if(Sl(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++)Ya(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Gc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(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&&la(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Vc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(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&&la(e)));break;case 12:if(i&2048){Tl(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 Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(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:Dl(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(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:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(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:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Ll={getCacheForType:function(e){var t=ta(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ta(sa).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=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 K&2&&Y!==0?Y&-Y:F.T===null?rt():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||Pi){var e=He;He<<=1,!(He&3932160)&&(He=262144),Jl=e}else Jl=536870912;return e=no.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),Xe(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ke(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-Te(),10<a)){if(yu(r,t,Jl,!Bl),Ge(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:$t},jl(t,a,d);var m=(a&62914560)===a?$l-Te():(a&4194048)===a?eu-Te():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(!Sr(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-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Qe(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,qi=Ki=null,Oo(e),Ma=null,Na=0,e=J;for(;e!==null;)Bc(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(),q=e,J=n=li(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Ke(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-Le(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,$r(),n}function Cu(e,t){U=null,F.H=Rs,t===Sa||t===wa?(t=Aa(),X=3):t===Ca?(t=Aa(),X=4):X=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Xs(e,_i(t,e.current)))}function wu(){var e=no.current;return e===null?!0:(Y&4194048)===Y?ro===null:(Y&62914560)===Y||Y&536870912?e===ro:!1}function Tu(){var e=F.H;return F.H=Rs,e===null?Rs:e}function Eu(){var e=F.A;return F.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&no.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==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:no.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++,qi=Ki=null,K=r,F.H=i,F.A=a,J===null&&(q=null,Y=0,$r()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Te()+500,Su(e,t)):Vl=Ke(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(Ea(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==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:Ea(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 qi=Ki=null,F.H=r,F.A=a,K=n,J===null?(q=null,Y=0,$r(),Wl):0}function ju(){for(;J!==null&&!Ce();)Mu(J)}function Mu(e){var t=Mc(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=gc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Oo(t);default:Bc(n,t),t=J=ui(t,Ul),t=Mc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){qi=Ki=null,Oo(t),Ma=null,Na=0;var i=t.return;try{if(tc(e,i,t,n,Y)){Wl=1,Xs(e,_i(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Xs(e,_i(n,e.current)),J=null;return}t.flags&32768?(Pi||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=no.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=Rc(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=zc(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(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=z,Ze(e,n,o,s,c,l),e===q&&(J=q=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(ke,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=K,K|=4;try{al(e,t,n)}finally{K=s,I.p=a,F.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=F.T,F.T=null;var r=I.p;I.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(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 _=Tr(s,h),v=Tr(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{K=i,I.p=r,F.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=F.T,F.T=null;var r=I.p;I.p=2;var i=K;K|=4;try{ol(e,t.alternate,t)}finally{K=i,I.p=r,F.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,we();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),nt(n),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.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{F.T=t,I.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,la(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=nt(su),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{I.p=a,F.T=r,Vu(e,t)}}function Wu(e,t,n){t=_i(n,t),t=Qs(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Xe(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=_i(n,e),n=$s(2),r=Ua(t,n,2),r!==null&&(ec(n,r,t,e),Xe(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;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,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Te()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Je()),e=ni(e,t),e!==null&&(Xe(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 xe(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-Le(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=Ge(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(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=Te(),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-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=Ge(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&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ke(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),nt(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=je;break;default:n=ke}return r=cd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(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=Ge(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Te()),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(){K&6?xe(De,ad):od()})}function dd(){if(nd===0){var e=fa;e===0&&(e=Ve,Ve<<=1,!(Ve&261888)&&(Ve=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Qt(``+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[st]||null).action),o=r.submitter;o&&(t=(t=o[st]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`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);ws(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),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Jr.length;hd++){var gd=Jr[hd];Yr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Yr(Br,`onAnimationEnd`),Yr(Vr,`onAnimationIteration`),Yr(Hr,`onAnimationStart`),Yr(`dblclick`,`onDoubleClick`),Yr(`focusin`,`onFocus`),Yr(`focusout`,`onBlur`),Yr(Ur,`onTransitionRun`),Yr(Wr,`onTransitionStart`),Yr(Gr,`onTransitionCancel`),Yr(Kr,`onTransitionEnd`),Ct(`onMouseEnter`,[`mouseout`,`mouseover`]),Ct(`onMouseLeave`,[`mouseout`,`mouseover`]),Ct(`onPointerEnter`,[`pointerout`,`pointerover`]),Ct(`onPointerLeave`,[`pointerout`,`pointerover`]),St(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),St(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),St(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),St(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),St(`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){Xr(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){Xr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[lt];n===void 0&&(n=t[lt]=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,bt.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,!un||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=ht(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}sn(function(){var r=a,i=tn(n),s=[];a:{var c=qr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;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=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Br:case Vr:case Hr:l=jn;break;case Kr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}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=cn(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!==en&&(u=n.relatedTarget||n.fromElement)&&(ht(u)||u[ct]))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?ht(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=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:_t(l),h=u==null?c:_t(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ht(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?_t(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ur;else if(ir(c))if(dr)v=br;else{v=vr;var y=_r}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Yt(r.elementType)&&(v=ur):v=yr;if(v&&=v(e,r)){ar(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Vt(c,`number`,c.value)}switch(y=r?_t(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(Kn)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 er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=Ed(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Nn(`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=cn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=cn(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=cn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=cn(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===``||Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Gt(e,``+r);break;case`className`:kt(e,`class`,r);break;case`tabIndex`:kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:kt(e,n,r);break;case`style`:Jt(e,r,o);break;case`data`:if(t!==`object`){kt(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=Qt(``+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=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);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=Qt(``+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),Ot(e,`popover`,r);break;case`xlinkActuate`:At(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:At(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:At(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:At(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ot(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=Xt.get(n)||n,Ot(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Jt(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`?Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Gt(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=$t);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!xt.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[st]||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,``):Ot(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)}}Bt(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&&Ht(e,!!r,n,!0):Ht(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)}Wt(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(Yt(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)}}zt(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?Ht(e,!!n,n?[]:``,!1):Ht(e,!!n,t,!0)):Ht(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)}Ut(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(Yt(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[pt]||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),mt(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[pt])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]);mt(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=I.d;I.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=gt(e);t!==null&&t.tag===5&&t.type===`form`?Es(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=Rt(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),yt(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="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(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),yt(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="`+Rt(r)+`"][href="`+Rt(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),yt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=vt(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`);yt(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=vt(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`),yt(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=vt(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`),yt(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=se.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=vt(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=vt(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=vt(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="`+Rt(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),yt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Rt(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~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(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`),yt(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,yt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),yt(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,yt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),yt(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[pt]||a[ot]||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,yt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),yt(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:te,_currentValue2:te,_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=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(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=si(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ba(a),e}function tp(e){return e?(e=ai,e):ai}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ha(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ua(e,r,t),n!==null&&(hu(n,e,t),Wa(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=ni(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=tt(t);var n=ni(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.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=gt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Te()+500,id(0,!1))}}break;case 31:case 13:s=ni(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=tn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ht(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(Ee()){case De:return 2;case Oe:return 8;case ke:case Ae:return 32;case je: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=gt(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=ht(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,it(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,it(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);en=r,n.target.dispatchEvent(r),en=null}else return t=gt(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=gt(n);a!==null&&(e.splice(t,3),t-=3,ws(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[st]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[st]||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[ct]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=rt();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`));I.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:F,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Pe=zp.inject(Rp),Fe=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;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[ct]=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()})),_=c(u(),1),v=g(),y=`modulepreload`,b=function(e){return`/`+e},x={},S=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=b(t,n),t in x)return;x[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`:y,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)})},C=`popstate`;function w(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function T(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return A(``,{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:j(t)}return N(t,n,null,e)}function E(e,t){if(e===!1||e==null)throw Error(t)}function D(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function O(){return Math.random().toString(36).substring(2,10)}function k(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 A(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||O(),unstable_mask:i}}function j({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 N(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=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u()+1;let d=k(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=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u();let i=k(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 P(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(C,d),c=e,()=>{i.removeEventListener(C,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 P(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),E(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:j(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function ee(e,t,n=`/`){return F(e,t,n,!1)}function F(e,t,n,r){let i=he((typeof t==`string`?M(t):t).pathname||`/`,n);if(i==null)return null;let a=te(e);ne(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=me(i);o=de(a[e],t,r)}return o}function I(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 te(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;E(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=Ce([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(E(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),te(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:le(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of L(e.path))a(e,t,!0,n)}),t}function L(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=L(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 ne(e){e.sort((e,t)=>e.score===t.score?ue(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var re=/^:[\w-]+$/,ie=3,R=2,ae=1,oe=10,se=-2,ce=e=>e===`*`;function le(e,t){let n=e.split(`/`),r=n.length;return n.some(ce)&&(r+=se),t&&(r+=R),n.filter(e=>!ce(e)).reduce((e,t)=>e+(re.test(t)?ie:t===``?ae:oe),r)}function ue(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 de(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=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Ce([a,u.pathname]),pathnameBase:we(Ce([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Ce([a,u.pathnameBase]))}return o}function fe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pe(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 pe(e,t=!1,n=!0){D(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 me(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return D(!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 he(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 ge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function _e(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(`/`)?ve(n.substring(1),`/`):ve(n,t)):a=t,{pathname:a,search:Te(r),hash:Ee(i)}}function ve(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 ye(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 be(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function xe(e){let t=be(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Se(e,t,n,r=!1){let i;typeof e==`string`?i=M(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),ye(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),ye(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),ye(`#`,`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=_e(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ce=e=>e.join(`/`).replace(/\/\/+/g,`/`),we=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Te=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ee=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,De=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 Oe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ke(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Ae=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function je(e,t){let n=e;if(typeof n!=`string`||!ge.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ae)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=he(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{D(!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 Me=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Me);var Ne=[`GET`,...Me];new Set(Ne);var Pe=_.createContext(null);Pe.displayName=`DataRouter`;var Fe=_.createContext(null);Fe.displayName=`DataRouterState`;var Ie=_.createContext(!1),Le=_.createContext({isTransitioning:!1});Le.displayName=`ViewTransition`;var Re=_.createContext(new Map);Re.displayName=`Fetchers`;var ze=_.createContext(null);ze.displayName=`Await`;var Be=_.createContext(null);Be.displayName=`Navigation`;var Ve=_.createContext(null);Ve.displayName=`Location`;var He=_.createContext({outlet:null,matches:[],isDataRoute:!1});He.displayName=`Route`;var Ue=_.createContext(null);Ue.displayName=`RouteError`;var We=`REACT_ROUTER_ERROR`,Ge=`REDIRECT`,Ke=`ROUTE_ERROR_RESPONSE`;function qe(e){if(e.startsWith(`${We}:${Ge}:{`))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 Je(e){if(e.startsWith(`${We}:${Ke}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new De(t.status,t.statusText,t.data)}catch{}}function Ye(e,{relative:t}={}){E(Xe(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(Be),{hash:i,pathname:a,search:o}=rt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ce([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Xe(){return _.useContext(Ve)!=null}function Ze(){return E(Xe(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(Ve).location}var Qe=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function $e(e){_.useContext(Be).static||_.useLayoutEffect(e)}function et(){let{isDataRoute:e}=_.useContext(He);return e?St():tt()}function tt(){E(Xe(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(Pe),{basename:t,navigator:n}=_.useContext(Be),{matches:r}=_.useContext(He),{pathname:i}=Ze(),a=JSON.stringify(xe(r)),o=_.useRef(!1);return $e(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(D(o.current,Qe),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Se(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ce([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}_.createContext(null);function nt(){let{matches:e}=_.useContext(He),t=e[e.length-1];return t?t.params:{}}function rt(e,{relative:t}={}){let{matches:n}=_.useContext(He),{pathname:r}=Ze(),i=JSON.stringify(xe(n));return _.useMemo(()=>Se(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function it(e,t){return at(e,t)}function at(e,t,n){E(Xe(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(Be),{matches:i}=_.useContext(He),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||``;wt(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=Ze(),d;if(t){let e=typeof t==`string`?M(t):t;E(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=ee(e,{pathname:p});D(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),D(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=ft(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ce([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ce([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(Ve.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function ot(){let e=xt(),t=Oe(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=_.createElement(_.Fragment,null,_.createElement(`p`,null,`💿 Hey developer 👋`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var st=_.createElement(ot,null),ct=class extends _.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=Je(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(He.Provider,{value:this.props.routeContext},_.createElement(Ue.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(ut,{error:e},t):t}};ct.contextType=Ie;var lt=new WeakMap;function ut({children:e,error:t}){let{basename:n}=_.useContext(Be);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=qe(t.digest);if(e){let r=lt.get(t);if(r)throw r;let i=je(e.location,n);if(Ae&&!lt.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 lt.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function dt({routeContext:e,match:t,children:n}){let r=_.useContext(Pe);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(He.Provider,{value:e},n)}function ft(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);E(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:ke(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||st,o&&(s<0&&c===0?(wt(`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?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(dt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(ct,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function pt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mt(e){let t=_.useContext(Pe);return E(t,pt(e)),t}function ht(e){let t=_.useContext(Fe);return E(t,pt(e)),t}function gt(e){let t=_.useContext(He);return E(t,pt(e)),t}function _t(e){let t=gt(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function vt(){return _t(`useRouteId`)}function yt(){return ht(`useNavigation`).navigation}function bt(){let{matches:e,loaderData:t}=ht(`useMatches`);return _.useMemo(()=>e.map(e=>I(e,t)),[e,t])}function xt(){let e=_.useContext(Ue),t=ht(`useRouteError`),n=_t(`useRouteError`);return e===void 0?t.errors?.[n]:e}function St(){let{router:e}=mt(`useNavigate`),t=_t(`useNavigate`),n=_.useRef(!1);return $e(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{D(n.current,Qe),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ct={};function wt(e,t,n){!t&&!Ct[e]&&(Ct[e]=!0,D(!1,n))}_.useOptimistic,_.memo(Tt);function Tt({routes:e,future:t,state:n,isStatic:r,onError:i}){return at(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function Et(e){E(!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 Dt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){E(!Xe(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.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=_.useMemo(()=>{let e=he(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 D(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:_.createElement(Be.Provider,{value:c},_.createElement(Ve.Provider,{children:t,value:h}))}function Ot({children:e,location:t}){return it(kt(e),t)}_.Component;function kt(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,kt(e.props.children,i));return}E(e.type===Et,`[${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>`),E(!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=kt(e.props.children,i)),n.push(a)}),n}var At=`get`,jt=`application/x-www-form-urlencoded`;function Mt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Nt(e){return Mt(e)&&e.tagName.toLowerCase()===`button`}function Pt(e){return Mt(e)&&e.tagName.toLowerCase()===`form`}function Ft(e){return Mt(e)&&e.tagName.toLowerCase()===`input`}function It(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Lt(e,t){return e.button===0&&(!t||t===`_self`)&&!It(e)}function Rt(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 zt(e,t){let n=Rt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Bt=null;function Vt(){if(Bt===null)try{new FormData(document.createElement(`form`),0),Bt=!1}catch{Bt=!0}return Bt}var Ht=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ut(e){return e!=null&&!Ht.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${jt}"`),null):e}function Wt(e,t){let n,r,i,a,o;if(Pt(e)){let o=e.getAttribute(`action`);r=o?he(o,t):null,n=e.getAttribute(`method`)||At,i=Ut(e.getAttribute(`enctype`))||jt,a=new FormData(e)}else if(Nt(e)||Ft(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?he(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||At,i=Ut(e.getAttribute(`formenctype`))||Ut(o.getAttribute(`enctype`))||jt,a=new FormData(o,e),!Vt()){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(Mt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=At,r=null,i=jt,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 Gt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Kt=/[&><\u2028\u2029]/g;function qt(e){return e.replace(Kt,e=>Gt[e])}function Jt(e,t){if(e===!1||e==null)throw Error(t)}function Yt(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&&he(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function Xt(e,t){if(e.id in t)return t[e.id];try{let n=await S(()=>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 Zt(e){return e!=null&&typeof e.page==`string`}function Qt(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 $t(e,t,n){return an((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Xt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Qt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function en(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 tn(e,t,{includeHydrateFallback:n}={}){return nn(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 nn(e){return[...new Set(e)]}function rn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function an(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Zt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(rn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function on(){let e=_.useContext(Pe);return Jt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function sn(){let e=_.useContext(Fe);return Jt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var cn=_.createContext(void 0);cn.displayName=`FrameworkContext`;function ln(){let e=_.useContext(cn);return Jt(e,`You must render this element inside a <HydratedRouter> element`),e}function un(e,t){let n=_.useContext(cn),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.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]),_.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:dn(s,p),onBlur:dn(c,m),onMouseEnter:dn(l,p),onMouseLeave:dn(u,m),onTouchStart:dn(d,p)}]:[a,f,{}]:[!1,f,{}]}function dn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function fn({page:e,...t}){let{router:n}=on(),r=_.useMemo(()=>ee(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?_.createElement(mn,{page:e,matches:r,...t}):null}function pn(e){let{manifest:t,routeModules:n}=ln(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return $t(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function mn({page:e,matches:t,...n}){let r=Ze(),{future:i,manifest:a,routeModules:o}=ln(),{basename:s}=on(),{loaderData:c,matches:l}=sn(),u=_.useMemo(()=>en(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>en(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.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=Yt(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=_.useMemo(()=>tn(d,a),[d,a]),m=pn(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function hn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}_.Component;var gn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{gn&&(window.__reactRouterVersion=`7.13.2`)}catch{}function _n({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=_.useRef();i.current??=T({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(Dt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function vn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=_.useState({action:n.action,location:n.location}),o=_.useCallback(e=>{r===!1?a(e):_.startTransition(()=>a(e))},[r]);return _.useLayoutEffect(()=>n.listen(o),[n,o]),_.createElement(Dt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}vn.displayName=`unstable_HistoryRouter`;var yn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bn=_.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:v}=_.useContext(Be),y=typeof l==`string`&&yn.test(l),b=je(l,h);l=b.to;let x=Ye(l,{relative:r}),S=Ze(),C=null;if(o){let e=Se(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Ce([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=un(n,p),D=Dn(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=_.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:hn(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,A,_.createElement(fn,{page:x})):A});bn.displayName=`Link`;var xn=_.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=rt(a,{relative:c.relative}),d=Ze(),f=_.useContext(Fe),{navigator:p,basename:m}=_.useContext(Be),h=f!=null&&Rn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=he(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(bn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});xn.displayName=`NavLink`;var Sn=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=At,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=_.useContext(Be),g=jn(),v=Mn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&yn.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,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?_.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Sn.displayName=`Form`;function Cn({getKey:e,storageKey:t,...n}){let r=_.useContext(cn),{basename:i}=_.useContext(Be),a=Ze(),o=bt();In({getKey:e,storageKey:t});let s=_.useMemo(()=>{if(!r||!e)return null;let t=Fn(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 _.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${qt(JSON.stringify(t||Nn))}, ${qt(JSON.stringify(s))})`}})}Cn.displayName=`ScrollRestoration`;function wn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tn(e){let t=_.useContext(Pe);return E(t,wn(e)),t}function En(e){let t=_.useContext(Fe);return E(t,wn(e)),t}function Dn(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=et(),d=Ze(),f=rt(e,{relative:o});return _.useCallback(p=>{if(Lt(p,t)){p.preventDefault();let t=n===void 0?j(d)===j(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function On(e){D(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=_.useRef(Rt(e)),n=_.useRef(!1),r=Ze(),i=_.useMemo(()=>zt(r.search,n.current?null:t.current),[r.search]),a=et();return[i,_.useCallback((e,t)=>{let r=Rt(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var kn=0,An=()=>`__${String(++kn)}__`;function jn(){let{router:e}=Tn(`useSubmit`),{basename:t}=_.useContext(Be),n=vt(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Wt(e,t);a.navigate===!1?await r(a.fetcherKey||An(),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 Mn(e,{relative:t}={}){let{basename:n}=_.useContext(Be),r=_.useContext(He);E(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...rt(e||`.`,{relative:t})},o=Ze();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:Ce([n,a.pathname])),j(a)}var Nn=`react-router-scroll-positions`,Pn={};function Fn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:he(e.pathname,n)||e.pathname},t)),i??=e.key,i}function In({getKey:e,storageKey:t}={}){let{router:n}=Tn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=En(`useScrollRestoration`),{basename:a}=_.useContext(Be),o=Ze(),s=bt(),c=yt();_.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Ln(_.useCallback(()=>{if(c.state===`idle`){let t=Fn(o,s,a,e);Pn[t]=window.scrollY}try{sessionStorage.setItem(t||Nn,JSON.stringify(Pn))}catch(e){D(!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`&&(_.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Nn);e&&(Pn=JSON.parse(e))}catch{}},[t]),_.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Pn,()=>window.scrollY,e?(t,n)=>Fn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),_.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{D(!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 Ln(e,t){let{capture:n}=t||{};_.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Rn(e,{relative:t}={}){let n=_.useContext(Le);E(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Tn(`useViewTransitionState`),i=rt(e,{relative:t});if(!n.isTransitioning)return!1;let a=he(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=he(n.nextLocation.pathname,r)||n.nextLocation.pathname;return fe(i.pathname,o)!=null||fe(i.pathname,a)!=null}var zn=`/api`;function Bn(e){return encodeURIComponent(e)}async function Vn(e){let t=await fetch(`${zn}${e}`);if(!t.ok)throw Error(`GET ${e} failed: ${t.status}`);return t.json()}async function Hn(e,t){let n=await fetch(`${zn}${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()}async function Un(e,t){let n=await fetch(`${zn}${e}`,{method:`PUT`,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:`PUT ${e} failed`}}));throw Error(t.error?.message??`PUT ${e} failed: ${n.status}`)}return n.json()}async function Wn(e,t){let n=await fetch(`${zn}${e}`,{method:`PATCH`,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:`PATCH ${e} failed`}}));throw Error(t.error?.message??`PATCH ${e} failed: ${n.status}`)}return n.json()}async function Gn(e){let t=await fetch(`${zn}${e}`,{method:`DELETE`});if(!t.ok){let n=await t.json().catch(()=>({error:{message:`DELETE ${e} failed`}}));throw Error(n.error?.message??`DELETE ${e} failed: ${t.status}`)}return t.json()}function Kn(e,t,n){let r=new AbortController;return fetch(`${zn}${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 qn(){return(await Vn(`/projects`)).projects}async function Jn(e){return(await Vn(`/projects/${Bn(e)}/sessions`)).sessions}async function Yn(e,t){return(await Vn(`/projects/${Bn(e)}/sessions/${Bn(t)}`)).session}async function Xn(){return Vn(`/source-audit`)}async function Zn(){return Vn(`/archive/stats`)}async function Qn(){return Vn(`/local-data`)}async function $n(){return Hn(`/archive/sync`)}async function er(){let e=await fetch(`${zn}/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(e){return Vn(`/projects/${Bn(e)}/detail`)}async function nr(e){return Vn(`/projects/${Bn(e)}/boundaries`)}async function rr(e,t){return Un(`/projects/${Bn(e)}/boundaries`,t)}async function ir(e,t){return Wn(`/sessions/${Bn(e)}/enhanced`,t)}async function ar(e,t){return Hn(`/projects/${Bn(e)}/sessions/${Bn(t)}/enhance`)}function or(e,t){return Kn(`/projects/${Bn(e)}/triage`,{},t)}function sr(e,t,n,r,i){return Kn(`/projects/${Bn(e)}/enhance-project`,{selectedSessionIds:t,skippedSessions:n,force:i},r)}async function cr(e,t,n,r){return Hn(`/projects/${Bn(e)}/refine-narrative`,{draftNarrative:t,draftTimeline:n,answers:r})}function lr(e,t,n){return Kn(`/projects/${Bn(e)}/upload`,t,n)}async function ur(){try{return await Vn(`/settings/api-key`)}catch{return{hasKey:!1}}}async function dr(e){await Hn(`/settings/api-key`,{apiKey:e})}async function fr(){try{return(await Vn(`/templates`)).templates}catch{return[]}}async function pr(){try{return await Vn(`/settings/theme`)}catch{return{template:`editorial`}}}async function mr(e){await Hn(`/settings/theme`,{template:e})}async function hr(){try{return await Vn(`/portfolio`)}catch{return{}}}async function gr(e){await Hn(`/portfolio`,e)}async function _r(){try{return await Vn(`/portfolio/state`)}catch{return{targets:{}}}}async function vr(e){if(e!==`heyi.am`)throw Error(`Unsupported publish target: ${e}`);return Hn(`/portfolio/upload`)}async function yr(){let e=await fetch(`${zn}/portfolio/export`,{method:`POST`,headers:{"Content-Type":`application/json`}});if(!e.ok){let t=`Portfolio export failed: ${e.status}`;try{let n=await e.json();n?.error?.message&&(t=n.error.message)}catch{}throw Error(t)}let t=await e.blob(),n=URL.createObjectURL(t),r=e.headers.get(`Content-Disposition`)?.match(/filename="(.+)"/)?.[1]??`portfolio.zip`,i=document.createElement(`a`);return i.href=n,i.download=r,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(n),{ok:!0,filename:r}}var br=class extends Error{code;status;constructor(e,t,n){super(t),this.code=e,this.status=n}};async function xr(e,t){let n=await fetch(`${zn}${e}`,{headers:{"Content-Type":`application/json`},...t});if(!n.ok){let t=`HTTP_${n.status}`,r=`${e} failed: ${n.status}`;try{let e=await n.json();e?.error?.code&&(t=e.error.code),e?.error?.message&&(r=e.error.message)}catch{}throw new br(t,r,n.status)}return await n.json()}async function Sr(){return xr(`/github/device-code`,{method:`POST`})}async function Cr(e){return xr(`/github/poll-token`,{method:`POST`,body:JSON.stringify(e)})}async function wr(){return(await xr(`/github/account`)).account}async function Tr(){await xr(`/github/account`,{method:`DELETE`})}async function Er(){return(await xr(`/github/repos`)).repos}async function Dr(e){return xr(`/github/publish`,{method:`POST`,body:JSON.stringify(e)})}async function Or(e){return Gn(`/projects/${Bn(e)}/remote`)}async function kr(e,t){return Gn(`/projects/${Bn(e)}/sessions/${Bn(t)}/remote`)}async function Ar(e){return Vn(`/sessions/${Bn(e)}/transcript-setting`)}async function jr(e,t){return Un(`/sessions/${Bn(e)}/transcript-setting`,{included:t})}async function Mr(e){try{return await Vn(e)}catch{return null}}function Nr(e){return Mr(`/projects/${encodeURIComponent(e)}/render`)}function Pr(e){return Mr(`/sessions/${encodeURIComponent(e)}/render`)}function Fr(e){if(!e.username)return e;let t=e.username.toLowerCase();return t===e.username?e:{...e,username:t}}async function Ir(){try{return Fr(await Vn(`/auth/status`))}catch{return{authenticated:!1}}}async function Lr(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),Vn(`/search?${n.toString()}`)}async function Rr(e){return(await Vn(`/sessions/${Bn(e)}`)).session}async function zr(e,t=`summary`){return Vn(`/sessions/${Bn(e)}/context?format=${t}`)}async function Br(e){return Vn(`/sessions/${Bn(e)}/transcript`)}async function Vr(e,t,n,r){try{return await Hn(`/projects/${Bn(e)}/enhance-save`,{selectedSessionIds:t,result:n,...r}),!0}catch{return!1}}async function Hr(e){try{return await Vn(`/projects/${Bn(e)}/git-remote`)}catch{return{url:null}}}async function Ur(e,t,n){return Hn(`/projects/${Bn(e)}/screenshot-capture`,{url:n,slug:t})}async function Wr(e){return Fr(await Hn(`/auth/poll`,{device_code:e}))}async function Gr(e){return Vn(`/auth/check-username?username=${encodeURIComponent(e)}`)}async function Kr(e){return Hn(`/auth/signup`,{username:e})}async function qr(){return Hn(`/auth/login`)}async function Jr(){await Hn(`/auth/logout`)}async function Yr(){return Vn(`/dashboard`)}async function Xr(){await Hn(`/onboarding/complete`)}function Zr(e){let t=new EventSource(`${zn}/sync/progress`);return t.onmessage=t=>{try{e(JSON.parse(t.data))}catch{}},t.onerror=()=>{t.close()},()=>t.close()}var Qr=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})),z=o(((e,t)=>{t.exports=Qr()}))(),$r={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 ei({variant:e=`default`,children:t}){return(0,z.jsx)(`span`,{className:`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm ${$r[e]}`,children:t})}function ti({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,z.jsxs)(`div`,{className:`relative`,children:[(0,z.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,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,z.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,z.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:`/`})]})}var ni=[{label:`Dashboard`,to:`/`,match:e=>e===`/`},{label:`Projects`,to:`/projects`,match:e=>e===`/projects`||e.startsWith(`/project/`)},{label:`Portfolio`,to:`/portfolio`,match:e=>e.startsWith(`/portfolio`)},{label:`Sessions`,to:`/search`,match:e=>e===`/search`||e.startsWith(`/session/`)},{label:`Settings`,to:`/settings`,match:e=>e.startsWith(`/settings`)}];function ri({back:e,chips:t,actions:n,children:r}){let i=et(),a=Ze(),o=a.pathname===`/search`,[s,c]=(0,_.useState)(``);return(0,z.jsxs)(`div`,{className:`min-h-screen flex flex-col bg-surface-mid`,children:[(0,z.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,z.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsxs)(bn,{to:`/`,className:`flex items-center gap-2 shrink-0`,children:[(0,z.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,z.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface`,children:`heyi.am`})]}),e&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`text-outline text-xs`,children:`/`}),(0,z.jsx)(bn,{to:e.to,className:`text-sm text-on-surface-variant hover:text-on-surface transition-colors`,children:e.label})]}),t&&t.length>0&&(0,z.jsx)(`div`,{className:`flex items-center gap-1.5 ml-1`,children:t.map(e=>(0,z.jsx)(ei,{variant:e.variant,children:e.label},e.label))})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!o&&(0,z.jsx)(`div`,{className:`w-48`,children:(0,z.jsx)(ti,{value:s,onChange:c,onSubmit:()=>{i(`/search?q=${encodeURIComponent(s)}`),c(``)},compact:!0})}),(0,z.jsxs)(`button`,{type:`button`,"data-testid":`cmdk-pill`,onClick:()=>console.log(`cmd-k`),className:`hidden md:inline-flex items-center gap-1.5 h-7 px-2 rounded-sm border border-ghost text-[0.6875rem] font-mono text-on-surface-variant hover:text-on-surface hover:border-outline transition-colors`,"aria-label":`Open command palette`,children:[(0,z.jsx)(`span`,{children:`⌘K`}),(0,z.jsx)(`span`,{children:`Search`})]}),n]})]})}),(0,z.jsxs)(`div`,{className:`flex flex-1 overflow-hidden`,children:[(0,z.jsx)(`nav`,{"aria-label":`Primary`,className:`w-[220px] shrink-0 border-r border-ghost bg-surface-lowest py-3 overflow-y-auto`,children:(0,z.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2`,children:ni.map(e=>{let t=e.match(a.pathname);return(0,z.jsx)(`li`,{children:(0,z.jsx)(bn,{to:e.to,"aria-current":t?`page`:void 0,className:t?`block px-3 py-1.5 rounded-sm text-[0.8125rem] font-semibold text-primary bg-surface-low`:`block px-3 py-1.5 rounded-sm text-[0.8125rem] text-on-surface-variant hover:text-on-surface hover:bg-surface-low transition-colors`,children:e.label})},e.to)})})}),(0,z.jsx)(`main`,{className:`flex-1 overflow-y-auto`,children:r})]})]})}function ii({hover:e,className:t=``,children:n}){return(0,z.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 ai={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 oi({variant:e,children:t}){return(0,z.jsx)(`span`,{className:`font-mono text-[9px] leading-tight uppercase tracking-wider py-0.5 px-1.5 rounded-sm ${ai[e]}`,children:t})}function si({label:e,value:t,valueSize:n=`text-2xl`}){return(0,z.jsxs)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md p-4`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mb-1`,children:e}),(0,z.jsx)(`div`,{className:`font-display font-bold text-on-surface ${n}`,children:t})]})}function ci({title:e,children:t}){return(0,z.jsxs)(`div`,{className:`bg-surface-low border border-ghost rounded-sm p-2.5`,children:[e&&(0,z.jsx)(`div`,{className:`font-body text-sm font-semibold text-on-surface mb-1`,children:e}),(0,z.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:t})]})}function li({title:e,meta:t,children:n}){return(0,z.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,z.jsx)(`h3`,{className:`font-display text-base font-semibold text-on-surface`,children:e}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t&&(0,z.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant`,children:t}),n]})]})}function ui({title:e,message:t,confirmLabel:n=`Confirm`,cancelLabel:r=`Cancel`,destructive:i=!1,details:a,busy:o=!1,error:s,onConfirm:c,onCancel:l}){let u=(0,_.useRef)(null);(0,_.useEffect)(()=>{u.current?.focus()},[]),(0,_.useEffect)(()=>{function e(e){e.key===`Escape`&&!o&&(e.stopPropagation(),l())}return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[o,l]);let d=i?`font-mono text-[0.8125rem] text-white bg-red-600 rounded-md px-3 py-1 hover:bg-red-700 transition-colors disabled:opacity-50`:`font-mono text-[0.8125rem] text-on-primary bg-primary rounded-md px-3 py-1 hover:bg-primary-hover transition-colors disabled:opacity-50`;return(0,z.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`confirm-modal-title`,className:`fixed inset-0 z-[80] flex items-center justify-center bg-black/40`,children:(0,z.jsxs)(`div`,{className:`bg-surface-lowest rounded-md border border-ghost shadow-lg w-full max-w-md`,children:[(0,z.jsx)(`div`,{className:`px-4 py-3 border-b border-ghost`,children:(0,z.jsx)(`span`,{id:`confirm-modal-title`,className:`font-mono text-[0.8125rem] font-semibold text-on-surface`,children:e})}),(0,z.jsxs)(`div`,{className:`px-4 py-4`,children:[(0,z.jsx)(`p`,{className:`text-sm text-on-surface leading-relaxed`,children:t}),a&&(0,z.jsx)(`p`,{className:`mt-2 text-xs text-on-surface-variant leading-relaxed`,children:a}),s&&(0,z.jsx)(`p`,{className:`mt-3 text-xs text-error font-mono`,role:`alert`,children:s})]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-ghost flex justify-end gap-2`,children:[(0,z.jsx)(`button`,{ref:u,type:`button`,disabled:o,onClick:l,className:`font-mono text-[0.8125rem] text-on-surface-variant hover:text-on-surface px-3 py-1 disabled:opacity-50`,children:r}),(0,z.jsx)(`button`,{type:`button`,disabled:o,onClick:c,className:d,children:o?`Working...`:n})]})]})})}function di({dashboard:e,stats:t,projects:n}){let r=n.slice(0,4),i=t?.enhancedCount??0;return(0,z.jsxs)(`div`,{className:`p-6`,children:[(0,z.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,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`h-6`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-4 gap-4`,children:[(0,z.jsx)(pi,{label:`Sessions indexed`,value:t.sessionCount,to:`/archive`,color:`var(--primary)`}),(0,z.jsx)(pi,{label:`Projects`,value:t.projectCount,to:`/projects`}),(0,z.jsx)(pi,{label:`Enhanced`,value:i,to:`/projects?filter=unenhanced`,color:i>0?`#34d399`:void 0}),(0,z.jsx)(pi,{label:`Sources`,value:t.sourceCount,to:`/sources`})]})]}),(0,z.jsx)(`div`,{className:`h-6`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,z.jsx)(bn,{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,z.jsx)(bn,{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,z.jsx)(bn,{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`}),(0,z.jsx)(bn,{to:`/portfolio`,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:`Open Portfolio`}),e?.sync.status===`syncing`&&(0,z.jsxs)(`span`,{className:`text-xs text-on-surface-variant`,children:[`syncing `,e.sync.current,`/`,e.sync.total,e.sync.currentProject?` — ${e.sync.currentProject}`:``,`...`]})]}),(0,z.jsx)(`div`,{className:`h-10`}),r.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`flex items-baseline justify-between mb-3`,children:[(0,z.jsx)(`h2`,{className:`font-semibold text-sm text-on-surface`,children:`Recent projects`}),(0,z.jsx)(bn,{to:`/projects`,className:`text-xs text-primary hover:underline`,children:`View all →`})]}),(0,z.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:r.map(e=>(0,z.jsx)(fi,{project:e},e.projectDir))}),(0,z.jsx)(`div`,{className:`h-10`})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,z.jsx)(mi,{to:`/archive`,label:`Archive`,title:`Back up sessions`,desc:`Import from local AI tools before they expire. Everything stays on your machine.`}),(0,z.jsx)(mi,{to:`/projects`,label:`Build`,title:`AI case studies`,desc:`AI reads your sessions, extracts skills, and drafts a narrative for each project.`}),(0,z.jsx)(mi,{to:`/search`,label:`Search`,title:`Find past work`,desc:`Full-text search across all sessions. Filter by tool, project, or skill.`}),(0,z.jsx)(mi,{to:`/portfolio`,label:`Export`,title:`HTML, markdown, or publish`,desc:`Export your full portfolio as a static site, publish to heyi.am, or push to GitHub Pages.`})]}),(0,z.jsx)(`div`,{className:`h-8`}),(0,z.jsxs)(`div`,{className:`border-t border-ghost pt-4 flex items-start gap-6 text-xs text-on-surface-variant`,children:[(0,z.jsx)(`span`,{children:`Everything is local by default.`}),(0,z.jsx)(`span`,{children:`Nothing is published unless you choose to.`}),(0,z.jsx)(`span`,{children:`No account required to archive or export.`})]})]})}function fi({project:e}){return(0,z.jsxs)(bn,{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,z.jsx)(`div`,{className:`font-semibold text-sm text-on-surface truncate`,children:e.projectName}),(0,z.jsxs)(`div`,{className:`text-xs text-on-surface-variant mt-0.5`,children:[e.sessionCount,` session`,e.sessionCount===1?``:`s`,e.enhancedAt&&(0,z.jsx)(`span`,{className:`ml-2`,style:{color:`#34d399`},children:`enhanced`})]}),e.skills.length>0&&(0,z.jsx)(`div`,{className:`flex gap-1 mt-2 flex-wrap`,children:e.skills.slice(0,3).map(e=>(0,z.jsx)(ei,{children:e},e))})]})}function pi({label:e,value:t,to:n,color:r}){return(0,z.jsxs)(bn,{to:n,className:`block bg-white border border-ghost rounded-sm px-4 py-3 hover:border-outline transition-colors`,children:[(0,z.jsx)(`div`,{className:`text-2xl font-bold`,style:r?{color:r}:{color:`var(--on-surface)`},children:t}),(0,z.jsx)(`div`,{className:`text-xs text-on-surface-variant mt-0.5`,children:e})]})}function mi({to:e,label:t,title:n,desc:r}){return(0,z.jsxs)(bn,{to:e,className:`group block bg-white border border-ghost rounded-sm p-4 hover:border-outline transition-colors`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-primary mb-1.5`,children:t}),(0,z.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-1`,children:n}),(0,z.jsx)(`div`,{className:`text-xs text-on-surface-variant leading-relaxed`,children:r})]})}var hi={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`},gi=`#084471`,_i=`#d1d5db`,vi=`'IBM Plex Mono', monospace`,yi=`#6b7280`,bi=`#9ca3af`,xi=[`#e11d48`,`#2563eb`,`#7e22ce`,`#ea580c`,`#0d9488`,`#6366f1`,`#c026d3`,`#0891b2`,`#ca8a04`,`#16a34a`,`#be185d`,`#4f46e5`,`#0e7490`,`#b45309`,`#059669`];function Si(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 Ci(e){if(!e)return yi;let t=e.toLowerCase();if(hi[t])return hi[t];for(let[e,n]of Object.entries(hi))if(t.includes(e)||e.includes(t))return n;return xi[Si(t)%xi.length]}function wi(e){return new Date(e.date).getTime()}function Ti(e){if(e.endTime)return new Date(e.endTime).getTime();let t=e.wallClockMinutes??e.durationMinutes;return wi(e)+t*6e4}function Ei(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 Di(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 Oi(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 ki=36e5,Ai=160,ji=480;function Mi(e){return Math.min(Math.max(e*3,Ai),ji)}function Ni(e){if(!e.length)return[];let t=[...e].sort((e,t)=>wi(e)-wi(t)),n=[],r=null;for(let e of t){let t=wi(e),i=Ti(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>ki&&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 Pi(e){let t=[...e].sort((e,t)=>wi(e)-wi(t)),n=[],r=new Map;for(let e of t){let t=wi(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]=Ti(e)+a,r.set(e.id,i)}return r}function Fi(e,t,n,r,i){return n===t?r:r+(e-t)/(n-t)*(i-r)}function Ii(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 Li=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+Li?(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 zi(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 Bi(e){let t=Ii(e);return{title:e.title,timestamp:Di(e.date),duration:Oi(e.wallClockMinutes??e.durationMinutes),linesOfCode:e.linesOfCode,agentCount:t.length,session:e}}var Vi=6,Hi=30;function Ui(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:Ci(e),duration:Oi(t),count:n}))}function Wi(e){return e.map(e=>{let t=Ii(e.session);return{title:e.session.title,timestamp:Di(e.session.date),agents:Ui(t),totalAgents:t.length,xStart:e.xStart,xEnd:e.xEnd}})}var Gi=30,Ki=56,qi=50,Ji=140,Yi=4,Xi=300,Zi=1200,Qi=140,$i=32;function ea(e){return e<=5?44:e<=10?32:e<=20?22:16}function ta(e,t){return e.length<=t?e:e.slice(0,t-1)+`…`}function na(e,t,n,r){if(r===n)return`M ${e} ${n} L ${t} ${n}`;let i=Math.min(qi,(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 ra=8;function ia(e,t=ra,n,r){let i=n??gi,a=r??bi,o=[],s=[],c=[],l=!1,u=48,d=0,f=0,p=u,m=(e,t)=>{e<d&&(d=e),e+t>f&&(f=e+t)};for(let n of e){if(n.type===`gap`){s.push({path:`M ${u} 0 L ${u+72} 0`,color:a,width:1.5,dashed:!0}),o.push({kind:`gap`,pos:{x:u,y:16},label:Ei(n.durationMs),durationMs:n.durationMs}),m(-8,40),u+=72+Ki;continue}if(n.type===`session`){let e=n.session,t=Ii(e),r=e.durationMinutes,a=t.length>0?Math.max(Ai,t.length*30+100):Ai,l=t.length>0?Math.min(Math.max(r*Yi,a),Zi):Math.min(Math.max(Mi(r),Ai),ji),d=Oi(e.durationMinutes),f=Bi(e),p=Di(e.date);if(t.length>0){let n=t.slice(0,Gi),r=wi(e),a=r+e.durationMinutes*6e4,h=Math.max(a,...n.map(e=>(e.date?new Date(e.date).getTime():r)+e.durationMinutes*6e4)),g=Ri(n,r),_=Math.max(...g.map(e=>e.children.length),1),v=ea(_),y=Math.min((_-1)*v,120),b=u,x=u+l,S=0-y/2-16,C=b+qi*2;o.push({kind:`label`,pos:{x:C+8,y:S},title:ta(e.title,$i),sub:d,timestamp:p,color:i,above:!0,session:e,tooltip:f}),m(S-4,16),o.push({kind:`dot`,pos:{x:b,y:0},color:i,size:`lg`,tooltip:f}),s.push({path:`M ${b} 0 L ${x} 0`,color:i,width:1.5});for(let e of g){let t=e.children.length,n=Math.min((t-1)*v,y),i=t>1?n/(t-1):0,a=0-n/2,o=Fi(e.startMs,r,h,b,x);e.children.forEach((e,t)=>{let n=a+t*i,c=Ci(e.role),l=(e.date?new Date(e.date).getTime():r)+e.durationMinutes*6e4,u=Fi(Math.min(l,h),r,h,b,x),d=Math.max(u,o+100);s.push({path:na(o,Math.min(d,x),0,n),color:c,width:1.5}),m(n-2,4)})}o.push({kind:`dot`,pos:{x,y:0},color:i,size:`lg`,tooltip:f}),c.push({session:e,xStart:b,xEnd:x}),u=x+Ki}else o.push({kind:`label`,pos:{x:u+14,y:-16},title:ta(e.title,$i),sub:d,timestamp:p,color:i,above:!0,session:e,tooltip:f}),m(-20,16),o.push({kind:`dot`,pos:{x:u,y:0},color:i,size:`sm`,tooltip:f}),o.push({kind:`dot`,pos:{x:u+l,y:0},color:i,size:`sm`,tooltip:f}),s.push({path:`M ${u} 0 L ${u+l} 0`,color:i,width:3}),c.push({session:e,xStart:u,xEnd:u+l}),u+=l+Ki;continue}if(n.type===`concurrent`){let e=[...n.sessions].sort((e,t)=>wi(e)-wi(t)),r=e.slice(0,t),d=Pi(r),f=Math.max(...d.values())+1,p=e.length-r.length;p>0&&(l=!0);let h=Math.max(...r.map(e=>Ii(e).length),0),g=h>15?Math.max(Ji,h*5+60):h>5?Math.max(Ji,h*8+40):Ji,_=n.startMs,v=n.endMs,y=(v-_)/6e4,b=Math.min(Math.max(y*Yi,Xi),Zi),x=u,S=u+b,C=Array(f).fill(0);for(let n of e.slice(0,t)){let e=d.get(n.id)??0,t=0+e*g,r=Ii(n),a=Bi(n),l=Di(n.date),u=Oi(n.durationMinutes),f=Fi(wi(n),_,v,x,S),p=f+Math.min(Math.max(n.durationMinutes*Yi,20),S-f);if(r.length>0){let d=r.slice(0,Gi),h=wi(n),_=Ti(n),{laneMap:v,laneCount:y}=zi(d,h),b=ea(y),x=Math.min((y-1)*b,g-40),S=y>1?x/(y-1):0,w=t-x/2,T=w-32;(C[e]===0||f>=C[e])&&(o.push({kind:`label`,pos:{x:f+8,y:T},title:ta(n.title,$i),sub:u,timestamp:l,color:i,above:!0,session:n,tooltip:a}),C[e]=f+Qi),m(T-4,28),o.push({kind:`dot`,pos:{x:f,y:t},color:i,size:`lg`,tooltip:a}),s.push({path:`M ${f} ${t} L ${p} ${t}`,color:i,width:1.5});let E=y>15?.4:y>8?.6:.8,D=y>15?1:1.5;d.forEach(e=>{let n=w+(v.get(e.id)??0)*S,r=Ci(e.role),i=e.date?new Date(e.date).getTime():h,a=i+e.durationMinutes*6e4,o=Fi(i,h,_,f,p),c=Math.min(Fi(Math.min(a,_),h,_,f,p),p),l=Math.max(c,o+60);s.push({path:na(o,Math.min(l,p),t,n),color:r,width:D,opacity:E}),m(n-2,4)}),o.push({kind:`dot`,pos:{x:p,y:t},color:i,size:`lg`,tooltip:a}),c.push({session:n,xStart:f,xEnd:p})}else (C[e]===0||f>=C[e])&&(o.push({kind:`label`,pos:{x:f+8,y:t-16},title:ta(n.title,$i),sub:u,timestamp:l,color:i,above:!0,session:n,tooltip:a}),C[e]=f+Qi),m(t-32,28),o.push({kind:`dot`,pos:{x:f,y:t},color:i,size:`sm`,tooltip:a}),o.push({kind:`dot`,pos:{x:p,y:t},color:i,size:`sm`,tooltip:a}),s.push({path:`M ${f} ${t} L ${p} ${t}`,color:i,width:3}),c.push({session:n,xStart:f,xEnd:p});m(t-4,8)}if(p>0){let e=0+f*g;o.push({kind:`label`,pos:{x:x+8,y:e},title:`+${p} more sessions`,color:a,above:!1}),m(e,16)}u=S+Ki}}let h=u-Ki,g=-d+4,_=f-d+8;return{nodes:o.map(e=>({...e,pos:{x:e.pos.x,y:e.pos.y+g}})),tracks:s,sessionRanges:c,hasConcurrentOverflow:l,threadStart:p,threadEnd:h,totalW:u+48,totalH:Math.max(_,100),centerY:0+g}}function aa(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 oa({entry:e,textSecondaryColor:t,textMutedColor:n}){if(!e||e.agents.length===0)return null;let r=e.agents.slice(0,Vi),i=e.agents.length-r.length,a=e.totalAgents>=Hi;return(0,z.jsxs)(`div`,{style:{fontFamily:vi,fontSize:10,display:`flex`,alignItems:`baseline`,gap:14,padding:`2px 0`,minHeight:20},children:[a?(0,z.jsxs)(`span`,{style:{fontSize:10,fontWeight:700,letterSpacing:`0.06em`,color:`#d97706`,flexShrink:0},children:[`LEGENDARY AGENTIC USE — `,e.totalAgents,` agents:`]}):(0,z.jsxs)(`span`,{style:{fontSize:10,color:t,fontWeight:600,flexShrink:0},children:[e.totalAgents,` agents:`]}),(0,z.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:10,alignItems:`center`},children:[r.map(e=>(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5},children:[(0,z.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:e.color,boxShadow:`0 0 4px ${e.color}40`,flexShrink:0}}),(0,z.jsx)(`span`,{style:{fontWeight:600,color:e.color,letterSpacing:`0.03em`},children:e.role.toUpperCase()}),e.count>1&&(0,z.jsxs)(`span`,{style:{color:n},children:[`×`,e.count]}),(0,z.jsx)(`span`,{style:{color:n},children:e.duration})]},e.role)),i>0&&(0,z.jsxs)(`span`,{style:{color:n,fontStyle:`italic`},children:[`+`,i,` more`]})]})]})}function sa({data:e,pos:t}){return(0,z.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:vi,fontSize:11,lineHeight:1.5,whiteSpace:`nowrap`,zIndex:100,pointerEvents:`none`,boxShadow:`0 4px 16px rgba(0,0,0,0.18)`},children:[(0,z.jsx)(`div`,{style:{fontWeight:700,fontSize:12,marginBottom:4,color:`#fff`},children:e.title}),(0,z.jsx)(`div`,{style:{color:`#d1d5db`},children:e.timestamp}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:16,marginTop:4},children:[(0,z.jsx)(`span`,{children:e.duration}),(0,z.jsxs)(`span`,{children:[e.linesOfCode.toLocaleString(),` lines`]}),e.agentCount>0&&(0,z.jsxs)(`span`,{children:[e.agentCount,` agents`]})]})]})}function ca({sessions:e,onSessionClick:t,maxHeight:n,accentColor:r,isDark:i}){let a=r??(i?`#f97316`:gi),o=i?`rgba(255,255,255,0.15)`:_i,s=i?`rgba(255,255,255,0.65)`:yi,c=i?`rgba(255,255,255,0.4)`:bi,l=(0,_.useMemo)(()=>Ni(e),[e]),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),g=(0,_.useRef)(null),v=u?999:ra,y=(0,_.useMemo)(()=>ia(l,v,a,c),[l,v,a,c]),b=(0,_.useMemo)(()=>Wi(y.sessionRanges),[y.sessionRanges]),x=(0,_.useRef)(null),[S,C]=(0,_.useState)(null),[w,T]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=b.filter(e=>e.agents.length>0);e.length>0&&T(e[0])},[b]);let E=(0,_.useCallback)(()=>{let e=x.current;if(!e)return;let t=b.filter(e=>e.agents.length>0),n=aa(e.scrollLeft,e.clientWidth,t);n&&T(n)},[b]),D=(0,_.useCallback)(()=>{if(m){g.current&&cancelAnimationFrame(g.current),g.current=null,h(!1);return}h(!0);let e=()=>{let t=x.current;if(t){if(t.scrollLeft>=t.scrollWidth-t.clientWidth-1){h(!1),g.current=null;return}t.scrollLeft+=1.2,g.current=requestAnimationFrame(e)}};g.current=requestAnimationFrame(e)},[m]);(0,_.useEffect)(()=>()=>{g.current&&cancelAnimationFrame(g.current)},[]),(0,_.useEffect)(()=>{if(!f)return;let e=e=>{e.key===`Escape`&&p(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[f]);let O=(0,_.useCallback)((e,t)=>{e&&C({tooltip:e,pos:t})},[]),k=(0,_.useCallback)(()=>C(null),[]);if(!e.length)return(0,z.jsx)(`div`,{"data-testid":`work-timeline-empty`,children:(0,z.jsx)(`p`,{style:{fontFamily:vi,fontSize:`0.8125rem`,color:s},children:`No sessions to display.`})});let A=b.some(e=>e.agents.length>0),j=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12},children:[(0,z.jsx)(`div`,{style:{flex:1,minWidth:0},children:A&&(0,z.jsx)(oa,{entry:w,textSecondaryColor:s,textMutedColor:c})}),(0,z.jsx)(`div`,{style:{display:`flex`,gap:6,flexShrink:0},children:y.totalW>600&&(0,z.jsx)(`button`,{onClick:D,style:(e=>({padding:`3px 10px`,fontSize:10,fontWeight:600,border:`1px solid ${o}`,borderRadius:4,background:e?a:i?`rgba(255,255,255,0.08)`:`#fff`,color:e?`#fff`:a,cursor:`pointer`,fontFamily:vi,letterSpacing:`0.03em`,flexShrink:0}))(m),children:m?`PAUSE`:`PLAY`})})]}),(0,z.jsx)(`div`,{ref:x,onScroll:E,style:{overflowX:`auto`,overflowY:f?`auto`:`hidden`,WebkitOverflowScrolling:`touch`,maxHeight:f?`calc(100vh - 80px)`:void 0},children:(0,z.jsxs)(`div`,{style:{position:`relative`,width:y.totalW,height:y.totalH,fontFamily:vi},children:[(0,z.jsxs)(`svg`,{style:{position:`absolute`,inset:0,width:y.totalW,height:y.totalH,pointerEvents:`none`},children:[(0,z.jsx)(`line`,{x1:y.threadStart,y1:y.centerY,x2:y.threadEnd,y2:y.centerY,stroke:o,strokeWidth:1.5}),y.tracks.map((e,t)=>(0,z.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, ${y.centerY})`},`t-${t}`))]}),y.nodes.map((e,n)=>{if(e.kind===`label`)return(0,z.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?()=>O(e.tooltip,e.pos):void 0,onMouseLeave:e.tooltip?k:void 0,children:[(0,z.jsx)(`span`,{style:{fontSize:12,fontWeight:700,color:e.color,letterSpacing:`0.01em`,display:`block`},children:e.title}),(0,z.jsxs)(`span`,{style:{fontSize:10,color:c,display:`flex`,gap:8,marginTop:1},children:[e.sub&&(0,z.jsx)(`span`,{children:e.sub}),e.timestamp&&(0,z.jsx)(`span`,{style:{color:s},children:e.timestamp})]})]},`l-${n}`);if(e.kind===`dot`){let t=e.size===`lg`?6:4;return(0,z.jsx)(`div`,{onMouseEnter:e.tooltip?()=>O(e.tooltip,e.pos):void 0,onMouseLeave:e.tooltip?k: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,z.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:c,letterSpacing:`0.04em`},children:e.label},`g-${n}`):null}),S&&(0,z.jsx)(sa,{data:S.tooltip,pos:S.pos})]})})]});if(f)return(0,z.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:9998,background:i?`#111`:`#f8f9fb`,display:`flex`,flexDirection:`column`,padding:`16px 24px`},children:[(0,z.jsx)(`button`,{onClick:()=>p(!1),style:{position:`absolute`,top:16,right:24,zIndex:1,padding:`6px 14px`,fontSize:12,fontWeight:700,border:`1px solid ${o}`,borderRadius:4,background:i?`rgba(255,255,255,0.08)`:`#fff`,color:a,cursor:`pointer`,fontFamily:vi},children:`Close`}),(0,z.jsx)(`div`,{"data-testid":`work-timeline`,style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:j})]});let M=n&&y.totalH>n;return(0,z.jsxs)(`div`,{"data-testid":`work-timeline`,style:{position:`relative`},children:[(0,z.jsx)(`div`,{style:M?{maxHeight:n,overflow:`hidden`}:void 0,children:j}),M&&(0,z.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,height:64,background:i?`linear-gradient(transparent, #111)`:`linear-gradient(transparent, #f8f9fb)`,display:`flex`,alignItems:`flex-end`,justifyContent:`center`,paddingBottom:10},children:(0,z.jsx)(`button`,{onClick:()=>{d(!0),p(!0)},style:{padding:`5px 16px`,fontSize:11,fontWeight:700,border:`1px solid ${o}`,borderRadius:4,background:i?`rgba(255,255,255,0.08)`:`#fff`,color:a,cursor:`pointer`,fontFamily:vi,letterSpacing:`0.03em`,boxShadow:`0 2px 8px rgba(0,0,0,0.08)`},children:`EXPAND TIMELINE`})})]})}function la(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function ua(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var da=`'IBM Plex Mono', monospace`,fa=`#084471`,pa=`#9ca3af`,ma=`#6b7280`,ha=`#e4e4e7`;function ga(e){return e===0?`0`:e>=1e3?`${(e/1e3).toFixed(e%1e3==0?0:1)}k`:String(e)}function _a(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 va(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 ya=3600*1e3,ba=600*1e3;function xa(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>ya?ba:Math.max(i,0),t.push(n)}return{visualTimes:t,totalVisualTime:n}}function Sa(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 Ca({sessions:e,totalLoc:t,totalFiles:n,keyMoments:r,onSessionClick:i,isDark:a,accentColor:o,dualPositive:s,variant:c=`default`}){let l=c===`radar`,u=(0,_.useRef)(null),d=(0,_.useRef)(null),f=(0,_.useRef)(null),p=(0,_.useRef)(null),m=(0,_.useRef)(null),h=l?a?`#22d3ee`:`#0891b2`:o||(a?`#f97316`:fa),g=a?{textMuted:l?`#94a3b8`:`rgba(255,255,255,0.4)`,textSecondary:l?`#cbd5e1`:`rgba(255,255,255,0.65)`,grid:l?`rgba(34,211,238,0.04)`:`rgba(255,255,255,0.06)`,gridAxis:l?`rgba(34,211,238,0.08)`:`rgba(255,255,255,0.06)`,text:`#fafafa`,accent:h,dotStroke:`rgba(0,0,0,0.3)`}:{textMuted:l?`#64748b`:pa,textSecondary:l?`#64748b`:ma,grid:l?`rgba(100,116,139,0.08)`:ha,gridAxis:l?`rgba(100,116,139,0.15)`:ha,text:`#191c1e`,accent:h,dotStroke:`#fff`},v=va(e);if(v.length===0)return(0,z.jsx)(`div`,{style:{fontFamily:da,fontSize:`0.75rem`,color:g.textSecondary,padding:16},children:`No session data available for growth chart.`});let{visualTimes:y,totalVisualTime:b}=xa(v),x=new Map;if(r)for(let e of r)x.set(e.sessionId,e.label);let S=v[v.length-1].cumulativeAdded,C=v[v.length-1].cumulativeDeleted,w=C>0,T=Math.round(b/6e4*.8)+120,E=v.length*12+120,D=Math.max(700,T,E),O=b||1,k=e=>48+e/O*(D-48-16),A,j,M,N,P,ee,F,I,te,L,ne;s?(I=_a(Math.max(S,C,1)),ee=I[I.length-1]||1,te=[],F=0,A=160,j=0,M=0,N=24+A+36,P=24+A,L=e=>P-e/ee*A,ne=L):(I=_a(Math.max(S,1)),ee=I[I.length-1]||1,te=w?_a(C):[],F=w?te[te.length-1]||1:0,A=140,j=w?50:0,M=w?2:0,N=24+A+M+j+36,P=24+A,L=e=>P-e/ee*A,ne=e=>P+M+e/F*j);let re=v.map((e,t)=>({x:k(y[t]),y:L(e.cumulativeAdded)})),ie=w?v.map((e,t)=>({x:k(y[t]),y:ne(e.cumulativeDeleted)})):[];function R(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}function ae(e){return e.length===0?``:e.map((e,t)=>`${t===0?`M`:`L`}${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(` `)}let oe=l?ae:R,se=oe(re),ce=se+` L${re[re.length-1].x.toFixed(1)},${P} L${re[0].x.toFixed(1)},${P} Z`,le=w?oe(ie):``,ue=w?le+` L${ie[ie.length-1].x.toFixed(1)},${P+M} L${ie[0].x.toFixed(1)},${P+M} Z`:``,de=new Set,fe=-1/0;for(let e=0;e<v.length;e++){let t=k(y[e]);t-fe>=90&&(de.add(e),fe=t)}v.length>1&&de.add(v.length-1);let pe=Sa(v,y,k),me=D>700,he=[...e].filter(e=>e.date).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,_.useEffect)(()=>{if(!l)return;let e=typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,t=[u.current,d.current].filter(e=>e!==null),n=[f.current,p.current].filter(e=>e!==null);if(e){for(let e of n)e.style.opacity=`1`;return}for(let e of t){let t=e.getTotalLength();e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=`${t}`,e.style.transition=`none`}for(let e of n)e.style.opacity=`0`,e.style.transition=`none`;let r=new IntersectionObserver(e=>{for(let i of e)i.isIntersecting&&(requestAnimationFrame(()=>{for(let e of t)e.style.transition=`stroke-dashoffset 1.2s ease-out`,e.style.strokeDashoffset=`0`;setTimeout(()=>{for(let e of n)e.style.transition=`opacity 0.8s ease-out`,e.style.opacity=`1`},400)}),r.disconnect())},{threshold:.2});return m.current&&r.observe(m.current),()=>r.disconnect()},[l,v.length]),(0,z.jsxs)(`div`,{ref:m,children:[(0,z.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,padding:`8px 12px`,borderBottom:`1px solid ${g.grid}`,fontFamily:da},children:[(0,z.jsx)(`span`,{style:{fontSize:10,fontWeight:700,color:g.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`},children:s?`Lines Changed`:`Code Changes Over Time`}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:11,fontWeight:600},children:[(0,z.jsxs)(`span`,{style:{color:g.accent},children:[`+`,ua(S)]}),w&&(0,z.jsxs)(`span`,{style:{color:g.textSecondary},children:[`-`,ua(C)]}),(0,z.jsxs)(`span`,{style:{color:g.text},children:[ua(t),` total`]})]})]}),(0,z.jsx)(`div`,{style:me?{overflowX:`auto`}:{padding:`4px 0`},children:(0,z.jsxs)(`svg`,{viewBox:`0 0 ${D} ${N}`,width:me?D:`100%`,height:me?N:void 0,preserveAspectRatio:`xMidYMid meet`,style:{display:`block`},children:[(0,z.jsxs)(`defs`,{children:[(0,z.jsxs)(`linearGradient`,{id:`addGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,z.jsx)(`stop`,{offset:`0%`,stopColor:g.accent,stopOpacity:l?.05:.12}),(0,z.jsx)(`stop`,{offset:`100%`,stopColor:g.accent,stopOpacity:l?.05:.02})]}),(0,z.jsxs)(`linearGradient`,{id:`delGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,z.jsx)(`stop`,{offset:`0%`,stopColor:g.accent,stopOpacity:l?.05:s?.12:.02}),(0,z.jsx)(`stop`,{offset:`100%`,stopColor:g.accent,stopOpacity:l?.05:s?.02:.1})]}),l&&(0,z.jsxs)(`filter`,{id:`dotGlow`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,z.jsx)(`feGaussianBlur`,{stdDeviation:`2`,result:`blur`}),(0,z.jsx)(`feComposite`,{in:`SourceGraphic`,in2:`blur`,operator:`over`})]})]}),I.map(e=>(0,z.jsxs)(`g`,{children:[(0,z.jsx)(`line`,{x1:48,y1:L(e),x2:D-16,y2:L(e),stroke:g.grid,strokeWidth:`0.5`,strokeDasharray:`4,4`}),(0,z.jsx)(`text`,{x:40,y:L(e)+3,textAnchor:`end`,fontFamily:da,fontSize:`8`,fill:g.textMuted,children:e===0?``:s?ga(e):`+${ga(e)}`})]},`ya-${e}`)),l&&(0,z.jsx)(`line`,{x1:48,y1:24,x2:48,y2:P+M+j,stroke:g.gridAxis,strokeWidth:`1`}),(0,z.jsx)(`line`,{x1:48,y1:P,x2:D-16,y2:P,stroke:l?g.gridAxis:g.grid,strokeWidth:`1`}),(0,z.jsx)(`text`,{x:40,y:P+3,textAnchor:`end`,fontFamily:da,fontSize:`8`,fill:g.textSecondary,fontWeight:`600`,children:`0`}),!s&&w&&te.filter(e=>e>0).map(e=>(0,z.jsxs)(`g`,{children:[(0,z.jsx)(`line`,{x1:48,y1:ne(e),x2:D-16,y2:ne(e),stroke:g.grid,strokeWidth:`0.5`,strokeDasharray:`4,4`}),(0,z.jsx)(`text`,{x:40,y:ne(e)+3,textAnchor:`end`,fontFamily:da,fontSize:`8`,fill:g.textMuted,children:`-${ga(e)}`})]},`yd-${e}`)),pe.map((e,t)=>(0,z.jsx)(`line`,{x1:e.x,y1:24,x2:e.x,y2:P+M+j,stroke:g.grid,strokeWidth:`0.5`,strokeDasharray:`2,4`},`m-${t}`)),l?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{ref:f,d:ce,fill:`${g.accent}0D`}),(0,z.jsx)(`polyline`,{ref:u,points:re.map(e=>`${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(` `),fill:`none`,stroke:g.accent,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:ce,fill:`url(#addGrad)`}),(0,z.jsx)(`path`,{d:se,fill:`none`,stroke:g.accent,strokeWidth:`1.5`})]}),w&&(0,z.jsx)(`g`,{opacity:`0.4`,children:l?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{ref:p,d:ue,fill:`${g.accent}0D`}),(0,z.jsx)(`polyline`,{ref:d,points:ie.map(e=>`${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(` `),fill:`none`,stroke:g.accent,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`path`,{d:ue,fill:`url(#delGrad)`}),(0,z.jsx)(`path`,{d:le,fill:`none`,stroke:g.accent,strokeWidth:`1.5`})]})}),v.map((e,t)=>{let n=k(y[t]),r=x.has(e.sessionId),a=de.has(t);return(0,z.jsxs)(`g`,{style:i?{cursor:`pointer`}:void 0,onClick:i?()=>i(he[t]):void 0,children:[r?(0,z.jsx)(`circle`,{cx:n,cy:L(e.cumulativeAdded),r:`5`,fill:g.accent,stroke:g.dotStroke,strokeWidth:`2`,filter:l?`url(#dotGlow)`:void 0}):a?(0,z.jsx)(`circle`,{cx:n,cy:L(e.cumulativeAdded),r:`3`,fill:g.accent,filter:l?`url(#dotGlow)`:void 0}):null,w&&e.cumulativeDeleted>0&&a&&(0,z.jsx)(`circle`,{cx:n,cy:ne(e.cumulativeDeleted),r:`2.5`,opacity:`0.4`,fill:g.accent,filter:l?`url(#dotGlow)`:void 0}),r&&(0,z.jsx)(`text`,{x:n,y:L(e.cumulativeAdded)-12,textAnchor:`middle`,fontFamily:da,fontSize:`8`,fill:g.textSecondary,children:x.get(e.sessionId)}),a&&(0,z.jsx)(`text`,{x:n,y:N-8,textAnchor:`middle`,fontFamily:da,fontSize:`8`,fill:g.textMuted,children:new Date(e.dateMs).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})})]},`pt-${t}`)})]})}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:24,padding:`8px 12px`,borderTop:`1px solid ${g.grid}`,fontFamily:da,fontSize:10},children:[(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,z.jsx)(`span`,{style:{width:16,height:3,background:g.accent,borderRadius:1,flexShrink:0}}),(0,z.jsxs)(`span`,{style:{fontSize:14,fontWeight:700,color:g.accent},children:[`+`,ua(S)]})]}),(0,z.jsx)(`div`,{style:{color:g.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600,marginTop:2},children:`Added`})]}),w&&(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,z.jsx)(`span`,{style:{width:16,height:3,background:g.accent,opacity:.4,borderRadius:1,flexShrink:0}}),(0,z.jsxs)(`span`,{style:{fontSize:14,fontWeight:700,color:g.textSecondary},children:[`-`,ua(C)]})]}),(0,z.jsx)(`div`,{style:{color:g.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600,marginTop:2},children:`Removed`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:g.text},children:ua(t)}),(0,z.jsx)(`div`,{style:{color:g.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Lines changed`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:g.text},children:n}),(0,z.jsx)(`div`,{style:{color:g.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Files`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:g.text},children:v.length}),(0,z.jsx)(`div`,{style:{color:g.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Sessions`})]})]})]})}var wa=[`preview_project`,`preview_enhanced`,`prompt_enhance`];function Ta(){let e=et(),[t,n]=(0,_.useState)(`loading`),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(new Set),[l,u]=(0,_.useState)(0),[d,f]=(0,_.useState)(0),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(null),[b,x]=(0,_.useState)(``),[S,C]=(0,_.useState)(`idle`),[w,T]=(0,_.useState)(``),[E,D]=(0,_.useState)(``),[O,k]=(0,_.useState)(!1),A=(0,_.useRef)(null),j=(0,_.useRef)(``),M=(0,_.useCallback)(()=>{Xr().catch(()=>{}),n(`dashboard`),e(`/`)},[e]);(0,_.useEffect)(()=>{let e=!1,t=null;return Yr().then(r=>{if(!e){if(i(r),r.onboardingComplete){n(`dashboard`);return}r.sync.status===`syncing`?(n(`syncing`),o(r.sync),t=Zr(t=>{e||(o(t),t.currentProject&&c(e=>new Set(e).add(t.currentProject)),t.status===`done`&&Yr().then(t=>{e||(i(t),t.isEmpty?M():setTimeout(()=>{e||n(`reveal`)},800))}))})):r.isEmpty?n(`dashboard`):n(`reveal`)}}).catch(()=>{e||n(`dashboard`)}),()=>{e=!0,t?.()}},[M]),(0,_.useEffect)(()=>{if(t!==`reveal`)return;let e=[];for(let t=1;t<=4;t++)e.push(setTimeout(()=>u(t),t*400));return e.push(setTimeout(()=>n(`prompt_project`),3100)),()=>e.forEach(clearTimeout)},[t]);let N=r?.stats,P=r?.projects??[],ee=P.length>0?P.reduce((e,t)=>t.sessionCount>e.sessionCount?t:e,P[0]):null,F=t!==`dashboard`&&t!==`loading`,I=wa.includes(t),te=[`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,z.jsxs)(ri,{chips:[{label:`local-first`,variant:`primary`},{label:`private by default`,variant:`green`}],actions:(0,z.jsx)(`div`,{className:`flex items-center gap-3`,children:F?(0,z.jsx)(`button`,{onClick:M,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Skip tour`}):(0,z.jsx)(bn,{to:`/settings`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Settings`})}),children:[t!==`dashboard`&&(0,z.jsxs)(`div`,{className:`flex min-h-[calc(100vh-3rem)]`,style:{justifyContent:I?`flex-start`:`center`,alignItems:I?`flex-start`:`center`},children:[(0,z.jsxs)(`div`,{className:`shrink-0 transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)]`,style:{width:I?340:`100%`,maxWidth:I?340:680,padding:I?`1.5rem 1rem 1.5rem 1.5rem`:`0 1.5rem`,position:I?`sticky`:`relative`,top:I?48:`auto`,alignSelf:I?`flex-start`:`center`},children:[t===`loading`&&(0,z.jsxs)(Na,{compact:!1,children:[(0,z.jsx)(B,{variant:`prompt`,children:`$ heyiam`}),(0,z.jsx)(B,{variant:`active`,children:` Connecting...`})]}),t===`syncing`&&a&&(0,z.jsxs)(Na,{compact:!1,children:[(0,z.jsx)(B,{variant:`prompt`,children:`$ heyiam`}),(0,z.jsx)(B,{variant:`info`,children:` Indexing your AI coding sessions.`}),(0,z.jsx)(B,{variant:`info`,children:` Everything stays on your machine.`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),a.phase===`discovering`&&(0,z.jsx)(B,{variant:`active`,children:` Discovering sessions...`}),(a.phase===`indexing`||a.phase===`done`)&&(0,z.jsxs)(B,{variant:`passed`,children:[` Found `,a.parentCount,` sessions`]}),a.phase===`indexing`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(B,{variant:`active`,children:[` `,`Indexing... (`,a.current,`/`,a.total,`)`,a.currentProject?` — ${a.currentProject}`:``]}),s.size>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(B,{variant:`section`,children:` Projects found:`}),[...s].slice(0,8).map(e=>(0,z.jsxs)(B,{variant:`default`,children:[` `,e]},e)),s.size>8&&(0,z.jsxs)(B,{variant:`default`,children:[` ...and `,s.size-8,` more`]})]})]}),a.phase===`done`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(B,{variant:`passed`,children:[` Indexed `,a.total,` sessions`]}),(0,z.jsx)(B,{variant:`passed`,children:` Ready.`})]})]}),t===`reveal`&&N&&(0,z.jsxs)(Na,{compact:!1,children:[(0,z.jsx)(B,{variant:`prompt`,children:`$ heyiam`}),(0,z.jsxs)(B,{variant:`passed`,children:[` Indexed `,N.sessionCount,` sessions. Ready.`]}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(B,{variant:`section`,children:` Your coding in numbers:`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),l>=1&&(0,z.jsxs)(B,{variant:`reveal`,children:[` `,(0,z.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:N.sessionCount}),` sessions indexed`]}),l>=2&&(0,z.jsxs)(B,{variant:`reveal`,children:[` `,(0,z.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:N.projectCount}),` projects discovered`]}),l>=3&&(0,z.jsxs)(B,{variant:`reveal`,children:[` `,(0,z.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:N.sourceCount}),` `,N.sourceCount===1?`tool`:`tools`,` detected`]}),l>=4&&ee&&(0,z.jsxs)(B,{variant:`reveal`,children:[` `,`Biggest: `,(0,z.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:ee.projectName}),` (`,ee.sessionCount,` sessions)`]})]}),t===`prompt_project`&&(0,z.jsxs)(Na,{compact:!1,children:[(0,z.jsx)(B,{variant:`prompt`,children:`$ heyiam`}),(0,z.jsxs)(B,{variant:`passed`,children:[` `,N?.sessionCount,` sessions across `,N?.projectCount,` projects.`]}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(B,{variant:`info`,children:` Here's what a project page looks`}),(0,z.jsx)(B,{variant:`info`,children:` like — with timeline, growth chart,`}),(0,z.jsx)(B,{variant:`info`,children:` and clickable sessions.`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(Pa,{question:`See a demo project?`,onYes:()=>n(`preview_project`),onNo:()=>n(`prompt_enhance`)})]}),t===`preview_project`&&(0,z.jsxs)(Na,{compact:!0,children:[(0,z.jsx)(B,{variant:`prompt`,children:`$ heyiam project view`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),v?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(B,{variant:`info`,children:` Viewing session detail.`}),(0,z.jsx)(B,{variant:`info`,children:` Click X to go back.`})]}):(0,z.jsxs)(z.Fragment,{children:[te[d]?.split(`
20
+ `).map((e,t)=>(0,z.jsxs)(B,{variant:`info`,children:[` `,e]},`${d}-${t}`)),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsxs)(B,{variant:`default`,children:[` `,(0,z.jsxs)(`span`,{className:`text-white/30`,children:[`section `,d+1,`/4`]})]})]}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(Pa,{question:`Enhance this project?`,onYes:()=>{y(null),n(`preview_enhanced`)},onNo:()=>{y(null),n(`preview_enhanced`)},yesLabel:`Enhance`,noLabel:`Skip`})]}),t===`preview_enhanced`&&(0,z.jsxs)(Na,{compact:!0,children:[(0,z.jsx)(B,{variant:`prompt`,children:`$ heyiam enhance heyi-am`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(B,{variant:`passed`,children:` Reading 16 sessions...`}),(0,z.jsx)(B,{variant:`passed`,children:` Extracting skills...`}),(0,z.jsx)(B,{variant:`passed`,children:` Writing narrative...`}),(0,z.jsx)(B,{variant:`passed`,children:` Building project arc...`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(B,{variant:`passed`,children:` Enhanced. Scroll to see the`}),(0,z.jsx)(B,{variant:`passed`,children:` difference.`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(Pa,{question:`Continue tour?`,onYes:()=>n(`prompt_enhance`),onNo:()=>M()})]}),t===`prompt_enhance`&&(0,z.jsxs)(Na,{compact:!0,children:[(0,z.jsx)(B,{variant:`prompt`,children:`$ heyiam enhance`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(B,{variant:`info`,children:` To enhance your own projects,`}),(0,z.jsx)(B,{variant:`info`,children:` you need an Anthropic API key.`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),h?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(B,{variant:`passed`,children:` API key saved. You're all set.`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(Pa,{question:`Continue?`,onYes:()=>n(`claim_username`),onNo:()=>n(`claim_username`)})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Pa,{question:`Add your API key now?`,onYes:()=>{},onNo:()=>n(`claim_username`),noLabel:`I'll do this later`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(`div`,{className:`triage-terminal__line opacity-80`,children:` Paste your key:`}),(0,z.jsx)(`div`,{className:`flex items-center gap-2 mt-1 ml-4`,children:(0,z.jsx)(`input`,{type:`password`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p.startsWith(`sk-`)&&dr(p).then(()=>g(!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,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`You can always add this later in Settings.`]})]})]}),t===`claim_username`&&(0,z.jsxs)(Na,{compact:!1,children:[(0,z.jsx)(B,{variant:`prompt`,children:`$ heyiam publish`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(B,{variant:`section`,children:` Claim your portfolio page`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(B,{variant:`info`,children:` Want to show off your AI dev work?`}),(0,z.jsx)(B,{variant:`info`,children:` Claim a name and create a public`}),(0,z.jsx)(B,{variant:`info`,children:` portfolio on heyi.am — show how`}),(0,z.jsx)(B,{variant:`info`,children:` you build, not just what you ship.`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsxs)(B,{variant:`info`,children:[` Your page: `,(0,z.jsxs)(`span`,{className:`text-[#9dcaff] font-semibold`,children:[`heyi.am/`,b||`your-name`]})]}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`Optional — the CLI works fully without an account.`]}),(0,z.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`You choose what to publish. Nothing is public by default.`]}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),S===`claimed`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(B,{variant:`passed`,children:[` Welcome, `,E,`!`]}),(0,z.jsxs)(B,{variant:`passed`,children:[` heyi.am/`,E,` is yours.`]}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsx)(Pa,{question:`Ready to explore?`,onYes:M,onNo:M,yesLabel:`Let's go`})]}):O?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(B,{variant:`active`,children:` Waiting for signup to complete...`}),(0,z.jsx)(B,{variant:`info`,children:` A browser window should have opened.`}),(0,z.jsx)(B,{variant:`info`,children:` Sign up there, then come back here.`}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 ml-4`,children:[(0,z.jsx)(`button`,{onClick:()=>{k(!1),C(`idle`)},className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:`Cancel`}),(0,z.jsx)(`button`,{onClick:()=>{k(!1),M()},className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:`Skip this`})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`triage-terminal__line opacity-80`,children:` Choose a username:`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 mt-1 ml-4`,children:[(0,z.jsx)(`span`,{className:`text-white/40 text-[11px] font-mono`,children:`heyi.am/`}),(0,z.jsx)(`input`,{type:`text`,value:b,onChange:e=>{let t=e.target.value.toLowerCase().replace(/[^a-z0-9-]/g,``);x(t),C(`idle`),T(``),A.current&&clearTimeout(A.current),t.length>=3&&t!==j.current&&(A.current=setTimeout(async()=>{j.current=t,C(`checking`);try{let e=await Gr(t);C(e.available?`available`:`taken`),e.available||T(e.reason||`Taken`)}catch{C(`idle`)}},500))},onKeyDown:async e=>{if(e.key===`Enter`&&b.length>=3){if(e.preventDefault(),S===`submitting`||S===`checking`||O)return;A.current&&clearTimeout(A.current),C(`submitting`),T(``);try{let e=await Gr(b);if(!e.available){C(`taken`),T(e.reason||`Username is taken`);return}let t=await Kr(b);k(!0),C(`available`),window.open(t.verification_uri,`_blank`);let n=Date.now(),r=async()=>{try{let e=await Wr(t.device_code);if(e.authenticated){k(!1),C(`claimed`),D(e.username||b);return}}catch{}Date.now()-n<3e5?setTimeout(r,5e3):(k(!1),C(`error`),T(`Timed out. Try again.`))};setTimeout(r,5e3)}catch{C(`error`),T(`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}),S===`checking`&&(0,z.jsx)(`span`,{className:`text-[10px] text-[#fbbf24] font-mono`,children:`checking...`}),S===`available`&&(0,z.jsx)(`span`,{className:`text-[10px] text-[#34d399] font-mono`,children:`available!`}),S===`submitting`&&(0,z.jsx)(`span`,{className:`text-[10px] text-[#fbbf24] font-mono`,children:`claiming...`}),S===`taken`&&(0,z.jsx)(`span`,{className:`text-[10px] text-[#f87171] font-mono`,children:w}),S===`error`&&(0,z.jsx)(`span`,{className:`text-[10px] text-[#f87171] font-mono`,children:w})]}),b.length>=3&&S===`idle`&&(0,z.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px] mt-1`,children:[` `,`Press Enter to check & claim`]}),(0,z.jsx)(B,{variant:`default`,children:`\xA0`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 mt-1 ml-4`,children:[(0,z.jsx)(`button`,{disabled:O||S===`submitting`,onClick:async()=>{if(!(O||S===`submitting`)){C(`submitting`),T(``);try{let e=await qr();k(!0),C(`idle`),window.open(e.verification_uri,`_blank`);let t=Date.now(),n=async()=>{try{let t=await Wr(e.device_code);if(t.authenticated){k(!1),C(`claimed`),D(t.username||``);return}}catch{}Date.now()-t<3e5?setTimeout(n,5e3):(k(!1),C(`error`),T(`Timed out.`))};setTimeout(n,5e3)}catch{C(`error`),T(`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,z.jsx)(`button`,{onClick:()=>M(),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`})]})]})]})]}),I&&(0,z.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:(t===`preview_project`||t===`preview_enhanced`||t===`prompt_enhance`)&&(0,z.jsx)(ka,{enhanced:t===`preview_enhanced`||t===`prompt_enhance`,onScrollSection:f,selectedSession:v,onSelectSession:y},t===`preview_project`?`draft`:`enhanced`)})]}),t===`dashboard`&&(0,z.jsx)(di,{dashboard:r,stats:N,projects:P})]})}var Ea=[`bg-primary`,`bg-green`,`bg-violet`];function Da(){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 Oa=Da();function ka({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=Oa.reduce((e,t)=>e+t.linesOfCode,0);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ma,{url:`localhost:17845/project/heyi-am`,children:(0,z.jsxs)(`div`,{className:`bg-surface-mid`,children:[(0,z.jsxs)(`div`,{ref:e=>{i.current[0]=e},className:`p-5 pb-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`font-display text-xl font-bold text-on-surface`,children:`heyi-am`}),(0,z.jsx)(`span`,{className:`text-on-surface-variant text-[0.8125rem]`,children:`Feb 15 – Mar 25, 2026`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(ei,{variant:e?`green`:`primary`,children:e?`Enhanced`:`Draft`}),(0,z.jsx)(ei,{variant:`primary`,children:`16 sessions`})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-4 mt-1 mb-2`,children:[(0,z.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,z.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`currentColor`,children:(0,z.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,z.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,z.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:(0,z.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`]})]}),e&&(0,z.jsxs)(ii,{className:`my-3`,children:[(0,z.jsx)(li,{title:`Narrative summary`,meta:`AI-generated`}),(0,z.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,z.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-4`,children:[(0,z.jsx)(si,{label:`Sessions`,value:16}),(0,z.jsx)(si,{label:`Human / Agents`,value:`52h / 78h`}),(0,z.jsx)(si,{label:`Lines changed`,value:ua(a)}),(0,z.jsx)(si,{label:`Files`,value:847})]})]}),e&&(0,z.jsx)(`div`,{className:`px-5 pb-4`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Project arc`,meta:`AI-generated`}),(0,z.jsxs)(`div`,{className:`relative pl-5`,children:[(0,z.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,z.jsxs)(`div`,{className:`relative pb-3 last:pb-0`,children:[(0,z.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,z.jsx)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant`,children:e.title}),(0,z.jsx)(ci,{children:(0,z.jsx)(`span`,{className:`text-on-surface-variant`,children:e.desc})})]},e.title))]})]})}),e&&(0,z.jsx)(`div`,{className:`px-5 pb-4`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Skills extracted`,meta:`14 skills`}),(0,z.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,z.jsx)(ei,{variant:`violet`,children:e},e))})]})}),(0,z.jsx)(`div`,{ref:e=>{i.current[1]=e},className:`px-5 pb-4`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Work timeline`,meta:`sessions over time`}),(0,z.jsx)(ca,{sessions:Oa,maxHeight:280})]})}),(0,z.jsx)(`div`,{ref:e=>{i.current[2]=e},className:`px-5 pb-4`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Project growth`,meta:`lines changed`}),(0,z.jsx)(Ca,{sessions:Oa,totalLoc:a,totalFiles:847})]})}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 px-5 pb-4`,children:[(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Key decisions`,meta:`signal`}),(0,z.jsx)(`div`,{className:`flex flex-col gap-3`,children:e?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ci,{title:`SQLite over filesystem`,children:`Chose SQLite for session indexing over raw filesystem scans — 10x faster project listing.`}),(0,z.jsx)(ci,{title:`Local-first architecture`,children:`All data stays on the user's machine. No cloud dependency for core features.`}),(0,z.jsx)(ci,{title:`Multi-parser pipeline`,children:`One bridge layer normalizes data from Claude, Cursor, Codex, and Gemini into a shared schema.`})]}):(0,z.jsx)(ci,{children:`Enhance this project to extract key decisions.`})})]}),(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Source breakdown`,meta:`provenance`}),(0,z.jsxs)(`table`,{className:`w-full border-collapse text-[0.8125rem]`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Source`}),(0,z.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Count`})]})}),(0,z.jsx)(`tbody`,{children:[{source:`claude`,count:10},{source:`cursor`,count:3},{source:`codex`,count:2},{source:`gemini`,count:1}].map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.source}),(0,z.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.count})]},e.source))})]})]})]}),(0,z.jsx)(`div`,{ref:e=>{i.current[3]=e},className:`px-5 pb-5`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:e?`Featured sessions`:`Sessions`,meta:`${Oa.length} total`}),(0,z.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:Oa.slice(0,6).map((e,t)=>(0,z.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,z.jsx)(`div`,{className:`h-1 rounded-full mb-3 ${Ea[t%Ea.length]}`}),(0,z.jsx)(`h4`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface mb-1 line-clamp-2`,children:e.title}),(0,z.jsxs)(`span`,{className:`text-on-surface-variant text-xs`,children:[la(e.durationMinutes),` · `,e.turns,` turns · `,ua(e.linesOfCode),` lines`]}),e.skills?.[0]&&(0,z.jsx)(`div`,{className:`mt-2`,children:(0,z.jsx)(ei,{variant:`violet`,children:e.skills[0]})})]},e.id))})]})})]})}),n&&(0,z.jsx)(`div`,{className:`fixed inset-0 z-50 flex justify-end bg-black/40`,onClick:e=>{e.target===e.currentTarget&&r(null)},children:(0,z.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,z.jsxs)(`div`,{className:`p-8`,children:[(0,z.jsx)(`div`,{className:`flex items-center gap-3 mb-6`,children:(0,z.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,z.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface mb-2`,children:n.title}),(0,z.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,z.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-5`,children:[(0,z.jsx)(Aa,{label:`Active Time`,value:la(n.durationMinutes),primary:!0}),(0,z.jsx)(Aa,{label:`Turns`,value:n.turns}),(0,z.jsx)(Aa,{label:`Files`,value:n.filesChanged?.length??`—`}),(0,z.jsx)(Aa,{label:`Lines changed`,value:ua(n.linesOfCode)})]}),e&&(0,z.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,z.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mb-5`,children:n.skills.map(e=>(0,z.jsx)(ei,{variant:`violet`,children:e},e))}),n.turns>=50&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsxs)(ja,{children:[`Session Activity · `,n.turns,` turns over `,la(n.durationMinutes)]}),(0,z.jsx)(ca,{sessions:[n],maxHeight:200})]}),(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsx)(ja,{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,z.jsxs)(`div`,{className:`flex gap-3 items-start py-2.5 border-b border-ghost last:border-b-0`,children:[(0,z.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,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-0.5`,children:e.title}),e.desc&&(0,z.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.desc})]})]},e.n))]}),n.toolBreakdown&&n.toolBreakdown.length>0&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsx)(ja,{children:`Tool Usage`}),n.toolBreakdown.map(e=>(0,z.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,z.jsx)(`span`,{className:`text-on-surface`,children:e.tool}),(0,z.jsx)(`span`,{className:`text-on-surface-variant`,children:e.count})]},e.tool))]}),n.filesChanged&&n.filesChanged.length>0&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsx)(ja,{children:`Top Files`}),n.filesChanged.slice(0,10).map(e=>(0,z.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,z.jsx)(`span`,{className:`text-on-surface truncate min-w-0`,children:e.path}),(0,z.jsxs)(`span`,{className:`flex-shrink-0 ml-2 whitespace-nowrap`,children:[(0,z.jsxs)(`span`,{className:`text-green-600 font-semibold`,children:[`+`,e.additions]}),(0,z.jsxs)(`span`,{className:`text-red-600 font-semibold ml-1`,children:[`-`,e.deletions]})]})]},e.path))]})]})})})]})}function Aa({label:e,value:t,primary:n}){return(0,z.jsxs)(`div`,{className:`text-center p-3 border border-ghost rounded-sm bg-surface-lowest`,children:[(0,z.jsx)(`div`,{className:`font-mono text-xl font-bold ${n?`text-primary`:`text-on-surface`}`,children:t}),(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mt-1`,children:e})]})}function ja({children:e}){return(0,z.jsx)(`div`,{className:`font-mono text-[0.625rem] font-semibold uppercase tracking-wider text-on-surface-variant mb-2.5`,children:e})}function Ma({url:e,children:t}){return(0,z.jsxs)(`div`,{className:`rounded-lg border border-[#d1d5db] bg-white shadow-xl overflow-hidden`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-[#f1f3f5] border-b border-[#d1d5db]`,children:[(0,z.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,z.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#ff5f57]`}),(0,z.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#febc2e]`}),(0,z.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#28c840]`})]}),(0,z.jsx)(`div`,{className:`flex-1 mx-2`,children:(0,z.jsx)(`div`,{className:`bg-white rounded-md border border-[#d1d5db] px-3 py-1 text-[10px] text-[#6b7280] font-mono`,children:e})})]}),(0,z.jsx)(`div`,{className:`bg-[#f1f5f9] max-h-[70vh] overflow-y-auto`,children:t})]})}function Na({children:e,compact:t}){let n=(0,_.useRef)(null);return(0,_.useEffect)(()=>{n.current?.scrollTo({top:n.current.scrollHeight})}),(0,z.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,z.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-3`,children:[(0,z.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#ff5f57]`}),(0,z.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#febc2e]`}),(0,z.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#28c840]`})]}),(0,z.jsx)(`div`,{ref:n,className:`triage-terminal__feed`,children:e})]})}function B({variant:e,children:t}){return(0,z.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 Pa({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,z.jsxs)(`div`,{className:`mt-1`,children:[(0,z.jsxs)(`div`,{className:`triage-terminal__line flex items-center gap-0 flex-wrap`,children:[(0,z.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:` > `}),(0,z.jsxs)(`span`,{children:[e,` `]}),(0,z.jsxs)(`span`,{className:`text-white/40`,children:[r?`[y/N]`:`[Y/n]`,` `]}),(0,z.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,z.jsxs)(`div`,{className:`flex items-center gap-2 mt-2 ml-4`,children:[(0,z.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,z.jsx)(`span`,{className:`text-white/30 ml-0.5`,children:`↵`})]}),(0,z.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 Fa(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{Xn().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,z.jsx)(ri,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],children:(0,z.jsx)(`div`,{className:`p-6`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Scanning sources...`})})});if(i)return(0,z.jsx)(ri,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],children:(0,z.jsx)(`div`,{className:`p-6`,children:(0,z.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,z.jsx)(ri,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],actions:(0,z.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,z.jsxs)(`div`,{className:`p-6`,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`font-display text-xl font-semibold text-on-surface`,children:`What we found, what we archived, and what we skipped`}),(0,z.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`The ingestion layer should feel inspectable, not magical.`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,z.jsxs)(ei,{variant:`green`,children:[s,` archived`]}),c&&(0,z.jsx)(ei,{variant:`amber`,children:`Claude retention risk detected`})]})]}),(0,z.jsx)(`div`,{className:`h-4`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,z.jsx)(si,{label:`Sources scanned`,value:e.length}),(0,z.jsx)(si,{label:`Live sessions`,value:o}),(0,z.jsx)(si,{label:`Archived`,value:s})]}),(0,z.jsx)(`div`,{className:`h-5`}),(0,z.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map(e=>(0,z.jsxs)(ii,{children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between mb-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h3`,{className:`font-display text-[0.9375rem] font-semibold text-on-surface`,children:e.tool}),(0,z.jsx)(`span`,{className:`font-mono text-xs text-outline`,children:e.path})]}),(0,z.jsx)(`div`,{className:`flex items-center gap-1`,children:e.chips.map(e=>(0,z.jsx)(ei,{variant:e.variant,children:e.label},e.label))})]}),(0,z.jsx)(`div`,{className:`flex flex-wrap gap-4 text-[0.8125rem] text-on-surface-variant mt-2`,children:e.kpis.map(e=>(0,z.jsxs)(`span`,{children:[(0,z.jsxs)(`strong`,{className:`text-on-surface`,children:[e.label,`:`]}),` `,e.value]},e.label))})]},e.tool))}),(0,z.jsx)(`div`,{className:`h-5`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(bn,{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,z.jsx)(bn,{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,z.jsx)(`button`,{className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors bg-transparent border-none`,children:`Add custom path`})]})]})})}function Ia(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 La(){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);function g(){return Promise.all([Zn(),Xn()]).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,...Ia(e.health)})))})}(0,_.useEffect)(()=>{g().catch(()=>s(!0)).finally(()=>a(!1))},[]);async function v(){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 g()}catch{d(`Sync failed. Check the console for details.`)}finally{l(!1)}}async function y(){p(!0),h(null);try{await er()}catch(e){h(e.message)}finally{p(!1)}}return i?(0,z.jsx)(ri,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],children:(0,z.jsx)(`div`,{className:`p-6`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading archive...`})})}):o||!e?(0,z.jsx)(ri,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],children:(0,z.jsx)(`div`,{className:`p-6`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Failed to load archive data.`})})}):(0,z.jsx)(ri,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],actions:(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`button`,{onClick:v,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,z.jsx)(`button`,{onClick:y,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?`Exporting…`:`Export archive`})]}),children:(0,z.jsxs)(`div`,{className:`p-6`,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`font-display text-xl font-semibold text-on-surface`,children:`Your preserved AI work history`}),(0,z.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`A durable library across tools, with clear ownership and visible coverage.`})]}),(0,z.jsx)(ei,{variant:`green`,children:`under your control`})]}),(0,z.jsx)(`div`,{className:`h-4`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[(0,z.jsx)(si,{label:`Archived sessions`,value:e.archived}),(0,z.jsx)(si,{label:`Oldest saved`,value:e.oldest}),(0,z.jsx)(si,{label:`Sources covered`,value:e.sources}),(0,z.jsx)(si,{label:`Last sync`,value:e.lastSync})]}),u&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`h-3`}),(0,z.jsx)(ci,{children:u})]}),m&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`h-3`}),(0,z.jsxs)(ci,{children:[`Export failed: `,m]})]}),(0,z.jsx)(`div`,{className:`h-5`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,z.jsxs)(ii,{className:`bg-white`,children:[(0,z.jsx)(li,{title:`By source`,meta:`coverage`}),(0,z.jsxs)(`table`,{className:`w-full border-collapse text-[0.8125rem]`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Source`}),(0,z.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Archived`}),(0,z.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Status`})]})}),(0,z.jsx)(`tbody`,{children:n.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.source}),(0,z.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.archived}),(0,z.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:(0,z.jsx)(ei,{variant:e.statusVariant,children:e.status})})]},e.source))})]})]}),(0,z.jsxs)(ii,{className:`bg-white`,children:[(0,z.jsx)(li,{title:`Archive posture`,meta:`ops`}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[n.some(e=>e.status===`partial`)&&(0,z.jsxs)(ci,{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,z.jsx)(ci,{children:`All sources healthy. Archive coverage is complete.`}),(0,z.jsx)(ci,{children:(0,z.jsx)(`span`,{className:`font-mono text-xs`,children:`Archive path: ~/.config/heyiam/sessions/`})})]}),(0,z.jsx)(`div`,{className:`h-4`}),(0,z.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,z.jsx)(bn,{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`})})]})]})]})})}function Ra(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 za(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 Ba(e){let t=e.enhancedSessionCount??0,n=e.sessionCount;return t===0?null:t>=n&&e.enhancedAt?`Enhanced ✓`:`${t} of ${n} enhanced`}function Va(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(``),[o]=On(),s=o.get(`filter`);(0,_.useEffect)(()=>{qn().then(t).catch(()=>{}).finally(()=>r(!1))},[]);let c=s===`unenhanced`?e.filter(e=>(e.enhancedSessionCount??0)===0&&!e.enhancedAt):e,l=i?c.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))}):c;return(0,z.jsx)(ri,{chips:[{label:`Projects`}],actions:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(bn,{to:`/search`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Search`}),(0,z.jsx)(bn,{to:`/archive`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Archive`}),(0,z.jsx)(bn,{to:`/settings`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Settings`})]}),children:(0,z.jsxs)(`div`,{className:`p-6`,children:[(0,z.jsx)(li,{title:`Your projects`,meta:`Local project memory built from both live and archived history.`,children:(0,z.jsx)(ei,{variant:`green`,children:`Local-only is a complete state`})}),e.length>3&&(0,z.jsx)(`div`,{className:`mt-3`,children:(0,z.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,z.jsx)(`div`,{className:`h-4`}),n?(0,z.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:`Loading projects...`}):l.length===0?(0,z.jsx)(ii,{children:(0,z.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,z.jsx)(`div`,{className:`flex flex-col gap-3`,children:l.map(e=>(0,z.jsx)(bn,{to:`/project/${encodeURIComponent(e.dirName)}`,className:`no-underline`,children:(0,z.jsxs)(ii,{hover:!0,children:[(0,z.jsx)(`div`,{className:`flex items-center justify-between mb-1`,children:(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`h3`,{className:`font-display text-[0.9375rem] font-semibold text-on-surface`,children:e.name}),za(e).map(e=>(0,z.jsx)(oi,{variant:e.variant,children:e.label},e.label))]}),(0,z.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:e.description}),Ba(e)&&(0,z.jsx)(`div`,{"data-testid":`enhancement-status`,className:`font-mono text-[10px] text-on-surface-variant mt-1`,children:Ba(e)})]})}),(e.dateRange||e.skills.length>0)&&(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 mt-2`,children:[e.dateRange&&(0,z.jsx)(`span`,{className:`font-mono text-[0.6875rem] text-outline`,children:Ra(e.dateRange)}),e.skills.length>0&&(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.skills.slice(0,8).map(e=>(0,z.jsx)(ei,{variant:`violet`,children:e},e)),e.skills.length>8&&(0,z.jsxs)(`span`,{className:`font-mono text-[10px] text-outline`,children:[`+`,e.skills.length-8]})]})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mt-3`,children:[(0,z.jsx)(si,{label:`Sessions`,value:e.sessionCount,valueSize:`text-lg`}),(0,z.jsx)(si,{label:`Time`,value:la(e.totalDuration),valueSize:`text-lg`}),(0,z.jsx)(si,{label:`Lines changed`,value:ua(e.totalLoc),valueSize:`text-lg`}),(0,z.jsx)(si,{label:`Files`,value:e.totalFiles,valueSize:`text-lg`})]})]})},e.dirName))})]})})}function Ha(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}catch{return``}}function Ua({sessions:e,initialSelection:t,projectDirName:n,onClose:r,onSave:i,onSessionDeleted:a}){let[o,s]=(0,_.useState)(()=>new Set(t)),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(()=>new Set),[m,h]=(0,_.useState)(()=>new Set),[g,v]=(0,_.useState)({}),[y,b]=(0,_.useState)({}),[x,S]=(0,_.useState)(()=>new Set),[C,w]=(0,_.useState)(null),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)({}),j=(0,_.useCallback)((e,t)=>{A(n=>({...n,[e]:t})),jr(e,t).catch(()=>{A(n=>({...n,[e]:!t}))})},[]),M=(0,_.useMemo)(()=>e.filter(e=>!e.parentSessionId&&!x.has(e.id)),[e,x]);(0,_.useEffect)(()=>{let e=!1,t=M.map(e=>e.id);return Promise.all(t.map(e=>Ar(e).then(t=>[e,t.included]).catch(()=>[e,!0]))).then(t=>{e||A(e=>{let n={...e};for(let[e,r]of t)n[e]===void 0&&(n[e]=r);return n})}),()=>{e=!0}},[M.map(e=>e.id).join(`,`)]);let N=(0,_.useMemo)(()=>C?e.find(e=>e.id===C)??null:null,[C,e]),P=(0,_.useCallback)(e=>{O(null),w(e)},[]),ee=(0,_.useCallback)(()=>{T||(w(null),O(null))},[T]),F=(0,_.useCallback)(async()=>{if(!C)return;let e=C;E(!0),O(null);try{await kr(n,e),S(t=>{let n=new Set(t);return n.add(e),n}),s(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n}),w(null),a?.(e)}catch(e){O(e.message)}finally{E(!1)}},[C,n,a]),{included:I,enhanced:te,draft:L}=(0,_.useMemo)(()=>{let e=c.toLowerCase(),t=M.filter(t=>e?(y[t.id]||t.title||t.id).toLowerCase().includes(e)||(t.skills??[]).some(t=>t.toLowerCase().includes(e))||(t.source??``).toLowerCase().includes(e):!0),n=[],r=[],i=[],a=(e,t)=>{let n=e.date?new Date(e.date).getTime():0;return(t.date?new Date(t.date).getTime():0)-n};for(let e of t)o.has(e.id)?n.push(e):e.status===`enhanced`||e.status===`uploaded`||g[e.id]===`done`?r.push(e):i.push(e);return{included:n.sort(a),enhanced:r.sort(a),draft:i.sort(a)}},[M,o,c,g,y]),ne=(0,_.useMemo)(()=>{if(o.size!==t.size)return!0;for(let e of o)if(!t.has(e))return!0;return!1},[o,t]),re=(0,_.useCallback)(e=>{p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ie=(0,_.useCallback)(e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),R=(0,_.useCallback)(e=>{h(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ae=(0,_.useCallback)(async()=>{let e=[...m];if(e.length===0)return;let t={};e.forEach(e=>{t[e]=`enhancing`}),v(e=>({...e,...t}));for(let t=0;t<e.length;t+=3){let r=e.slice(t,t+3);await Promise.all(r.map(async e=>{try{let t=await ar(n,e);v(t=>({...t,[e]:`done`})),b(n=>({...n,[e]:t.result.title}))}catch{v(t=>({...t,[e]:`failed`}))}}))}h(new Set)},[m,n]),oe=(0,_.useCallback)(async()=>{d(!0);try{await i(o)}catch(e){console.error(`Failed to save:`,e)}finally{d(!1)}},[o,i]),se=Object.values(g).some(e=>e===`enhancing`);return(0,z.jsxs)(`div`,{className:`fixed inset-0 z-[60] flex items-center justify-center bg-black/40`,children:[(0,z.jsxs)(`div`,{className:`bg-surface-lowest rounded-md border border-ghost shadow-lg w-full max-w-xl max-h-[75vh] flex flex-col`,children:[(0,z.jsxs)(`div`,{className:`px-4 py-3 border-b border-ghost`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[0.8125rem] font-semibold text-on-surface`,children:`Manage Sessions`}),(0,z.jsx)(`button`,{type:`button`,onClick:r,className:`text-on-surface-variant hover:text-on-surface text-lg leading-none`,children:`×`})]}),(0,z.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),placeholder:`Filter sessions...`,className:`w-full bg-surface-lowest border border-ghost rounded-sm px-2 py-1.5 text-xs font-mono text-on-surface placeholder:text-outline outline-none focus:border-primary`})]}),(0,z.jsxs)(`div`,{className:`flex-1 overflow-y-auto`,children:[(0,z.jsx)(Wa,{label:`Included`,count:I.length,borderColor:`border-primary`,collapsed:f.has(`included`),onToggle:()=>re(`included`),children:I.map(e=>(0,z.jsx)(Ga,{session:e,displayTitle:y[e.id],borderColor:`border-primary`,checked:!0,onToggle:()=>ie(e.id),onDelete:e.status===`uploaded`?()=>P(e.id):void 0,transcriptIncluded:k[e.id]??!0,onToggleTranscript:t=>j(e.id,t)},e.id))}),te.length>0&&(0,z.jsx)(Wa,{label:`Enhanced`,count:te.length,borderColor:`border-green`,collapsed:f.has(`enhanced`),onToggle:()=>re(`enhanced`),children:te.map(e=>(0,z.jsx)(Ga,{session:e,displayTitle:y[e.id],borderColor:`border-green`,checked:!1,onToggle:()=>ie(e.id),onDelete:e.status===`uploaded`?()=>P(e.id):void 0,transcriptIncluded:k[e.id]??!0,onToggleTranscript:t=>j(e.id,t)},e.id))}),L.length>0&&(0,z.jsx)(Wa,{label:`Draft`,count:L.length,borderColor:`border-transparent`,collapsed:f.has(`draft`),onToggle:()=>re(`draft`),action:m.size>0&&!se?(0,z.jsxs)(`button`,{type:`button`,onClick:ae,className:`font-mono text-[10px] text-primary hover:underline`,children:[`Enhance `,m.size,` session`,m.size===1?``:`s`]}):void 0,children:L.map(e=>(0,z.jsx)(Ka,{session:e,checked:m.has(e.id),status:g[e.id]??`idle`,enhancedTitle:y[e.id],onToggle:()=>R(e.id),onInclude:()=>{g[e.id]===`done`&&ie(e.id)}},e.id))}),I.length===0&&te.length===0&&L.length===0&&(0,z.jsx)(`div`,{className:`text-center py-8 text-xs text-on-surface-variant`,children:`No sessions match filter.`})]}),(0,z.jsxs)(`div`,{className:`px-4 py-3 border-t border-ghost`,children:[ne&&(0,z.jsx)(`div`,{className:`text-[10px] text-amber-600 mb-2 font-mono`,children:`Session set changed. Re-enhance to update the narrative.`}),(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsxs)(`span`,{className:`text-xs text-on-surface-variant font-mono`,children:[o.size,` included`]}),(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:r,className:`font-mono text-[0.8125rem] text-on-surface-variant hover:text-on-surface px-3 py-1`,children:`Cancel`}),(0,z.jsx)(`button`,{type:`button`,disabled:o.size===0||u||se,onClick:oe,className:`font-mono text-[0.8125rem] text-on-primary bg-primary rounded-md px-3 py-1 hover:bg-primary-hover transition-colors disabled:opacity-50`,children:u?`Saving...`:`Save`})]})]})]})]}),C&&N&&(0,z.jsx)(ui,{title:`Delete session`,message:`Delete this session? This removes it from heyi.am permanently.`,details:N.title||N.id,confirmLabel:`Delete`,destructive:!0,busy:T,error:D,onConfirm:F,onCancel:ee})]})}function Wa({label:e,count:t,borderColor:n,collapsed:r,onToggle:i,action:a,children:o}){return(0,z.jsxs)(`div`,{className:`border-b border-ghost last:border-b-0`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:i,className:`flex items-center justify-between w-full px-4 py-2 hover:bg-surface-low`,"aria-expanded":!r,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline`,children:[e,` (`,t,`)`]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[a&&(0,z.jsx)(`span`,{onClick:e=>e.stopPropagation(),children:a}),(0,z.jsx)(`span`,{className:`text-[10px] text-outline`,children:r?`+`:`−`})]})]}),!r&&(0,z.jsx)(`div`,{className:`pb-1`,children:o})]})}function Ga({session:e,displayTitle:t,borderColor:n,checked:r,onToggle:i,onDelete:a,transcriptIncluded:o,onToggleTranscript:s}){let c=t||e.title||`Session ${e.id.slice(0,8)}`;return(0,z.jsxs)(`div`,{className:`flex flex-col px-4 py-2 hover:bg-surface-low border-l-2 ${n}`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsxs)(`label`,{className:`flex items-center gap-3 flex-1 min-w-0 cursor-pointer`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:r,onChange:i,className:`accent-primary flex-shrink-0`}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsx)(`div`,{className:`text-sm text-on-surface truncate`,children:c}),(0,z.jsxs)(`div`,{className:`font-mono text-[10px] text-on-surface-variant`,children:[e.date?Ha(e.date):``,e.durationMinutes>0&&` · ${la(e.durationMinutes)}`,e.linesOfCode>0&&` · ${ua(e.linesOfCode)}`,e.source&&(0,z.jsx)(`span`,{className:`ml-1.5 text-outline`,children:e.source})]})]})]}),a&&(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a()},"aria-label":`Remove "${c}" from heyi.am`,title:`Remove from heyi.am`,className:`flex-shrink-0 w-6 h-6 flex items-center justify-center rounded-sm text-on-surface-variant hover:text-error hover:bg-surface-lowest`,children:(0,z.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,"aria-hidden":`true`,children:(0,z.jsx)(`path`,{d:`M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14`})})})]}),s&&(0,z.jsxs)(`label`,{className:`mt-1 ml-7 flex items-center gap-2 font-mono text-[10px] text-on-surface-variant cursor-pointer select-none`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:o??!0,onChange:e=>s(e.target.checked),className:`accent-primary`,"aria-label":`Include transcript for "${c}"`}),(0,z.jsx)(`span`,{children:`Include transcript`})]})]})}function Ka({session:e,checked:t,status:n,enhancedTitle:r,onToggle:i,onInclude:a}){let o=n===`done`;return(0,z.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-2 hover:bg-surface-low border-l-2 border-transparent`,children:[o?(0,z.jsx)(`input`,{type:`checkbox`,checked:!1,onChange:a,className:`accent-primary flex-shrink-0`,title:`Include in project`}):n===`enhancing`?(0,z.jsx)(`span`,{className:`w-4 h-4 border-2 border-primary border-t-transparent rounded-full animate-spin flex-shrink-0`}):(0,z.jsx)(`input`,{type:`checkbox`,checked:t,onChange:i,className:`accent-amber-500 flex-shrink-0`,title:`Select for enhancement`}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`text-sm text-on-surface truncate`,children:[o?(0,z.jsx)(z.Fragment,{children:r||e.title||`Session ${e.id.slice(0,8)}`}):(0,z.jsx)(`span`,{className:`text-on-surface-variant`,children:e.title||`Session ${e.id.slice(0,8)}`}),n===`idle`&&(0,z.jsx)(`span`,{className:`ml-1.5 font-mono text-[9px] text-amber-600 bg-amber-50 px-1 py-0.5 rounded-sm`,children:`draft`}),n===`enhancing`&&(0,z.jsx)(`span`,{className:`ml-1.5 font-mono text-[9px] text-primary`,children:`enhancing...`}),n===`done`&&(0,z.jsx)(`span`,{className:`ml-1.5 font-mono text-[9px] text-green`,children:`enhanced`}),n===`failed`&&(0,z.jsx)(`span`,{className:`ml-1.5 font-mono text-[9px] text-error`,children:`failed`})]}),(0,z.jsxs)(`div`,{className:`font-mono text-[10px] text-on-surface-variant`,children:[e.date?Ha(e.date):``,e.durationMinutes>0&&` · ${la(e.durationMinutes)}`,e.linesOfCode>0&&` · ${ua(e.linesOfCode)}`,e.source&&(0,z.jsx)(`span`,{className:`ml-1.5 text-outline`,children:e.source})]})]})]})}function qa(e,t){let n=[],r=/@keyframes\s+[\w-]+\s*\{/g,i,a=[];for(;(i=r.exec(e))!==null;){let t=1,r=i.index+i[0].length;for(;r<e.length&&t>0;)e[r]===`{`?t++:e[r]===`}`&&t--,r++;n.push(e.substring(i.index,r)),a.push([i.index,r])}let o=e;for(let e=a.length-1;e>=0;e--)o=o.substring(0,a[e][0])+o.substring(a[e][1]);return o=o.replace(/(?:^|\n)\s*:root\s*\{/g,`
21
+ :scope {`).replace(/(?:^|\n)\s*body\s*\{/g,`
22
+ :scope {`).replace(/\*\s*,\s*\*::before\s*,\s*\*::after\s*\{[^}]*\}/g,``),`@scope (#${t}) {\n${o}\n}\n${n.join(`
23
+ `)}`}var Ja=`[class*="-section"], [class*="sc-"], [class*="-hero"], .fade-up, .fade-in, .reveal, [class*="anim-"], .strata-layer, [class*="cos-"]`;function Ya(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function Xa(e){return qa(e,`session-liquid-render`)}function Za({session:e,projectDirName:t,onClose:n,isDark:r,onSessionUpdated:i}){let[a,o]=(0,_.useState)(e),[s,c]=(0,_.useState)(!0),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1),p=et(),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(``),[y,b]=(0,_.useState)([]),[x,S]=(0,_.useState)([]),[C,w]=(0,_.useState)([]),[T,E]=(0,_.useState)(``),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(null),j=(0,_.useRef)(null),M=(0,_.useRef)(null);(0,_.useEffect)(()=>{M.current?.scrollTo(0,0)},[e.id]),(0,_.useEffect)(()=>{Yn(t,e.id).then(e=>o(e)).catch(()=>{}).finally(()=>c(!1))},[t,e.id]),(0,_.useEffect)(()=>{Pr(e.id).then(e=>{e&&(O(e.html),A(e.css))}).catch(()=>{})},[e.id]),(0,_.useEffect)(()=>{if(l)return;let e=j.current;if(!D||!e)return;e.textContent=``;let t=document.createRange();t.selectNodeContents(e);let n=t.createContextualFragment(D);e.appendChild(n),requestAnimationFrame(()=>{e.querySelectorAll(Ja).forEach((e,t)=>{setTimeout(()=>{e.classList.add(`visible`),e.style.animationPlayState=`running`,e.style.opacity=`1`},t*50)})})},[D,l]);let N=(0,_.useCallback)(e=>{e.key===`Escape`&&n()},[n]);(0,_.useEffect)(()=>(document.addEventListener(`keydown`,N),()=>document.removeEventListener(`keydown`,N)),[N]);let P=a.status===`enhanced`||a.status===`uploaded`,ee=(0,_.useCallback)(()=>{h(a.title||``),v(a.developerTake||``),b([...a.skills||[]]),S((a.qaPairs||[]).map(e=>({...e}))),w((a.executionPath||[]).map(e=>({stepNumber:e.stepNumber,title:e.title,body:e.description}))),u(!0)},[a]),F=(0,_.useCallback)(()=>{u(!1),E(``)},[]),I=(0,_.useCallback)(async()=>{f(!0);try{await ir(a.id,{title:m,developerTake:g,skills:y,qaPairs:x,executionSteps:C}),o(await Yn(t,a.id));let e=await Pr(a.id);e&&(O(e.html),A(e.css)),u(!1),i?.()}catch(e){console.error(`Failed to save session edits:`,e)}finally{f(!1)}},[a.id,t,m,g,y,x,C,i]),te=(0,_.useCallback)(()=>{let e=T.trim();e&&!y.includes(e)&&b([...y,e]),E(``)},[T,y]),L=a.children&&a.children.length>0;return(0,z.jsxs)(`div`,{className:`absolute inset-0 z-50 flex flex-col`,children:[(0,z.jsxs)(`div`,{className:`sticky top-0 z-10 border-b px-6 py-3 flex items-center gap-3 ${r?`bg-black border-white/10`:`bg-surface-lowest border-ghost`}`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:n,className:`font-mono text-[0.8125rem] rounded-md px-3 py-1 cursor-pointer transition-colors ${r?`text-white/60 hover:text-white/90 bg-white/5 border border-white/10`:`text-on-surface-variant hover:text-on-surface bg-surface-low border border-surface-high`}`,children:`← Back to project`}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>{n(),p(`/session/${encodeURIComponent(a.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 →`}),P&&!l&&(0,z.jsx)(`button`,{type:`button`,onClick:ee,className:`font-mono text-[0.8125rem] text-on-surface-variant bg-surface-low border border-ghost rounded-md px-3 py-1 cursor-pointer hover:text-on-surface hover:bg-surface-high transition-colors ml-auto`,children:`Edit`}),l&&(0,z.jsxs)(`div`,{className:`flex items-center gap-2 ml-auto`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:F,className:`font-mono text-[0.8125rem] text-on-surface-variant hover:text-on-surface px-3 py-1 cursor-pointer transition-colors`,children:`Cancel`}),(0,z.jsx)(`button`,{type:`button`,onClick:I,disabled:d,className:`font-mono text-[0.8125rem] text-on-primary bg-primary rounded-md px-3 py-1 cursor-pointer hover:bg-primary-hover transition-colors disabled:opacity-50`,children:d?`Saving...`:`Save`})]})]}),(0,z.jsx)(`div`,{ref:M,className:`flex-1 overflow-y-auto ${r?``:`bg-surface`}`,style:r?{background:`#000`}:void 0,children:(0,z.jsx)(`div`,{className:`max-w-4xl mx-auto p-8`,children:l?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(Qa,{children:`Title`}),(0,z.jsx)(`input`,{type:`text`,value:m,onChange:e=>h(e.target.value),maxLength:200,className:`w-full text-xl font-display font-bold px-3 py-2 rounded-sm border border-ghost bg-surface-lowest text-on-surface`})]}),(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(Qa,{children:`Developer Take`}),(0,z.jsx)(`textarea`,{value:g,onChange:e=>v(e.target.value),maxLength:2e3,rows:4,className:`w-full text-[0.9375rem] leading-relaxed px-3 py-2 rounded-sm border border-ghost bg-surface-lowest text-on-surface resize-y`})]}),(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(Qa,{children:`Skills`}),(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mb-2`,children:y.map((e,t)=>(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 text-xs font-mono rounded-sm bg-violet-50 text-violet-700 border border-violet-200`,children:[e,(0,z.jsx)(`button`,{type:`button`,onClick:()=>b(y.filter((e,n)=>n!==t)),className:`text-violet-400 hover:text-violet-700 text-sm leading-none`,children:`×`})]},t))}),(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(`input`,{type:`text`,value:T,onChange:e=>E(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),te())},placeholder:`Add skill...`,className:`flex-1 text-xs font-mono px-2 py-1.5 rounded-sm border border-ghost bg-surface-lowest text-on-surface placeholder:text-outline`}),(0,z.jsx)(`button`,{type:`button`,onClick:te,className:`text-xs font-mono text-primary hover:underline px-2`,children:`Add`})]})]}),C.length>0&&(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(Qa,{children:`Execution Path`}),C.map((e,t)=>(0,z.jsxs)(`div`,{className:`flex gap-3 items-start py-2.5 border-b border-ghost last:border-b-0`,children:[(0,z.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 mt-1.5`,children:e.stepNumber}),(0,z.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,z.jsx)(`input`,{type:`text`,value:e.title,onChange:e=>{let n=[...C];n[t]={...n[t],title:e.target.value},w(n)},className:`w-full text-sm font-semibold px-2 py-1 rounded-sm border border-ghost bg-surface-lowest text-on-surface`}),(0,z.jsx)(`textarea`,{value:e.body,onChange:e=>{let n=[...C];n[t]={...n[t],body:e.target.value},w(n)},rows:2,className:`w-full text-[0.8125rem] leading-relaxed px-2 py-1 rounded-sm border border-ghost bg-surface-lowest text-on-surface-variant resize-y`})]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>w(C.filter((e,n)=>n!==t)),className:`text-on-surface-variant hover:text-error text-sm mt-1.5`,children:`×`})]},t)),(0,z.jsx)(`button`,{type:`button`,onClick:()=>w([...C,{stepNumber:C.length+1,title:``,body:``}]),className:`text-xs font-mono text-primary hover:underline mt-2`,children:`+ Add step`})]}),(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(Qa,{children:`Questions & Answers`}),x.map((e,t)=>(0,z.jsxs)(`div`,{className:`py-3 border-b border-ghost last:border-b-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-2 mb-1.5`,children:[(0,z.jsx)(`input`,{type:`text`,value:e.question,onChange:e=>{let n=[...x];n[t]={...n[t],question:e.target.value},S(n)},className:`flex-1 text-[0.9375rem] font-semibold px-2 py-1 rounded-sm border border-ghost bg-surface-lowest text-on-surface`}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>S(x.filter((e,n)=>n!==t)),className:`text-on-surface-variant hover:text-error text-sm`,children:`×`})]}),(0,z.jsx)(`textarea`,{value:e.answer,onChange:e=>{let n=[...x];n[t]={...n[t],answer:e.target.value},S(n)},rows:2,className:`w-full text-sm leading-relaxed px-2 py-1 rounded-sm border border-ghost bg-surface-lowest text-on-surface-variant resize-y`})]},t)),(0,z.jsx)(`button`,{type:`button`,onClick:()=>S([...x,{question:``,answer:``}]),className:`text-xs font-mono text-primary hover:underline mt-2`,children:`+ Add Q&A`})]})]}):(0,z.jsx)(z.Fragment,{children:D?(0,z.jsxs)(z.Fragment,{children:[k&&(0,z.jsx)(`style`,{children:Xa(k)}),(0,z.jsx)(`div`,{id:`session-liquid-render`,ref:j})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface mb-2`,children:a.title}),(0,z.jsxs)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant mb-4`,children:[Ya(a.date),a.source&&` · ${a.source}`,a.context&&` · ${a.context}`]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-5`,children:[(0,z.jsx)($a,{label:`Active Time`,value:la(a.durationMinutes),primary:!0,children:L&&(0,z.jsx)(eo,{you:la(Math.max(0,a.durationMinutes-a.children.reduce((e,t)=>e+t.durationMinutes,0))),agent:la(a.children.reduce((e,t)=>e+t.durationMinutes,0))})}),(0,z.jsx)($a,{label:`Turns`,value:a.turns,children:L&&(0,z.jsx)(eo,{you:`Human`,agent:`${a.childCount??a.children.length} agents`})}),(0,z.jsx)($a,{label:`Files`,value:a.filesChanged?.length===1&&a.filesChanged[0]?.path===`(aggregate)`?`—`:a.filesChanged?.length??`—`}),(0,z.jsx)($a,{label:`Lines changed`,value:ua(a.linesOfCode),children:L&&(0,z.jsx)(eo,{you:ua(Math.max(0,a.linesOfCode-a.children.reduce((e,t)=>e+t.linesOfCode,0))),agent:ua(a.children.reduce((e,t)=>e+t.linesOfCode,0))})})]}),a.developerTake&&(0,z.jsx)(`p`,{className:`text-[0.9375rem] leading-relaxed text-on-surface border-l-[3px] border-primary pl-3 mb-5`,children:a.developerTake}),a.skills&&a.skills.length>0&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mb-5`,children:a.skills.map(e=>(0,z.jsx)(ei,{variant:`violet`,children:e},e))}),a.turns>=50&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsxs)(Qa,{children:[`Session Activity · `,a.turns,` turns over `,la(a.durationMinutes)]}),(0,z.jsx)(ca,{sessions:[a],maxHeight:200})]}),s&&(0,z.jsx)(`p`,{className:`text-sm text-on-surface-variant mb-4`,children:`Loading full session data...`}),a.executionPath&&a.executionPath.length>0&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsx)(Qa,{children:`Execution Path`}),a.executionPath.map(e=>(0,z.jsxs)(`div`,{className:`flex gap-3 items-start py-2.5 border-b border-ghost last:border-b-0`,children:[(0,z.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,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-0.5`,children:e.title}),(0,z.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.description})]})]},e.stepNumber))]}),a.toolBreakdown&&a.toolBreakdown.length>0&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsx)(Qa,{children:`Tool Usage`}),a.toolBreakdown.map(e=>(0,z.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,z.jsx)(`span`,{className:`text-on-surface truncate min-w-0`,children:e.tool}),(0,z.jsx)(`span`,{className:`text-on-surface-variant flex-shrink-0 ml-3`,children:e.count})]},e.tool))]}),a.qaPairs&&a.qaPairs.length>0&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsx)(Qa,{children:`Questions & Answers`}),a.qaPairs.map((e,t)=>(0,z.jsxs)(`div`,{className:`py-3 border-b border-ghost last:border-b-0`,children:[(0,z.jsx)(`div`,{className:`font-semibold text-[0.9375rem] text-on-surface mb-2`,children:e.question}),(0,z.jsx)(`div`,{className:`text-sm text-on-surface-variant leading-relaxed`,children:e.answer})]},t))]})]})})})})]})}function Qa({children:e}){return(0,z.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,z.jsxs)(`div`,{className:`text-center p-3 border border-ghost rounded-sm bg-surface-lowest`,children:[(0,z.jsx)(`div`,{className:`font-mono text-xl font-bold ${n?`text-primary`:`text-on-surface`}`,children:t}),(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mt-1`,children:e}),r]})}function eo({you:e,agent:t}){return(0,z.jsxs)(`div`,{className:`flex justify-center gap-2 mt-1 font-mono text-[9px] text-on-surface-variant`,children:[(0,z.jsx)(`span`,{className:`text-primary font-semibold`,children:e}),(0,z.jsx)(`span`,{className:`text-green font-semibold`,children:t})]})}var to=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 M(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 N(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,N(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,`$&/`)+`/`),N(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+=N(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+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(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 F=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)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(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=I,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:ee}},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,F)}catch(e){F(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`})),no=o(((e,t)=>{t.exports=to()})),ro=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})),io=o(((e,t)=>{t.exports=ro()})),ao=c(no(),1),V=io(),oo={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`},so=`#084471`,co=`#d1d5db`,H=`'IBM Plex Mono', monospace`,lo=`#6b7280`,U=`#9ca3af`,uo=[`#e11d48`,`#2563eb`,`#7e22ce`,`#ea580c`,`#0d9488`,`#6366f1`,`#c026d3`,`#0891b2`,`#ca8a04`,`#16a34a`,`#be185d`,`#4f46e5`,`#0e7490`,`#b45309`,`#059669`];function fo(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 po(e){if(!e)return lo;let t=e.toLowerCase();if(oo[t])return oo[t];for(let[e,n]of Object.entries(oo))if(t.includes(e)||e.includes(t))return n;return uo[fo(t)%uo.length]}function mo(e){return new Date(e.date).getTime()}function ho(e){if(e.endTime)return new Date(e.endTime).getTime();let t=e.wallClockMinutes??e.durationMinutes;return mo(e)+t*6e4}function go(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 _o(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 vo(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 yo=36e5,bo=160,xo=480;function So(e){return Math.min(Math.max(e*3,bo),xo)}function Co(e){if(!e.length)return[];let t=[...e].sort((e,t)=>mo(e)-mo(t)),n=[],r=null;for(let e of t){let t=mo(e),i=ho(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>yo&&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 wo(e){let t=[...e].sort((e,t)=>mo(e)-mo(t)),n=[],r=new Map;for(let e of t){let t=mo(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]=ho(e)+a,r.set(e.id,i)}return r}function To(e,t,n,r,i){return n===t?r:r+(e-t)/(n-t)*(i-r)}function Eo(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 Do=2*6e4;function Oo(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+Do?(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 ko(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 Ao(e){let t=Eo(e);return{title:e.title,timestamp:_o(e.date),duration:vo(e.wallClockMinutes??e.durationMinutes),linesOfCode:e.linesOfCode,agentCount:t.length,session:e}}var jo=6,Mo=30;function No(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:po(e),duration:vo(t),count:n}))}function Po(e){return e.map(e=>{let t=Eo(e.session);return{title:e.session.title,timestamp:_o(e.session.date),agents:No(t),totalAgents:t.length,xStart:e.xStart,xEnd:e.xEnd}})}var Fo=30,Io=56,Lo=50,Ro=140,zo=4,Bo=300,Vo=1200,Ho=140,Uo=32;function Wo(e){return e<=5?44:e<=10?32:e<=20?22:16}function Go(e,t){return e.length<=t?e:e.slice(0,t-1)+`…`}function Ko(e,t,n,r){if(r===n)return`M ${e} ${n} L ${t} ${n}`;let i=Math.min(Lo,(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 qo=8;function Jo(e,t=qo,n){let r=n?.main??so,i=n?.muted??U,a=[],o=[],s=[],c=!1,l=48,u=0,d=0,f=l,p=(e,t)=>{e<u&&(u=e),e+t>d&&(d=e+t)};for(let n of e){if(n.type===`gap`){o.push({path:`M ${l} 0 L ${l+72} 0`,color:i,width:1.5,dashed:!0}),a.push({kind:`gap`,pos:{x:l,y:16},label:go(n.durationMs),durationMs:n.durationMs}),p(-8,40),l+=72+Io;continue}if(n.type===`session`){let e=n.session,t=Eo(e),i=e.durationMinutes,c=t.length>0?Math.max(bo,t.length*30+100):bo,u=t.length>0?Math.min(Math.max(i*zo,c),Vo):Math.min(Math.max(So(i),bo),xo),d=vo(e.durationMinutes),f=Ao(e),m=_o(e.date);if(t.length>0){let n=t.slice(0,Fo),i=mo(e),c=i+e.durationMinutes*6e4,h=Math.max(c,...n.map(e=>(e.date?new Date(e.date).getTime():i)+e.durationMinutes*6e4)),g=Oo(n,i),_=Math.max(...g.map(e=>e.children.length),1),v=Wo(_),y=Math.min((_-1)*v,120),b=l,x=l+u,S=0-y/2-16,C=b+Lo*2;a.push({kind:`label`,pos:{x:C+8,y:S},title:Go(e.title,Uo),sub:d,timestamp:m,color:r,above:!0,session:e,tooltip:f}),p(S-4,16),a.push({kind:`dot`,pos:{x:b,y:0},color:r,size:`lg`,tooltip:f}),o.push({path:`M ${b} 0 L ${x} 0`,color:r,width:1.5});for(let e of g){let t=e.children.length,n=Math.min((t-1)*v,y),r=t>1?n/(t-1):0,a=0-n/2,s=To(e.startMs,i,h,b,x);e.children.forEach((e,t)=>{let n=a+t*r,c=po(e.role),l=(e.date?new Date(e.date).getTime():i)+e.durationMinutes*6e4,u=To(Math.min(l,h),i,h,b,x),d=Math.max(u,s+100);o.push({path:Ko(s,Math.min(d,x),0,n),color:c,width:1.5}),p(n-2,4)})}a.push({kind:`dot`,pos:{x,y:0},color:r,size:`lg`,tooltip:f}),s.push({session:e,xStart:b,xEnd:x}),l=x+Io}else a.push({kind:`label`,pos:{x:l+14,y:-16},title:Go(e.title,Uo),sub:d,timestamp:m,color:r,above:!0,session:e,tooltip:f}),p(-20,16),a.push({kind:`dot`,pos:{x:l,y:0},color:r,size:`sm`,tooltip:f}),a.push({kind:`dot`,pos:{x:l+u,y:0},color:r,size:`sm`,tooltip:f}),o.push({path:`M ${l} 0 L ${l+u} 0`,color:r,width:3}),s.push({session:e,xStart:l,xEnd:l+u}),l+=u+Io;continue}if(n.type===`concurrent`){let e=[...n.sessions].sort((e,t)=>mo(e)-mo(t)),u=e.slice(0,t),d=wo(u),f=Math.max(...d.values())+1,m=e.length-u.length;m>0&&(c=!0);let h=Math.max(...u.map(e=>Eo(e).length),0),g=h>15?Math.max(Ro,h*5+60):h>5?Math.max(Ro,h*8+40):Ro,_=n.startMs,v=n.endMs,y=(v-_)/6e4,b=Math.min(Math.max(y*zo,Bo),Vo),x=l,S=l+b,C=Array(f).fill(0);for(let n of e.slice(0,t)){let e=d.get(n.id)??0,t=0+e*g,i=Eo(n),c=Ao(n),l=_o(n.date),u=vo(n.durationMinutes),f=To(mo(n),_,v,x,S),m=f+Math.min(Math.max(n.durationMinutes*zo,20),S-f);if(i.length>0){let d=i.slice(0,Fo),h=mo(n),_=ho(n),{laneMap:v,laneCount:y}=ko(d,h),b=Wo(y),x=Math.min((y-1)*b,g-40),S=y>1?x/(y-1):0,w=t-x/2,T=w-32;(C[e]===0||f>=C[e])&&(a.push({kind:`label`,pos:{x:f+8,y:T},title:Go(n.title,Uo),sub:u,timestamp:l,color:r,above:!0,session:n,tooltip:c}),C[e]=f+Ho),p(T-4,28),a.push({kind:`dot`,pos:{x:f,y:t},color:r,size:`lg`,tooltip:c}),o.push({path:`M ${f} ${t} L ${m} ${t}`,color:r,width:1.5});let E=y>15?.4:y>8?.6:.8,D=y>15?1:1.5;d.forEach(e=>{let n=w+(v.get(e.id)??0)*S,r=po(e.role),i=e.date?new Date(e.date).getTime():h,a=i+e.durationMinutes*6e4,s=To(i,h,_,f,m),c=Math.min(To(Math.min(a,_),h,_,f,m),m),l=Math.max(c,s+60);o.push({path:Ko(s,Math.min(l,m),t,n),color:r,width:D,opacity:E}),p(n-2,4)}),a.push({kind:`dot`,pos:{x:m,y:t},color:r,size:`lg`,tooltip:c}),s.push({session:n,xStart:f,xEnd:m})}else (C[e]===0||f>=C[e])&&(a.push({kind:`label`,pos:{x:f+8,y:t-28},title:Go(n.title,Uo),sub:u,timestamp:l,color:r,above:!0,session:n,tooltip:c}),C[e]=f+Ho),p(t-32,28),a.push({kind:`dot`,pos:{x:f,y:t},color:r,size:`sm`,tooltip:c}),a.push({kind:`dot`,pos:{x:m,y:t},color:r,size:`sm`,tooltip:c}),o.push({path:`M ${f} ${t} L ${m} ${t}`,color:r,width:3}),s.push({session:n,xStart:f,xEnd:m});p(t-4,8)}if(m>0){let e=0+f*g;a.push({kind:`label`,pos:{x:x+8,y:e},title:`+${m} more sessions`,color:i,above:!1}),p(e,16)}l=S+Io}}let m=l-Io,h=-u+4,g=d-u+8;return{nodes:a.map(e=>({...e,pos:{x:e.pos.x,y:e.pos.y+h}})),tracks:o,sessionRanges:s,hasConcurrentOverflow:c,threadStart:f,threadEnd:m,totalW:l+48,totalH:Math.max(g,100),centerY:0+h}}function Yo(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 Xo({entry:e,textSecondaryColor:t,textMutedColor:n}){if(!e||e.agents.length===0)return null;let r=t??lo,i=n??U,a=e.agents.slice(0,jo),o=e.agents.length-a.length,s=e.totalAgents>=Mo;return(0,V.jsxs)(`div`,{style:{fontFamily:H,fontSize:10,display:`flex`,alignItems:`baseline`,gap:14,padding:`6px 0`,minHeight:28},children:[s?(0,V.jsxs)(`span`,{style:{fontSize:10,fontWeight:700,letterSpacing:`0.06em`,color:`#d97706`,flexShrink:0},children:[`LEGENDARY AGENTIC USE — `,e.totalAgents,` agents:`]}):(0,V.jsxs)(`span`,{style:{fontSize:10,color:r,fontWeight:600,flexShrink:0},children:[e.totalAgents,` agents:`]}),(0,V.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:10,alignItems:`center`},children:[a.map(e=>(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5},children:[(0,V.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:e.color,boxShadow:`0 0 4px ${e.color}40`,flexShrink:0}}),(0,V.jsx)(`span`,{style:{fontWeight:600,color:e.color,letterSpacing:`0.03em`},children:e.role.toUpperCase()}),e.count>1&&(0,V.jsxs)(`span`,{style:{color:i},children:[`×`,e.count]}),(0,V.jsx)(`span`,{style:{color:i},children:e.duration})]},e.role)),o>0&&(0,V.jsxs)(`span`,{style:{color:i,fontStyle:`italic`},children:[`+`,o,` more`]})]})]})}function Zo({data:e,pos:t}){return(0,V.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:H,fontSize:11,lineHeight:1.5,whiteSpace:`nowrap`,zIndex:100,pointerEvents:`none`,boxShadow:`0 4px 16px rgba(0,0,0,0.18)`},children:[(0,V.jsx)(`div`,{style:{fontWeight:700,fontSize:12,marginBottom:4,color:`#fff`},children:e.title}),(0,V.jsx)(`div`,{style:{color:`#d1d5db`},children:e.timestamp}),(0,V.jsxs)(`div`,{style:{display:`flex`,gap:16,marginTop:4},children:[(0,V.jsx)(`span`,{children:e.duration}),(0,V.jsxs)(`span`,{children:[e.linesOfCode.toLocaleString(),` lines`]}),e.agentCount>0&&(0,V.jsxs)(`span`,{children:[e.agentCount,` agents`]})]})]})}function Qo({sessions:e,onSessionClick:t,maxHeight:n,accentColor:r,isDark:i}){let a=r??(i?`#f97316`:so),o=i?`rgba(255,255,255,0.15)`:co,s=i?`rgba(255,255,255,0.65)`:lo,c=i?`rgba(255,255,255,0.4)`:U,l=i?`#111`:`#f8f9fb`,u=(0,ao.useMemo)(()=>Co(e),[e]),[d,f]=(0,ao.useState)(!1),[p,m]=(0,ao.useState)(!1),[h,g]=(0,ao.useState)(!1),_=(0,ao.useRef)(null),v=d?999:qo,y=(0,ao.useMemo)(()=>({main:a,muted:c}),[a,c]),b=(0,ao.useMemo)(()=>Jo(u,v,y),[u,v,y]),x=(0,ao.useMemo)(()=>Po(b.sessionRanges),[b.sessionRanges]),S=(0,ao.useRef)(null),[C,w]=(0,ao.useState)(null),[T,E]=(0,ao.useState)(null);(0,ao.useEffect)(()=>{let e=x.filter(e=>e.agents.length>0);e.length>0&&E(e[0])},[x]);let D=(0,ao.useCallback)(()=>{let e=S.current;if(!e)return;let t=x.filter(e=>e.agents.length>0),n=Yo(e.scrollLeft,e.clientWidth,t);n&&E(n)},[x]),O=(0,ao.useCallback)(()=>{if(h){_.current&&cancelAnimationFrame(_.current),_.current=null,g(!1);return}g(!0);let e=()=>{let t=S.current;if(t){if(t.scrollLeft>=t.scrollWidth-t.clientWidth-1){g(!1),_.current=null;return}t.scrollLeft+=1.2,_.current=requestAnimationFrame(e)}};_.current=requestAnimationFrame(e)},[h]);(0,ao.useEffect)(()=>()=>{_.current&&cancelAnimationFrame(_.current)},[]),(0,ao.useEffect)(()=>{if(!p)return;let e=e=>{e.key===`Escape`&&m(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[p]);let k=(0,ao.useCallback)((e,t)=>{e&&w({tooltip:e,pos:t})},[]),A=(0,ao.useCallback)(()=>w(null),[]);if(!e.length)return(0,V.jsx)(`div`,{"data-testid":`work-timeline-empty`,children:(0,V.jsx)(`p`,{style:{fontFamily:H,fontSize:`0.8125rem`,color:s},children:`No sessions to display.`})});let j=x.some(e=>e.agents.length>0),M=(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12},children:[(0,V.jsx)(`div`,{style:{flex:1,minWidth:0},children:j&&(0,V.jsx)(Xo,{entry:T,textSecondaryColor:s,textMutedColor:c})}),(0,V.jsx)(`div`,{style:{display:`flex`,gap:6,flexShrink:0},children:b.totalW>600&&(0,V.jsx)(`button`,{onClick:O,style:(e=>({padding:`3px 10px`,fontSize:10,fontWeight:600,border:`1px solid ${o}`,borderRadius:4,background:e?a:i?`rgba(255,255,255,0.08)`:`#fff`,color:e?`#fff`:a,cursor:`pointer`,fontFamily:H,letterSpacing:`0.03em`,flexShrink:0}))(h),children:h?`PAUSE`:`PLAY`})})]}),(0,V.jsx)(`div`,{ref:S,onScroll:D,style:{overflowX:`auto`,overflowY:p?`auto`:`hidden`,WebkitOverflowScrolling:`touch`,paddingBottom:12,maxHeight:p?`calc(100vh - 80px)`:void 0},children:(0,V.jsxs)(`div`,{style:{position:`relative`,width:b.totalW,height:b.totalH,fontFamily:H},children:[(0,V.jsxs)(`svg`,{style:{position:`absolute`,inset:0,width:b.totalW,height:b.totalH,pointerEvents:`none`},children:[(0,V.jsx)(`line`,{x1:b.threadStart,y1:b.centerY,x2:b.threadEnd,y2:b.centerY,stroke:o,strokeWidth:1.5}),b.tracks.map((e,t)=>(0,V.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, ${b.centerY})`},`t-${t}`))]}),b.nodes.map((e,n)=>{if(e.kind===`label`)return(0,V.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?()=>k(e.tooltip,e.pos):void 0,onMouseLeave:e.tooltip?A:void 0,children:[(0,V.jsx)(`span`,{style:{fontSize:12,fontWeight:700,color:e.color,letterSpacing:`0.01em`,display:`block`},children:e.title}),(0,V.jsxs)(`span`,{style:{fontSize:10,color:c,display:`flex`,gap:8,marginTop:1},children:[e.sub&&(0,V.jsx)(`span`,{children:e.sub}),e.timestamp&&(0,V.jsx)(`span`,{style:{color:s},children:e.timestamp})]})]},`l-${n}`);if(e.kind===`dot`){let t=e.size===`lg`?6:4;return(0,V.jsx)(`div`,{onMouseEnter:e.tooltip?()=>k(e.tooltip,e.pos):void 0,onMouseLeave:e.tooltip?A: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,V.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:c,letterSpacing:`0.04em`},children:e.label},`g-${n}`):null}),C&&(0,V.jsx)(Zo,{data:C.tooltip,pos:C.pos})]})})]});if(p)return(0,V.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:9998,background:l,display:`flex`,flexDirection:`column`,padding:`16px 24px`},children:[(0,V.jsx)(`button`,{onClick:()=>m(!1),style:{position:`absolute`,top:16,right:24,zIndex:1,padding:`6px 14px`,fontSize:12,fontWeight:700,border:`1px solid ${o}`,borderRadius:4,background:i?`rgba(255,255,255,0.08)`:`#fff`,color:a,cursor:`pointer`,fontFamily:H},children:`Close`}),(0,V.jsx)(`div`,{"data-testid":`work-timeline`,style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:M})]});let N=n&&b.totalH>n;return(0,V.jsxs)(`div`,{"data-testid":`work-timeline`,style:{position:`relative`},children:[(0,V.jsx)(`div`,{style:N?{maxHeight:n,overflow:`hidden`}:void 0,children:M}),N&&(0,V.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,height:64,background:`linear-gradient(transparent, ${l})`,display:`flex`,alignItems:`flex-end`,justifyContent:`center`,paddingBottom:10},children:(0,V.jsx)(`button`,{onClick:()=>{f(!0),m(!0)},style:{padding:`5px 16px`,fontSize:11,fontWeight:700,border:`1px solid ${o}`,borderRadius:4,background:i?`rgba(255,255,255,0.08)`:`#fff`,color:a,cursor:`pointer`,fontFamily:H,letterSpacing:`0.03em`,boxShadow:i?`0 2px 8px rgba(0,0,0,0.3)`:`0 2px 8px rgba(0,0,0,0.08)`},children:`EXPAND TIMELINE`})})]})}var $o=`'IBM Plex Mono', monospace`,es=`#084471`,ts=`#16a34a`,ns=`#dc2626`,rs=`#9ca3af`,is=`#6b7280`,as=`#e4e4e7`;function os(e){return e<1e3?String(e):`${(e/1e3).toFixed(1)}k`}function ss(e){return e===0?`0`:e>=1e3?`${(e/1e3).toFixed(e%1e3==0?0:1)}k`:String(e)}function cs(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 ls(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 us=3600*1e3,ds=600*1e3;function fs(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>us?ds:Math.max(i,0),t.push(n)}return{visualTimes:t,totalVisualTime:n}}function ps(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 ms({sessions:e,totalLoc:t,totalFiles:n,keyMoments:r,onSessionClick:i,accentColor:a,isDark:o,dualPositive:s=!0}){let c=o?{textMuted:`rgba(255,255,255,0.4)`,textSecondary:`rgba(255,255,255,0.65)`,grid:`rgba(255,255,255,0.06)`,text:`#fafafa`,green:ts,red:ns,accent:a||`#f97316`,dotStroke:`rgba(0,0,0,0.3)`,border:`rgba(255,255,255,0.06)`}:{textMuted:rs,textSecondary:is,grid:as,text:`#191c1e`,green:ts,red:ns,accent:a||es,dotStroke:`#fff`,border:as},l=ls(e);if(l.length===0)return(0,V.jsx)(`div`,{style:{fontFamily:$o,fontSize:`0.75rem`,color:c.textSecondary,padding:16},children:`No session data available for growth chart.`});let{visualTimes:u,totalVisualTime:d}=fs(l),f=new Map;if(r)for(let e of r)f.set(e.sessionId,e.label);let p=l[l.length-1].cumulativeAdded,m=l[l.length-1].cumulativeDeleted,h=m>0,g=Math.round(d/6e4*.8)+120,_=l.length*12+120,v=Math.max(700,g,_),y=d||1,b=e=>48+e/y*(v-48-16),x,S,C,w,T,E,D,O,k,A,j;s?(O=cs(Math.max(p,m,1)),E=O[O.length-1]||1,k=[],D=0,x=160,S=0,C=0,w=24+x+36,T=24+x,A=e=>T-e/E*x,j=A):(O=cs(Math.max(p,1)),E=O[O.length-1]||1,k=h?cs(m):[],D=h?k[k.length-1]||1:0,x=140,S=h?50:0,C=h?2:0,w=24+x+C+S+36,T=24+x,A=e=>T-e/E*x,j=e=>T+C+e/D*S);let M=l.map((e,t)=>({x:b(u[t]),y:A(e.cumulativeAdded)})),N=h?l.map((e,t)=>({x:b(u[t]),y:j(e.cumulativeDeleted)})):[];function P(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 ee=P(M),F=ee+` L${M[M.length-1].x.toFixed(1)},${T} L${M[0].x.toFixed(1)},${T} Z`,I=h?P(N):``,te=h?I+` L${N[N.length-1].x.toFixed(1)},${T+(s?0:C)} L${N[0].x.toFixed(1)},${T+(s?0:C)} Z`:``,L=new Set,ne=-1/0;for(let e=0;e<l.length;e++){let t=b(u[e]);t-ne>=90&&(L.add(e),ne=t)}l.length>1&&L.add(l.length-1);let re=ps(l,u,b),ie=v>700,R=[...e].filter(e=>e.date).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,padding:`8px 12px`,borderBottom:`1px solid ${c.border}`,fontFamily:$o},children:[(0,V.jsx)(`span`,{style:{fontSize:10,fontWeight:700,color:c.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`},children:s?`Lines Changed`:`Code Changes Over Time`}),(0,V.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:11,fontWeight:600},children:[(0,V.jsxs)(`span`,{style:{color:s?c.accent:c.green},children:[`+`,os(p)]}),h&&(0,V.jsxs)(`span`,{style:{color:s?c.textSecondary:c.red},children:[`-`,os(m)]}),(0,V.jsxs)(`span`,{style:{color:c.text},children:[os(t),` total`]})]})]}),(0,V.jsx)(`div`,{style:ie?{overflowX:`auto`}:{padding:`4px 0`},children:(0,V.jsxs)(`svg`,{viewBox:`0 0 ${v} ${w}`,width:ie?v:`100%`,height:ie?w:void 0,preserveAspectRatio:`xMidYMid meet`,style:{display:`block`},children:[(0,V.jsxs)(`defs`,{children:[(0,V.jsxs)(`linearGradient`,{id:`addGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,V.jsx)(`stop`,{offset:`0%`,stopColor:s?c.accent:c.green,stopOpacity:.12}),(0,V.jsx)(`stop`,{offset:`100%`,stopColor:s?c.accent:c.green,stopOpacity:.02})]}),(0,V.jsxs)(`linearGradient`,{id:`delGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,V.jsx)(`stop`,{offset:`0%`,stopColor:s?c.accent:c.red,stopOpacity:s?.12:.02}),(0,V.jsx)(`stop`,{offset:`100%`,stopColor:s?c.accent:c.red,stopOpacity:s?.02:.1})]})]}),O.map(e=>(0,V.jsxs)(`g`,{children:[(0,V.jsx)(`line`,{x1:48,y1:A(e),x2:v-16,y2:A(e),stroke:c.grid,strokeWidth:`0.5`,strokeDasharray:`4,4`}),(0,V.jsx)(`text`,{x:40,y:A(e)+3,textAnchor:`end`,fontFamily:$o,fontSize:`8`,fill:c.textMuted,children:e===0?``:s?ss(e):`+${ss(e)}`})]},`ya-${e}`)),(0,V.jsx)(`line`,{x1:48,y1:T,x2:v-16,y2:T,stroke:c.grid,strokeWidth:`1`}),(0,V.jsx)(`text`,{x:40,y:T+3,textAnchor:`end`,fontFamily:$o,fontSize:`8`,fill:c.textSecondary,fontWeight:`600`,children:`0`}),!s&&h&&k.filter(e=>e>0).map(e=>(0,V.jsxs)(`g`,{children:[(0,V.jsx)(`line`,{x1:48,y1:j(e),x2:v-16,y2:j(e),stroke:c.grid,strokeWidth:`0.5`,strokeDasharray:`4,4`}),(0,V.jsx)(`text`,{x:40,y:j(e)+3,textAnchor:`end`,fontFamily:$o,fontSize:`8`,fill:c.textMuted,children:`-${ss(e)}`})]},`yd-${e}`)),re.map((e,t)=>(0,V.jsx)(`line`,{x1:e.x,y1:24,x2:e.x,y2:T+C+S,stroke:c.grid,strokeWidth:`0.5`,strokeDasharray:`2,4`},`m-${t}`)),(0,V.jsx)(`path`,{d:F,fill:`url(#addGrad)`}),(0,V.jsx)(`path`,{d:ee,fill:`none`,stroke:s?c.accent:c.green,strokeWidth:`1.5`}),h&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`path`,{d:te,fill:`url(#delGrad)`}),(0,V.jsx)(`path`,{d:I,fill:`none`,stroke:s?`${c.accent}66`:c.red,strokeWidth:`1.5`})]}),l.map((e,t)=>{let n=b(u[t]),r=f.has(e.sessionId),a=L.has(t);return(0,V.jsxs)(`g`,{style:i?{cursor:`pointer`}:void 0,onClick:i?()=>i(R[t]):void 0,children:[r?(0,V.jsx)(`circle`,{cx:n,cy:A(e.cumulativeAdded),r:`5`,fill:s?c.accent:c.green,stroke:c.dotStroke,strokeWidth:`2`}):a?(0,V.jsx)(`circle`,{cx:n,cy:A(e.cumulativeAdded),r:`3`,fill:s?c.accent:c.green}):null,h&&e.cumulativeDeleted>0&&a&&(0,V.jsx)(`circle`,{cx:n,cy:j(e.cumulativeDeleted),r:`2.5`,fill:s?`${c.accent}66`:c.red}),r&&(0,V.jsx)(`text`,{x:n,y:A(e.cumulativeAdded)-12,textAnchor:`middle`,fontFamily:$o,fontSize:`8`,fill:c.textSecondary,children:f.get(e.sessionId)}),a&&(0,V.jsx)(`text`,{x:n,y:w-8,textAnchor:`middle`,fontFamily:$o,fontSize:`8`,fill:c.textMuted,children:new Date(e.dateMs).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})})]},`pt-${t}`)})]})}),(0,V.jsxs)(`div`,{style:{display:`flex`,gap:24,padding:`8px 12px`,borderTop:`1px solid ${c.border}`,fontFamily:$o,fontSize:10},children:[(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:s?c.accent:c.green},children:[`+`,os(p)]}),(0,V.jsx)(`div`,{style:{color:c.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Added`})]}),h&&(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:s?c.textSecondary:c.red},children:[`-`,os(m)]}),(0,V.jsx)(`div`,{style:{color:c.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Deleted`})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:c.text},children:os(t)}),(0,V.jsx)(`div`,{style:{color:c.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Total LOC`})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:c.text},children:n}),(0,V.jsx)(`div`,{style:{color:c.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Files`})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:c.text},children:l.length}),(0,V.jsx)(`div`,{style:{color:c.textMuted,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Sessions`})]})]})]})}var hs=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}}}})),gs=o(((e,t)=>{t.exports=hs()})),_s=o((e=>{var t=no();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`})),vs=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=_s()})),ys=o((e=>{var t=gs(),n=no(),r=vs();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 u(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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=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,ee={pending:!1,data:null,method:null,action:null},F=[],I=-1;function te(e){return{current:e}}function L(e){0>I||(e.current=F[I],F[I]=null,I--)}function ne(e,t){I++,F[I]=e.current,e.current=t}var re=te(null),ie=te(null),R=te(null),ae=te(null);function oe(e,t){switch(ne(R,t),ne(ie,e),ne(re,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}}L(re),ne(re,e)}function se(){L(re),L(ie),L(R)}function ce(e){e.memoizedState!==null&&ne(ae,e);var t=re.current,n=Hd(t,e.type);t!==n&&(ne(ie,e),ne(re,n))}function le(e){ie.current===e&&(L(re),L(ie)),ae.current===e&&(L(ae),Qf._currentValue=ee)}var ue,de;function fe(e){if(ue===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ue=t&&t[1]||``,de=-1<e.stack.indexOf(`
24
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
25
+ `+ue+e+de}var pe=!1;function me(e,t){if(!e||pe)return``;pe=!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(`
26
+ `),l=s.split(`
27
+ `);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=`
28
+ `+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{pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?fe(n):``}function he(e,t){switch(e.tag){case 26:case 27:case 5:return fe(e.type);case 16:return fe(`Lazy`);case 13:return e.child!==t&&t!==null?fe(`Suspense Fallback`):fe(`Suspense`);case 19:return fe(`SuspenseList`);case 0:case 15:return me(e.type,!1);case 11:return me(e.type.render,!1);case 1:return me(e.type,!0);case 31:return fe(`Activity`);default:return``}}function ge(e){try{var t=``,n=null;do t+=he(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
29
+ Error generating stack: `+e.message+`
30
+ `+e.stack}}var _e=Object.prototype.hasOwnProperty,ve=t.unstable_scheduleCallback,ye=t.unstable_cancelCallback,be=t.unstable_shouldYield,xe=t.unstable_requestPaint,Se=t.unstable_now,Ce=t.unstable_getCurrentPriorityLevel,we=t.unstable_ImmediatePriority,Te=t.unstable_UserBlockingPriority,Ee=t.unstable_NormalPriority,De=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function Ne(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:Le,Fe=Math.log,Ie=Math.LN2;function Le(e){return e>>>=0,e===0?32:31-(Fe(e)/Ie|0)|0}var Re=256,ze=262144,Be=4194304;function Ve(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 He(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=Ve(n))):i=Ve(o):i=Ve(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ve(n))):i=Ve(o)):i=Ve(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 Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function We(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 Ge(){var e=Be;return Be<<=1,!(Be&62914560)&&(Be=4194304),e}function Ke(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Je(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-Pe(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&&Ye(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ye(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Xe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ze(e,t){var n=t&-t;return n=n&42?1:Qe(n),(n&(e.suspendedLanes|t))===0?n:0}function Qe(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 $e(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function et(){var e=P.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function tt(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var nt=Math.random().toString(36).slice(2),rt=`__reactFiber$`+nt,it=`__reactProps$`+nt,at=`__reactContainer$`+nt,ot=`__reactEvents$`+nt,st=`__reactListeners$`+nt,ct=`__reactHandles$`+nt,lt=`__reactResources$`+nt,ut=`__reactMarker$`+nt;function dt(e){delete e[rt],delete e[it],delete e[ot],delete e[st],delete e[ct]}function ft(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[at]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[rt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function pt(e){if(e=e[rt]||e[at]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function mt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ht(e){var t=e[lt];return t||=e[lt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function gt(e){e[ut]=!0}var _t=new Set,vt={};function yt(e,t){bt(e,t),bt(e+`Capture`,t)}function bt(e,t){for(vt[e]=t,e=0;e<t.length;e++)_t.add(t[e])}var xt=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]*$`),St={},Ct={};function wt(e){return _e.call(Ct,e)?!0:_e.call(St,e)?!1:xt.test(e)?Ct[e]=!0:(St[e]=!0,!1)}function Tt(e,t,n){if(wt(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 Et(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 Dt(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 Ot(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function At(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 jt(e){if(!e._valueTracker){var t=kt(e)?`checked`:`value`;e._valueTracker=At(e,t,``+e[t])}}function Mt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=kt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Nt(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 Pt=/[\n"\\]/g;function Ft(e){return e.replace(Pt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function It(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=``+Ot(t)):e.value!==``+Ot(t)&&(e.value=``+Ot(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Rt(e,o,Ot(n)):Rt(e,o,Ot(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=``+Ot(s):e.removeAttribute(`name`)}function Lt(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)){jt(e);return}n=n==null?``:``+Ot(n),t=t==null?n:``+Ot(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),jt(e)}function Rt(e,t,n){t===`number`&&Nt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function zt(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=``+Ot(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 Bt(e,t,n){if(t!=null&&(t=``+Ot(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ot(n)}function Vt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(M(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ot(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),jt(e)}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ut=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 Wt(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||Ut.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Gt(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&&Wt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Wt(e,o,t[o])}function Kt(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 qt=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`]]),Jt=/^[\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 Yt(e){return Jt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Xt(){}var Zt=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $t=null,en=null;function tn(e){var t=pt(e);if(t&&(e=t.stateNode)){var n=e[it]||null;a:switch(e=t.stateNode,t.type){case`input`:if(It(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="`+Ft(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[it]||null;if(!a)throw Error(i(90));It(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&&Mt(r)}break a;case`textarea`:Bt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&zt(e,!!n.multiple,t,!1)}}}var nn=!1;function rn(e,t,n){if(nn)return e(t,n);nn=!0;try{return e(t)}finally{if(nn=!1,($t!==null||en!==null)&&(bu(),$t&&(t=$t,e=en,en=$t=null,tn(t),e)))for(t=0;t<e.length;t++)tn(e[t])}}function an(e,t){var n=e.stateNode;if(n===null)return null;var r=n[it]||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 on=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,`passive`,{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.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 dn=i.slice(e,1<r?1-r:void 0)}function pn(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 mn(){return!0}function hn(){return!1}function gn(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)?mn:hn,this.isPropagationStopped=hn,this}return f(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=mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vn=gn(_n),yn=f({},_n,{view:0,detail:0}),bn=gn(yn),xn,Sn,Cn,wn=f({},yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,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!==Cn&&(Cn&&e.type===`mousemove`?(xn=e.screenX-Cn.screenX,Sn=e.screenY-Cn.screenY):Sn=xn=0,Cn=e),xn)},movementY:function(e){return`movementY`in e?e.movementY:Sn}}),Tn=gn(wn),En=gn(f({},wn,{dataTransfer:0})),Dn=gn(f({},yn,{relatedTarget:0})),On=gn(f({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=gn(f({},_n,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=gn(f({},_n,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=gn(f({},yn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=gn(f({},wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=gn(f({},yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=gn(f({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=gn(f({},wn,{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})),Vn=gn(f({},_n,{newState:0,oldState:0})),Hn=[9,13,27,32],Un=on&&`CompositionEvent`in window,Wn=null;on&&`documentMode`in document&&(Wn=document.documentMode);var Gn=on&&`TextEvent`in window&&!Wn,Kn=on&&(!Un||Wn&&8<Wn&&11>=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=fn(),dn=un=ln=null,Zn=!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 Kn&&t.locale!==`ko`?null:t.data;default:return null}}var er={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 tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){$t?en?en.push(r):en=[r]:$t=r,t=Ed(t,`onChange`),0<t.length&&(n=new vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function ar(e){yd(e,0)}function or(e){if(Mt(mt(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(on){var lr;if(on){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function fr(){rr&&(rr.detachEvent(`onpropertychange`,pr),ir=rr=null)}function pr(e){if(e.propertyName===`value`&&or(ir)){var t=[];nr(t,ir,e,Qt(e)),rn(ar,t)}}function mr(e,t,n){e===`focusin`?(fr(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,pr)):e===`focusout`&&fr()}function hr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return or(ir)}function gr(e,t){if(e===`click`)return or(t)}function _r(e,t){if(e===`input`||e===`change`)return or(t)}function vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var yr=typeof Object.is==`function`?Object.is:vr;function br(e,t){if(yr(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(!_e.call(t,i)||!yr(e[i],t[i]))return!1}return!0}function xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var n=xr(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=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(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=Nt(e.document)}return t}function Tr(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 Er=on&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==Nt(r)||(r=Dr,`selectionStart`in r&&Tr(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}),kr&&br(kr,r)||(kr=r,r=Ed(Or,`onSelect`),0<r.length&&(t=new vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};on&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[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),yt(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&&ei(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 z(e,t,n,r){return Qr(e,t,n,r),ti(e)}function $r(e,t){return Qr(e,null,null,t),ti(e)}function ei(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-Pe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(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 ni={};function ri(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 ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(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 si(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 ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ii(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return li(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ii(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ii(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ii(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:ge(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:ge(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Pe(r)-1;r&=~(1<<i),n+=1;var a=32-Pe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Pe(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[rt]=e,t[it]=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),Lt(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),Vt(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=Xt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!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&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=uf(e)}else t===27?(t=Ai,Zd(e.type)?(e=lf,lf=null,Ai=e):Ai=t):Ai=ki?cf(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=te(null),Ui=null,Wi=null;function Gi(e,t,n){ne(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,L(Hi)}function qi(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 Ji(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),qi(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),qi(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 Yi(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;yr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ae.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&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!yr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=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()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=dd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(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 ma=N.S;N.S=function(e,t){eu=Se(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=te(null);function ga(){var e=ha.current;return e===null?q.pooledCache:e}function _a(e,t){t===null?ne(ha,ha.current):ne(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xt,Xt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Xt,Xt);else{if(e=q,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,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function B(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=oi(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=ui(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===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Ma(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=fi(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=li(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=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ci(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case h:return t=fi(t,e.mode,n),t.return=e,t;case T:return t=Ta(t),f(e,t,n)}if(M(t)||k(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===b)return f(e,$i(e,t),n);Na(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 m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ta(n),p(e,t,n,r)}if(M(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===b)return p(e,t,$i(e,n),r);Na(e,n)}return null}function _(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 m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ta(r),_(e,t,n,r,i)}if(M(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,ja(r),i);if(r.$$typeof===b)return _(e,t,n,$i(t,r),i);Na(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),ji&&wi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return ji&&wi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),ji&&wi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),ji&&wi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return ji&&wi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),ji&&wi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){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===T&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case h: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=fi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ta(o),x(e,r,o,c)}if(M(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ja(o),c);if(o.$$typeof===b)return x(e,r,$i(e,o),c);Na(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=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=x(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Pa=B(!0),Fa=B(!1),Ia=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ra(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 za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Qr(e,r,t,n),ti(e)}function Va(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,Xe(e,n)}}function Ha(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 Ua=!1;function Wa(){if(Ua){var e=ua;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;Ia=!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 p=s.lane&-536870913,m=p!==s.lane;if(m?(Y&p)===p:(r&p)===p){p!==0&&p===la&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ia=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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 Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=te(null),Ya=te(0);function Xa(e,t){e=Ul,ne(Ya,e),ne(Ja,t),Ul=e|t.baseLanes}function Za(){ne(Ya,Ul),ne(Ja,Ja.current)}function Qa(){Ul=Ya.current,L(Ja),L(Ya)}var $a=te(null),eo=null;function to(e){var t=e.alternate;ne(oo,oo.current&1),ne($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function ro(e){ne(oo,oo.current),ne($a,e),eo===null&&(eo=e)}function io(e){e.tag===22?(ne(oo,oo.current),ne($a,e),eo===null&&(eo=e)):ao(e)}function ao(){ne(oo,oo.current),ne($a,$a.current)}function V(e){L($a),eo===e&&(eo=null),L(oo)}var oo=te(0);function so(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 co=0,H=null,lo=null,U=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return co=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?zs:Bs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){N.H=Rs;var t=lo!==null&&lo.next!==null;if(co=0,U=lo=H=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Xi(e)&&(rc=!0))}function So(e,t,n,r){H=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,U=lo=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=Vs,o=t(n,r)}while(fo);return o}function Co(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(lo===null?null:lo.memoizedState)!==e&&(H.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,U=lo=H=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return U===null?H.memoizedState=U=e:U=U.next=e,U}function Oo(){if(lo===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=lo.next;var t=U===null?H.memoizedState:U.next;if(t!==null)U=t,lo=e;else{if(e===null)throw H.alternate===null?Error(i(467)):Error(i(310));lo=e,e={memoizedState:lo.memoizedState,baseState:lo.baseState,baseQueue:lo.baseQueue,queue:lo.queue,next:null},U===null?H.memoizedState=U=e:U=U.next=e}return U}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=wa(go,e,t),t=H,(U===null?t.memoizedState:U.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?zs:Bs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===b)return Qi(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.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=ko(),H.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]=D;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),lo,e)}function Fo(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?(co&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===la&&(d=!0);else if((co&p)===p){u=u.next,p===la&&(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,H.lanes|=p,Gl|=p;f=u.action,po&&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,H.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!yr(o,e.memoizedState)&&(rc=!0,d&&(n=ua,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 Io(e){var t=Oo(),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);yr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=H,a=Oo(),o=ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!yr((lo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||U!==null&&U.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||co&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=ko(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yr(e,n)}catch{return!0}}function Ho(e){var t=$r(e,2);t!==null&&hu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Ne(!0);try{n()}finally{Ne(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,lo,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Fs(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,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(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),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(ji){var n=q.formState;if(n!==null){a:{var r=H;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;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){Ai=cf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=Ms.bind(null,H,r),r.dispatch=n,r=Uo(!1),a=Ps.bind(null,H,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),lo,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===ya?xa:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=lo;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=ko(),H.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 is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();H.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;lo!==null&&r!==null&&yo(r,lo.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(H.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=ko(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(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 ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||co&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),H.lanes|=e,Gl|=e,n)}function xs(e,t,n,r){return yr(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(Y&261930)?(rc=!0,e.memoizedState=n):(e=mu(),H.lanes|=e,Gl|=e,t):(e=bs(e,n,r),yr(e,t)||(rc=!0),e)}function Ss(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,Ps(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,pa(c,r),pu(e)):Ns(e,t,r,pu(e))}catch(n){Ns(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 Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,ee,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},pu())}function Ds(){return Qi(Qf)}function Os(){return Oo().memoizedState}function ks(){return Oo().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=za(n);var r=Ba(t,e,n);r!==null&&(hu(r,t,n),Va(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=z(e,t,n,r),n!==null&&(hu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,pu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(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,yr(s,o))return Qr(e,t,i,0),q===null&&Zr(),!1}catch{}if(n=z(e,t,i,r),n!==null)return hu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=z(e,n,r,2),t!==null&&hu(t,e,2)}function Fs(e){var t=e.alternate;return e===H||t!==null&&t===H}function Is(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xe(e,n)}}var Rs={readContext:Qi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Rs.useEffectEvent=vo;var zs={readContext:Qi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Ne(!0);try{n(t)}finally{Ne(!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=js.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=Ms.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return bs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=Ss.bind(null,H,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,a=Do();if(ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=q.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Pe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=As.bind(null,H)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:jo,useCallback:_s,useContext:Qi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:ys,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return xs(Oo(),lo.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Os,useHostTransitionStatus:Ds,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),lo,e,t)},useMemoCache:Mo,useCacheRefresh:ks};Bs.useEffectEvent=us;var Vs={readContext:Qi,use:jo,useCallback:_s,useContext:Qi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:ys,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return lo===null?bs(n,e,t):xs(n,lo.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Os,useHostTransitionStatus:Ds,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return lo===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,lo,e,t)},useMemoCache:Mo,useCacheRefresh:ks};Vs.useEffectEvent=us;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=za(r);i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(hu(t,e,r),Va(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(hu(t,e,r),Va(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=za(n);r.tag=2,t!=null&&(r.callback=t),t=Ba(e,r,n),t!==null&&(hu(t,e,n),Va(t,e,n))}};function Ws(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?!br(n,r)||!br(i,a):!0}function Gs(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&&Us.enqueueReplaceState(t,t.state,null)}function Ks(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=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){qr(e)}function Js(e){console.error(e)}function Ys(e){qr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(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 Qs(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=za(e),e.tag=3,e}function ec(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(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(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 tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?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===Sa?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(ji)return t=$a.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=mi(r,n),a=Qs(e.stateNode,r,a),Ha(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=mi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ha(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=$s(a),ec(a,e,n,r),Ha(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Fa(t,null,n,r):Pa(t,e.child,n,r)}function ac(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 Zi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!rc?(To(e,t,i),kc(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?br:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(br(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}return hc(e,t,n,r,i)}function cc(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 uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),io(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Za(),ao(t)):(_a(t,a.cachePool),Xa(t,a),ao(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Za(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Pa(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,V(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ro(t),(e=Ai)?(e=rf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(rc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=q,r!==null&&(s=Ze(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),hu(r,e,s),nc;Du(),t=fc(e,t,n)}else e=o.treeContext,Ai=cf(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=dc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(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 hc(e,t,n,r,i){return Zi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!rc?(To(e,t,i),kc(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!rc?(To(e,t,a),kc(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},La(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(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&&Us.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),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=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Qi(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)&&Gs(t,a,r,o),Ia=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||Ia?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=Ia||Ws(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,Ra(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Qi(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)&&Gs(t,a,r,c),Ia=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||Ia||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=Ia||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(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,mc(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=Pa(t,e.child,null,i),t.child=Pa(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return zi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:va()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function Sc(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:(oo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(ji){if(a?to(t):ao(t),(e=Ai)?(e=rf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(to(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Pa(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(to(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,Vi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=q,s!==null&&(r=Ze(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),hu(s,e,r),nc;af(c)||Du(),t=Tc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=cf(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=oi(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 Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Pa(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Dc(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 Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,ne(oo,o),ic(e,t,r,n),r=ji?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(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&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(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&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(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=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function jc(e,t,n){switch(t.tag){case 3:oe(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:ce(t);break;case 4:oe(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ne(oo,oo.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}else rc=!1,ji&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=j(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(oe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ra(e,t),Ga(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Wa(),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=vc(e,t,r,n);break a}else if(r!==a){a=mi(Error(i(424)),t),Vi(a),t=vc(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(Ai=cf(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Fa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=Bd(R.current).createElement(n),r[rt]=t,r[it]=e,Pd(r,n,e),gt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ce(t),e===null&&ji&&(r=t.stateNode=ff(t.type,t.pendingProps,R.current),ki=t,Ni=!0,a=Ai,Zd(t.type)?(lf=a,Ai=cf(r.firstChild)):Ai=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((a=r=Ai)&&(r=tf(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ki=t,Ai=cf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),ce(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=bo(e,t,Co,null,null,n),Qf._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=nf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return Sc(e,t,n);case 4:return oe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pa(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=q,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},La(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(Ra(e,t),Ga(t,null,null,n),Wa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(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 Ea=Sa,ba}else e.flags&=-16777217}function Fc(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 Ea=Sa,ba}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ge(),e.lanes|=t,Yl|=t)}function Lc(e,t){if(!ji)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 W(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 Rc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(t),null;case 1:return W(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),W(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(W(t),Pc(t,a,null,r,n)):(W(t),Fc(t,o))):o?o===e.memoizedState?(W(t),t.flags&=-16777217):(Nc(t),W(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),W(t),Pc(t,a,e,r,n)),null;case 27:if(le(t),n=R.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return W(t),null}e=re.current,Ri(t)?Ii(t,e):(e=ff(a,r,n),t.stateNode=e,Nc(t))}return W(t),null;case 5:if(le(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return W(t),null}if(o=re.current,Ri(t))Ii(t,o);else{var s=Bd(R.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[rt]=t,o[it]=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&&Nc(t)}}return W(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=R.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[rt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Fi(t,!0)}else e=Bd(e).createTextNode(r),e[rt]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(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[rt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(V(t),t):(V(t),null);if(t.flags&128)throw Error(i(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(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[rt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(V(t),t):(V(t),null)}return V(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),Ic(t,t.updateQueue),W(t),null);case 4:return se(),e===null&&Sd(t.stateNode.containerInfo),W(t),null;case 10:return Ki(t.type),W(t),null;case 19:if(L(oo),r=t.memoizedState,r===null)return W(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return ne(oo,oo.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Se()>tu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return W(t),null}else 2*Se()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Lc(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?(W(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Se(),e.sibling=null,n=oo.current,ne(oo,a?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return V(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&Ic(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&&L(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),W(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return le(t),null;case 31:if(t.memoizedState!==null){if(V(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(V(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(oo),null;case 4:return se(),null;case 10:return Ki(t.type),null;case 22:case 23:return V(t),Qa(),e!==null&&L(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Bc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),se();break;case 26:case 27:case 5:le(t);break;case 4:se();break;case 31:t.memoizedState!==null&&V(t);break;case 13:V(t);break;case 19:L(oo);break;case 10:Ki(t.type);break;case 22:case 23:V(t),Qa(),e!==null&&L(ha);break;case 24:Ki(ia)}}function Vc(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 Hc(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 Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Z(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Gc(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 Kc(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 qc(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 Jc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[it]=t}catch(t){Z(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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 Zc(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=Xt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(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(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(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[rt]=e,t[it]=n}catch(t){Z(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=wr(e),Tr(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,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,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=Ks(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,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Vc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(bl(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{qa(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:bl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(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||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),el=i,tl=a}break;case 30:break;default:bl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&dt(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 G=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount==`function`)try{Me.onCommitFiberUnmount(je,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=G,i=cl;Zd(n.type)&&(G=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),G=r,cl=i;break;case 5:tl||Kc(n,t);case 6:if(r=G,i=cl,G=null,ll(e,t,n),G=r,cl=i,G!==null)if(cl)try{(G.nodeType===9?G.body:G.nodeName===`HTML`?G.ownerDocument.body:G).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{G.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:G!==null&&(cl?(e=G,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(G,n.stateNode));break;case 4:r=G,i=cl,G=n.stateNode.containerInfo,cl=!0,ll(e,t,n),G=r,cl=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ll(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ll(e,t,n),tl=r;break;default:ll(e,t,n)}}function dl(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 fl(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 pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(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)){G=c.stateNode,cl=!1;break a}break;case 5:G=c.stateNode,cl=!1;break a;case 3:case 4:G=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(G===null)throw Error(i(160));ul(o,s,a),G=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(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=gl;if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(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[ut]||o[rt]||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[rt]=e,gt(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[rt]=e,gt(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&&Jc(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:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{Ht(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(hl(t,e),vl(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=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}nl&&(nl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Se()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,hl(t,e),tl=d,el=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||xl(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,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ht(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),xl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Kc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(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:Sl(i,a,n),Vc(4,a);break;case 1:if(Sl(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++)Ka(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Gc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(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&&oa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Vc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(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&&oa(e)));break;case 12:if(i&2048){Tl(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 Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(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:Dl(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(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:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(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:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Ll={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=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 K&2&&Y!==0?Y&-Y:N.T===null?et():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||ji){var e=ze;ze<<=1,!(ze&3932160)&&(ze=262144),Jl=e}else Jl=536870912;return e=$a.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),qe(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ue(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-Se(),10<a)){if(yu(r,t,Jl,!Bl),He(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:Xt},jl(t,a,d);var m=(a&62914560)===a?$l-Se():(a&4194048)===a?eu-Se():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(!yr(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-Pe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ye(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Wi=Ui=null,Eo(e),ka=null,Aa=0,e=J;for(;e!==null;)Bc(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(),q=e,J=n=oi(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Ue(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-Pe(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Zr(),n}function Cu(e,t){H=null,N.H=Rs,t===ya||t===xa?(t=Da(),X=3):t===ba?(t=Da(),X=4):X=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Xs(e,mi(t,e.current)))}function wu(){var e=$a.current;return e===null?!0:(Y&4194048)===Y?eo===null:(Y&62914560)===Y||Y&536870912?e===eo:!1}function Tu(){var e=N.H;return N.H=Rs,e===null?Rs:e}function Eu(){var e=N.A;return N.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&$a.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==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:$a.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++,Wi=Ui=null,K=r,N.H=i,N.A=a,J===null&&(q=null,Y=0,Zr()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Se()+500,Su(e,t)):Vl=Ue(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(Ca(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==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:Ca(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 Wi=Ui=null,N.H=r,N.A=a,K=n,J===null?(q=null,Y=0,Zr(),Wl):0}function ju(){for(;J!==null&&!be();)Mu(J)}function Mu(e){var t=Mc(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=gc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:Bc(n,t),t=J=si(t,Ul),t=Mc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Wi=Ui=null,Eo(t),ka=null,Aa=0;var i=t.return;try{if(tc(e,i,t,n,Y)){Wl=1,Xs(e,mi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Xs(e,mi(n,e.current)),J=null;return}t.flags&32768?(ji||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.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=Rc(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=zc(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(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Xr,Je(e,n,o,s,c,l),e===q&&(J=q=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(Ee,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=K,K|=4;try{al(e,t,n)}finally{K=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=K;K|=4;try{_l(t,e);var a=zd,o=wr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Cr(s.ownerDocument.documentElement,s)){if(c!==null&&Tr(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 _=Sr(s,h),v=Sr(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{K=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=K;K|=4;try{ol(e,t.alternate,t)}finally{K=i,P.p=r,N.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,xe();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),$e(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot==`function`)try{Me.onCommitFiberRoot(je,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,oa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=$e(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,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Me&&typeof Me.onPostCommitFiberRoot==`function`)try{Me.onPostCommitFiberRoot(je,o)}catch{}return!0}finally{P.p=a,N.T=r,Vu(e,t)}}function Wu(e,t,n){t=mi(n,t),t=Qs(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(qe(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=mi(n,e),n=$s(2),r=Ba(t,n,2),r!==null&&(ec(n,r,t,e),qe(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;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,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Se()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Ge()),e=$r(e,t),e!==null&&(qe(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 ve(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-Pe(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=He(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ue(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=Se(),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-Pe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=We(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=He(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&&ye(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ue(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ye(r),$e(n)){case 2:case 8:n=Te;break;case 32:n=Ee;break;case 268435456:n=Oe;break;default:n=Ee}return r=cd.bind(null,e),n=ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ye(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=He(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Se()),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(){K&6?ve(we,ad):od()})}function dd(){if(nd===0){var e=la;e===0&&(e=Re,Re<<=1,!(Re&261888)&&(Re=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Yt(``+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[it]||null).action),o=r.submitter;o&&(t=(t=o[it]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new vn(`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);ws(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),ws(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`),bt(`onMouseEnter`,[`mouseout`,`mouseover`]),bt(`onMouseLeave`,[`mouseout`,`mouseover`]),bt(`onPointerEnter`,[`pointerout`,`pointerover`]),bt(`onPointerLeave`,[`pointerout`,`pointerover`]),yt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),yt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),yt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),yt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),yt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),yt(`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[ot];n===void 0&&(n=t[ot]=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,_t.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,!sn||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=ft(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}rn(function(){var r=a,i=Qt(n),s=[];a:{var c=Wr.get(e);if(c!==void 0){var l=vn,u=e;switch(e){case`keypress`:if(pn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=Dn;break;case`focusout`:u=`blur`,l=Dn;break;case`beforeblur`:case`afterblur`:l=Dn;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=Tn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=En;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Lr:case Rr:case zr:l=On;break;case Ur:l=zn;break;case`scroll`:case`scrollend`:l=bn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=Vn}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=an(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!==Zt&&(u=n.relatedTarget||n.fromElement)&&(ft(u)||u[at]))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?ft(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=Tn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:mt(l),h=u==null?c:mt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ft(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?mt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(tr(c))if(cr)v=_r;else{v=hr;var y=mr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Kt(r.elementType)&&(v=sr):v=gr;if(v&&=v(e,r)){nr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Rt(c,`number`,c.value)}switch(y=r?mt(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(s,n,i);break;case`selectionchange`:if(Er)break;case`keydown`:case`keyup`:jr(s,n,i)}var b;if(Un)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 Zn?Yn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Kn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=fn()):(ln=i,un=`value`in ln?ln.value:ln.textContent,Zn=!0)),y=Ed(r,x),0<y.length&&(x=new An(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=Gn?Qn(e,n):$n(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new An(`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=an(e,n),i!=null&&r.unshift(Td(e,i,a)),i=an(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=an(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=an(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,`
31
+ `).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===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Et(e,`class`,r);break;case`tabIndex`:Et(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Et(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Et(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=Yt(``+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=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);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=Yt(``+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),Tt(e,`popover`,r);break;case`xlinkActuate`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Tt(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=qt.get(n)||n,Tt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Gt(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`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(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=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!vt.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[it]||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,``):Tt(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)}}Lt(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&&zt(e,!!r,n,!0):zt(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)}Vt(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(Kt(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)}}It(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?zt(e,!!n,n?[]:``,!1):zt(e,!!n,t,!0)):zt(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)}Bt(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(Kt(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[ut]||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),dt(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[ut])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]);dt(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=pt(e);t!==null&&t.tag===5&&t.type===`form`?Es(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=Ft(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),gt(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="`+Ft(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ft(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ft(n.imageSizes)+`"]`)):i+=`[href="`+Ft(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=f({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),gt(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="`+Ft(r)+`"][href="`+Ft(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=f({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),gt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=ht(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=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);gt(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=ht(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),gt(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=ht(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),gt(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=R.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=ht(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=ht(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=ht(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="`+Ft(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},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),gt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ft(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~="`+Ft(n.href)+`"]`);if(r)return t.instance=r,gt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),gt(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,gt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),gt(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,gt(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),gt(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[ut]||a[rt]||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,gt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),gt(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:b,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_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=Ke(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ke(0),this.hiddenUpdates=Ke(null),this.identifierPrefix=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=ii(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},La(a),e}function tp(e){return e?(e=ni,e):ni}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ba(e,r,t),n!==null&&(hu(n,e,t),Va(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=$r(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=Qe(t);var n=$r(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=pt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ve(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Pe(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Se()+500,id(0,!1))}}break;case 31:case 13:s=$r(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=Qt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ft(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(Ce()){case we:return 2;case Te:return 8;case Ee:case De:return 32;case Oe: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=pt(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=ft(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,tt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,tt(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);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=pt(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=pt(n);a!==null&&(e.splice(t,3),t-=3,ws(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[it]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[it]||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[at]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=et();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=u(t),e=e===null?null:d(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{je=zp.inject(Rp),Me=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;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[at]=t.current,Sd(e),new Fp(t)}})),bs=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=ys()}))();function xs(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function Ss(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Cs(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function ws({session:e,sessionPageUrl:t,onClose:n}){let r=(0,ao.useCallback)(e=>{e.key===`Escape`&&n()},[n]);(0,ao.useEffect)(()=>(document.addEventListener(`keydown`,r),document.body.style.overflow=`hidden`,()=>{document.removeEventListener(`keydown`,r),document.body.style.overflow=``}),[r]);let i=e.children&&e.children.length>0;return(0,V.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:50,display:`flex`,justifyContent:`flex-end`,background:`rgba(0,0,0,0.4)`},onClick:e=>{e.target===e.currentTarget&&n()},children:(0,V.jsx)(`div`,{style:{width:600,maxWidth:`100%`,height:`100%`,background:`var(--surface, #f8f9fb)`,overflowY:`auto`,boxShadow:`-8px 0 32px rgba(25,28,30,0.1)`},children:(0,V.jsxs)(`div`,{style:{padding:`2rem`},children:[(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`0.75rem`,marginBottom:`1.5rem`},children:[(0,V.jsx)(`button`,{type:`button`,onClick:n,style:{fontFamily:`var(--font-mono, monospace)`,fontSize:`0.8125rem`,color:`var(--on-surface-variant, #6b7280)`,background:`var(--surface-low, #f3f4f6)`,border:`1px solid var(--surface-high, #e7e8ea)`,borderRadius:`0.375rem`,padding:`0.25rem 0.75rem`,cursor:`pointer`},children:`ESC · Close`}),t&&(0,V.jsx)(`a`,{href:t,style:{fontFamily:`var(--font-mono, monospace)`,fontSize:`0.8125rem`,color:`var(--primary, #084471)`,background:`rgba(8,68,113,0.05)`,border:`1px solid rgba(8,68,113,0.2)`,borderRadius:`0.375rem`,padding:`0.25rem 0.75rem`,textDecoration:`none`},children:`View full session →`})]}),(0,V.jsx)(`h2`,{style:{fontFamily:`var(--font-display, sans-serif)`,fontSize:`1.5rem`,fontWeight:700,color:`var(--on-surface, #191c1e)`,marginBottom:`0.5rem`},children:e.title}),(0,V.jsxs)(`div`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:`0.6875rem`,textTransform:`uppercase`,letterSpacing:`0.05em`,color:`var(--on-surface-variant, #6b7280)`,marginBottom:`1rem`},children:[Cs(e.date),e.source&&` · ${e.source}`,e.context&&` · ${e.context}`]}),(0,V.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`0.75rem`,marginBottom:`1.25rem`},children:[(0,V.jsx)(Es,{label:`Active Time`,value:xs(e.durationMinutes),primary:!0,children:i&&(0,V.jsx)(Ds,{you:xs(Math.max(0,e.durationMinutes-e.children.reduce((e,t)=>e+t.durationMinutes,0))),agent:xs(e.children.reduce((e,t)=>e+t.durationMinutes,0))})}),(0,V.jsx)(Es,{label:`Turns`,value:e.turns,children:i&&(0,V.jsx)(Ds,{you:`Human`,agent:`${e.children.length} agents`})}),(0,V.jsx)(Es,{label:`Files`,value:e.filesChanged?.length===1&&e.filesChanged[0]?.path===`(aggregate)`?`—`:e.filesChanged?.length??`—`}),(0,V.jsx)(Es,{label:`Lines changed`,value:Ss(e.linesOfCode),children:i&&(0,V.jsx)(Ds,{you:Ss(Math.max(0,e.linesOfCode-e.children.reduce((e,t)=>e+t.linesOfCode,0))),agent:Ss(e.children.reduce((e,t)=>e+t.linesOfCode,0))})})]}),e.developerTake&&(0,V.jsx)(`p`,{style:{fontSize:`0.9375rem`,lineHeight:1.6,color:`var(--on-surface, #191c1e)`,borderLeft:`3px solid var(--primary, #084471)`,paddingLeft:`0.75rem`,marginBottom:`1.25rem`},children:e.developerTake}),e.skills&&e.skills.length>0&&(0,V.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`0.375rem`,marginBottom:`1.25rem`},children:e.skills.map(e=>(0,V.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:`11px`,padding:`0.125rem 0.5rem`,borderRadius:`0.25rem`,background:`var(--violet-bg, #ede9fe)`,color:`var(--violet, #6d28d9)`},children:e},e))}),e.turns>=50&&(0,V.jsxs)(`div`,{style:{marginBottom:`1.25rem`},children:[(0,V.jsxs)(Ts,{children:[`Session Activity · `,e.turns,` turns over `,xs(e.durationMinutes)]}),(0,V.jsx)(Qo,{sessions:[e],maxHeight:200})]}),e.executionPath&&e.executionPath.length>0&&(0,V.jsxs)(`div`,{style:{marginBottom:`1.25rem`},children:[(0,V.jsx)(Ts,{children:`Execution Path`}),e.executionPath.map(e=>(0,V.jsxs)(`div`,{style:{display:`flex`,gap:`0.75rem`,alignItems:`flex-start`,padding:`0.625rem 0`,borderBottom:`1px solid var(--ghost, rgba(194,199,208,0.15))`},children:[(0,V.jsx)(`div`,{style:{width:24,height:24,borderRadius:`50%`,background:`var(--primary, #084471)`,color:`white`,fontFamily:`var(--font-mono, monospace)`,fontSize:`0.625rem`,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:e.stepNumber}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{style:{fontWeight:600,fontSize:`0.875rem`,color:`var(--on-surface, #191c1e)`,marginBottom:`0.125rem`},children:e.title}),(0,V.jsx)(`div`,{style:{fontSize:`0.8125rem`,color:`var(--on-surface-variant, #6b7280)`,lineHeight:1.5},children:e.description})]})]},e.stepNumber))]}),e.toolBreakdown&&e.toolBreakdown.length>0&&(0,V.jsxs)(`div`,{style:{marginBottom:`1.25rem`},children:[(0,V.jsx)(Ts,{children:`Tool Usage`}),e.toolBreakdown.map(e=>(0,V.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`0.375rem 0`,borderBottom:`1px solid var(--ghost, rgba(194,199,208,0.15))`,fontFamily:`var(--font-mono, monospace)`,fontSize:`0.75rem`},children:[(0,V.jsx)(`span`,{style:{color:`var(--on-surface, #191c1e)`},children:e.tool}),(0,V.jsx)(`span`,{style:{color:`var(--on-surface-variant, #6b7280)`},children:e.count})]},e.tool))]}),e.qaPairs&&e.qaPairs.length>0&&(0,V.jsxs)(`div`,{style:{marginBottom:`1.25rem`},children:[(0,V.jsx)(Ts,{children:`Questions & Answers`}),e.qaPairs.map((e,t)=>(0,V.jsxs)(`div`,{style:{padding:`0.75rem 0`,borderBottom:`1px solid var(--ghost, rgba(194,199,208,0.15))`},children:[(0,V.jsx)(`div`,{style:{fontWeight:600,fontSize:`0.9375rem`,color:`var(--on-surface, #191c1e)`,marginBottom:`0.5rem`},children:e.question}),(0,V.jsx)(`div`,{style:{fontSize:`0.875rem`,color:`var(--on-surface-variant, #6b7280)`,lineHeight:1.5},children:e.answer})]},t))]})]})})})}function Ts({children:e}){return(0,V.jsx)(`div`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:`0.625rem`,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.05em`,color:`var(--on-surface-variant, #6b7280)`,marginBottom:`0.625rem`},children:e})}function Es({label:e,value:t,primary:n,children:r}){return(0,V.jsxs)(`div`,{style:{textAlign:`center`,padding:`0.75rem`,border:`1px solid var(--ghost, rgba(194,199,208,0.15))`,borderRadius:`0.25rem`,background:`var(--surface-lowest, #ffffff)`},children:[(0,V.jsx)(`div`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:`1.25rem`,fontWeight:700,color:n?`var(--primary, #084471)`:`var(--on-surface, #191c1e)`},children:t}),(0,V.jsx)(`div`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:`9px`,textTransform:`uppercase`,letterSpacing:`0.05em`,color:`var(--on-surface-variant, #6b7280)`,marginTop:`0.25rem`},children:e}),r]})}function Ds({you:e,agent:t}){return(0,V.jsxs)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:`0.5rem`,marginTop:`0.25rem`,fontFamily:`var(--font-mono, monospace)`,fontSize:`9px`,color:`var(--on-surface-variant, #6b7280)`},children:[(0,V.jsx)(`span`,{style:{color:`var(--primary, #084471)`,fontWeight:600},children:e}),(0,V.jsx)(`span`,{style:{color:`var(--green, #006a61)`,fontWeight:600},children:t})]})}function Os(e){let t=e.dataset.sessions;if(!t)return[];try{let e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}}function ks(){let e=document.querySelector(`[data-accent]`);if(e)return{isDark:e.getAttribute(`data-mode`)===`dark`,accentColor:e.getAttribute(`data-accent`)||void 0};let t=window.getComputedStyle(document.body).backgroundColor.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(!t)return{isDark:!1};let[,n,r,i]=t.map(Number);return{isDark:(.299*n+.587*r+.114*i)/255<.5}}var As=new Map,js=null;function Ms(){let[e,t]=(0,ao.useState)(null);if(js=e=>t(e),!e)return null;let n=document.querySelector(`.heyiam-project`),r=n?.getAttribute(`data-session-base-url`),i;if(r)i=`${r}/${e.title.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``).slice(0,80)||`untitled`}.html`;else{let t=n?.getAttribute(`data-username`),r=n?.getAttribute(`data-project-slug`),a=e.slug;t&&r&&a&&(i=`/@${t}/${r}/${a}`)}return(0,V.jsx)(ws,{session:e,sessionPageUrl:i,onClose:()=>t(null)})}function Ns(){let{isDark:e,accentColor:t}=ks();if(document.querySelectorAll(`[data-work-timeline]`).forEach(n=>{let r=Os(n);if(r.length!==0){for(let e of r)As.set(e.id,e);(0,bs.createRoot)(n).render(ao.createElement(Qo,{sessions:r,maxHeight:300,isDark:e,accentColor:t,onSessionClick:e=>{js&&js(e)}}))}}),document.querySelectorAll(`[data-growth-chart]`).forEach(n=>{let r=Os(n);if(r.length===0)return;for(let e of r)As.set(e.id,e);let i=parseInt(n.dataset.totalLoc||`0`,10),a=parseInt(n.dataset.totalFiles||`0`,10);(0,bs.createRoot)(n).render(ao.createElement(ms,{sessions:r,totalLoc:i,totalFiles:a,isDark:e,accentColor:t,onSessionClick:e=>{js&&js(e)}}))}),document.querySelectorAll(`[data-session-id]`).forEach(e=>{e.style.cursor=`pointer`,e.addEventListener(`click`,t=>{let n=e.dataset.sessionId;if(!n)return;let r=As.get(n);r&&js&&(t.preventDefault(),js(r))})}),Fs(),Is(),Ls(),As.size>0){let e=document.createElement(`div`);e.id=`heyiam-overlay-root`,document.body.appendChild(e),(0,bs.createRoot)(e).render(ao.createElement(Ms))}}var Ps=typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function Fs(){let e=document.querySelectorAll([`.counter[data-target]`,`.stat-value[data-target]`,`.stat-number[data-target]`,`.value[data-target]`,`[data-count-to]`,`.dl-stat-number[data-target]`,`[data-animate][data-target]`].join(`,`));if(e.length===0)return;function t(e,t){return t===`comma`?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,`,`):t===`decimal`||t===`1`?e.toFixed(1):Math.round(e).toString()}function n(e){let n=parseFloat(e.getAttribute(`data-target`)??e.getAttribute(`data-count-to`)??`0`),r=e.getAttribute(`data-format`)??``,i=e.getAttribute(`data-suffix`)??``,a=r===`decimal`||r===`1`;if(Ps){e.textContent=t(n,r)+i;return}let o=null;function s(c){o||=c;let l=Math.min((c-o)/1200,1),u=1-(1-l)**3;e.textContent=t(a?u*n:Math.round(u*n),r)+i,l<1&&requestAnimationFrame(s)}requestAnimationFrame(s)}let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(n(t.target),r.unobserve(t.target))},{threshold:.3});e.forEach(e=>r.observe(e))}function Is(){let e=[`.fade-in`,`.fade-up`,`.reveal`,`.section-reveal`,`.sc-section`,`.sc-stagger`,`.mono-section`,`.ember-section`,`.radar-section`,`.cos-section`,`.strata-layer`,`.dl-bounce`,`.vd-section`,`.fly-left`,`.fly-right`,`.phase-item`,`.growth-line`,`.growth-area`,`.growth-dot`,`.session-card`,`.beat-item`,`.qa-card`];document.querySelectorAll(`.parallax`).forEach(e=>{e.classList.add(`parallax--mounted`)});let t=document.querySelectorAll(e.join(`,`));if(t.length===0)return;if(Ps){t.forEach(e=>e.classList.add(`visible`));return}let n=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(t.target.classList.add(`visible`),n.unobserve(t.target))},{threshold:.15});t.forEach(e=>n.observe(e))}function Ls(){let e=document.querySelectorAll(`[data-width], [data-bar-width], [data-target-width]`);if(e.length===0)return;if(Ps){e.forEach(e=>{let t=e.getAttribute(`data-width`)??e.getAttribute(`data-bar-width`)??e.getAttribute(`data-target-width`)??``;t&&(e.style.width=t.includes(`%`)?t:`${t}%`)});return}let t=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){let e=n.target,r=e.getAttribute(`data-width`)??e.getAttribute(`data-bar-width`)??e.getAttribute(`data-target-width`)??``;r&&(e.style.transition=`width 0.6s ease-out`,e.style.width=r.includes(`%`)?r:`${r}%`),t.unobserve(e)}},{threshold:.2});e.forEach(e=>t.observe(e))}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,Ns):Ns());function Rs(e){let t=document.createElement(`a`);return t.href=e,t.target=`_blank`,t.rel=`noopener noreferrer`,t.className=`project-link`,t.textContent=e.replace(/^https?:\/\/(www\.)?/,``).replace(/\.git$/,``),t}function zs(e){return qa(e,`liquid-render`)+`
32
+ #liquid-render img[alt*="screenshot" i], #liquid-render img[alt*="Screenshot" i], #liquid-render [class*="screenshot"] img { max-height: 24rem; width: 100%; object-fit: cover; object-position: top; border-radius: 6px; }`}function Bs(){let{dirName:e}=nt(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(!0),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(`#084471`),[h,g]=(0,_.useState)(`light`),y=(0,_.useRef)([]),b=(0,_.useRef)(null),[x,S]=(0,_.useState)(``),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(``),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(!1),[j,M]=(0,_.useState)(!1),[N,P]=(0,_.useState)(null),[ee,F]=(0,_.useState)(``),[I,te]=(0,_.useState)(!1),[L,ne]=(0,_.useState)(null),[re,ie]=(0,_.useState)(!1),[R,ae]=(0,_.useState)(!1),[oe,se]=(0,_.useState)(!1),[ce,le]=(0,_.useState)(null),ue=(0,_.useRef)(null),de=(0,_.useRef)(null),fe=(0,_.useCallback)(t=>{e&&(f(null),Nr(t?`${e}?template=${encodeURIComponent(t)}`:e).then(e=>{e?(c(e.html),u(e.css),e.accent&&m(e.accent),e.mode&&g(e.mode),e.screenshotUrl&&O(t=>t||e.screenshotUrl)):f(`Failed to render template`)}).catch(()=>{f(`Failed to render template`)}))},[e]);(0,_.useEffect)(()=>{e&&(c(null),u(null),n(null),i(!0),tr(e).then(e=>{n(e),e.enhanceCache?.title&&S(e.enhanceCache.title),e.enhanceCache?.repoUrl&&w(e.enhanceCache.repoUrl),e.enhanceCache?.projectUrl&&E(e.enhanceCache.projectUrl),e.enhanceCache?.screenshotBase64&&O(e.enhanceCache.screenshotBase64),e.enhanceCache?.result?.narrative&&F(e.enhanceCache.result.narrative)}).catch(()=>{}).finally(()=>i(!1)),fe(),Hr(e).then(({url:e})=>{e&&w(t=>t||(e.startsWith(`http`)?e:`https://${e}`))}).catch(()=>{}),Ir().then(e=>{e.username&&P(e.username)}).catch(()=>{}))},[e,fe]),(0,_.useEffect)(()=>{let e=b.current;!s||!e||(e.innerHTML=s,requestAnimationFrame(()=>{Fs(),Is(),Ls()}))},[s,r]),(0,_.useEffect)(()=>{let e=b.current;if(!e||!t)return;let n=t;function r(e){let t=e.target.closest(`a[href]`);if(!t)return;let r=(t.getAttribute(`href`)??``).match(/\/session\/(.+)$/);if(!r)return;e.preventDefault();let i=decodeURIComponent(r[1]).replace(/\.html$/,``),a=n.sessions.find(e=>e.id===i||e.title?.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``)===i);a&&o(a)}return e.addEventListener(`click`,r),()=>e.removeEventListener(`click`,r)},[t]),(0,_.useEffect)(()=>{let e=b.current;if(!s||!e||!t)return;let n=[],{sessions:r,project:i}=t,a=h===`dark`;return e.querySelectorAll(`[data-work-timeline]`).forEach(e=>{let t=(0,v.createRoot)(e);n.push(t),t.render((0,z.jsx)(ca,{sessions:r,maxHeight:400,onSessionClick:e=>o(e),accentColor:p,isDark:a}))}),e.querySelectorAll(`[data-growth-chart]`).forEach(e=>{let t=(0,v.createRoot)(e);n.push(t),t.render((0,z.jsx)(Ca,{sessions:r,totalLoc:i.totalLoc,totalFiles:i.totalFiles,onSessionClick:e=>o(e),accentColor:p,isDark:a,dualPositive:!0,variant:e.getAttribute(`data-variant`)||`default`}))}),y.current=n,()=>{for(let e of n)e.unmount()}},[s,t]),(0,_.useEffect)(()=>{let e=b.current;if(!e||!s)return;let t=e.querySelector(`[data-editable="title"]`);t&&x&&(t.textContent=x);let n=e.querySelector(`[data-editable="links"]`);n&&(n.replaceChildren(),(C||T)&&(C&&n.appendChild(Rs(C)),T&&n.appendChild(Rs(T))));let r=e.querySelector(`[data-editable="screenshot"]`);r&&(D?r.style.display=``:r.style.display=`none`);let i=e.querySelector(`[data-editable="narrative"]`);i&&ee&&(i.textContent=ee)},[x,C,T,D,ee,s]);let pe=(0,_.useCallback)(()=>{if(!e||!t)return;let n=t.enhanceCache,r=n?.result??{narrative:``,arc:[],skills:[],timeline:[],questions:[]},i=ee===r.narrative?r:{...r,narrative:ee};Vr(e,n?.selectedSessionIds??[],i,{title:x||void 0,repoUrl:C||void 0,projectUrl:T||void 0,screenshotBase64:D??void 0}).then(()=>M(!1)).catch(()=>{})},[e,t,x,C,T,D,ee]);if((0,_.useEffect)(()=>{if(j)return ue.current&&clearTimeout(ue.current),ue.current=setTimeout(pe,800),()=>{ue.current&&clearTimeout(ue.current)}},[j,pe]),r)return(0,z.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading project...`})});if(!t)return(0,z.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Project not found.`})});let{project:me,sessions:he}=t,ge=[...new Set(he.map(e=>e.source??`unknown`))];return(0,z.jsxs)(`div`,{className:`grid grid-cols-[240px_1fr] min-h-[calc(100vh-48px)]${h===`dark`?` bg-black`:``}`,children:[(0,z.jsxs)(`aside`,{className:`border-r border-ghost bg-surface-low p-4 overflow-y-auto`,children:[(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:`Source mix`}),(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:ge.map(e=>(0,z.jsx)(ei,{children:e},e))})]}),(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:`Status`}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:[(0,z.jsx)(ei,{variant:`primary`,children:me.enhancedAt?`Refined`:`Unrefined`}),(0,z.jsx)(ei,{variant:`green`,children:me.isUploaded?`Uploaded`:`Local only`})]}),me.isUploaded&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{le(null),ae(!0)},className:`mt-2 font-mono text-[10px] text-error hover:underline`,children:`Remove from heyi.am`})]}),t.enhanceCache&&(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:`Sessions`}),(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsxs)(`span`,{className:`text-xs text-on-surface-variant`,children:[t.enhanceCache.selectedSessionIds.length,` of `,he.filter(e=>!e.parentSessionId).length,` included`]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ie(!0),className:`text-[10px] font-mono text-primary hover:underline`,children:`Manage`})]})]}),(()=>{let n=t.enhanceCache?.selectedSessionIds?.length??0,r=he.length,i=!!me.enhancedAt&&n>=r&&r>0;return(0,z.jsxs)(`div`,{className:`mb-4`,children:[(0,z.jsx)(bn,{to:`/project/${encodeURIComponent(e)}/enhance`,"aria-disabled":i||void 0,onClick:e=>{i&&e.preventDefault()},className:`block w-full text-center font-mono text-[10px] uppercase tracking-wider px-3 py-2 rounded-sm border ${i?`border-ghost text-outline cursor-not-allowed pointer-events-none`:`border-primary text-primary hover:bg-primary/10`}`,children:i?`Enhanced ✓`:`Enhance with AI`}),!i&&n>0&&(0,z.jsxs)(`div`,{className:`text-[9px] font-mono text-outline mt-1`,children:[n,` of `,r,` sessions enhanced`]})]})})(),(0,z.jsx)(ci,{children:`The local project page is the main object. Public pages are just one projection of it.`}),(0,z.jsxs)(`div`,{className:`mt-6 pt-4 border-t border-ghost`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-3`,children:`Project metadata`}),(0,z.jsxs)(`label`,{className:`block mb-3`,children:[(0,z.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Title`}),(0,z.jsx)(`input`,{type:`text`,value:x,placeholder:me.name,onChange:e=>{S(e.target.value),M(!0)},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`})]}),t.enhanceCache?.result?.narrative!==void 0&&(0,z.jsxs)(`label`,{className:`block mb-3`,children:[(0,z.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Narrative`}),(0,z.jsx)(`textarea`,{value:ee,onChange:e=>{F(e.target.value),M(!0)},rows:4,placeholder:`Project narrative...`,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 resize-y leading-relaxed`})]}),(0,z.jsxs)(`label`,{className:`block mb-3`,children:[(0,z.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Repo URL`}),(0,z.jsx)(`input`,{type:`url`,value:C,onChange:e=>{w(e.target.value),M(!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,z.jsxs)(`label`,{className:`block mb-3`,children:[(0,z.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Project URL`}),(0,z.jsx)(`input`,{type:`url`,value:T,onChange:e=>{E(e.target.value),M(!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,z.jsxs)(`div`,{className:`mb-2`,children:[(0,z.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Screenshot`}),D?(0,z.jsxs)(`div`,{className:`relative rounded-sm overflow-hidden border border-ghost`,children:[(0,z.jsx)(`img`,{src:D.startsWith(`data:`)||D.startsWith(`/`)?D:`data:image/png;base64,${D}`,alt:`Project screenshot`,className:`w-full h-auto max-h-32 object-cover object-top`}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>{O(null),M(!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,z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>de.current?.click(),className:`text-xs font-mono text-primary hover:underline text-left`,children:`Upload image...`}),T&&(0,z.jsx)(`button`,{type:`button`,onClick:async()=>{if(!e)return;A(!0);let t=me.name.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``);try{let n=await Ur(e,t,T);n.ok&&n.preview&&(O(n.preview),M(!0))}catch{}finally{A(!1)}},disabled:k,className:`text-xs font-mono text-primary hover:underline text-left`,children:k?`Capturing...`:`Auto-capture from URL`})]}),(0,z.jsx)(`input`,{ref:de,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{O(n.result),M(!0)},n.readAsDataURL(t)}})]}),j&&(0,z.jsx)(`div`,{className:`text-[9px] font-mono text-outline mt-2`,children:`Saving...`})]}),!1]}),(0,z.jsxs)(`div`,{className:`relative min-h-0 overflow-y-auto ${h===`dark`?`p-0`:`p-6`}`,style:h===`dark`?{background:`#000`}:void 0,children:[s?(0,z.jsxs)(z.Fragment,{children:[l&&(0,z.jsx)(`style`,{children:zs(l)}),(0,z.jsx)(`div`,{id:`liquid-render`,ref:b})]}):d?(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 gap-3`,children:[(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:d}),(0,z.jsx)(`button`,{onClick:()=>fe(`editorial`),className:`text-xs text-primary hover:underline`,children:`Retry with editorial template`})]}):(0,z.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Rendering template...`})}),a&&e&&(0,z.jsx)(Za,{session:a,projectDirName:e,onClose:()=>o(null),isDark:h===`dark`,onSessionUpdated:()=>fe()})]}),re&&(0,z.jsx)(Ua,{sessions:he,initialSelection:new Set(t.enhanceCache?.selectedSessionIds??[]),projectDirName:e,onClose:()=>ie(!1),onSave:async t=>{await rr(e,{selectedSessionIds:[...t]}),ie(!1);let r=await tr(e);n(r),r.enhanceCache?.result?.narrative&&F(r.enhanceCache.result.narrative),fe()},onSessionDeleted:async()=>{try{n(await tr(e)),fe()}catch{}}}),R&&(0,z.jsx)(ui,{title:`Remove from heyi.am`,message:`Delete this project and all its sessions from heyi.am? This can't be undone.`,details:`Your local archived sessions stay on disk — only the remote copy is removed.`,confirmLabel:`Remove`,destructive:!0,busy:oe,error:ce,onCancel:()=>{oe||(ae(!1),le(null))},onConfirm:async()=>{se(!0),le(null);try{await Or(e),ae(!1),n(await tr(e)),fe()}catch(e){le(e.message)}finally{se(!1)}}})]})}function Vs(){let{dirName:e}=nt(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(!1);(0,_.useEffect)(()=>{e&&Promise.all([nr(e).catch(()=>null),Jn(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 rr(e,t)}catch{}finally{c(!1)}}}return a?(0,z.jsx)(ri,{back:{label:e??`Project`,to:`/project/${encodeURIComponent(e??``)}`},chips:[{label:`Project boundaries`}],children:(0,z.jsx)(`div`,{className:`p-6`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading boundaries...`})})}):(0,z.jsx)(ri,{back:{label:e??`Project`,to:`/project/${encodeURIComponent(e??``)}`},chips:[{label:`Project boundaries`}],actions:(0,z.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,z.jsxs)(`div`,{className:`p-6`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl font-bold text-on-surface`,children:`Shape what this project actually contains`}),(0,z.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`Clustering gets you close. This screen makes it trustworthy.`}),(0,z.jsx)(`div`,{className:`h-4`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Included sessions`,meta:`${l.length} total`}),(0,z.jsx)(`div`,{className:`flex flex-col gap-3`,children:l.length===0?(0,z.jsx)(ci,{children:`No sessions included yet.`}):l.map(e=>(0,z.jsx)(ci,{title:e.title,children:(0,z.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,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Nearby / excluded`,meta:`needs review`}),(0,z.jsx)(`div`,{className:`flex flex-col gap-3`,children:u.length===0?(0,z.jsx)(ci,{children:`No excluded sessions.`}):u.map(e=>(0,z.jsx)(ci,{title:r.find(t=>t.id===e.sessionId)?.title??e.sessionId,children:(0,z.jsxs)(`span`,{className:`font-mono text-xs text-on-surface-variant`,children:[`excluded · `,e.reason]})},e.sessionId))})]})]})]})})}function Hs(e){return e?new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):``}function Us(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 Ws=[`overview`,`triage`,`enhance`,`questions`,`timeline`];function Gs({current:e}){let t=Ws.indexOf(e);return(0,z.jsx)(`div`,{className:`phase-bar`,children:Ws.slice(0,-1).map((e,n)=>(0,z.jsx)(`div`,{className:`phase-bar__segment ${n<=t?`phase-bar__segment--active`:``}`},n))})}function Ks({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,z.jsxs)(`div`,{className:`upload-flow`,children:[(0,z.jsx)(`div`,{className:`upload-flow__label`,children:`Upload Project`}),(0,z.jsx)(`h2`,{className:`upload-flow__title`,children:e.name}),(0,z.jsx)(`div`,{className:`upload-flow__date`,children:Us(e.dateRange)}),(0,z.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,z.jsxs)(`div`,{className:`upload-flow__stat-grid`,children:[(0,z.jsx)(qs,{label:`Sessions`,value:String(e.sessionCount)}),(0,z.jsx)(qs,{label:e.totalAgentDuration?`Human / Agents`:`Total Time`,value:e.totalAgentDuration?`${la(e.totalDuration)} / ${la(e.totalAgentDuration)}`:la(e.totalDuration)}),(0,z.jsx)(qs,{label:`Lines changed`,value:ua(e.totalLoc)}),(0,z.jsx)(qs,{label:`Files`,value:String(e.totalFiles)})]}),(0,z.jsxs)(`div`,{className:`upload-flow__section-label`,children:[`All Sessions (`,t.length,`)`]}),(0,z.jsxs)(`div`,{className:`session-table`,children:[(0,z.jsxs)(`div`,{className:`session-table__header`,children:[(0,z.jsx)(`span`,{children:`Session`}),(0,z.jsx)(`span`,{style:{textAlign:`right`},children:`Date`}),(0,z.jsx)(`span`,{style:{textAlign:`right`},children:`Time`}),(0,z.jsx)(`span`,{style:{textAlign:`right`},children:`LOC`}),(0,z.jsx)(`span`,{style:{textAlign:`right`},children:`Turns`})]}),(0,z.jsx)(`div`,{className:`session-table__body`,children:i.map(e=>(0,z.jsxs)(`div`,{className:`session-table__row`,children:[(0,z.jsx)(`span`,{className:`session-table__name`,children:e.title}),(0,z.jsx)(`span`,{className:`session-table__cell`,children:Hs(e.date)}),(0,z.jsx)(`span`,{className:`session-table__cell`,children:la(e.durationMinutes)}),(0,z.jsx)(`span`,{className:`session-table__cell`,children:ua(e.linesOfCode)}),(0,z.jsx)(`span`,{className:`session-table__cell`,children:e.turns})]},e.id))})]}),(0,z.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,z.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:r,children:`Cancel`}),(0,z.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:n,children:[e.sessionCount<5?`Enhance all ${e.sessionCount} sessions`:`Let AI pick sessions`,` →`]})]})]})}function qs({label:e,value:t}){return(0,z.jsxs)(`div`,{className:`stat-card`,children:[(0,z.jsx)(`div`,{className:`stat-card__label`,children:e}),(0,z.jsx)(`div`,{className:`stat-card__value`,children:t})]})}var Js=[`◐`,`◑`,`◒`,`◓`];function Ys(){let[e,t]=(0,_.useState)(0);return(0,_.useEffect)(()=>{let e=setInterval(()=>t(e=>(e+1)%Js.length),120);return()=>clearInterval(e)},[]),Js[e]}function Xs(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`: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 Zs({events:e}){let t=Ys(),n=(0,_.useRef)(null),r=Xs(e,t);return(0,_.useEffect)(()=>{n.current&&(n.current.scrollTop=n.current.scrollHeight)},[r.length]),(0,z.jsx)(`div`,{className:`triage-terminal`,role:`log`,"aria-live":`polite`,"aria-label":`Triage progress`,children:(0,z.jsx)(`div`,{className:`triage-terminal__feed`,ref:n,children:r.map(e=>(0,z.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 Qs({title:e,stats:t,reason:n,variant:r,checked:i,onToggle:a,dimTitle:o,previouslyUploaded:s}){let[c,l]=(0,_.useState)(!1),u=n.length>(r===`selected`?60:40),d=r===`selected`?n.length>60?n.slice(0,57)+`...`:n:n.length>40?n.slice(0,37)+`...`:n;return(0,z.jsxs)(`div`,{className:`triage-item ${i?`triage-item--selected`:`triage-item--skipped`}`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:i,onChange:a,className:`triage-item__checkbox`}),(0,z.jsxs)(`div`,{className:`triage-item__info`,children:[(0,z.jsxs)(`div`,{className:`triage-item__name`,style:o?{color:`var(--on-surface-variant)`}:void 0,children:[e,s&&(0,z.jsx)(`span`,{className:`triage-item__uploaded-badge`,children:`previously uploaded`})]}),(0,z.jsx)(`div`,{className:`triage-item__stats`,children:t})]}),(0,z.jsx)(`div`,{className:`triage-item__reason triage-item__reason--${r} ${u?`triage-item__reason--expandable`:``}`,onClick:u?()=>l(!c):void 0,role:u?`button`:void 0,tabIndex:u?0:void 0,onKeyDown:u?e=>{e.key===`Enter`&&l(!c)}:void 0,children:c?n:d})]})}function $s({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,z.jsxs)(`div`,{className:`upload-flow`,children:[(0,z.jsx)(Gs,{current:`triage`}),(0,z.jsxs)(`div`,{className:`upload-flow__scan-status`,children:[`✓ Scanned `,t.length,` sessions · `,la(e.totalDuration),` · `,ua(e.totalLoc),` lines`]}),(0,z.jsxs)(`h2`,{className:`upload-flow__title`,children:[`AI selected `,l,` sessions to showcase`]}),(0,z.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,z.jsxs)(`div`,{className:`triage-method-banner`,children:[(0,z.jsx)(`span`,{className:`triage-method-banner__icon`,"aria-hidden":`true`,children:`ⓘ`}),(0,z.jsx)(`span`,{children:`Sessions selected by signal analysis (no API key configured). `}),(0,z.jsx)(`a`,{href:`/settings`,className:`triage-method-banner__link`,children:`Go to Settings`})]}),(0,z.jsxs)(`div`,{className:`upload-flow__section-label upload-flow__section-label--selected`,children:[`✓ Selected for showcase (`,l,`)`]}),(0,z.jsx)(`div`,{className:`triage-list`,children:n.selected.map(e=>{let t=c.get(e.sessionId),n=r.has(e.sessionId);return(0,z.jsx)(Qs,{title:t?.title??e.sessionId,stats:t?`${la(t.durationMinutes)} \u00b7 ${ua(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,z.jsxs)(`details`,{className:`triage-skipped`,children:[(0,z.jsxs)(`summary`,{className:`triage-skipped__summary`,children:[(0,z.jsx)(`span`,{children:`▶`}),` Skipped (`,n.skipped.length,`) — click to override`]}),(0,z.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,z.jsx)(Qs,{title:t?.title??e.sessionId,stats:t?`${la(t.durationMinutes)} \u00b7 ${ua(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,z.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,z.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:o,children:`Back`}),(0,z.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:a,disabled:l===0,children:`Enhance project →`})]})]})}function ec({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=sr(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`),M=s.every(e=>e.status!==`pending`&&e.status!==`enhancing`),N=A.length>0,P=j.length>0,ee=(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)},[]),F=(0,_.useCallback)(()=>{i({narrative:``,arc:[],skills:p,timeline:[],questions:[]})},[p,i]);return(0,z.jsxs)(`div`,{className:`enhance-split`,children:[(0,z.jsxs)(`div`,{className:`enhance-split__left`,children:[(0,z.jsx)(`div`,{className:`enhance-split__left-header`,children:`Session Processing`}),(0,z.jsx)(`div`,{className:`enhance-split__feed`,ref:T,children:s.map(e=>(0,z.jsxs)(`div`,{className:`enhance-feed-item ${e.status===`pending`?`enhance-feed-item--pending`:``} ${e.status===`failed`?`enhance-feed-item--failed`:``}`,children:[(0,z.jsxs)(`div`,{className:`enhance-feed-item__row`,children:[e.status===`done`||e.status===`skipped`?(0,z.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}):e.status===`failed`?(0,z.jsx)(`span`,{className:`enhance-feed-item__fail`,children:`✗`}):e.status===`enhancing`?(0,z.jsx)(`span`,{className:`enhance-feed-item__spinner`}):(0,z.jsx)(`span`,{className:`enhance-feed-item__circle`,children:`◯`}),(0,z.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,z.jsx)(`div`,{className:`enhance-feed-item__detail ${e.status===`failed`?`enhance-feed-item__detail--failed`:``}`,children:e.detail})]},e.sessionId))}),(0,z.jsxs)(`div`,{className:`enhance-split__narrative-box`,children:[(0,z.jsx)(`div`,{className:`enhance-split__narrative-label`,children:`PROJECT NARRATIVE`}),(0,z.jsx)(`div`,{className:`enhance-split__narrative-status`,children:b&&l===`done`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}),(0,z.jsxs)(`span`,{children:[`Loaded from cache (`,new Date(b).toLocaleDateString(),`)`]})]}):l===`done`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}),(0,z.jsx)(`span`,{children:`Project story complete`})]}):l===`generating`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`enhance-split__blink-dot`}),(0,z.jsxs)(`span`,{children:[`Building project story from `,n.size,` sessions...`]})]}):(0,z.jsx)(`span`,{children:`Waiting for session processing...`})})]})]}),(0,z.jsxs)(`div`,{className:`enhance-split__right`,children:[(0,z.jsx)(Gs,{current:`enhance`}),v?(0,z.jsxs)(`div`,{className:`enhance-error`,style:{marginTop:`var(--spacing-4)`},children:[(0,z.jsx)(`div`,{className:`enhance-error__message`,children:v}),(0,z.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,z.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:a,children:`Back`}),(0,z.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:ee,children:`Retry`}),P&&(0,z.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:F,children:`Continue without narrative`})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`upload-flow__label`,children:`Project Story`}),(0,z.jsx)(`h2`,{className:`upload-flow__title`,children:e.name}),!h&&!d?.narrative&&(0,z.jsxs)(`div`,{className:`enhance-split__narrative-placeholder`,children:[(0,z.jsx)(`span`,{className:`enhance-split__blink-dot`}),(0,z.jsx)(`span`,{children:l===`generating`?`Writing project narrative...`:`Analyzing sessions — narrative will appear here...`})]}),(h||d?.narrative)&&(0,z.jsxs)(`div`,{className:`enhance-split__narrative-text`,children:[d?.narrative??h,l===`generating`&&(0,z.jsx)(`span`,{className:`typewriter-cursor`,"aria-hidden":`true`})]}),k.length>0&&(0,z.jsx)(`div`,{className:`enhance-split__skills`,children:k.map(e=>(0,z.jsx)(`span`,{className:`chip`,children:e},e))}),d?.arc&&d.arc.length>0&&(()=>{let e=d.arc;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`upload-flow__section-label`,style:{marginTop:`var(--spacing-6)`},children:`Project Arc`}),(0,z.jsx)(`div`,{className:`enhance-split__arc`,children:e.map((t,n)=>(0,z.jsxs)(`div`,{className:`enhance-split__arc-item ${!O&&n===e.length-1?`enhance-split__arc-item--generating`:``}`,children:[(0,z.jsx)(`div`,{className:`enhance-split__arc-num`,children:String(t.phase).padStart(2,`0`)}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`enhance-split__arc-title`,children:t.title}),(0,z.jsx)(`div`,{className:`enhance-split__arc-desc`,children:t.description})]})]},n))})]})})(),M&&N&&!O&&(0,z.jsxs)(`div`,{className:`enhance-split__failure-recovery`,children:[(0,z.jsxs)(`p`,{className:`enhance-split__failure-text`,children:[A.length,` session`,A.length===1?``:`s`,` failed to enhance.`]}),(0,z.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,z.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:ee,children:`Retry failed`}),P&&(0,z.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:F,children:[`Continue with `,j.length,` successful →`]})]})]}),O&&(0,z.jsxs)(`div`,{className:`upload-flow__actions`,children:[b&&(0,z.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:()=>{w.current?.abort(),C(!0)},children:`Re-enhance`}),(0,z.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:()=>i(d),children:[d.questions.length>0?`Answer a few questions`:`Continue`,` →`]})]})]})]})]})}var tc={pattern:`Pattern detected`,architecture:`Architecture`,evolution:`Evolution`};function nc({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,z.jsxs)(`div`,{className:`upload-flow`,children:[(0,z.jsx)(Gs,{current:`questions`}),(0,z.jsxs)(`div`,{className:`upload-flow__scan-status`,children:[`✓ `,e.timeline.reduce((e,t)=>e+t.sessions.length,0),` sessions enhanced · Project narrative generated`]}),(0,z.jsx)(`h2`,{className:`upload-flow__title`,children:`A few things we noticed`}),(0,z.jsx)(`p`,{className:`upload-flow__desc`,children:`Your answers get woven into the narrative. Skip any you don't want to answer.`}),(0,z.jsx)(`div`,{className:`questions-list`,children:e.questions.map(e=>(0,z.jsxs)(`div`,{className:`question-card`,children:[(0,z.jsx)(`div`,{className:`question-card__tag-row`,children:(0,z.jsx)(`span`,{className:`question-card__tag question-card__tag--${e.category}`,children:tc[e.category]??e.category})}),(0,z.jsx)(`div`,{className:`question-card__text`,children:e.question}),(0,z.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,z.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,z.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:t,disabled:a,children:`Skip questions`}),(0,z.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:l,disabled:!c||a,children:a?`Weaving...`:`Weave into narrative →`})]})]})}function rc({project:e,timeline:t,onBack:n,onViewProject:r}){let i=t.reduce((e,t)=>e+t.sessions.length,0);return(0,z.jsxs)(`div`,{className:`upload-flow`,children:[(0,z.jsx)(Gs,{current:`timeline`}),(0,z.jsx)(`div`,{className:`upload-flow__label`,children:`Project Timeline`}),(0,z.jsxs)(`h2`,{className:`upload-flow__title`,children:[e.name,` `,(0,z.jsxs)(`span`,{style:{fontWeight:400,fontSize:`1rem`,color:`var(--on-surface-variant)`},children:[i,` sessions`]})]}),(0,z.jsx)(`p`,{className:`upload-flow__desc`,children:e.description}),(0,z.jsxs)(`div`,{className:`timeline`,children:[(0,z.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,z.jsxs)(`div`,{className:`timeline__period`,children:[(0,z.jsxs)(`div`,{className:`timeline__period-header`,children:[(0,z.jsx)(`span`,{className:`timeline__period-date`,children:e.period}),(0,z.jsx)(`span`,{className:`timeline__period-sep`,children:`—`}),(0,z.jsx)(`span`,{className:`timeline__period-label`,children:e.label})]}),n.map(e=>(0,z.jsxs)(`div`,{className:`timeline__featured`,children:[(0,z.jsx)(`div`,{className:`timeline__dot--large`}),(0,z.jsxs)(`div`,{className:`timeline__card`,children:[(0,z.jsxs)(`div`,{className:`timeline__card-header`,children:[(0,z.jsx)(`span`,{className:`timeline__card-title`,children:e.title}),e.tag&&(0,z.jsx)(`span`,{className:`timeline__card-tag`,children:e.tag})]}),(0,z.jsxs)(`div`,{className:`timeline__card-meta`,children:[(0,z.jsx)(`span`,{children:la(e.duration)}),e.date&&(0,z.jsx)(`span`,{children:Hs(e.date)})]}),e.description&&(0,z.jsx)(`p`,{className:`timeline__card-desc`,children:e.description}),e.skills&&e.skills.length>0&&(0,z.jsx)(`div`,{className:`timeline__card-skills`,children:e.skills.map(e=>(0,z.jsx)(`span`,{className:`chip`,children:e},e))})]})]},e.sessionId)),r.length>0&&(0,z.jsxs)(`div`,{className:`timeline__collapsed`,children:[(0,z.jsx)(`div`,{className:`timeline__dot--small`}),(0,z.jsx)(ic,{sessions:r})]})]},t)})]}),(0,z.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,z.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:n,children:`Back`}),(0,z.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:r,children:`View updated project →`})]})]})}function ic({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?`${Hs(n[0])} \u2013 ${Hs(n[n.length-1])}`:n.length===1?Hs(n[0]):``;return(0,z.jsxs)(`span`,{className:`timeline__collapsed-text`,children:[e.length,` smaller session`,e.length===1?``:`s`,` — `,t,r&&(0,z.jsxs)(z.Fragment,{children:[` · `,r]})]})}var ac=[{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 oc(){let{dirName:e}=nt(),[t,n]=On(),r=et(),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(!0);(0,_.useEffect)(()=>{qn().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),M=A?.timeline??[],N=(0,_.useCallback)(()=>{f.length>0||!e||Jn(e).then(e=>{p(e),h(!1)}).catch(e=>{k(e.message),h(!1)})},[e,f.length]);(0,_.useEffect)(()=>{[`overview`,`triage`,`enhance`].includes(l)&&N()},[l,N]),(0,_.useEffect)(()=>{let i=t.get(`view`)||t.get(`preview`);!e||i!==`1`||(n({},{replace:!0}),r(`/project/${e}`))},[e]);let P=(0,_.useCallback)(()=>{e&&(S(!0),k(null),w([]),D.current=or(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 ee=(0,_.useCallback)(e=>{j(e),e.questions.length>0?d(`questions`):d(`timeline`)},[]),F=(0,_.useCallback)(()=>{d(`timeline`)},[]),I=(0,_.useCallback)(async t=>{if(!(!e||!A))try{let n=await cr(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]),te=(0,_.useCallback)(e=>{b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return o?(0,z.jsx)(ri,{back:{label:`Projects`,to:`/projects`},children:(0,z.jsx)(`div`,{className:`dashboard-loading`,children:`Loading project...`})}):c?(0,z.jsx)(ri,{back:{label:`Projects`,to:`/projects`},children:m&&l===`overview`?(0,z.jsx)(`div`,{className:`dashboard-loading`,children:`Loading sessions...`}):O&&l===`overview`?(0,z.jsx)(`div`,{className:`dashboard-error`,children:O}):l===`overview`?x?(0,z.jsx)(Zs,{events:C}):(0,z.jsx)(Ks,{project:c,sessions:f,onTriage:P,onCancel:()=>r(`/`)}):l===`triage`&&g?(0,z.jsx)($s,{project:c,sessions:f,triageResult:g,selectedIds:y,onToggle:te,onEnhance:()=>d(`enhance`),onBack:()=>d(`overview`),uploadedSessionIds:c.uploadedSessions?new Set(c.uploadedSessions):void 0}):l===`enhance`&&g?(0,z.jsxs)(z.Fragment,{children:[T&&(0,z.jsxs)(`div`,{className:`upload-flow__auto-select-banner`,children:[`✓ `,T]}),(0,z.jsx)(ec,{project:c,sessions:f,selectedIds:y,triageResult:g,onComplete:ee,onBack:()=>d(`triage`)})]}):l===`questions`&&A?(0,z.jsx)(nc,{enhanceResult:A,onSkip:F,onWeave:I}):l===`timeline`?(0,z.jsx)(rc,{project:c,timeline:M.length>0?M.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}))})):ac,onBack:()=>A?.questions.length?d(`questions`):d(`enhance`),onViewProject:()=>{e&&A&&Vr(e,Array.from(y),A).catch(()=>{}),r(`/project/${e}`)}}):null}):(0,z.jsx)(ri,{back:{label:`Projects`,to:`/projects`},children:(0,z.jsx)(`div`,{className:`dashboard-error`,children:`Project not found`})})}function sc(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 cc(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``)}function lc(){let{dirName:e=``}=nt(),t=et(),[n,r]=(0,_.useState)({step:`review`}),[i,a]=(0,_.useState)(null);(0,_.useEffect)(()=>{e&&tr(e).then(a).catch(()=>{})},[e]);let o=(0,_.useCallback)(()=>{r({step:`uploading`,messages:[]});let t=i?.enhanceCache,n=i?.project,a=t?.title||n?.name||sc(e);lr(e,{title:a,slug:cc(a),narrative:t?.result?.narrative??``,repoUrl:t?.repoUrl??``,projectUrl:t?.projectUrl??``,timeline:t?.result?.timeline??[],skills:t?.result?.skills??[],totalSessions:n?.sessionCount??0,totalLoc:n?.totalLoc??0,totalDurationMinutes:n?.totalDuration??0,totalAgentDurationMinutes:n?.totalAgentDuration,totalFilesChanged:n?.totalFiles??0,totalInputTokens:n?.totalInputTokens??0,totalOutputTokens:n?.totalOutputTokens??0,skippedSessions:[],selectedSessionIds:t?.selectedSessionIds??[],screenshotBase64:t?.screenshotBase64??void 0},e=>{switch(e.type){case`project`:r(t=>t.step===`uploading`?{...t,messages:[...t.messages,`Project ${e.status}`]}:t);break;case`session`:r(t=>t.step===`uploading`?{...t,messages:[...t.messages,`Session ${e.sessionId}: ${e.status}`]}:t);break;case`done`:r({step:`done`,projectUrl:e.projectUrl,uploaded:e.uploaded,failed:e.failed});break;case`error`:e.message===`AUTH_REQUIRED`?s():r({step:`error`,message:e.message});break}})},[e,i]),s=(0,_.useCallback)(async()=>{r({step:`auth`,status:`opening`});try{let e=await qr();window.open(e.verification_uri,`_blank`),r({step:`auth`,status:`waiting`});let t=Date.now(),n=async()=>{try{if((await Wr(e.device_code)).authenticated){r({step:`auth`,status:`done`}),setTimeout(()=>o(),500);return}}catch{}Date.now()-t<3e5?setTimeout(n,5e3):r({step:`auth`,status:`error`,error:`Timed out. Try again.`})};setTimeout(n,5e3)}catch{r({step:`auth`,status:`error`,error:`Could not connect. Try again later.`})}},[o]),c=(0,z.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:o,disabled:n.step===`uploading`,children:`Upload to heyiam.com`});return(0,z.jsx)(ri,{back:{label:`Project`,to:`/project/${e}`},chips:[{label:`Upload to heyiam.com`}],actions:n.step===`review`?c:void 0,children:(0,z.jsxs)(`div`,{className:`p-6`,children:[n.step===`uploading`&&(0,z.jsxs)(ii,{className:`max-w-2xl mx-auto`,children:[(0,z.jsx)(li,{title:`Uploading...`,meta:`in progress`}),(0,z.jsxs)(`div`,{className:`space-y-1.5 mt-3`,children:[n.messages.map((e,t)=>(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,z.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),e]},t)),n.messages.length===0&&(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,z.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),`Connecting...`]})]})]}),n.step===`done`&&(0,z.jsxs)(ii,{className:`max-w-2xl mx-auto`,children:[(0,z.jsx)(li,{title:`Uploaded`,meta:`on heyi.am`}),(0,z.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-green shrink-0`}),(0,z.jsxs)(`span`,{className:`text-sm text-on-surface font-medium`,children:[n.uploaded,` session`,n.uploaded===1?``:`s`,` uploaded`]})]}),(0,z.jsx)(`p`,{className:`text-xs text-on-surface-variant`,children:`Sessions are unlisted by default. Go to the dashboard to publish them.`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,z.jsx)(`button`,{type:`button`,"data-testid":`publish-done-open-portfolio`,onClick:()=>{window.open(n.projectUrl,`_blank`,`noopener,noreferrer`),t(`/portfolio`)},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:`Open Portfolio`}),(0,z.jsx)(`a`,{href:n.projectUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`View live page →`})]})]}),(0,z.jsx)(uc,{projectUrl:n.projectUrl})]}),n.step===`auth`&&(0,z.jsxs)(ii,{className:`max-w-2xl mx-auto`,children:[n.status===`opening`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(li,{title:`Opening browser...`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 mt-3 text-sm text-on-surface-variant`,children:[(0,z.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),`Starting login...`]})]}),n.status===`waiting`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(li,{title:`Log in to heyiam.com`}),(0,z.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,z.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,z.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.`})]})]}),n.status===`done`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(li,{title:`Logged in`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 mt-3 text-sm text-on-surface`,children:[(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-green shrink-0`}),`Uploading...`]})]}),n.status===`error`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(li,{title:`Login failed`}),(0,z.jsx)(`p`,{className:`text-error text-sm mt-2`,children:n.error}),(0,z.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:s,children:`Try again`})]})]}),n.step===`error`&&(0,z.jsxs)(ii,{className:`max-w-2xl mx-auto`,children:[(0,z.jsx)(li,{title:`Upload failed`}),(0,z.jsx)(`p`,{className:`text-error text-sm mt-2`,children:n.message}),(0,z.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:`Retry`})]}),n.step===`review`&&(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-6`,children:[(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`What gets uploaded`,meta:`review`}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(ci,{children:`Project title and narrative summary`}),(0,z.jsx)(ci,{children:`Selected sessions and stats`}),(0,z.jsx)(ci,{children:`Curated decisions, phases, and rendered templates`})]})]}),(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`What stays local`,meta:`safety`}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(ci,{children:`Excluded sessions and private notes`}),(0,z.jsx)(ci,{children:`Source audit details and archive metadata`}),(0,z.jsx)(ci,{children:`Sensitive flagged terms and personal data`})]}),(0,z.jsx)(`div`,{className:`flex items-center gap-3 mt-4`,children:(0,z.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:o,children:`Upload to heyiam.com`})})]})]})]})})}function uc({projectUrl:e}){let[t,n]=(0,_.useState)(null),r=e.endsWith(`/`)?e.slice(0,-1):e,i=(()=>{try{return new URL(r).pathname.split(`/`).filter(Boolean)}catch{return[]}})(),a=i[0]||``,o=i[1]||``,s=[{label:`Badge`,desc:`GitHub, markdown`,code:`[![heyi.am](${r}/embed.svg)](${r})`},{label:`Widget`,desc:`Personal site`,code:`<div class="heyiam-embed" data-username="${a}" data-project="${o}"></div>\n<script src="${new URL(r).origin}/embed.js"><\/script>`},{label:`iframe`,desc:`Any site`,code:`<iframe src="${r}/embed?sections=stats,skills" width="480" height="200" frameborder="0"></iframe>`}],c=(e,t)=>{navigator.clipboard.writeText(e).then(()=>{n(t),setTimeout(()=>n(null),2e3)})};return(0,z.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-ghost`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-2`,children:`Embed`}),(0,z.jsx)(`div`,{className:`space-y-2`,children:s.map(e=>(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between mb-0.5`,children:[(0,z.jsxs)(`span`,{className:`text-[10px] text-on-surface-variant`,children:[(0,z.jsx)(`strong`,{children:e.label}),` `,(0,z.jsx)(`span`,{className:`text-outline`,children:e.desc})]}),(0,z.jsx)(`button`,{onClick:()=>c(e.code,e.label),className:`text-[10px] text-primary hover:underline`,children:t===e.label?`Copied`:`Copy`})]}),(0,z.jsx)(`pre`,{className:`text-[10px] font-mono bg-surface-lowest border border-ghost rounded-sm px-2 py-1.5 overflow-x-auto text-on-surface-variant whitespace-pre-wrap break-all`,children:e.code})]},e.label))})]})}function dc(){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)(null),[g,v]=(0,_.useState)(!0),[y,b]=(0,_.useState)(null),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(!1),[T,E]=(0,_.useState)(null),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=!1;return Promise.all([Zn().catch(t=>(e||A(t instanceof Error?t.message:`Failed to load archive stats`),null)),Qn().catch(t=>(e||A(t instanceof Error?t.message:`Failed to load local data`),null))]).then(([t,n])=>{e||(E(t),O(n))}),()=>{e=!0}},[]),(0,_.useEffect)(()=>{let e=!1;return v(!0),wr().then(t=>{e||(h(t),b(null))}).catch(t=>{e||(t instanceof br&&t.status===401?h(null):b(t instanceof Error?t.message:`Failed to load GitHub account`))}).finally(()=>{e||v(!1)}),()=>{e=!0}},[]);async function j(){S(!0),b(null);try{await Tr(),h(null),w(!0)}catch(e){b(e instanceof Error?e.message:`Disconnect failed`)}finally{S(!1)}}(0,_.useEffect)(()=>{Promise.all([ur().catch(()=>({hasKey:!1})),Ir().catch(()=>({authenticated:!1}))]).then(([e,n])=>{t(e),r(n)}).finally(()=>p(!1))},[]);async function M(){if(i.trim()){l(!0);try{await dr(i.trim()),t({hasKey:!0,keyPrefix:i.trim().slice(0,16)}),a(``)}finally{l(!1)}}}async function N(){l(!0);try{await dr(``),t({hasKey:!1}),a(``),s(!1)}finally{l(!1)}}async function P(){d(!0);try{await Jr(),r({authenticated:!1})}finally{d(!1)}}return f||!e||!n?(0,z.jsx)(ri,{back:{label:`Projects`,to:`/projects`},chips:[{label:`Settings`}],children:(0,z.jsx)(`div`,{className:`max-w-3xl mx-auto p-6`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading settings...`})})}):(0,z.jsx)(ri,{back:{label:`Projects`,to:`/projects`},chips:[{label:`Settings`}],children:(0,z.jsxs)(`div`,{className:`max-w-3xl mx-auto p-6`,children:[(0,z.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface`,children:`Settings`}),(0,z.jsx)(`div`,{className:`mt-4`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`API configuration`,meta:`local only`}),(0,z.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,z.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,z.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`&&M()}}),(0,z.jsx)(`p`,{className:`text-on-surface-variant text-xs mb-3`,children:`Used for project refinement. Keys stay on your machine.`}),(0,z.jsx)(`div`,{className:`flex items-center gap-2`,children:e.hasKey&&!i?(0,z.jsxs)(z.Fragment,{children:[(0,z.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,z.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:N,disabled:c,children:`Remove`})]}):i?(0,z.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:M,disabled:c,children:c?`Saving...`:`Save key`}):null})]})}),(0,z.jsx)(`div`,{className:`mt-4`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Connected accounts`,meta:`optional`}),g?(0,z.jsx)(`span`,{className:`text-[13px] text-on-surface-variant`,children:`Loading…`}):m?(0,z.jsxs)(`div`,{"data-testid":`settings-github-row`,className:`flex items-center gap-3`,children:[(0,z.jsx)(`img`,{src:m.avatarUrl,alt:``,className:`w-7 h-7 rounded-full border border-ghost`}),(0,z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,z.jsxs)(`span`,{className:`text-[13px] text-on-surface`,children:[`GitHub · `,(0,z.jsx)(`strong`,{children:m.login})]}),m.name?(0,z.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:m.name}):null]}),(0,z.jsx)(`button`,{"data-testid":`settings-github-disconnect`,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:j,disabled:x,children:x?`Disconnecting…`:`Disconnect`})]}):(0,z.jsxs)(`div`,{"data-testid":`settings-github-empty`,className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`text-[13px] text-on-surface-variant`,children:C?`Disconnected.`:`No accounts connected.`}),(0,z.jsx)(bn,{to:`/portfolio`,className:`text-xs font-medium px-2.5 py-1 rounded-md border border-ghost hover:border-outline text-on-surface`,children:`Connect from Portfolio →`})]}),y?(0,z.jsx)(`p`,{"data-testid":`settings-github-error`,className:`text-xs text-error mt-2`,children:y}):null]})}),(0,z.jsx)(`div`,{className:`mt-4`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Local data`,meta:`read-only`}),(0,z.jsxs)(`dl`,{"data-testid":`settings-local-data`,className:`grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2 text-[13px]`,children:[(0,z.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,z.jsx)(`dt`,{className:`text-on-surface-variant`,children:`Sessions archived`}),(0,z.jsx)(`dd`,{"data-testid":`settings-local-data-archive-count`,className:`text-on-surface font-mono`,children:T?T.total:`—`})]}),(0,z.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,z.jsx)(`dt`,{className:`text-on-surface-variant`,children:`Last archive sync`}),(0,z.jsx)(`dd`,{"data-testid":`settings-local-data-last-sync`,className:`text-on-surface font-mono truncate`,children:T?.lastSync||`Never`})]}),(0,z.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,z.jsx)(`dt`,{className:`text-on-surface-variant`,children:`Sync daemon`}),(0,z.jsx)(`dd`,{"data-testid":`settings-local-data-daemon`,className:`text-on-surface font-mono`,children:D?D.daemon.installed?`Installed`:`Not installed`:`—`})]}),(0,z.jsxs)(`div`,{className:`flex justify-between gap-3 sm:col-span-2`,children:[(0,z.jsx)(`dt`,{className:`text-on-surface-variant shrink-0`,children:`Local DB path`}),(0,z.jsx)(`dd`,{"data-testid":`settings-local-data-db-path`,className:`text-on-surface font-mono text-xs truncate`,title:D?.dbPath??``,children:D?.dbPath??`—`})]})]}),k?(0,z.jsx)(`p`,{"data-testid":`settings-local-data-error`,className:`text-xs text-error mt-2`,children:k}):null]})}),(0,z.jsx)(`div`,{className:`mt-4`,children:(0,z.jsxs)(ii,{children:[(0,z.jsx)(li,{title:`Authentication`,meta:`optional`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full shrink-0 ${n.authenticated?`bg-green`:`bg-outline`}`}),n.authenticated?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:`text-[13px] text-on-surface`,children:[`Connected as `,(0,z.jsxs)(`strong`,{children:[`@`,n.username]})]}),(0,z.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:`Authenticated via device auth. Required for publishing.`}),(0,z.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:P,disabled:u,children:u?`Disconnecting...`:`Disconnect`})]}):(0,z.jsx)(`span`,{className:`text-[13px] text-on-surface-variant`,children:`Not connected. Authentication is required for publishing.`})]})]})})]})})}var fc=[`all`,`minimal`,`animated`,`data-dense`,`dark`,`light`],pc=[`default`,`a-z`,`by-mode`],mc={all:`All`,minimal:`Minimal`,animated:`Animated`,"data-dense":`Data-dense`,dark:`Dark`,light:`Light`},hc={default:`Default`,"a-z":`A-Z`,"by-mode":`By mode`},gc={mock:`Mock data`,mine:`My data`};function _c(e){return e.mode===`dark`?`#09090b`:`#ffffff`}function vc(e,t){return t===`all`?!0:t===`dark`?e.mode===`dark`:t===`light`?e.mode===`light`:(e.tags??[]).includes(t)}function yc(e,t){return t===`default`?e:t===`a-z`?[...e].sort((e,t)=>e.label.localeCompare(t.label)):t===`by-mode`?[...e].sort((e,t)=>e.mode===t.mode?e.label.localeCompare(t.label):e.mode===`light`?-1:1):e}function bc(e,t){return t===`mine`?`/preview/portfolio?template=${encodeURIComponent(e)}`:`/preview/template/${e}?page=portfolio`}function xc({mode:e=`route`,onSelectTemplate:t,onClose:n}={}){let[r,i]=On(),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(`editorial`),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!0),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)(`mock`),v=r.get(`category`)||`all`,y=r.get(`sort`)||`default`;(0,_.useEffect)(()=>{Promise.all([fr().catch(()=>[]),pr().catch(()=>({template:`editorial`})),qn().catch(()=>[])]).then(([e,t,n])=>{o(e),c(t.template),n.length>0&&u(n[0].dirName)}).finally(()=>f(!1))},[]);function b(e,t){i(n=>{let r=new URLSearchParams(n);return e===`category`&&t===`all`||e===`sort`&&t===`default`?r.delete(e):r.set(e,t),r})}async function x(n){if(e===`modal`){t?.(n);return}let r=s;c(n);try{await mr(n),m(`Theme updated to ${a.find(e=>e.name===n)?.label??n}`),setTimeout(()=>m(null),2e3)}catch{c(r),m(`Failed to save theme`),setTimeout(()=>m(null),2e3)}}let S=yc(a.filter(e=>vc(e,v)),y),C=a.find(e=>e.name===s)??a[0];return e===`modal`?(0,z.jsxs)(Sc,{onClose:n,children:[(0,z.jsxs)(`div`,{className:`px-5 pt-4 pb-3 border-b border-ghost flex items-center justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`font-display text-lg font-bold text-on-surface`,children:`Choose a template`}),(0,z.jsxs)(`p`,{className:`text-xs text-on-surface-variant mt-0.5`,children:[a.length,` template`,a.length===1?``:`s`,` — preview with mock data or your own`]})]}),(0,z.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Close template browser`,"data-testid":`template-browser-close`,className:`text-on-surface-variant hover:text-on-surface text-xl leading-none px-2 py-1 rounded-sm focus-visible:ring-2 focus-visible:ring-primary`,children:`×`})]}),(0,z.jsx)(`div`,{className:`px-5 pt-3`,children:(0,z.jsx)(Cc,{value:h,onChange:g})}),(0,z.jsx)(`div`,{className:`px-5 pt-3 pb-2`,children:(0,z.jsx)(Ec,{activeCategory:v,activeSort:y,onCategoryChange:e=>b(`category`,e),onSortChange:e=>b(`sort`,e)})}),(0,z.jsx)(`div`,{className:`overflow-y-auto px-5 pb-5 flex-1`,"data-testid":`template-browser-modal-body`,children:d?(0,z.jsx)(`div`,{className:`py-12 text-center`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading templates...`})}):S.length===0?(0,z.jsx)(jc,{onClear:()=>b(`category`,`all`)}):(0,z.jsx)(Oc,{templates:S,currentTheme:s,dataMode:h,variant:`modal`,onApply:x})})]}):d?(0,z.jsx)(ri,{back:{label:`Settings`,to:`/settings`},chips:[{label:`Templates`}],children:(0,z.jsx)(`div`,{className:`max-w-6xl mx-auto px-6 py-12`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading templates...`})})}):(0,z.jsxs)(ri,{back:{label:`Settings`,to:`/settings`},chips:[{label:`Templates`}],children:[(0,z.jsx)(wc,{activeTemplate:C,templateCount:a.length,firstProjectDir:l}),(0,z.jsx)(Tc,{activeCategory:v,activeSort:y,dataMode:h,onCategoryChange:e=>b(`category`,e),onSortChange:e=>b(`sort`,e),onDataModeChange:g}),(0,z.jsx)(`div`,{className:`max-w-6xl mx-auto px-6 py-6`,children:S.length===0?(0,z.jsx)(jc,{onClear:()=>b(`category`,`all`)}):(0,z.jsx)(Oc,{templates:S,currentTheme:s,dataMode:h,variant:`route`,onApply:x})}),p&&(0,z.jsx)(Mc,{message:p})]})}function Sc({children:e,onClose:t}){return(0,_.useEffect)(()=>{if(!t)return;function e(e){e.key===`Escape`&&t?.()}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),(0,z.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/40 flex items-start justify-center pt-12 px-4`,role:`dialog`,"aria-modal":`true`,"aria-label":`Template browser`,"data-testid":`template-browser-modal-overlay`,onClick:t,children:(0,z.jsx)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md shadow-xl w-full max-w-[720px] max-h-[80vh] flex flex-col`,"data-testid":`template-browser-modal-sheet`,onClick:e=>e.stopPropagation(),children:e})})}function Cc({value:e,onChange:t}){return(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Preview data source`,className:`inline-flex items-center rounded-sm border border-ghost`,"data-testid":`template-browser-data-mode`,children:[`mock`,`mine`].map(n=>{let r=e===n;return(0,z.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"data-testid":`template-browser-data-mode-${n}`,onClick:()=>t(n),className:`text-xs font-mono px-3 py-1 first:rounded-l-sm last:rounded-r-sm transition-colors focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-0 ${r?`bg-primary/10 text-primary`:`text-on-surface-variant hover:text-on-surface`}`,children:gc[n]},n)})})}function wc({activeTemplate:e,templateCount:t,firstProjectDir:n}){return(0,z.jsx)(`div`,{className:`bg-surface-lowest border-b border-ghost`,children:(0,z.jsx)(`div`,{className:`max-w-6xl mx-auto px-6 py-8`,children:(0,z.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`font-display text-3xl font-bold text-on-surface`,children:`Portfolio Templates`}),(0,z.jsx)(`p`,{className:`text-sm text-on-surface-variant mt-1`,children:`Browse themes for your published portfolio`}),(0,z.jsxs)(`p`,{className:`font-mono text-xs text-on-surface-variant uppercase tracking-wider mt-2`,children:[t,` template`,t===1?``:`s`]})]}),e&&(0,z.jsxs)(`div`,{className:`flex items-start gap-3 sm:text-right`,children:[(0,z.jsx)(Ac,{template:e,className:`w-12 aspect-[16/10] shrink-0`}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium text-on-surface`,children:e.label}),(0,z.jsx)(oi,{variant:`refined`,children:`Active`})]}),(0,z.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:e.description}),n&&(0,z.jsx)(`a`,{href:`/preview/project/${encodeURIComponent(n)}`,target:`_blank`,rel:`noopener noreferrer`,className:`text-xs text-on-surface-variant hover:text-primary transition-colors font-medium mt-1`,children:`Preview site →`})]})]})]})})})}function Tc({activeCategory:e,activeSort:t,dataMode:n,onCategoryChange:r,onSortChange:i,onDataModeChange:a}){return(0,z.jsx)(`div`,{className:`sticky top-12 z-40 bg-surface-lowest border-b border-ghost`,children:(0,z.jsx)(`div`,{className:`max-w-6xl mx-auto px-6 py-3`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 overflow-x-auto`,style:{WebkitOverflowScrolling:`touch`,maskImage:`linear-gradient(to right, black 85%, transparent)`},children:[(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Filter by category`,className:`flex items-center gap-1.5`,children:fc.map(t=>(0,z.jsx)(Dc,{label:mc[t],active:e===t,onClick:()=>r(t)},t))}),(0,z.jsx)(`div`,{className:`border-l border-ghost mx-3 h-4 shrink-0`,"aria-hidden":`true`}),(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Sort templates`,className:`flex items-center gap-1.5`,children:pc.map(e=>(0,z.jsx)(Dc,{label:hc[e],active:t===e,onClick:()=>i(e)},e))}),(0,z.jsx)(`div`,{className:`border-l border-ghost mx-3 h-4 shrink-0`,"aria-hidden":`true`}),(0,z.jsx)(Cc,{value:n,onChange:a})]})})})}function Ec({activeCategory:e,activeSort:t,onCategoryChange:n,onSortChange:r}){return(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Filter by category`,className:`flex items-center gap-1.5`,children:fc.map(t=>(0,z.jsx)(Dc,{label:mc[t],active:e===t,onClick:()=>n(t)},t))}),(0,z.jsx)(`div`,{className:`border-l border-ghost mx-2 h-4 shrink-0`,"aria-hidden":`true`}),(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Sort templates`,className:`flex items-center gap-1.5`,children:pc.map(e=>(0,z.jsx)(Dc,{label:hc[e],active:t===e,onClick:()=>r(e)},e))})]})}function Dc({label:e,active:t,onClick:n}){return(0,z.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":t,onClick:n,className:`text-xs font-mono px-3 py-1 rounded-sm whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 ${t?`bg-primary/10 text-primary`:`bg-surface-low text-on-surface-variant hover:bg-surface-high`}`,children:e})}function Oc({templates:e,currentTheme:t,dataMode:n,variant:r,onApply:i}){let[a,o]=(0,_.useState)(null),s=(0,_.useCallback)(e=>o(e),[]);return(0,z.jsx)(`div`,{className:`grid ${r===`modal`?`grid-cols-1 sm:grid-cols-2 gap-4`:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5`}`,children:e.map((e,o)=>(0,z.jsx)(kc,{template:e,isActive:t===e.name,index:o,dataMode:n,variant:r,singleIframeMode:r===`modal`,isFocused:a===e.name,onFocus:()=>s(e.name),onApply:()=>i(e.name)},e.name))})}function kc({template:e,isActive:t,index:n,dataMode:r,variant:i,singleIframeMode:a,isFocused:o,onFocus:s,onApply:c}){let l=!a||o||t,u=bc(e.name,r);return(0,z.jsxs)(`article`,{className:`group bg-surface-lowest rounded-md overflow-hidden transition-all duration-150 motion-reduce:transition-none ${t?`border-2 border-primary ring-1 ring-primary/20`:`border border-ghost hover:border-outline-variant hover:shadow-sm`}`,"aria-label":`${e.label} template`,"aria-current":t?`true`:void 0,onMouseEnter:a?s:void 0,onFocus:a?s:void 0,style:{animationDelay:`${n*30}ms`},children:[(0,z.jsxs)(`div`,{className:`border-b border-ghost relative overflow-hidden`,style:{height:`220px`},children:[(0,z.jsx)(Ac,{template:e,className:`absolute inset-0 w-full h-full`}),l&&(0,z.jsx)(`iframe`,{src:u,"data-testid":`template-card-iframe-${e.name}`,style:{width:`1200px`,height:`900px`,transform:`scale(0.2)`,transformOrigin:`top left`,border:`none`,pointerEvents:`none`,position:`absolute`,top:0,left:0},loading:`lazy`,tabIndex:-1,"aria-hidden":`true`,title:`${e.label} preview`})]}),(0,z.jsxs)(`div`,{className:`p-3 flex flex-col gap-1.5`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium ${t?`text-primary`:`text-on-surface`}`,children:e.label}),t&&(0,z.jsx)(oi,{variant:`refined`,children:`Active`})]}),(0,z.jsx)(`span`,{className:`text-xs text-on-surface-variant leading-snug truncate`,children:e.description}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[(0,z.jsx)(`span`,{className:`text-[10px] text-on-surface-variant font-mono uppercase tracking-wider`,children:e.mode===`dark`?`Dark`:`Light`}),(0,z.jsx)(`span`,{className:`opacity-30 text-[10px]`,children:`·`}),(0,z.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full`,style:{background:e.accent},"aria-label":`Accent color: ${e.accent}`}),(e.tags??[]).map(e=>(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`span`,{className:`opacity-30 text-[10px]`,children:`·`}),(0,z.jsx)(ei,{children:e})]},e))]}),(0,z.jsx)(`div`,{className:`flex items-center gap-3 mt-1 ${i===`modal`?``:`sm:opacity-0 sm:group-hover:opacity-100`} transition-opacity duration-150 motion-reduce:transition-none ${t?`sm:opacity-100`:``}`,children:i===`modal`?(0,z.jsx)(`button`,{type:`button`,onClick:c,"data-testid":`template-card-use-${e.name}`,className:`text-xs font-medium px-2.5 py-1 rounded-md bg-primary text-on-primary hover:bg-primary-hover transition-colors focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2`,children:t?`Current`:`Use this template`}):(0,z.jsxs)(z.Fragment,{children:[!t&&(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`text-xs font-medium px-2.5 py-1 rounded-md bg-primary text-on-primary hover:bg-primary-hover transition-colors focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2`,children:`Apply`}),(0,z.jsx)(`a`,{href:`/preview/template/${e.name}?page=portfolio`,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] text-on-surface-variant hover:text-primary transition-colors font-medium`,children:`Portfolio`}),(0,z.jsx)(`a`,{href:`/preview/template/${e.name}?page=project`,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] text-on-surface-variant hover:text-primary transition-colors font-medium`,children:`Project`}),(0,z.jsx)(`a`,{href:`/preview/template/${e.name}?page=session`,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] text-on-surface-variant hover:text-primary transition-colors font-medium`,children:`Session`})]})})]})]})}function Ac({template:e,className:t=``}){let n=_c(e),r=e.mode===`dark`,i=r?`rgba(255,255,255,0.6)`:`rgba(0,0,0,0.5)`,a=r?`rgba(255,255,255,0.15)`:`rgba(0,0,0,0.1)`,o=r?`rgba(255,255,255,0.06)`:`rgba(0,0,0,0.04)`,s=r?`rgba(255,255,255,0.08)`:`rgba(0,0,0,0.06)`;return(0,z.jsxs)(`div`,{className:`overflow-hidden ${t}`,style:{background:n,padding:`16px 20px`,display:`flex`,flexDirection:`column`,gap:`10px`},children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,z.jsx)(`div`,{style:{width:`20px`,height:`20px`,borderRadius:`50%`,background:o}}),(0,z.jsx)(`div`,{style:{height:`10px`,width:`35%`,borderRadius:`2px`,background:i}})]}),(0,z.jsx)(`div`,{style:{height:`2px`,width:`40%`,background:e.accent,opacity:.8,borderRadius:`1px`}}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:`6px`},children:[(0,z.jsxs)(`div`,{style:{flex:1,height:`28px`,borderRadius:`4px`,background:o,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`2px`},children:[(0,z.jsx)(`div`,{style:{width:`14px`,height:`6px`,background:e.accent,opacity:.6,borderRadius:`1px`}}),(0,z.jsx)(`div`,{style:{width:`20px`,height:`3px`,background:a,borderRadius:`1px`}})]}),(0,z.jsxs)(`div`,{style:{flex:1,height:`28px`,borderRadius:`4px`,background:o,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`2px`},children:[(0,z.jsx)(`div`,{style:{width:`14px`,height:`6px`,background:i,opacity:.4,borderRadius:`1px`}}),(0,z.jsx)(`div`,{style:{width:`20px`,height:`3px`,background:a,borderRadius:`1px`}})]}),(0,z.jsxs)(`div`,{style:{flex:1,height:`28px`,borderRadius:`4px`,background:o,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`2px`},children:[(0,z.jsx)(`div`,{style:{width:`14px`,height:`6px`,background:i,opacity:.4,borderRadius:`1px`}}),(0,z.jsx)(`div`,{style:{width:`20px`,height:`3px`,background:a,borderRadius:`1px`}})]})]}),(0,z.jsxs)(`div`,{style:{background:o,borderRadius:`4px`,padding:`8px`,borderLeft:`2px solid ${e.accent}`,opacity:.7},children:[(0,z.jsx)(`div`,{style:{height:`3px`,width:`90%`,background:a,borderRadius:`1px`,marginBottom:`4px`}}),(0,z.jsx)(`div`,{style:{height:`3px`,width:`75%`,background:a,borderRadius:`1px`,marginBottom:`4px`}}),(0,z.jsx)(`div`,{style:{height:`3px`,width:`60%`,background:a,borderRadius:`1px`}})]}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,flex:1,minHeight:`24px`},children:[(0,z.jsx)(`div`,{style:{flex:2,background:o,borderRadius:`4px`,position:`relative`,overflow:`hidden`},children:(0,z.jsxs)(`div`,{style:{position:`absolute`,bottom:`3px`,left:`4px`,right:`4px`,display:`flex`,gap:`2px`,alignItems:`flex-end`},children:[(0,z.jsx)(`div`,{style:{flex:1,height:`8px`,background:e.accent,opacity:.5,borderRadius:`1px 1px 0 0`}}),(0,z.jsx)(`div`,{style:{flex:1,height:`14px`,background:e.accent,opacity:.6,borderRadius:`1px 1px 0 0`}}),(0,z.jsx)(`div`,{style:{flex:1,height:`10px`,background:e.accent,opacity:.5,borderRadius:`1px 1px 0 0`}}),(0,z.jsx)(`div`,{style:{flex:1,height:`18px`,background:e.accent,opacity:.7,borderRadius:`1px 1px 0 0`}}),(0,z.jsx)(`div`,{style:{flex:1,height:`12px`,background:e.accent,opacity:.5,borderRadius:`1px 1px 0 0`}})]})}),(0,z.jsx)(`div`,{style:{flex:1,background:s,borderRadius:`4px`}})]}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:`4px`},children:[(0,z.jsx)(`div`,{style:{flex:1,height:`16px`,borderRadius:`3px`,background:o,borderTop:`2px solid ${e.accent}`}}),(0,z.jsx)(`div`,{style:{flex:1,height:`16px`,borderRadius:`3px`,background:o,borderTop:`2px solid ${r?`rgba(255,255,255,0.15)`:`rgba(0,0,0,0.12)`}`}})]})]})}function jc({onClear:e}){return(0,z.jsxs)(`div`,{className:`text-center py-12`,children:[(0,z.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:`No templates match this filter.`}),(0,z.jsx)(`button`,{type:`button`,onClick:e,className:`mt-3 text-xs font-medium text-primary hover:underline focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2`,children:`Clear filters`})]})}function Mc({message:e}){return(0,z.jsx)(`div`,{className:`fixed bottom-6 left-1/2 -translate-x-1/2 z-50 bg-surface-lowest border border-ghost rounded-md shadow-lg px-4 py-2 text-sm text-on-surface animate-fade-in motion-reduce:animate-none`,role:`status`,"aria-live":`polite`,children:e})}var Nc={activeTarget:`heyi.am`,publishState:null,profile:{},projects:[],isDraft:!1,changeList:[],isPublishing:!1,lastPublishError:null,lastSavedAt:null,refreshTrigger:0};function Pc(e,t){switch(t.type){case`LOAD`:return{...e,profile:t.profile,publishState:t.publishState,projects:Fc(t.projects),isPublishing:!1,lastPublishError:null,lastSavedAt:Date.now()};case`UPDATE_PROFILE_FIELD`:{let n={...e.profile,[t.field]:t.value};return{...e,profile:n}}case`PROFILE_SAVED`:return{...e,lastSavedAt:Date.now()};case`BUMP_REFRESH`:return{...e,refreshTrigger:e.refreshTrigger+1};case`TOGGLE_PROJECT_INCLUDED`:{let n=e.projects.map(e=>e.projectId===t.projectId?{...e,included:!e.included}:e);return{...e,projects:n}}case`REORDER_PROJECT`:{let n=e.projects.slice().sort((e,t)=>e.order-t.order),r=n.findIndex(e=>e.projectId===t.projectId);if(r===-1)return e;let[i]=n.splice(r,1),a=Math.max(0,Math.min(t.newIndex,n.length));return n.splice(a,0,i),{...e,projects:n.map((e,t)=>({...e,order:t}))}}case`PUBLISH_START`:return{...e,isPublishing:!0,lastPublishError:null};case`PUBLISH_SUCCESS`:return{...e,isPublishing:!1,lastPublishError:null,publishState:t.publishState,isDraft:!1,changeList:[]};case`PUBLISH_FAIL`:return{...e,isPublishing:!1,lastPublishError:t.error};case`RECOMPUTE_DRAFT`:return{...e,isDraft:t.isDraft,changeList:t.changeList};case`SET_ACTIVE_TARGET`:return{...e,activeTarget:t.target};case`SET_VISIBILITY`:{if(!e.publishState)return e;let n=e.publishState.targets[t.target]??{lastPublishedAt:``,lastPublishedProfileHash:``,lastPublishedProfile:{},config:{}};return{...e,publishState:{...e.publishState,targets:{...e.publishState.targets,[t.target]:{...n,visibility:t.visibility}}}}}default:return e}}function Fc(e){return e.slice().sort((e,t)=>e.order-t.order).map((e,t)=>({...e,order:t}))}var Ic=(0,_.createContext)(null);function Lc({children:e,initialState:t}){let[n,r]=(0,_.useReducer)(Pc,{...Nc,...t}),i=(0,_.useMemo)(()=>({state:n,dispatch:r}),[n]);return(0,z.jsx)(Ic.Provider,{value:i,children:e})}function W(){let e=(0,_.useContext)(Ic);if(!e)throw Error(`usePortfolioStore must be used inside <PortfolioStoreProvider/>`);return e}function Rc({open:e,onClose:t}){let{state:n,dispatch:r}=W(),{activeTarget:i,publishState:a}=n,o=(0,_.useRef)(null),s=a?.targets[`heyi.am`]?.visibility??`public`,[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(!e)return;function n(e){e.key===`Escape`&&(e.preventDefault(),t())}return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]);let m=(0,_.useCallback)(e=>{o.current&&e.target instanceof Node&&!o.current.contains(e.target)&&t()},[t]),h=(0,_.useCallback)(e=>{r({type:`SET_VISIBILITY`,target:`heyi.am`,visibility:e})},[r]),g=(0,_.useCallback)(async()=>{d(null),p(null),l(!0);try{p((await yr()).filename)}catch(e){d(e instanceof Error?e.message:`Download failed`)}finally{l(!1)}},[]),[v,y]=(0,_.useState)({kind:`loading`}),[b,x]=(0,_.useState)([]),[S,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(``),[E,D]=(0,_.useState)(!1),[O,k]=(0,_.useState)(null),[A,j]=(0,_.useState)(null),[M,N]=(0,_.useState)(!1);(0,_.useEffect)(()=>{if(!e)return;let t=!1;return y({kind:`loading`}),wr().then(e=>{t||y(e?{kind:`connected`,account:e}:{kind:`idle`})}).catch(e=>{t||(e instanceof br&&e.status===401?y({kind:`idle`}):y({kind:`error`,message:e instanceof Error?e.message:`Failed to load GitHub account`}))}),()=>{t=!0}},[e]),(0,_.useEffect)(()=>{if(v.kind!==`connected`)return;let e=!1;return C(!0),Er().then(t=>{e||(x(t),t.length>0&&!w&&T(t[0].full_name))}).catch(t=>{e||k(t instanceof Error?t.message:`Failed to load repos`)}).finally(()=>{e||C(!1)}),()=>{e=!0}},[v.kind]),(0,_.useEffect)(()=>{if(v.kind!==`awaiting`)return;let{deviceCode:e}=v,t=Math.max(e.interval,1)*1e3,n=Date.now()+e.expires_in*1e3,r=!1;async function i(){if(!r){if(Date.now()>=n){y({kind:`timeout`});return}try{let t=await Cr({device_code:e.device_code});if(r)return;switch(t.status){case`success`:y({kind:`connected`,account:t.account});break;case`pending`:break;case`expired`:y({kind:`timeout`});break;case`denied`:y({kind:`error`,message:`Authorization denied by user`});break}}catch(e){if(r)return;y({kind:`error`,message:e instanceof Error?e.message:`Authorization failed`})}}}let a=window.setInterval(()=>{i()},t);return()=>{r=!0,window.clearInterval(a)}},[v]);let P=(0,_.useCallback)(async()=>{k(null),j(null),y({kind:`loading`});try{y({kind:`awaiting`,deviceCode:await Sr()})}catch(e){y({kind:`error`,message:e instanceof Error?e.message:`Failed to start device auth`})}},[]),ee=(0,_.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),N(!0),window.setTimeout(()=>N(!1),1500)}catch{}},[]),F=(0,_.useCallback)(async()=>{if(!w||v.kind!==`connected`)return;let[e,t]=w.split(`/`);if(!(!e||!t)){D(!0),k(null),j(null);try{j((await Dr({owner:e,repo:t})).url),r({type:`SET_ACTIVE_TARGET`,target:`github`})}catch(e){k(e instanceof Error?e.message:`Publish failed`)}finally{D(!1)}}},[r,v,w]);return e?(0,z.jsx)(`div`,{"data-testid":`target-picker-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":`Choose publish target`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,onMouseDown:m,children:(0,z.jsxs)(`div`,{ref:o,className:`w-[560px] max-w-[92vw] max-h-[90vh] overflow-y-auto bg-surface-low border border-ghost rounded-md p-6 relative`,"data-testid":`target-picker-sheet`,children:[(0,z.jsx)(`button`,{type:`button`,"data-testid":`target-picker-close`,onClick:t,"aria-label":`Close target picker`,className:`absolute top-3 right-3 text-on-surface-variant hover:text-on-surface text-lg leading-none`,children:`×`}),(0,z.jsx)(`h2`,{className:`text-[0.9375rem] font-semibold text-on-surface mb-1`,children:`Publish target`}),(0,z.jsx)(`p`,{className:`text-[0.8125rem] text-on-surface-variant mb-5`,children:`Where should the Publish button push your portfolio?`}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,z.jsxs)(`section`,{"data-testid":`target-card-export`,className:`border border-ghost rounded-sm p-4 bg-surface-lowest`,children:[(0,z.jsxs)(`div`,{className:`mb-2`,children:[(0,z.jsx)(`h3`,{className:`text-[0.875rem] font-semibold text-on-surface`,children:`Download as .zip`}),(0,z.jsx)(`p`,{className:`text-[0.75rem] text-on-surface-variant mt-0.5`,children:`Render the full portfolio as a static site and download it as a zip. Host it anywhere.`})]}),(0,z.jsxs)(`div`,{className:`mt-3 flex items-center gap-3`,children:[(0,z.jsx)(`button`,{type:`button`,"data-testid":`target-export-download`,onClick:()=>void g(),disabled:c,className:`text-[0.8125rem] px-3 py-1 rounded-sm bg-primary text-on-primary hover:bg-primary-hover disabled:opacity-50 disabled:cursor-not-allowed`,children:c?`Building zip…`:`Download as .zip`}),f?(0,z.jsxs)(`span`,{"data-testid":`target-export-downloaded-filename`,className:`text-[0.75rem] text-on-surface-variant truncate`,children:[`Downloaded `,f]}):null]}),u?(0,z.jsx)(`p`,{"data-testid":`target-export-download-error`,className:`text-[0.75rem] text-error mt-2`,children:u}):null]}),(0,z.jsxs)(`section`,{"data-testid":`target-card-heyiam`,className:`border border-ghost rounded-sm p-4 bg-surface-lowest`,children:[(0,z.jsxs)(`div`,{className:`mb-2`,children:[(0,z.jsx)(`h3`,{className:`text-[0.875rem] font-semibold text-on-surface`,children:`heyi.am`}),(0,z.jsx)(`p`,{className:`text-[0.75rem] text-on-surface-variant mt-0.5`,children:`Hosted at heyi.am/your-handle. No DNS, no config.`})]}),(0,z.jsxs)(`fieldset`,{className:`mt-3 flex items-center gap-4`,children:[(0,z.jsx)(`legend`,{className:`sr-only`,children:`Visibility`}),(0,z.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[0.8125rem] text-on-surface cursor-pointer`,children:[(0,z.jsx)(`input`,{type:`radio`,name:`heyiam-visibility`,value:`public`,"data-testid":`target-heyiam-visibility-public`,checked:s===`public`,onChange:()=>h(`public`)}),(0,z.jsx)(`span`,{children:`Public`})]}),(0,z.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[0.8125rem] text-on-surface cursor-pointer`,children:[(0,z.jsx)(`input`,{type:`radio`,name:`heyiam-visibility`,value:`unlisted`,"data-testid":`target-heyiam-visibility-unlisted`,checked:s===`unlisted`,onChange:()=>h(`unlisted`)}),(0,z.jsx)(`span`,{children:`Unlisted`})]})]})]}),(0,z.jsxs)(`section`,{"data-testid":`target-card-github`,className:`border border-ghost rounded-sm p-4 bg-surface-lowest`,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h3`,{className:`text-[0.875rem] font-semibold text-on-surface`,children:`GitHub Pages`}),(0,z.jsx)(`p`,{className:`text-[0.75rem] text-on-surface-variant mt-0.5`,children:`Push rendered HTML to a gh-pages branch of a repo you own.`})]}),i===`github`?(0,z.jsx)(`span`,{"data-testid":`target-github-active-badge`,className:`text-[0.6875rem] uppercase tracking-wide text-primary border border-primary rounded-sm px-1.5 py-0.5 shrink-0`,children:`Active`}):null]}),(0,z.jsx)(zc,{flow:v,onConnect:P,onCopyCode:ee,copiedCode:M,repos:b,reposLoading:S,selectedRepo:w,onSelectRepo:T,publishing:E,publishError:O,publishedUrl:A,onPublish:F,onRetry:P})]})]})]})}):null}function zc(e){let{flow:t,onConnect:n,onCopyCode:r,copiedCode:i,repos:a,reposLoading:o,selectedRepo:s,onSelectRepo:c,publishing:l,publishError:u,publishedUrl:d,onPublish:f,onRetry:p}=e;if(t.kind===`loading`)return(0,z.jsx)(`div`,{"data-testid":`github-loading`,className:`mt-3 text-[0.75rem] text-on-surface-variant`,children:`Checking GitHub connection…`});if(t.kind===`idle`)return(0,z.jsx)(`div`,{className:`mt-3`,children:(0,z.jsx)(`button`,{type:`button`,"data-testid":`github-connect`,onClick:n,className:`text-[0.8125rem] px-3 py-1 rounded-sm bg-primary text-on-primary hover:bg-primary-hover`,children:`Connect GitHub`})});if(t.kind===`awaiting`){let{user_code:e,verification_uri:n}=t.deviceCode;return(0,z.jsxs)(`div`,{"data-testid":`github-awaiting`,className:`mt-3 flex flex-col gap-3`,children:[(0,z.jsx)(`div`,{"data-testid":`github-user-code`,className:`font-mono text-2xl tracking-widest text-on-surface bg-surface-low border border-ghost rounded-sm py-2 px-3 inline-block`,children:e}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsxs)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,"data-testid":`github-verification-link`,className:`text-[0.8125rem] text-primary underline`,children:[`Open `,n.replace(/^https?:\/\//,``),` ↗`]}),(0,z.jsx)(`button`,{type:`button`,"data-testid":`github-copy-code`,onClick:()=>r(e),className:`text-[0.75rem] px-2 py-0.5 rounded-sm border border-ghost hover:border-outline text-on-surface-variant`,children:i?`Copied`:`Copy code`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-[0.75rem] text-on-surface-variant`,children:[(0,z.jsx)(`span`,{"data-testid":`github-spinner`,"aria-hidden":!0,className:`inline-block w-3 h-3 rounded-full border border-on-surface-variant border-t-transparent animate-spin`}),`Waiting for you to authorize…`]})]})}if(t.kind===`error`)return(0,z.jsxs)(`div`,{"data-testid":`github-error`,className:`mt-3 flex flex-col gap-2`,children:[(0,z.jsx)(`p`,{className:`text-[0.75rem] text-error`,children:t.message}),(0,z.jsx)(`button`,{type:`button`,"data-testid":`github-retry`,onClick:p,className:`self-start text-[0.8125rem] px-3 py-1 rounded-sm border border-ghost hover:border-outline text-on-surface`,children:`Try again`})]});if(t.kind===`timeout`)return(0,z.jsxs)(`div`,{"data-testid":`github-timeout`,className:`mt-3 flex flex-col gap-2`,children:[(0,z.jsx)(`p`,{className:`text-[0.75rem] text-on-surface-variant`,children:`Code expired.`}),(0,z.jsx)(`button`,{type:`button`,"data-testid":`github-new-code`,onClick:p,className:`self-start text-[0.8125rem] px-3 py-1 rounded-sm border border-ghost hover:border-outline text-on-surface`,children:`Get a new code`})]});let m=t.account;return(0,z.jsxs)(`div`,{"data-testid":`github-connected`,className:`mt-3 flex flex-col gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`img`,{src:m.avatarUrl,alt:``,"data-testid":`github-account-avatar`,className:`w-6 h-6 rounded-full border border-ghost`}),(0,z.jsxs)(`span`,{className:`text-[0.8125rem] text-on-surface`,children:[`Connected as `,(0,z.jsx)(`strong`,{children:m.login}),m.name?(0,z.jsxs)(`span`,{className:`text-on-surface-variant`,children:[` (`,m.name,`)`]}):null]})]}),(0,z.jsxs)(`label`,{className:`flex flex-col gap-1 text-[0.75rem] text-on-surface-variant`,children:[`Repository`,(0,z.jsx)(`select`,{"data-testid":`github-repo-select`,value:s,onChange:e=>c(e.target.value),disabled:o||a.length===0,className:`bg-surface-low border border-ghost rounded-sm px-2 py-1 text-on-surface text-[0.8125rem]`,children:o?(0,z.jsx)(`option`,{value:``,children:`Loading repos…`}):a.length===0?(0,z.jsx)(`option`,{value:``,children:`No repos available`}):a.map(e=>(0,z.jsxs)(`option`,{value:e.full_name,children:[e.full_name,e.private?` (private)`:``]},e.id))})]}),(0,z.jsx)(`button`,{type:`button`,"data-testid":`github-publish`,onClick:f,disabled:l||!s,className:`self-start text-[0.8125rem] px-3 py-1 rounded-sm bg-primary text-on-primary hover:bg-primary-hover disabled:opacity-50 disabled:cursor-not-allowed`,children:l?`Publishing…`:s?`Publish to ${s}`:`Publish`}),u?(0,z.jsx)(`p`,{"data-testid":`github-publish-error`,className:`text-[0.75rem] text-error`,children:u}):null,d?(0,z.jsxs)(`p`,{"data-testid":`github-published-url`,className:`text-[0.75rem] text-on-surface-variant`,children:[`Published at`,` `,(0,z.jsxs)(`a`,{href:d,target:`_blank`,rel:`noreferrer`,className:`text-primary underline`,children:[d,` ↗`]})]}):null]})}function Bc(e){return e.isPublishing?{kind:`publishing`,label:`Publishing…`,disabled:!0}:e.lastPublishError?{kind:`retry`,label:`Retry publish`,disabled:!1}:e.publishStateExists?{kind:`republish`,label:`Re-publish`,disabled:!1}:{kind:`publish`,label:`Publish to heyi.am`,disabled:!1}}function Vc(e){if(e.isPublishing)return{dotClass:`bg-amber animate-pulse`,phrase:`Publishing…`,testId:`status-publishing`};if(e.lastPublishError)return{dotClass:`bg-error`,phrase:`Publish failed: ${e.lastPublishError}`,testId:`status-error`};if(!e.publishStateExists)return{dotClass:`bg-outline`,phrase:`Not yet published`,testId:`status-never`};if(e.isDraft){let t=e.changeCount;return{dotClass:`bg-amber`,phrase:`Draft — ${t} ${t===1?`change`:`changes`}`,testId:`status-draft`}}return{dotClass:`bg-green`,phrase:`Live`,testId:`status-live`}}function Hc(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return!!(t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.isContentEditable)}function Uc(){let{state:e,dispatch:t}=W(),{publishState:n,isPublishing:r,lastPublishError:i,isDraft:a,changeList:o}=e,[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),d=n?.targets[`heyi.am`],f=(d?.visibility??`public`)===`unlisted`?`Unlisted`:`Public`,p=Bc({isPublishing:r||l?.step===`opening`||l?.step===`waiting`,lastPublishError:i,publishStateExists:!!(n&&d),isDraft:a}),m=Vc({publishStateExists:!!(n&&d),isPublishing:r||l?.step===`opening`||l?.step===`waiting`,lastPublishError:i,isDraft:a,changeCount:o.length}),h=(0,_.useCallback)(async()=>{t({type:`PUBLISH_START`});try{let r=await vr(`heyi.am`);t({type:`PUBLISH_SUCCESS`,publishState:{targets:{...n?.targets??{},"heyi.am":{lastPublishedAt:r.publishedAt??new Date().toISOString(),lastPublishedProfileHash:r.hash??``,lastPublishedProfile:e.profile,config:d?.config??{},visibility:d?.visibility,url:r.url}}}})}catch(e){let n=e instanceof Error?e.message:`Unknown error`;n===`Authentication required`?(t({type:`PUBLISH_FAIL`,error:``}),g()):t({type:`PUBLISH_FAIL`,error:n})}},[n,t,e.profile,d]),g=(0,_.useCallback)(async()=>{u({step:`opening`});try{let e=await qr();window.open(e.verification_uri,`_blank`),u({step:`waiting`,deviceCode:e.device_code,verificationUri:e.verification_uri});let t=Date.now(),n=async()=>{try{if((await Wr(e.device_code)).authenticated){u({step:`done`}),setTimeout(()=>{u(null),h()},500);return}}catch{}Date.now()-t<3e5?setTimeout(n,5e3):u({step:`error`,error:`Timed out. Try again.`})};setTimeout(n,5e3)}catch{u({step:`error`,error:`Could not connect. Try again later.`})}},[h]),v=(0,_.useCallback)(async()=>{p.disabled||await h()},[p.disabled,h]);return(0,_.useEffect)(()=>{function e(e){e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(Hc(e.target)||p.disabled||(e.preventDefault(),v()))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v,p.disabled]),(0,z.jsxs)(`div`,{"data-testid":`portfolio-statusbar`,className:`flex items-center justify-between h-11 px-4 border-b border-ghost bg-surface-lowest shrink-0`,children:[(0,z.jsx)(Rc,{open:s,onClose:()=>c(!1)}),(0,z.jsxs)(`button`,{type:`button`,"data-testid":`statusbar-target-pill`,onClick:()=>c(!0),className:`inline-flex items-center gap-1.5 border border-ghost rounded-sm px-2 py-0.5 text-[0.8125rem] text-on-surface hover:border-outline transition-colors`,children:[(0,z.jsxs)(`span`,{children:[`heyi.am · `,f]}),(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`text-on-surface-variant`,children:`▾`})]}),(0,z.jsxs)(`div`,{"data-testid":l?`status-auth`:m.testId,className:`flex items-center gap-2 text-[0.8125rem] text-on-surface-variant`,children:[l?.step===`opening`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block w-2 h-2 rounded-full bg-amber animate-pulse`}),(0,z.jsx)(`span`,{children:`Starting login...`})]}),l?.step===`waiting`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block w-2 h-2 rounded-full bg-amber animate-pulse`}),(0,z.jsx)(`span`,{children:`Waiting for login in browser...`})]}),l?.step===`done`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block w-2 h-2 rounded-full bg-green`}),(0,z.jsx)(`span`,{children:`Authenticated — publishing...`})]}),l?.step===`error`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block w-2 h-2 rounded-full bg-error`}),(0,z.jsx)(`span`,{children:l.error})]}),!l&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block w-2 h-2 rounded-full ${m.dotClass}`}),(0,z.jsx)(`span`,{children:m.phrase})]})]}),(0,z.jsx)(`button`,{type:`button`,"data-testid":`statusbar-primary-action`,"data-action-kind":p.kind,onClick:()=>void v(),disabled:p.disabled,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 disabled:opacity-50 disabled:cursor-not-allowed`,children:p.label})]})}var Wc=`/preview/portfolio`,Gc=[`displayName`,`bio`,`location`,`email`,`phone`,`linkedinUrl`,`githubUrl`,`twitterHandle`,`websiteUrl`,`photoBase64`];function Kc(e,t){switch(e){case`email`:return`mailto:${t}`;case`phone`:return`tel:${t}`;case`linkedinUrl`:case`githubUrl`:case`websiteUrl`:return t;case`twitterHandle`:return`https://x.com/${t.replace(/^@/,``)}`;default:return null}}function qc(e,t,n){let r=e.querySelector(`[data-portfolio-field="${t}"]`);if(!r)return;let i=n??``,a=i===``;if(a?r.setAttribute(`data-portfolio-empty`,`true`):r.removeAttribute(`data-portfolio-empty`),t===`photoBase64`){a||r.setAttribute(`src`,i);return}let o=r.querySelector(`[data-portfolio-text]`);o?o.textContent=t===`twitterHandle`?`@${i.replace(/^@/,``)}`:i:(t===`displayName`||t===`bio`||t===`location`)&&(r.textContent=i);let s=Kc(t,i);s!==null&&r.tagName===`A`&&!a&&r.setAttribute(`href`,s)}function Jc(e,t){for(let n of Gc)qc(e,n,t[n])}function Yc(){let{state:e,dispatch:t}=W(),[n,r]=(0,_.useState)(0),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(`editorial`),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(!1),m=(0,_.useRef)(null),h=Wc;(0,_.useEffect)(()=>{let e=!1;return pr().then(t=>{!e&&t?.template&&s(t.template)}).catch(()=>{}),()=>{e=!0}},[]),(0,_.useEffect)(()=>{let e=!1;return Ir().then(t=>{e||(t.authenticated&&t.username&&l(t.username),t.publicBaseUrl&&d(t.publicBaseUrl.replace(/\/$/,``)))}).catch(()=>{}),()=>{e=!0}},[]),(0,_.useEffect)(()=>{let t=m.current?.contentDocument;t&&Jc(t,e.profile)},[e.profile]);function g(){let t=m.current?.contentDocument;t&&Jc(t,e.profile)}let v;if(e.activeTarget===`heyi.am`){let t=e.publishState?.targets[`heyi.am`];v=c&&u&&t?.lastPublishedAt?`${u}/${encodeURIComponent(c)}`:null}else v=e.publishState?.targets.github?.url??null;let y=(0,_.useRef)(null);(0,_.useEffect)(()=>()=>{y.current!==null&&(clearTimeout(y.current),y.current=null)},[]);function b(){i||(t({type:`BUMP_REFRESH`}),a(!0),y.current!==null&&clearTimeout(y.current),y.current=setTimeout(()=>{y.current=null,a(!1)},500))}function x(){v&&window.open(v,`_blank`,`noopener,noreferrer`)}function S(){p(!0)}function C(){p(!1)}let w=(0,_.useCallback)(async e=>{p(!1);let t=o;s(e);try{await mr(e),r(e=>e+1)}catch{s(t)}},[o]);return(0,z.jsxs)(`div`,{className:`flex flex-1 min-w-0 min-h-0 flex-col bg-surface-mid`,"data-testid":`portfolio-preview`,children:[(0,z.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center justify-end gap-3 border-b border-ghost bg-surface-lowest px-3`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:S,className:`font-mono text-xs text-on-surface-variant hover:text-on-surface px-2 py-1 rounded-sm border border-ghost`,"data-testid":`portfolio-preview-template-pill`,children:o}),(0,z.jsx)(`button`,{type:`button`,onClick:b,disabled:i,"aria-disabled":i,className:`text-xs text-on-surface-variant hover:text-on-surface px-2 py-1 disabled:opacity-40 disabled:cursor-not-allowed`,"data-testid":`portfolio-preview-refresh`,title:`Force a fresh preview render.`,children:`Refresh ⟳`}),(0,z.jsx)(`button`,{type:`button`,onClick:x,disabled:v===null,"aria-disabled":v===null,className:`text-xs text-on-surface-variant hover:text-on-surface px-2 py-1 disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-on-surface-variant`,"data-testid":`portfolio-preview-open-in-browser`,title:v===null?`Publish first to open in browser`:v,children:`Open in browser ↗`})]}),(0,z.jsx)(Zc,{iframeRef:m,src:h,onLoad:g},`${n}-${e.refreshTrigger}`),f&&(0,z.jsx)(xc,{mode:`modal`,onClose:C,onSelectTemplate:w})]})}var Xc=1280;function Zc({iframeRef:e,src:t,onLoad:n}){let r=(0,_.useRef)(null),[i,a]=(0,_.useState)(1);return(0,_.useLayoutEffect)(()=>{function e(){let e=r.current;if(!e)return;let t=e.clientWidth;a(Math.min(1,t/Xc))}e();let t=new ResizeObserver(e);return r.current&&t.observe(r.current),()=>t.disconnect()},[]),(0,z.jsx)(`div`,{ref:r,className:`flex-1 min-h-0 overflow-hidden relative bg-surface-lowest`,children:(0,z.jsx)(`iframe`,{ref:e,title:`Portfolio preview`,src:t,onLoad:n,"data-testid":`portfolio-preview-iframe`,className:`border-0 absolute top-0 left-0`,style:{width:`${Xc}px`,height:`${100/i}%`,transform:`scale(${i})`,transformOrigin:`top left`}})})}var Qc=c(m());function $c(){var e=[...arguments];return(0,_.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var el=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function tl(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function nl(e){return`nodeType`in e}function rl(e){return e?tl(e)?e:nl(e)?e.ownerDocument?.defaultView??window:window:window}function il(e){let{Document:t}=rl(e);return e instanceof t}function al(e){return tl(e)?!1:e instanceof rl(e).HTMLElement}function ol(e){return e instanceof rl(e).SVGElement}function sl(e){return e?tl(e)?e.document:nl(e)?il(e)?e:al(e)||ol(e)?e.ownerDocument:document:document:document}var G=el?_.useLayoutEffect:_.useEffect;function cl(e){let t=(0,_.useRef)(e);return G(()=>{t.current=e}),(0,_.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function ll(){let e=(0,_.useRef)(null);return[(0,_.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,_.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function ul(e,t){t===void 0&&(t=[e]);let n=(0,_.useRef)(e);return G(()=>{n.current!==e&&(n.current=e)},t),n}function dl(e,t){let n=(0,_.useRef)();return(0,_.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function fl(e){let t=cl(e),n=(0,_.useRef)(null);return[n,(0,_.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function pl(e){let t=(0,_.useRef)();return(0,_.useEffect)(()=>{t.current=e},[e]),t.current}var ml={};function hl(e,t){return(0,_.useMemo)(()=>{if(t)return t;let n=ml[e]==null?0:ml[e]+1;return ml[e]=n,e+`-`+n},[e,t])}function gl(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var _l=gl(1),vl=gl(-1);function yl(e){return`clientX`in e&&`clientY`in e}function bl(e){if(!e)return!1;let{KeyboardEvent:t}=rl(e.target);return t&&e instanceof t}function xl(e){if(!e)return!1;let{TouchEvent:t}=rl(e.target);return t&&e instanceof t}function Sl(e){if(xl(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return yl(e)?{x:e.clientX,y:e.clientY}:null}var Cl=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[Cl.Translate.toString(e),Cl.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),wl=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Tl(e){return e.matches(wl)?e:e.querySelector(wl)}var El={display:`none`};function Dl(e){let{id:t,value:n}=e;return _.createElement(`div`,{id:t,style:El},n)}function Ol(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return _.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function kl(){let[e,t]=(0,_.useState)(``);return{announce:(0,_.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Al=(0,_.createContext)(null);function jl(e){let t=(0,_.useContext)(Al);(0,_.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Ml(){let[e]=(0,_.useState)(()=>new Set),t=(0,_.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,_.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Nl={draggable:`
33
+ To pick up a draggable item, press the space bar.
34
+ While dragging, use the arrow keys to move the item.
35
+ Press space again to drop the item in its new position, or press escape to cancel.
36
+ `},Pl={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Fl(e){let{announcements:t=Pl,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Nl}=e,{announce:a,announcement:o}=kl(),s=hl(`DndLiveRegion`),[c,l]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{l(!0)},[]),jl((0,_.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=_.createElement(_.Fragment,null,_.createElement(Dl,{id:r,value:i.draggable}),_.createElement(Ol,{id:s,announcement:o}));return n?(0,Qc.createPortal)(u,n):u}var Il;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Il||={});function Ll(){}function Rl(e,t){return(0,_.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function K(){var e=[...arguments];return(0,_.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var q=Object.freeze({x:0,y:0});function J(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Y(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function X(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function zl(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Bl(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function Vl(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Hl=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Vl(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=J(Vl(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Y)},Ul=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=zl(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=zl(r),o=i.reduce((e,t,r)=>e+J(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(Y)};function Wl(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Gl=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=Wl(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(X)};function Kl(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ql(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:q}function Jl(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Yl=Jl(1);function Xl(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Zl(e,t,n){let r=Xl(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Ql={ignoreTransform:!1};function $l(e,t){t===void 0&&(t=Ql);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=rl(e).getComputedStyle(e);t&&(n=Zl(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function eu(e){return $l(e,{ignoreTransform:!0})}function tu(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function nu(e,t){return t===void 0&&(t=rl(e).getComputedStyle(e)),t.position===`fixed`}function ru(e,t){t===void 0&&(t=rl(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function iu(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(il(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!al(i)||ol(i)||n.includes(i))return n;let a=rl(e).getComputedStyle(i);return i!==e&&ru(i,a)&&n.push(i),nu(i,a)?n:r(i.parentNode)}return e?r(e):n}function au(e){let[t]=iu(e,1);return t??null}function ou(e){return!el||!e?null:tl(e)?e:nl(e)?il(e)||e===sl(e).scrollingElement?window:al(e)?e:null:null}function su(e){return tl(e)?e.scrollX:e.scrollLeft}function cu(e){return tl(e)?e.scrollY:e.scrollTop}function lu(e){return{x:su(e),y:cu(e)}}var uu;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(uu||={});function du(e){return!el||!e?!1:e===document.scrollingElement}function fu(e){let t={x:0,y:0},n=du(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var pu={x:.2,y:.2};function mu(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=pu);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=fu(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=uu.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=uu.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=uu.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=uu.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function hu(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function gu(e){return e.reduce((e,t)=>_l(e,lu(t)),q)}function _u(e){return e.reduce((e,t)=>e+su(t),0)}function vu(e){return e.reduce((e,t)=>e+cu(t),0)}function yu(e,t){if(t===void 0&&(t=$l),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);au(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var bu=[[`x`,[`left`,`right`],_u],[`y`,[`top`,`bottom`],vu]],xu=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=iu(t),r=gu(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of bu)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},Su=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Cu(e){let{EventTarget:t}=rl(e);return e instanceof t?e:sl(e)}function wu(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var Tu;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Tu||={});function Eu(e){e.preventDefault()}function Du(e){e.stopPropagation()}var Ou;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Ou||={});var ku={start:[Ou.Space,Ou.Enter],cancel:[Ou.Esc],end:[Ou.Space,Ou.Enter,Ou.Tab]},Au=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ou.Right:return{...n,x:n.x+25};case Ou.Left:return{...n,x:n.x-25};case Ou.Down:return{...n,y:n.y+25};case Ou.Up:return{...n,y:n.y-25}}},ju=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Su(sl(t)),this.windowListeners=new Su(rl(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Tu.Resize,this.handleCancel),this.windowListeners.add(Tu.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Tu.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&yu(n),t(q)}handleKeyDown(e){if(bl(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=ku,coordinateGetter:a=Au,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:q;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=vl(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=fu(n),p=hu(n),m={x:Math.min(i===Ou.Right?p.right-p.width/2:p.right,Math.max(i===Ou.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Ou.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Ou.Down?p.top:p.top+p.height/2,u.y))},h=i===Ou.Right&&!s||i===Ou.Left&&!c,g=i===Ou.Down&&!l||i===Ou.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Ou.Right&&e<=d.x||i===Ou.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Ou.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Ou.Down&&e<=d.y||i===Ou.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Ou.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,_l(vl(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};ju.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=ku,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Mu(e){return!!(e&&`distance`in e)}function Nu(e){return!!(e&&`delay`in e)}var Pu=class{constructor(e,t,n){n===void 0&&(n=Cu(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=sl(i),this.documentListeners=new Su(this.document),this.listeners=new Su(n),this.windowListeners=new Su(rl(i)),this.initialCoordinates=Sl(r)??q,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Tu.Resize,this.handleCancel),this.windowListeners.add(Tu.DragStart,Eu),this.windowListeners.add(Tu.VisibilityChange,this.handleCancel),this.windowListeners.add(Tu.ContextMenu,Eu),this.documentListeners.add(Tu.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Nu(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Mu(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Tu.Click,Du,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Tu.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=Sl(e)??q,s=vl(n,o);if(!t&&a){if(Mu(a)){if(a.tolerance!=null&&wu(s,a.tolerance))return this.handleCancel();if(wu(s,a.distance))return this.handleStart()}if(Nu(a)&&wu(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Ou.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Fu={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},Iu=class extends Pu{constructor(e){let{event:t}=e,n=sl(t.target);super(e,Fu,n)}};Iu.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Lu={move:{name:`mousemove`},end:{name:`mouseup`}},Ru;(function(e){e[e.RightClick=2]=`RightClick`})(Ru||={});var zu=class extends Pu{constructor(e){super(e,Lu,sl(e.event.target))}};zu.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Ru.RightClick?!1:(r?.({event:n}),!0)}}];var Bu={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Vu=class extends Pu{constructor(e){super(e,Bu)}static setup(){return window.addEventListener(Bu.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Bu.move.name,e)};function e(){}}};Vu.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Hu;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Hu||={});var Uu;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Uu||={});function Wu(e){let{acceleration:t,activator:n=Hu.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Uu.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Gu({delta:d,disabled:!a}),[m,h]=ll(),g=(0,_.useRef)({x:0,y:0}),v=(0,_.useRef)({x:0,y:0}),y=(0,_.useMemo)(()=>{switch(n){case Hu.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Hu.DraggableRect:return i}},[n,i,c]),b=(0,_.useRef)(null),x=(0,_.useCallback)(()=>{let e=b.current;if(!e)return;let t=g.current.x*v.current.x,n=g.current.y*v.current.y;e.scrollBy(t,n)},[]),S=(0,_.useMemo)(()=>s===Uu.TreeOrder?[...l].reverse():l,[s,l]);(0,_.useEffect)(()=>{if(!a||!l.length||!y){h();return}for(let e of S){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=mu(e,n,y,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),b.current=e,m(x,o),g.current=a,v.current=i;return}}g.current={x:0,y:0},v.current={x:0,y:0},h()},[t,x,r,h,a,o,JSON.stringify(y),JSON.stringify(p),m,l,S,u,JSON.stringify(f)])}var Z={x:{[uu.Backward]:!1,[uu.Forward]:!1},y:{[uu.Backward]:!1,[uu.Forward]:!1}};function Gu(e){let{delta:t,disabled:n}=e,r=pl(t);return dl(e=>{if(n||!r||!e)return Z;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[uu.Backward]:e.x[uu.Backward]||i.x===-1,[uu.Forward]:e.x[uu.Forward]||i.x===1},y:{[uu.Backward]:e.y[uu.Backward]||i.y===-1,[uu.Forward]:e.y[uu.Forward]||i.y===1}}},[n,t,r])}function Ku(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return dl(e=>t==null?null:r??e??null,[r,t])}function qu(e,t){return(0,_.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var Ju;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Ju||={});var Yu;(function(e){e.Optimized=`optimized`})(Yu||={});var Xu=new Map;function Zu(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,_.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,_.useRef)(e),d=g(),f=ul(d),p=(0,_.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,_.useRef)(null),h=dl(t=>{if(d&&!n)return Xu;if(!t||t===Xu||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new xu(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,_.useEffect)(()=>{u.current=e},[e]),(0,_.useEffect)(()=>{d||p()},[n,d]),(0,_.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,_.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case Ju.Always:return!1;case Ju.BeforeDragging:return n;default:return!n}}}function Qu(e,t){return dl(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function $u(e,t){return Qu(e,t)}function ed(e){let{callback:t,disabled:n}=e,r=cl(t),i=(0,_.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,_.useEffect)(()=>()=>i?.disconnect(),[i]),i}function td(e){let{callback:t,disabled:n}=e,r=cl(t),i=(0,_.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,_.useEffect)(()=>()=>i?.disconnect(),[i]),i}function nd(e){return new xu($l(e),e)}function rd(e,t,n){t===void 0&&(t=nd);let[r,i]=(0,_.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=ed({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=td({callback:a});return G(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function id(e){return ql(e,Qu(e))}var ad=[];function od(e){let t=(0,_.useRef)(e),n=dl(n=>e?n&&n!==ad&&e&&t.current&&e.parentNode===t.current.parentNode?n:iu(e):ad,[e]);return(0,_.useEffect)(()=>{t.current=e},[e]),n}function sd(e){let[t,n]=(0,_.useState)(null),r=(0,_.useRef)(e),i=(0,_.useCallback)(e=>{let t=ou(e.target);t&&n(e=>e?(e.set(t,lu(t)),new Map(e)):null)},[]);return(0,_.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=ou(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,lu(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{ou(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,_.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>_l(e,t),q):gu(e):q,[e,t])}function cd(e,t){t===void 0&&(t=[]);let n=(0,_.useRef)(null);return(0,_.useEffect)(()=>{n.current=null},t),(0,_.useEffect)(()=>{let t=e!==q;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?vl(e,n.current):q}function ld(e){(0,_.useEffect)(()=>{if(!el)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function ud(e,t){return(0,_.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function dd(e){return(0,_.useMemo)(()=>e?tu(e):null,[e])}var fd=[];function pd(e,t){t===void 0&&(t=$l);let[n]=e,r=dd(n?rl(n):null),[i,a]=(0,_.useState)(fd);function o(){a(()=>e.length?e.map(e=>du(e)?r:new xu(t(e),e)):fd)}let s=td({callback:o});return G(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function md(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return al(t)?t:e}function hd(e){let{measure:t}=e,[n,r]=(0,_.useState)(null),i=td({callback:(0,_.useCallback)(e=>{for(let{target:n}of e)if(al(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=fl((0,_.useCallback)(e=>{let n=md(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,_.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var gd=[{sensor:Iu,options:{}},{sensor:ju,options:{}}],_d={current:{}},vd={draggable:{measure:eu},droppable:{measure:eu,strategy:Ju.WhileDragging,frequency:Yu.Optimized},dragOverlay:{measure:$l}},yd=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},Q={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new yd,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ll},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:vd,measureDroppableContainers:Ll,windowRect:null,measuringScheduled:!1},bd={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:Ll,draggableNodes:new Map,over:null,measureDroppableContainers:Ll},xd=(0,_.createContext)(bd),Sd=(0,_.createContext)(Q);function Cd(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yd}}}function wd(e,t){switch(t.type){case Il.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Il.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Il.DragEnd:case Il.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Il.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new yd(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Il.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new yd(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Il.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new yd(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Td(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,_.useContext)(xd),a=pl(r),o=pl(n?.id);return(0,_.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!bl(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=Tl(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function Ed(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Dd(e){return(0,_.useMemo)(()=>({draggable:{...vd.draggable,...e?.draggable},droppable:{...vd.droppable,...e?.droppable},dragOverlay:{...vd.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Od(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,_.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;G(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=ql(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=au(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var kd=(0,_.createContext)({...q,scaleX:1,scaleY:1}),Ad;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Ad||={});var jd=(0,_.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=gd,collisionDetection:o=Gl,measuring:s,modifiers:c,...l}=e,[u,d]=(0,_.useReducer)(wd,void 0,Cd),[f,p]=Ml(),[m,h]=(0,_.useState)(Ad.Uninitialized),g=m===Ad.Initialized,{draggable:{active:v,nodes:y,translate:b},droppable:{containers:x}}=u,S=v==null?null:y.get(v),C=(0,_.useRef)({initial:null,translated:null}),w=(0,_.useMemo)(()=>v==null?null:{id:v,data:S?.data??_d,rect:C},[v,S]),T=(0,_.useRef)(null),[E,D]=(0,_.useState)(null),[O,k]=(0,_.useState)(null),A=ul(l,Object.values(l)),j=hl(`DndDescribedBy`,t),M=(0,_.useMemo)(()=>x.getEnabled(),[x]),N=Dd(s),{droppableRects:P,measureDroppableContainers:ee,measuringScheduled:F}=Zu(M,{dragging:g,dependencies:[b.x,b.y],config:N.droppable}),I=Ku(y,v),te=(0,_.useMemo)(()=>O?Sl(O):null,[O]),L=je(),ne=$u(I,N.draggable.measure);Od({activeNode:v==null?null:y.get(v),config:L.layoutShiftCompensation,initialRect:ne,measure:N.draggable.measure});let re=rd(I,N.draggable.measure,ne),ie=rd(I?I.parentElement:null),R=(0,_.useRef)({activatorEvent:null,active:null,activeNode:I,collisionRect:null,collisions:null,droppableRects:P,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:x,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ae=x.getNodeFor(R.current.over?.id),oe=hd({measure:N.dragOverlay.measure}),se=oe.nodeRef.current??I,ce=g?oe.rect??re:null,le=!!(oe.nodeRef.current&&oe.rect),ue=id(le?null:re),de=dd(se?rl(se):null),fe=od(g?ae??I:null),pe=pd(fe),me=Ed(c,{transform:{x:b.x-ue.x,y:b.y-ue.y,scaleX:1,scaleY:1},activatorEvent:O,active:w,activeNodeRect:re,containerNodeRect:ie,draggingNodeRect:ce,over:R.current.over,overlayNodeRect:oe.rect,scrollableAncestors:fe,scrollableAncestorRects:pe,windowRect:de}),he=te?_l(te,b):null,ge=sd(fe),_e=cd(ge),ve=cd(ge,[re]),ye=_l(me,_e),be=ce?Yl(ce,me):null,xe=w&&be?o({active:w,collisionRect:be,droppableRects:P,droppableContainers:M,pointerCoordinates:he}):null,Se=Bl(xe,`id`),[Ce,we]=(0,_.useState)(null),Te=Kl(le?me:_l(me,ve),Ce?.rect??null,re),Ee=(0,_.useRef)(null),De=(0,_.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(T.current==null)return;let i=y.get(T.current);if(!i)return;let a=e.nativeEvent;Ee.current=new n({active:T.current,activeNode:i,event:a,options:r,context:R,onAbort(e){if(!y.get(e))return;let{onDragAbort:t}=A.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!y.get(e))return;let{onDragPending:i}=A.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=T.current;if(t==null)return;let n=y.get(t);if(!n)return;let{onDragStart:r}=A.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:C}};(0,Qc.unstable_batchedUpdates)(()=>{r?.(i),h(Ad.Initializing),d({type:Il.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),D(Ee.current),k(a)})},onMove(e){d({type:Il.DragMove,coordinates:e})},onEnd:o(Il.DragEnd),onCancel:o(Il.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=R.current,o=null;if(t&&i){let{cancelDrop:s}=A.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Il.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Il.DragCancel)}T.current=null,(0,Qc.unstable_batchedUpdates)(()=>{d({type:e}),h(Ad.Uninitialized),we(null),D(null),k(null),Ee.current=null;let t=e===Il.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=A.current[t];e?.(o),f({type:t,event:o})}})}}},[y]),Oe=qu(a,(0,_.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=y.get(r);if(T.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},T.current=r,De(n,t))},[y,De]));ld(a),G(()=>{re&&m===Ad.Initializing&&h(Ad.Initialized)},[re,m]),(0,_.useEffect)(()=>{let{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:i}=R.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:ye.x,y:ye.y},over:i};(0,Qc.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[ye.x,ye.y]),(0,_.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=R.current;if(!e||T.current==null||!t||!i)return;let{onDragOver:a}=A.current,o=r.get(Se),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,Qc.unstable_batchedUpdates)(()=>{we(s),a?.(c),f({type:`onDragOver`,event:c})})},[Se]),G(()=>{R.current={activatorEvent:O,active:w,activeNode:I,collisionRect:be,collisions:xe,droppableRects:P,draggableNodes:y,draggingNode:se,draggingNodeRect:ce,droppableContainers:x,over:Ce,scrollableAncestors:fe,scrollAdjustedTranslate:ye},C.current={initial:ce,translated:be}},[w,I,xe,be,y,se,ce,P,x,Ce,fe,ye]),Wu({...L,delta:b,draggingRect:be,pointerCoordinates:he,scrollableAncestors:fe,scrollableAncestorRects:pe});let ke=(0,_.useMemo)(()=>({active:w,activeNode:I,activeNodeRect:re,activatorEvent:O,collisions:xe,containerNodeRect:ie,dragOverlay:oe,draggableNodes:y,droppableContainers:x,droppableRects:P,over:Ce,measureDroppableContainers:ee,scrollableAncestors:fe,scrollableAncestorRects:pe,measuringConfiguration:N,measuringScheduled:F,windowRect:de}),[w,I,re,O,xe,ie,oe,y,x,P,Ce,ee,fe,pe,N,F,de]),Ae=(0,_.useMemo)(()=>({activatorEvent:O,activators:Oe,active:w,activeNodeRect:re,ariaDescribedById:{draggable:j},dispatch:d,draggableNodes:y,over:Ce,measureDroppableContainers:ee}),[O,Oe,w,re,d,j,y,Ce,ee]);return _.createElement(Al.Provider,{value:p},_.createElement(xd.Provider,{value:Ae},_.createElement(Sd.Provider,{value:ke},_.createElement(kd.Provider,{value:Te},i)),_.createElement(Td,{disabled:n?.restoreFocus===!1})),_.createElement(Fl,{...n,hiddenTextDescribedById:j}));function je(){let e=E?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),Md=(0,_.createContext)(null),$=`button`,Nd=`Draggable`;function Pd(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=hl(Nd),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,_.useContext)(xd),{role:p=$,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,v=(0,_.useContext)(g?kd:Md),[y,b]=fl(),[x,S]=fl(),C=ud(o,t),w=ul(n);return G(()=>(d.set(t,{id:t,key:a,node:y,activatorNode:x,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,_.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===$?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:C,node:y,over:f,setNodeRef:b,setActivatorNodeRef:S,transform:v}}function Fd(){return(0,_.useContext)(Sd)}var Id=`Droppable`,Ld={timeout:25};function Rd(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=hl(Id),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,_.useContext)(xd),u=(0,_.useRef)({disabled:n}),d=(0,_.useRef)(!1),f=(0,_.useRef)(null),p=(0,_.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...Ld,...i},v=ul(h??r),y=td({callback:(0,_.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(v.current)?v.current:[v.current]),p.current=null},g)},[g]),disabled:m||!o}),[b,x]=fl((0,_.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y])),S=ul(t);return(0,_.useEffect)(()=>{!y||!b.current||(y.disconnect(),d.current=!1,y.observe(b.current))},[b,y]),(0,_.useEffect)(()=>(s({type:Il.RegisterDroppable,element:{id:r,key:a,disabled:n,node:b,rect:f,data:S}}),()=>s({type:Il.UnregisterDroppable,key:a,id:r})),[r]),(0,_.useEffect)(()=>{n!==u.current.disabled&&(s({type:Il.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:b,over:c,setNodeRef:x}}function zd(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Bd(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function Vd(e){return e!==null&&e>=0}function Hd(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ud(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var Wd=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=zd(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},Gd={scaleX:1,scaleY:1},Kd=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...Gd}:null}let s=qd(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...Gd}:r<t&&r>=a?{x:0,y:o.height+s,...Gd}:{x:0,y:0,...Gd}};function qd(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var Jd=`Sortable`,Yd=_.createContext({activeIndex:-1,containerId:Jd,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Wd,disabled:{draggable:!1,droppable:!1}});function Xd(e){let{children:t,id:n,items:r,strategy:i=Wd,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=Fd(),d=hl(Jd,n),f=s.rect!==null,p=(0,_.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,v=(0,_.useRef)(p),y=!Hd(p,v.current),b=g!==-1&&h===-1||y,x=Ud(a);G(()=>{y&&m&&u(p)},[y,p,m,u]),(0,_.useEffect)(()=>{v.current=p},[p]);let S=(0,_.useMemo)(()=>({activeIndex:h,containerId:d,disabled:x,disableTransforms:b,items:p,overIndex:g,useDragOverlay:f,sortedRects:Bd(p,c),strategy:i}),[h,d,x.draggable,x.droppable,b,p,g,c,f,i]);return _.createElement(Yd.Provider,{value:S},t)}var Zd=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return zd(n,r,i).indexOf(t)},Qd=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},$d={duration:200,easing:`ease`},ef=`transform`,tf=Cl.Transition.toString({property:ef,duration:0,easing:`linear`}),nf={roleDescription:`sortable`};function rf(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,_.useState)(null),s=(0,_.useRef)(n);return G(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=$l(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,_.useEffect)(()=>{a&&o(null)},[a]),a}function af(e){let{animateLayoutChanges:t=Qd,attributes:n,disabled:r,data:i,getNewIndex:a=Zd,id:o,strategy:s,resizeObserverConfig:c,transition:l=$d}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:v,strategy:y}=(0,_.useContext)(Yd),b=of(r,p),x=u.indexOf(o),S=(0,_.useMemo)(()=>({sortable:{containerId:d,index:x,items:u},...i}),[d,i,x,u]),C=(0,_.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:w,node:T,isOver:E,setNodeRef:D}=Rd({id:o,data:S,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...c}}),{active:O,activatorEvent:k,activeNodeRect:A,attributes:j,setNodeRef:M,listeners:N,isDragging:P,over:ee,setActivatorNodeRef:F,transform:I}=Pd({id:o,data:S,attributes:{...nf,...n},disabled:b.draggable}),te=$c(D,M),L=!!O,ne=L&&!m&&Vd(f)&&Vd(g),re=!v&&P,ie=ne?(re&&ne?I:null)??(s??y)({rects:h,activeNodeRect:A,activeIndex:f,overIndex:g,index:x}):null,R=Vd(f)&&Vd(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):x,ae=O?.id,oe=(0,_.useRef)({activeId:ae,items:u,newIndex:R,containerId:d}),se=u!==oe.current.items,ce=t({active:O,containerId:d,isDragging:P,isSorting:L,id:o,index:x,items:u,newIndex:oe.current.newIndex,previousItems:oe.current.items,previousContainerId:oe.current.containerId,transition:l,wasDragging:oe.current.activeId!=null}),le=rf({disabled:!ce,index:x,node:T,rect:w});return(0,_.useEffect)(()=>{L&&oe.current.newIndex!==R&&(oe.current.newIndex=R),d!==oe.current.containerId&&(oe.current.containerId=d),u!==oe.current.items&&(oe.current.items=u)},[L,R,d,u]),(0,_.useEffect)(()=>{if(ae===oe.current.activeId)return;if(ae!=null&&oe.current.activeId==null){oe.current.activeId=ae;return}let e=setTimeout(()=>{oe.current.activeId=ae},50);return()=>clearTimeout(e)},[ae]),{active:O,activeIndex:f,attributes:j,data:S,rect:w,index:x,newIndex:R,items:u,isOver:E,isSorting:L,isDragging:P,listeners:N,node:T,overIndex:g,over:ee,setNodeRef:te,setActivatorNodeRef:F,setDroppableNodeRef:D,setDraggableNodeRef:M,transform:le??ie,transition:ue()};function ue(){if(le||se&&oe.current.newIndex===x)return tf;if(!(re&&!bl(k)||!l)&&(L||ce))return Cl.Transition.toString({...l,property:ef})}}function of(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function sf(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var cf=[Ou.Down,Ou.Right,Ou.Up,Ou.Left],lf=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(cf.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case Ou.Down:r.top<a.top&&t.push(n);break;case Ou.Up:r.top>a.top&&t.push(n);break;case Ou.Left:r.left>a.left&&t.push(n);break;case Ou.Right:r.left<a.left&&t.push(n);break}});let c=Ul({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=Bl(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=iu(c).some((e,t)=>s[t]!==e),i=uf(e,t),a=df(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:vl(u,l)}}}};function uf(e,t){return!sf(e)||!sf(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function df(e,t){return!sf(e)||!sf(t)||!uf(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var ff=300,pf=5*1024*1024,mf=10*1024*1024;function hf(e,t){return(e??``)!==(t??``)}var gf=`w-full bg-surface-low border border-ghost rounded-md px-3 py-1.5 text-sm text-on-surface placeholder:text-outline`;function _f(e,t=``){return[gf,e?`border-l-2 border-amber-500`:``,t].filter(Boolean).join(` `)}function vf({id:e,title:t,meta:n,defaultOpen:r=!1,children:i}){let[a,o]=(0,_.useState)(r);return(0,z.jsxs)(`section`,{"data-testid":`editrail-section-${e}`,className:`border-b border-ghost`,children:[(0,z.jsxs)(`button`,{type:`button`,"data-testid":`editrail-section-toggle-${e}`,onClick:()=>o(e=>!e),"aria-expanded":a,className:`w-full flex items-center justify-between px-4 py-3 text-left hover:bg-surface-low transition-colors`,children:[(0,z.jsxs)(`span`,{className:`font-mono text-[11px] uppercase tracking-wider text-on-surface-variant`,children:[t,n?(0,z.jsx)(`span`,{className:`ml-2 text-outline normal-case`,children:n}):null]}),(0,z.jsx)(`span`,{className:`text-on-surface-variant text-xs`,"aria-hidden":`true`,children:a?`−`:`+`})]}),a?(0,z.jsx)(`div`,{"data-testid":`editrail-section-body-${e}`,className:`pl-3 ml-4 mr-4 mb-3 border-l border-ghost space-y-3`,children:(0,z.jsx)(`div`,{className:`pl-3`,children:i})}):null]})}function yf({htmlFor:e,children:t}){return(0,z.jsx)(`label`,{htmlFor:e,className:`font-mono text-[11px] uppercase tracking-wider text-on-surface-variant block mb-1`,children:t})}function bf({id:e,field:t,label:n,type:r=`text`,placeholder:i,maxLength:a,multiline:o=!1,rows:s=3}){let{state:c,dispatch:l}=W(),u=c.profile[t]??``,d=c.publishState?.targets[`heyi.am`]?.lastPublishedProfile[t]??void 0,f=(0,_.useRef)(c.profile);(0,_.useEffect)(()=>{f.current=c.profile},[c.profile]);let p=(0,_.useRef)(null);(0,_.useEffect)(()=>()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)},[]);let m=hf(u,d);function h(e){let n=e===``?void 0:e;l({type:`UPDATE_PROFILE_FIELD`,field:t,value:n}),p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>{p.current=null,gr({...f.current,[t]:n}).then(()=>{l({type:`PROFILE_SAVED`})}).catch(e=>{console.error(`[EditRail] Failed to persist profile field`,t,e)})},ff)}return o?(0,z.jsxs)(`div`,{children:[(0,z.jsx)(yf,{htmlFor:e,children:n}),(0,z.jsx)(`textarea`,{id:e,"data-testid":`editrail-field-${t}`,value:u,onChange:e=>h(e.target.value),placeholder:i,maxLength:a,rows:s,className:_f(m,`resize-y`)})]}):(0,z.jsxs)(`div`,{children:[(0,z.jsx)(yf,{htmlFor:e,children:n}),(0,z.jsx)(`input`,{id:e,type:r,"data-testid":`editrail-field-${t}`,value:u,onChange:e=>h(e.target.value),placeholder:i,maxLength:a,className:_f(m)})]})}function xf(){let{state:e,dispatch:t}=W(),n=e.profile.photoBase64,r=e.publishState?.targets[`heyi.am`]?.lastPublishedProfile.photoBase64,i=hf(n,r),a=(0,_.useRef)(e.profile);(0,_.useEffect)(()=>{a.current=e.profile},[e.profile]);function o(e){gr(e).then(()=>{t({type:`PROFILE_SAVED`})}).catch(e=>{console.error(`[EditRail] Failed to persist photo`,e)})}function s(e){let n=e.target.files?.[0];if(!n)return;if(n.size>pf){alert(`Photo must be under 5MB`),e.target.value=``;return}let r=new FileReader;r.onload=()=>{let e=r.result;t({type:`UPDATE_PROFILE_FIELD`,field:`photoBase64`,value:e}),o({...a.current,photoBase64:e})},r.readAsDataURL(n),e.target.value=``}function c(){t({type:`UPDATE_PROFILE_FIELD`,field:`photoBase64`,value:void 0}),o({...a.current,photoBase64:void 0})}return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(yf,{children:`Profile photo`}),(0,z.jsxs)(`div`,{className:i?`border-l-2 border-amber-500 pl-2 flex items-center gap-3`:`flex items-center gap-3`,children:[n?(0,z.jsx)(`div`,{className:`relative w-14 h-14 rounded-full overflow-hidden border border-ghost shrink-0`,children:(0,z.jsx)(`img`,{src:n,alt:`Profile`,className:`w-full h-full object-cover`})}):(0,z.jsx)(`div`,{className:`w-14 h-14 rounded-full bg-surface-low border border-ghost shrink-0 flex items-center justify-center`,children:(0,z.jsx)(`span`,{className:`text-on-surface-variant text-[10px]`,children:`No photo`})}),(0,z.jsxs)(`label`,{className:`text-xs font-mono text-primary hover:underline cursor-pointer`,children:[n?`Change photo`:`Upload photo`,(0,z.jsx)(`input`,{type:`file`,accept:`image/png,image/jpeg,image/webp`,className:`hidden`,"data-testid":`editrail-field-photoBase64`,onChange:s})]}),n?(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Remove`}):null]})]})}function Sf(){let{state:e,dispatch:t}=W(),n=e.profile.resumeBase64,r=e.profile.resumeFilename,i=e.publishState?.targets[`heyi.am`]?.lastPublishedProfile.resumeBase64,a=hf(n,i),o=(0,_.useRef)(e.profile);(0,_.useEffect)(()=>{o.current=e.profile},[e.profile]);function s(e){gr(e).then(()=>{t({type:`PROFILE_SAVED`})}).catch(e=>{console.error(`[EditRail] Failed to persist resume`,e)})}function c(e){let n=e.target.files?.[0];if(!n)return;if(n.size>mf){alert(`Resume must be under 10MB`),e.target.value=``;return}let r=new FileReader;r.onload=()=>{let e=r.result;t({type:`UPDATE_PROFILE_FIELD`,field:`resumeBase64`,value:e}),t({type:`UPDATE_PROFILE_FIELD`,field:`resumeFilename`,value:n.name}),s({...o.current,resumeBase64:e,resumeFilename:n.name})},r.readAsDataURL(n),e.target.value=``}function l(){t({type:`UPDATE_PROFILE_FIELD`,field:`resumeBase64`,value:void 0}),t({type:`UPDATE_PROFILE_FIELD`,field:`resumeFilename`,value:void 0}),s({...o.current,resumeBase64:void 0,resumeFilename:void 0})}return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(yf,{children:`Resume (PDF)`}),(0,z.jsxs)(`div`,{className:a?`border-l-2 border-amber-500 pl-2 flex items-center gap-3`:`flex items-center gap-3`,children:[n?(0,z.jsx)(`span`,{className:`font-mono text-xs text-on-surface truncate max-w-[180px]`,children:r??`resume.pdf`}):(0,z.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:`No resume`}),(0,z.jsxs)(`label`,{className:`text-xs font-mono text-primary hover:underline cursor-pointer`,children:[n?`Replace`:`Upload PDF`,(0,z.jsx)(`input`,{type:`file`,accept:`application/pdf`,className:`hidden`,"data-testid":`editrail-field-resumeBase64`,onChange:c})]}),n?(0,z.jsx)(`button`,{type:`button`,onClick:l,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Remove`}):null]})]})}function Cf({projectId:e,title:t,included:n,onToggle:r}){let{attributes:i,listeners:a,setNodeRef:o,transform:s,transition:c,isDragging:l}=af({id:e});return(0,z.jsxs)(`div`,{ref:o,style:{transform:Cl.Transform.toString(s),transition:c,opacity:l?.5:1},"data-testid":`editrail-project-row-${e}`,className:`group flex items-center gap-2 py-1.5 px-1 hover:bg-surface-low rounded-sm`,children:[(0,z.jsx)(`button`,{type:`button`,"aria-label":`Drag ${t}`,"data-testid":`editrail-project-handle-${e}`,className:`opacity-0 group-hover:opacity-100 transition-opacity cursor-grab text-on-surface-variant text-xs font-mono px-1`,...i,...a,children:`::`}),(0,z.jsx)(`input`,{type:`checkbox`,checked:n,"data-testid":`editrail-project-checkbox-${e}`,onChange:()=>r(e),className:`shrink-0`}),(0,z.jsx)(`span`,{className:`text-sm truncate ${n?`text-on-surface`:`text-on-surface-variant`}`,children:t})]})}function wf(){let{state:e,dispatch:t}=W(),[n,r]=(0,_.useState)({}),i=(0,_.useRef)(e.profile),a=(0,_.useRef)(e.projects);(0,_.useEffect)(()=>{i.current=e.profile},[e.profile]),(0,_.useEffect)(()=>{a.current=e.projects},[e.projects]);let o=(0,_.useRef)(null);(0,_.useEffect)(()=>()=>{o.current!==null&&(clearTimeout(o.current),o.current=null)},[]);function s(){o.current!==null&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,gr({...i.current,projectsOnPortfolio:a.current.slice().sort((e,t)=>e.order-t.order).map((e,t)=>({projectId:e.projectId,included:e.included,order:t}))}).then(()=>{t({type:`BUMP_REFRESH`})}).catch(e=>{console.error(`[EditRail] Failed to persist projectsOnPortfolio`,e)})},ff)}(0,_.useEffect)(()=>{let e=!1;return qn().then(t=>{if(e)return;let n={};for(let e of t)n[e.dirName]=e.name;r(n)}).catch(()=>{}),()=>{e=!0}},[]);let c=(0,_.useMemo)(()=>e.projects.slice().sort((e,t)=>e.order-t.order),[e.projects]),l=`${c.filter(e=>e.included).length} of ${c.length}`,u=K(Rl(Iu),Rl(ju,{coordinateGetter:lf}));function d(e){let{active:n,over:r}=e;if(!r||n.id===r.id)return;let i=c.map(e=>e.projectId),a=i.indexOf(String(n.id)),o=i.indexOf(String(r.id));a<0||o<0||(t({type:`REORDER_PROJECT`,projectId:String(n.id),newIndex:o}),s())}function f(e){t({type:`TOGGLE_PROJECT_INCLUDED`,projectId:e}),s()}return(0,z.jsx)(vf,{id:`projects`,title:`Projects on portfolio`,meta:`· ${l}`,children:c.length===0?(0,z.jsx)(`p`,{className:`text-xs text-on-surface-variant`,children:`No projects yet.`}):(0,z.jsx)(jd,{sensors:u,collisionDetection:Hl,onDragEnd:d,children:(0,z.jsx)(Xd,{items:c.map(e=>e.projectId),strategy:Kd,children:(0,z.jsx)(`div`,{"data-testid":`editrail-projects-list`,children:c.map(e=>(0,z.jsx)(Cf,{projectId:e.projectId,title:n[e.projectId]??e.projectId,included:e.included,onToggle:f},e.projectId))})})})})}function Tf(){let[e,t]=(0,_.useState)(`editorial`),[n,r]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=!1;return pr().then(n=>{e||t(n.template)}).catch(()=>{}),()=>{e=!0}},[]);let i=async n=>{r(!1);let i=e;t(n);try{await mr(n)}catch{t(i)}};return(0,z.jsxs)(vf,{id:`template`,title:`Template`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{"data-testid":`editrail-template-pill`,className:`font-mono text-xs px-2 py-1 rounded-sm bg-surface-low border border-ghost text-on-surface`,children:e}),(0,z.jsx)(`button`,{type:`button`,"data-testid":`editrail-template-change`,className:`text-xs font-mono text-primary hover:underline`,onClick:()=>r(!0),children:`Change template`})]}),n&&(0,z.jsx)(xc,{mode:`modal`,onClose:()=>r(!1),onSelectTemplate:i})]})}function Ef(){return(0,z.jsxs)(`aside`,{"data-testid":`portfolio-editrail`,className:`w-[360px] shrink-0 border-l border-ghost bg-surface-lowest overflow-y-auto`,children:[(0,z.jsxs)(vf,{id:`identity`,title:`Identity`,defaultOpen:!0,children:[(0,z.jsx)(bf,{id:`editrail-displayName`,field:`displayName`,label:`Display name`,placeholder:`Jane Smith`,maxLength:200}),(0,z.jsx)(bf,{id:`editrail-bio`,field:`bio`,label:`Bio / About`,placeholder:`A short bio for your portfolio...`,maxLength:2e3,multiline:!0,rows:3}),(0,z.jsx)(bf,{id:`editrail-location`,field:`location`,label:`Location`,placeholder:`San Francisco, CA`})]}),(0,z.jsxs)(vf,{id:`contact`,title:`Contact`,children:[(0,z.jsx)(bf,{id:`editrail-email`,field:`email`,label:`Email`,type:`email`,placeholder:`jane@example.com`}),(0,z.jsx)(bf,{id:`editrail-phone`,field:`phone`,label:`Phone`,type:`tel`,placeholder:`+1 (555) 123-4567`}),(0,z.jsx)(bf,{id:`editrail-linkedin`,field:`linkedinUrl`,label:`LinkedIn URL`,type:`url`,placeholder:`https://linkedin.com/in/janesmith`}),(0,z.jsx)(bf,{id:`editrail-github`,field:`githubUrl`,label:`GitHub URL`,type:`url`,placeholder:`https://github.com/janesmith`}),(0,z.jsx)(bf,{id:`editrail-twitter`,field:`twitterHandle`,label:`Twitter / X`,placeholder:`@janesmith`}),(0,z.jsx)(bf,{id:`editrail-website`,field:`websiteUrl`,label:`Personal website`,type:`url`,placeholder:`https://janesmith.dev`})]}),(0,z.jsxs)(vf,{id:`photo-resume`,title:`Photo & resume`,children:[(0,z.jsx)(xf,{}),(0,z.jsx)(Sf,{})]}),(0,z.jsx)(wf,{}),(0,z.jsx)(Tf,{})]})}function Df(){let{dispatch:e}=W();return(0,_.useEffect)(()=>{let t=!1;return Promise.all([hr().catch(()=>({})),_r().catch(()=>({targets:{}})),qn().catch(()=>[])]).then(([n,r,i])=>{if(t)return;let a=n.projectsOnPortfolio??[],o;if(a.length===0){let e=i.slice().sort((e,t)=>{let n=e.lastSessionDate||``,r=t.lastSessionDate||``;return n===r?t.dirName.localeCompare(e.dirName):r.localeCompare(n)}),t=new Set(e.slice(0,3).map(e=>e.dirName));o=e.map((e,n)=>({projectId:e.dirName,included:t.has(e.dirName),order:n}))}else{let e=new Map(a.map(e=>[e.projectId,e])),t=a.filter(e=>i.some(t=>t.dirName===e.projectId)).map(e=>({projectId:e.projectId,included:e.included,order:e.order}));t.sort((e,t)=>e.order-t.order);let n=i.filter(t=>!e.has(t.dirName)).map(e=>({projectId:e.dirName,included:!0,order:0}));o=[...t,...n].map((e,t)=>({...e,order:t}))}e({type:`LOAD`,profile:n,publishState:r,projects:o})}),()=>{t=!0}},[e]),null}function Of(){return(0,z.jsxs)(Lc,{children:[(0,z.jsx)(Df,{}),(0,z.jsx)(ri,{children:(0,z.jsxs)(`div`,{className:`flex flex-col h-[calc(100vh-3rem)] min-h-0`,children:[(0,z.jsx)(Uc,{}),(0,z.jsxs)(`div`,{className:`flex flex-1 min-h-0 overflow-hidden`,children:[(0,z.jsx)(Yc,{}),(0,z.jsx)(Ef,{})]})]})})]})}var kf=[`Claude`,`Cursor`,`Codex`,`Gemini`];function Af(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}catch{return e}}function jf(){let[e,t]=On(),n=et(),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 Lr(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,z.jsx)(ri,{chips:[{label:`Search`}],children:(0,z.jsxs)(`div`,{className:`p-6 max-w-3xl mx-auto`,children:[(0,z.jsx)(ti,{value:s,onChange:c,autoFocus:!0,placeholder:`Search sessions...`}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 mt-3`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mr-1`,children:`Source`}),kf.map(e=>(0,z.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,z.jsxs)(z.Fragment,{children:[(0,z.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,z.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,z.jsxs)(z.Fragment,{children:[(0,z.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,z.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,z.jsx)(`div`,{className:`h-4`}),p?(0,z.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:`Searching...`}):h?(0,z.jsxs)(z.Fragment,{children:[(0,z.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,z.jsx)(ii,{children:(0,z.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:`No sessions found. Try a different query or adjust filters.`})}):(0,z.jsx)(`div`,{className:`flex flex-col gap-2`,children:l.map(e=>(0,z.jsx)(`button`,{onClick:()=>n(`/session/${encodeURIComponent(e.sessionId)}${s?`?q=${encodeURIComponent(s)}`:``}`),className:`text-left w-full cursor-pointer`,children:(0,z.jsxs)(ii,{hover:!0,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsx)(`h4`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface truncate`,children:e.title}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,z.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:e.projectName}),(0,z.jsx)(ei,{children:e.source}),(0,z.jsx)(`span`,{className:`text-xs text-outline`,children:Af(e.date)})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 font-mono text-[0.6875rem] text-outline shrink-0`,children:[(0,z.jsx)(`span`,{children:la(e.durationMinutes)}),(0,z.jsxs)(`span`,{children:[e.turns,` turns`]}),(0,z.jsxs)(`span`,{children:[ua(e.linesOfCode),` lines`]})]})]}),e.snippet&&(0,z.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-2 line-clamp-2 font-mono`,children:e.snippet}),e.skills.length>0&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:e.skills.map(e=>(0,z.jsx)(ei,{variant:`violet`,children:e},e))})]})},e.sessionId))})]}):(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,z.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,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,z.jsx)(`p`,{className:`font-display text-sm font-semibold text-on-surface`,children:`Search across all your AI sessions`}),(0,z.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-1`,children:`Full-text search with source, project, and skill filters`})]})]})})}var Mf={Read:`📄`,Write:`✏️`,Edit:`✏️`,Bash:`▶`,Grep:`🔍`,Glob:`📂`,Agent:`🤖`,WebSearch:`🌐`,WebFetch:`🌐`};function Nf(e){return Mf[e]??`⚙`}function Pf(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 Ff({block:e}){let[t,n]=(0,_.useState)(!1),r=!!e.output,i=e.toolName===`Edit`,a=e.toolName===`Bash`;return(0,z.jsxs)(`div`,{className:`my-1.5 border border-ghost rounded-md bg-surface-lowest overflow-hidden`,children:[(0,z.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,z.jsx)(`span`,{className:`text-xs shrink-0 w-4 text-center`,children:Nf(e.toolName)}),(0,z.jsx)(`span`,{className:`font-mono text-[11px] font-semibold text-primary shrink-0`,children:e.toolName}),(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-on-surface-variant truncate flex-1`,children:Pf(e)}),e.isError&&(0,z.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-error shrink-0`,children:`error`}),(0,z.jsx)(`span`,{className:`text-[10px] text-outline shrink-0 transition-transform`,style:{transform:t?`rotate(90deg)`:`rotate(0deg)`},children:`▸`})]}),t&&(0,z.jsxs)(`div`,{className:`border-t border-ghost`,children:[i&&e.inputData&&(0,z.jsxs)(`div`,{className:`px-3 py-2 border-b border-ghost`,children:[typeof e.inputData.old_string==`string`&&(0,z.jsxs)(`div`,{className:`mb-2`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1`,children:`old`}),(0,z.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,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1`,children:`new`}),(0,z.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,z.jsx)(`div`,{className:`px-3 py-2 border-b border-ghost bg-[var(--inverse-surface)]`,children:(0,z.jsxs)(`pre`,{className:`font-mono text-[11px] text-[var(--inverse-on-surface)] whitespace-pre-wrap break-all`,children:[`$ `,e.input]})}),r&&(0,z.jsxs)(`div`,{className:`px-3 py-2 max-h-64 overflow-y-auto`,children:[(0,z.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,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mt-2`,children:`output truncated`})]}),!r&&!i&&!a&&(0,z.jsx)(`div`,{className:`px-3 py-2 text-[11px] text-outline italic`,children:`no output`})]})]})}function If({text:e}){let[t,n]=(0,_.useState)(!1),r=e.slice(0,80).replace(/\n/g,` `);return(0,z.jsxs)(`div`,{className:`my-1`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-2 text-left cursor-pointer group`,children:[(0,z.jsx)(`span`,{className:`text-[10px] text-outline transition-transform shrink-0`,style:{transform:t?`rotate(90deg)`:`rotate(0deg)`},children:`▸`}),(0,z.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,z.jsx)(`div`,{className:`ml-5 mt-1.5 pl-3 border-l-2 border-ghost`,children:(0,z.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 Lf=300;function Rf({text:e,highlights:t}){let[n,r]=(0,_.useState)(e.length<=Lf),i=e.length>Lf,a=(()=>{if(!i)return e.length;let t=e.slice(0,Lf+50),n=t.lastIndexOf(`. `,Lf);if(n>Lf*.6)return n+1;let r=t.lastIndexOf(` `,Lf);return r>Lf*.6?r:Lf})(),o=n?e:e.slice(0,a);if(t){let e=RegExp(`(${Wf(t)})`,`gi`);return(0,z.jsxs)(`div`,{className:`text-[0.8125rem] leading-relaxed whitespace-pre-wrap break-words`,children:[o.split(e).map((t,n)=>e.test(t)?(0,z.jsx)(`mark`,{className:`bg-amber/30 text-on-surface rounded-sm px-0.5`,children:t},n):(0,z.jsx)(`span`,{children:t},n)),i&&(0,z.jsx)(zf,{expanded:n,onToggle:()=>r(!n)})]})}return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Bf,{text:o}),i&&(0,z.jsx)(zf,{expanded:n,onToggle:()=>r(!n)})]})}function zf({expanded:e,onToggle:t}){return(0,z.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 Bf({text:e}){return(0,z.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(`
37
+ `),i=r>0?n.slice(0,r).trim():``,a=r>0?n.slice(r+1):n;return(0,z.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,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:i}),a]},t)}return(0,z.jsx)(`span`,{children:e.split(/(`[^`]+`)/g).map((e,t)=>e.startsWith("`")&&e.endsWith("`")?(0,z.jsx)(`code`,{className:`bg-surface-low rounded px-1 py-0.5 font-mono text-[11px]`,children:e.slice(1,-1)},t):(0,z.jsx)(`span`,{children:e},t))},t)})})}function Vf({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,z.jsxs)(`div`,{className:`relative`,"data-message-index":n,children:[r&&(0,z.jsx)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:(0,z.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,z.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,z.jsx)(Hf,{block:e,searchQuery:t},`t-${n}`)),o.map((e,n)=>(0,z.jsx)(Hf,{block:e,searchQuery:t},`x-${n}`)),a.length>3&&!c?(0,z.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,z.jsx)(`span`,{className:`text-[10px] text-outline`,children:`▸`}),(0,z.jsxs)(`span`,{children:[a.length,` tool calls`]}),(0,z.jsxs)(`span`,{className:`text-outline`,children:[`(`,[...new Set(a.map(e=>e.type===`tool_call`?e.toolName:``))].join(`, `),`)`]})]}):a.map((e,n)=>(0,z.jsx)(Hf,{block:e,searchQuery:t},`tc-${n}`)),a.length>3&&c&&(0,z.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 Hf({block:e,searchQuery:t}){switch(e.type){case`text`:return(0,z.jsx)(Rf,{text:e.text,highlights:t});case`thinking`:return(0,z.jsx)(If,{text:e.text});case`tool_call`:return(0,z.jsx)(Ff,{block:e})}}function Uf({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,z.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,z.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,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,z.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,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`font-mono text-[10px] text-outline shrink-0`,children:n>0?`${r+1}/${n}`:`no matches`}),(0,z.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,z.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,z.jsx)(`button`,{type:`button`,onClick:o,className:`text-xs text-outline hover:text-on-surface cursor-pointer ml-1`,children:`✕`})]})}function Wf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Gf({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(Wf(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,z.jsx)(`div`,{className:`text-center ${n?`py-4`:`py-12`}`,children:(0,z.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:`No conversation data available.`})}):(0,z.jsxs)(`div`,{ref:l,className:`relative`,children:[!n&&r&&(0,z.jsx)(`div`,{className:`sticky top-12 z-40 mb-4`,children:(0,z.jsx)(Uf,{query:a,onQueryChange:e=>{o(e),c(0)},matchCount:u,currentMatch:s,onNext:d,onPrev:f,onClose:p})}),(0,z.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,z.jsxs)(`div`,{children:[r!==null&&r!==t.role&&t.role===`user`&&(0,z.jsx)(`div`,{className:`border-t border-ghost/60 mb-4 mt-1`}),(0,z.jsx)(Vf,{message:t,messageIndex:n,searchQuery:a||void 0,showRoleBadge:i})]},t.id)})}),!n&&!r&&(0,z.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,z.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,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})})]})}function Kf(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}catch{return e}}function qf(e){let t=e.replace(/^#+\s*/gm,``).replace(/\*\*/g,``).replace(/\n.*/s,``);return t.length>120&&(t=t.slice(0,117)+`...`),t}function Jf(){let{sessionId:e}=nt(),[t]=On(),n=et(),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),Rr(e).then(a).catch(e=>l(e.message)).finally(()=>s(!1)))},[e]),(0,_.useEffect)(()=>{!e||m||(p(!0),Br(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 zr(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 zr(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,z.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-surface-mid`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading session...`})});if(c||!i)return(0,z.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center bg-surface-mid gap-3`,children:[(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:c??`Session not found.`}),(0,z.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,z.jsxs)(`div`,{className:`min-h-screen bg-surface-mid`,children:[(0,z.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,z.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,z.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,z.jsx)(`span`,{className:`text-outline text-xs shrink-0`,children:`/`}),(0,z.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface truncate`,children:qf(i.title)})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,z.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,z.jsxs)(`div`,{className:`relative`,children:[(0,z.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,z.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,z.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,z.jsx)(`span`,{className:`font-semibold capitalize`,children:e}),(0,z.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,z.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,z.jsxs)(`div`,{className:`p-6 max-w-3xl mx-auto`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 mb-2`,children:[i.source&&(0,z.jsx)(ei,{children:i.source}),(0,z.jsx)(ei,{children:Kf(i.date)}),i.projectName&&(0,z.jsx)(ei,{variant:`primary`,children:i.projectName})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-4 font-mono text-[11px] text-on-surface-variant mb-4`,children:[(0,z.jsxs)(`span`,{children:[la(i.durationMinutes),` active`]}),(0,z.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,z.jsxs)(`span`,{children:[i.turns,` turns`]}),(0,z.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,z.jsxs)(`span`,{children:[D.length,` files`]}),(0,z.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,z.jsxs)(`span`,{children:[ua(i.linesOfCode),` lines`]})]}),i.developerTake&&(0,z.jsx)(`div`,{className:`mb-5`,children:(0,z.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,z.jsx)(`div`,{className:`flex flex-wrap gap-1 mb-5`,children:i.skills.map(e=>(0,z.jsx)(ei,{variant:`violet`,children:e},e))}),f?(0,z.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`w-4 h-4 border-2 border-primary border-t-transparent rounded-full animate-spin`}),(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading transcript...`})]})}):(0,z.jsx)(Gf,{messages:A,initialSearchQuery:r}),(O.length>0||D.length>0||i.qaPairs&&i.qaPairs.length>0)&&(0,z.jsxs)(`div`,{className:`mt-8 pt-6 border-t border-ghost`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-4`,children:`Supporting detail`}),D.length>0&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsxs)(`div`,{className:`font-mono text-[10px] uppercase tracking-wider text-on-surface-variant mb-2`,children:[`Files changed · `,D.length]}),(0,z.jsx)(`div`,{className:`flex flex-col divide-y divide-ghost bg-surface-lowest border border-ghost rounded-md`,children:D.map(e=>(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,z.jsx)(`span`,{className:`font-mono text-xs text-on-surface truncate flex-1 mr-3`,children:e.path}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-[11px] shrink-0`,children:[e.additions>0&&(0,z.jsxs)(`span`,{className:`text-green`,children:[`+`,e.additions]}),e.deletions>0&&(0,z.jsxs)(`span`,{className:`text-error`,children:[`-`,e.deletions]})]})]},e.path))})]}),O.length>0&&(0,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.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,z.jsx)(`div`,{className:`flex flex-col gap-2`,children:O.sort((e,t)=>t.count-e.count).map(e=>(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[11px] text-on-surface-variant w-28 truncate shrink-0`,children:e.tool}),(0,z.jsx)(`div`,{className:`flex-1 h-4 bg-surface-low rounded-sm overflow-hidden`,children:(0,z.jsx)(`div`,{className:`h-full bg-primary/20 rounded-sm`,style:{width:`${e.count/k*100}%`}})}),(0,z.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,z.jsxs)(`div`,{className:`mb-5`,children:[(0,z.jsx)(`div`,{className:`font-mono text-[10px] uppercase tracking-wider text-on-surface-variant mb-2`,children:`Questions & Answers`}),(0,z.jsx)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md divide-y divide-ghost`,children:i.qaPairs.map((e,t)=>(0,z.jsxs)(`div`,{className:`px-3 py-3`,children:[(0,z.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-1`,children:e.question}),(0,z.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.answer})]},t))})]})]})]})]})}function Yf(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function Xf(){let{dirName:e}=nt(),t=et(),[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&&tr(e).then(r).catch(()=>{}).finally(()=>a(!1))},[e]),i)return(0,z.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-surface-mid`,children:(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading sessions...`})});if(!n)return(0,z.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center bg-surface-mid gap-3`,children:[(0,z.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Project not found.`}),(0,z.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,z.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,z.jsxs)(`div`,{className:`min-h-screen bg-surface-mid`,children:[(0,z.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,z.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,z.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,z.jsx)(`span`,{className:`text-outline text-xs shrink-0`,children:`/`}),(0,z.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface`,children:`All sessions`})]}),(0,z.jsxs)(ei,{variant:`primary`,children:[f.length,` sessions`]})]})}),(0,z.jsxs)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-4 mb-4`,children:[(0,z.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,z.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,z.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline`,children:`Sort:`}),(0,z.jsx)(h,{label:`Date`,sortKey:`date`}),(0,z.jsx)(h,{label:`Duration`,sortKey:`duration`}),(0,z.jsx)(h,{label:`Lines`,sortKey:`loc`}),(0,z.jsx)(h,{label:`Turns`,sortKey:`turns`})]})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[p.map(e=>(0,z.jsxs)(bn,{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,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsx)(`div`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface mb-0.5 truncate`,children:e.title}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 font-mono text-[10px] text-on-surface-variant`,children:[(0,z.jsx)(`span`,{children:Yf(e.date)}),(0,z.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,z.jsx)(`span`,{children:la(e.durationMinutes)}),(0,z.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,z.jsxs)(`span`,{children:[e.turns,` turns`]}),(0,z.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,z.jsxs)(`span`,{children:[ua(e.linesOfCode),` lines`]})]}),e.developerTake&&(0,z.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-1 line-clamp-1`,children:e.developerTake})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0 pt-0.5`,children:[e.source&&(0,z.jsx)(ei,{children:e.source}),e.skills?.[0]&&(0,z.jsx)(ei,{variant:`violet`,children:e.skills[0]}),(e.skills?.length??0)>1&&(0,z.jsxs)(`span`,{className:`font-mono text-[9px] text-outline`,children:[`+`,e.skills.length-1]})]})]},e.id)),p.length===0&&(0,z.jsx)(`div`,{className:`text-center py-12`,children:(0,z.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:u?`No sessions match your filter.`:`No sessions in this project.`})})]})]})]})}function Zf({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,z.jsxs)(`div`,{className:`relative`,ref:r,children:[(0,z.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,z.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,className:`transition-transform ${t?`rotate-180`:``}`,children:(0,z.jsx)(`path`,{d:`M3 4.5L6 7.5L9 4.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),t&&(0,z.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,z.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 Qf(){let{dirName:e}=nt(),[t,n]=(0,_.useState)(null);return(0,_.useEffect)(()=>{e&&tr(e).then(e=>{n(e.project.name)}).catch(()=>{})},[e]),(0,z.jsx)(ri,{back:{label:`Projects`,to:`/projects`},chips:[{label:t??`...`}],actions:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(bn,{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,z.jsx)(Zf,{dirName:e??``}),(0,z.jsx)(bn,{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,z.jsx)(Bs,{})})}function $f(){return(0,z.jsx)(_n,{children:(0,z.jsxs)(Ot,{children:[(0,z.jsx)(Et,{path:`/`,element:(0,z.jsx)(Ta,{})}),(0,z.jsx)(Et,{path:`/sources`,element:(0,z.jsx)(Fa,{})}),(0,z.jsx)(Et,{path:`/archive`,element:(0,z.jsx)(La,{})}),(0,z.jsx)(Et,{path:`/projects`,element:(0,z.jsx)(Va,{})}),(0,z.jsx)(Et,{path:`/project/:dirName`,element:(0,z.jsx)(Qf,{})}),(0,z.jsx)(Et,{path:`/project/:dirName/sessions`,element:(0,z.jsx)(Xf,{})}),(0,z.jsx)(Et,{path:`/project/:dirName/boundaries`,element:(0,z.jsx)(Vs,{})}),(0,z.jsx)(Et,{path:`/project/:dirName/enhance`,element:(0,z.jsx)(oc,{})}),(0,z.jsx)(Et,{path:`/search`,element:(0,z.jsx)(jf,{})}),(0,z.jsx)(Et,{path:`/session/:sessionId`,element:(0,z.jsx)(Jf,{})}),(0,z.jsx)(Et,{path:`/project/:dirName/publish`,element:(0,z.jsx)(lc,{})}),(0,z.jsx)(Et,{path:`/settings`,element:(0,z.jsx)(dc,{})}),(0,z.jsx)(Et,{path:`/portfolio`,element:(0,z.jsx)(Of,{})}),(0,z.jsx)(Et,{path:`/templates`,element:(0,z.jsx)(xc,{})})]})})}(0,v.createRoot)(document.getElementById(`root`)).render((0,z.jsx)(_.StrictMode,{children:(0,z.jsx)($f,{})}));