symbio 0.7.1 → 0.8.0

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,55 @@
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),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(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},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function ee(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 te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 re(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,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=re(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(A(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 j(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ae=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)};function M(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ae)}catch(e){ae(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function oe(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else M(oe.bind(null,e))}var se={map:j,forEach:function(e,t,n){j(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=oe,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=M,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=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&&te(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&&te(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 ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function te(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,te(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}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();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`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(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.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.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=u(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=u(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,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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=u(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=u(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,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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 l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=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=m()})),g=o((e=>{var t=p(),n=d(),r=h();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){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e: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 f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),ee=Symbol.for(`react.transitional.element`),k=Symbol.for(`react.portal`),te=Symbol.for(`react.fragment`),ne=Symbol.for(`react.strict_mode`),A=Symbol.for(`react.profiler`),re=Symbol.for(`react.consumer`),j=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),M=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.activity`),le=Symbol.for(`react.legacy_hidden`),ue=Symbol.for(`react.memo_cache_sentinel`),de=Symbol.for(`react.view_transition`),fe=Symbol.for(`react.recoverable`),pe=Symbol.iterator;function me(e){return typeof e!=`object`||!e?null:(e=pe&&e[pe]||e[`@@iterator`],typeof e==`function`?e:null)}var he=Symbol.for(`react.client.reference`);function ge(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case te:return`Fragment`;case A:return`Profiler`;case ne:return`StrictMode`;case ae:return`Suspense`;case M:return`SuspenseList`;case ce:return`Activity`;case de:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case k:return`Portal`;case j:return e.displayName||`Context`;case re:return(e._context.displayName||`Context`)+`.Consumer`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?ge(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var _e=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,ve={pending:!1,data:null,method:null,action:null},ye=[],be=-1;function xe(e){return{current:e}}function Se(e){0>be||(e.current=ye[be],ye[be]=null,be--)}function Ce(e,t){be++,ye[be]=e.current,e.current=t}var we=xe(null),Te=xe(null),Ee=xe(null),De=xe(null);function Oe(e,t){switch(Ce(Ee,t),Ce(Te,e),Ce(we,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?gp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=gp(t),e=_p(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Se(we),Ce(we,e)}function ke(){Se(we),Se(Te),Se(Ee)}function Ae(e){var t=e.memoizedState;t!==null&&(X._currentValue=t.memoizedState,Ce(De,e)),t=we.current;var n=_p(t,e.type);t!==n&&(Ce(Te,e),Ce(we,n))}function je(e){Te.current===e&&(Se(we),Se(Te)),De.current===e&&(Se(De),X._currentValue=ve)}var Me,Ne;function Pe(e){if(Me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Me=t&&t[1]||``,Ne=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+Me+e+Ne}var Fe=!1;function Ie(e,t){if(!e||Fe)return``;Fe=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}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{Fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Pe(n):``}function Le(e,t){switch(e.tag){case 26:case 27:case 5:return Pe(e.type);case 16:return Pe(`Lazy`);case 13:return e.child!==t&&t!==null?Pe(`Suspense Fallback`):Pe(`Suspense`);case 19:return Pe(`SuspenseList`);case 0:case 15:return Ie(e.type,!1);case 11:return Ie(e.type.render,!1);case 1:return Ie(e.type,!0);case 31:return Pe(`Activity`);case 30:return Pe(`ViewTransition`);default:return``}}function Re(e){try{var t=``,n=null;do t+=Le(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var ze=Object.prototype.hasOwnProperty,Be=t.unstable_scheduleCallback,Ve=t.unstable_cancelCallback,He=t.unstable_shouldYield,Ue=t.unstable_requestPaint,We=t.unstable_now,Ge=t.unstable_getCurrentPriorityLevel,Ke=t.unstable_ImmediatePriority,qe=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,Ye=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,F=t.log,Ze=t.unstable_setDisableYieldValue,Qe=null,$e=null;function et(e){if(typeof F==`function`&&Ze(e),$e&&typeof $e.setStrictMode==`function`)try{$e.setStrictMode(Qe,e)}catch{}}var tt=Math.clz32?Math.clz32:it,nt=Math.log,rt=Math.LN2;function it(e){return e>>>=0,e===0?32:31-(nt(e)/rt|0)|0}var at=256,ot=262144,st=4194304;function ct(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&-e;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 lt(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=ct(n))):i=ct(o):i=ct(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ct(n))):i=ct(o)):i=ct(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 ut(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-tt(n),i=1<<r;t|=e[r],n&=~i}return t}function ft(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 pt(){var e=st;return st<<=1,!(st&62914560)&&(st=4194304),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ht(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gt(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-tt(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&&_t(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function _t(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-tt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-tt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function yt(e,t){var n=t&-t;return n=n&42?1:bt(n),(n&(e.suspendedLanes|t))===0?n:0}function bt(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 xt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function St(){var e=P.p;return e===0?(e=window.event,e===void 0?32:Th(e.type)):e}function Ct(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var I=Math.random().toString(36).slice(2),wt=`__reactFiber$`+I,Tt=`__reactProps$`+I,Et=`__reactContainer$`+I,Dt=`__reactEvents$`+I,Ot=`__reactListeners$`+I,kt=`__reactHandles$`+I,At=`__reactResources$`+I,jt=`__reactMarker$`+I,Mt=`__reactLoad$`+I;function Nt(e){delete e[wt],delete e[Tt],delete e[Ot],delete e[kt]}function Pt(e){var t;if(t=e[wt])return t;for(var n=e.parentNode;n;){if(t=n[Et]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gm(e);e!==null;){if(n=e[wt])return n;e=gm(e)}return t}e=n,n=e.parentNode}return null}function Ft(e){if(e=e[wt]||e[Et]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function It(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Lt(e){var t=e[At];return t||=e[At]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Rt(e){e[jt]=!0}function zt(e){e[Mt]=void 0}var Bt=new Set,Vt={};function Ht(e,t){Ut(e,t),Ut(e+`Capture`,t)}function Ut(e,t){for(Vt[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]*$`),Gt={},Kt={};function qt(e){return ze.call(Kt,e)?!0:ze.call(Gt,e)?!1:Wt.test(e)?Kt[e]=!0:(Gt[e]=!0,!1)}var L=!1;function Jt(){var e=L;return L=!1,e}function Yt(e,t,n){if(qt(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 Xt(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 Zt(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 Qt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function $t(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function en(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 tn(e){if(!e._valueTracker){var t=$t(e)?`checked`:`value`;e._valueTracker=en(e,t,``+e[t])}}function nn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=$t(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var rn=/[\n"\\]/g;function an(e){return e.replace(rn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function on(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=``+Qt(t)):e.value!==``+Qt(t)&&(e.value=``+Qt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):cn(e,Qt(n)):o===`number`&&e.value==t?cn(e,Qt(e.value)):cn(e,Qt(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=``+Qt(s):e.removeAttribute(`name`)}function sn(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)){tn(e);return}n=n==null?``:``+Qt(n),t=t==null?n:``+Qt(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),tn(e)}function cn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function ln(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=``+Qt(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 un(e,t,n){t!=null&&(t=``+Qt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Qt(n)}function dn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(_e(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Qt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),tn(e)}function fn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pn=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 mn(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||pn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function hn(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]=``,L=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(mn(e,a,r),L=!0)}else for(var o in t)t.hasOwnProperty(o)&&mn(e,o,t[o])}function gn(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 _n=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`],[`maskType`,`mask-type`],[`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`]]),vn=/^[\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 yn(e){return vn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function bn(){}var xn=null;function Sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cn=null,wn=null;function Tn(e){var t=Ft(e);if(t&&(e=t.stateNode)){var n=e[Tt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(on(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="`+an(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Tt]||null;if(!a)throw Error(i(90));on(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&&nn(r)}break a;case`textarea`:un(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&ln(e,!!n.multiple,t,!1)}}}var En=!1;function Dn(e,t,n){if(En)return e(t,n);En=!0;try{return e(t)}finally{if(En=!1,(Cn!==null||wn!==null)&&(Ud(),Cn&&(t=Cn,e=wn,wn=Cn=null,Tn(t),e)))for(t=0;t<e.length;t++)Tn(e[t])}}function On(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Tt]||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 kn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,An=!1;if(kn)try{var jn={};Object.defineProperty(jn,"passive",{get:function(){An=!0}}),window.addEventListener(`test`,jn,jn),window.removeEventListener(`test`,jn,jn)}catch{An=!1}var Mn=null,Nn=null,Pn=null;function Fn(){if(Pn)return Pn;var e,t=Nn,n=t.length,r,i=`value`in Mn?Mn.value:Mn.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 Pn=i.slice(e,1<r?1-r:void 0)}function In(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 Ln(){return!0}function Rn(){return!1}function zn(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)?Ln:Rn,this.isPropagationStopped=Rn,this}return D(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=Ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Ln)},persist:function(){},isPersistent:Ln}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vn=zn(Bn),Hn=D({},Bn,{view:0,detail:0}),Un=zn(Hn),Wn,Gn,Kn,qn=D({},Hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Kn&&(Kn&&e.type===`mousemove`?(Wn=e.screenX-Kn.screenX,Gn=e.screenY-Kn.screenY):Gn=Wn=0,Kn=e),Wn)},movementY:function(e){return`movementY`in e?e.movementY:Gn}}),Jn=zn(qn),Yn=zn(D({},qn,{dataTransfer:0})),Xn=zn(D({},Hn,{relatedTarget:0})),Zn=zn(D({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=zn(D({},Bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),$n=zn(D({},Bn,{data:0})),er={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},tr={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`},nr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nr[e])?!!t[e]:!1}function ir(){return rr}var ar=zn(D({},Hn,{key:function(e){if(e.key){var t=er[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=In(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?tr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?In(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?In(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=zn(D({},qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=zn(D({},Bn,{submitter:0})),cr=zn(D({},Hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),lr=zn(D({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ur=zn(D({},qn,{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})),dr=zn(D({},Bn,{newState:0,oldState:0,source:0})),fr=[9,13,27,32],pr=kn&&`CompositionEvent`in window,mr=null;kn&&`documentMode`in document&&(mr=document.documentMode);var hr=kn&&`TextEvent`in window&&!mr,gr=kn&&(!pr||mr&&8<mr&&11>=mr),_r=` `,vr=!1;function yr(e,t){switch(e){case`keyup`:return fr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xr=!1;function Sr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(vr=!0,_r):null;case`textInput`:return e=t.data,e===_r&&vr?null:e;default:return null}}function Cr(e,t){if(xr)return e===`compositionend`||!pr&&yr(e,t)?(e=Fn(),Pn=Nn=Mn=null,xr=!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 gr&&t.locale!==`ko`?null:t.data;default:return null}}var wr={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`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){Cn?wn?wn.push(r):wn=[r]:Cn=r,t=$f(t,`onChange`),0<t.length&&(n=new Vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){Kf(e,0)}function Ar(e){if(nn(It(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(kn){var Nr;if(kn){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Sn(e)),Dn(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(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(!ze.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function Gr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var n=Kr(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=Kr(n)}}function Jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(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=Gr(e.document)}return t}function Xr(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 Zr=kn&&`documentMode`in document&&11>=document.documentMode,Qr=null,$r=null,ei=null,ti=!1;function ni(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ti||Qr==null||Qr!==Gr(r)||(r=Qr,`selectionStart`in r&&Xr(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}),ei&&Wr(ei,r)||(ei=r,r=$f($r,`onSelect`),0<r.length&&(t=new Vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ii={animationend:ri(`Animation`,`AnimationEnd`),animationiteration:ri(`Animation`,`AnimationIteration`),animationstart:ri(`Animation`,`AnimationStart`),transitionrun:ri(`Transition`,`TransitionRun`),transitionstart:ri(`Transition`,`TransitionStart`),transitioncancel:ri(`Transition`,`TransitionCancel`),transitionend:ri(`Transition`,`TransitionEnd`)},ai={},oi={};kn&&(oi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),`TransitionEvent`in window||delete ii.transitionend.transition);function si(e){if(ai[e])return ai[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oi)return ai[e]=t[n];return e}var ci=si(`animationend`),li=si(`animationiteration`),ui=si(`animationstart`),di=si(`transitionrun`),fi=si(`transitionstart`),pi=si(`transitioncancel`),mi=si(`transitionend`),hi=new Map,gi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);gi.push(`scrollEnd`);function _i(e,t){hi.set(e,t),Ht(t,[e])}var vi=0;function yi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=wd.identifierPrefix;var n=vi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function bi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Md;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function xi(e,t){return e=bi(e),t=bi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Si=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)},Ci=[],wi=0,Ti=0;function Ei(){for(var e=wi,t=Ti=wi=0;t<e;){var n=Ci[t];Ci[t++]=null;var r=Ci[t];Ci[t++]=null;var i=Ci[t];Ci[t++]=null;var a=Ci[t];if(Ci[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&&Ai(n,i,a)}}function Di(e,t,n,r){Ci[wi++]=e,Ci[wi++]=t,Ci[wi++]=n,Ci[wi++]=r,Ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Oi(e,t,n,r){return Di(e,t,n,r),ji(e)}function ki(e,t){return Di(e,null,null,t),ji(e)}function Ai(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-tt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ji(e){if(50<Nd)throw Nd=0,Pd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ni(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 Pi(e,t,n,r){return new Ni(e,t,n,r)}function Fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ii(e,t){var n=e.alternate;return n===null?(n=Pi(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&1206910976,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 Li(e,t){e.flags&=1206910978;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 Ri(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Fi(r)&&(s=1);else if(typeof r==`string`)s=Zm(e,n,we.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ce:return e=Pi(31,n,t,a),e.elementType=ce,e.lanes=o,e;case te:return zi(n.children,a,o,t);case ne:s=8,a|=24;break;case A:return e=Pi(12,n,t,a|2),e.elementType=A,e.lanes=o,e;case ae:return e=Pi(13,n,t,a),e.elementType=ae,e.lanes=o,e;case M:return e=Pi(19,n,t,a),e.elementType=M,e.lanes=o,e;case le:case de:return e=a|32,e=Pi(30,n,t,e),e.elementType=de,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case j:s=10;break a;case re:s=9;break a;case ie:s=11;break a;case oe:s=14;break a;case se:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Pi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function zi(e,t,n,r){return e=Pi(7,e,r,t),e.lanes=n,e}function Bi(e,t,n){return e=Pi(6,e,null,t),e.lanes=n,e}function Vi(e){var t=Pi(18,null,null,0);return t.stateNode=e,t}function Hi(e,t,n){return t=Pi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ui=new WeakMap;function Wi(e,t){if(typeof e==`object`&&e){var n=Ui.get(e);return n===void 0?(t={value:e,source:t,stack:Re(t)},Ui.set(e,t),t):n}return{value:e,source:t,stack:Re(t)}}var Gi=[],Ki=0,qi=null,Ji=0,Yi=[],Xi=0,Zi=null,Qi=1,$i=``;function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=qi,qi=e,Ji=t}function ta(e,t,n){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Zi=e;var r=Qi;e=$i;var i=32-tt(r)-1;r&=~(1<<i),n+=1;var a=32-tt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Qi=1<<32-tt(t)+i|n<<i|r,$i=a+e}else Qi=1<<a|n<<i|r,$i=e}function na(e){e.return!==null&&(ea(e,1),ta(e,1,0))}function ra(e){for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null;for(;e===Zi;)Zi=Yi[--Xi],Yi[Xi]=null,$i=Yi[--Xi],Yi[Xi]=null,Qi=Yi[--Xi],Yi[Xi]=null}function ia(e,t){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Qi=t.id,$i=t.overflow,Zi=e}var aa=null,oa=null,R=!1,sa=null,ca=!1,la=Error(i(519));function ua(e){throw ga(Wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),la}function da(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[wt]=e,t[Tt]=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<Wf.length;n++)q(Wf[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),sn(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),dn(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||ap(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=bn),t=!0):t=!1,t||ua(e,!0)}function fa(e){for(aa=e.return;aa;)switch(aa.tag){case 5:case 31:case 13:ca=!1;return;case 27:case 3:ca=!0;return;default:aa=aa.return}}function pa(e){if(e!==aa)return!1;if(!R)return fa(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||yp(e.type,e.memoizedProps)),n=!n),n&&oa&&ua(e),fa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=hm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=hm(e)}else t===27?(t=oa,Op(e.type)?(e=mm,mm=null,oa=e):oa=t):oa=aa?pm(e.stateNode.nextSibling):null;return!0}function ma(){oa=aa=null,R=!1}function ha(){var e=sa;return e!==null&&(_d===null?_d=e:_d.push.apply(_d,e),sa=null),e}function ga(e){sa===null?sa=[e]:sa.push(e)}var _a=xe(null),va=null,ya=null;function ba(e,t,n){Ce(_a,t._currentValue),t._currentValue=n}function xa(e){e._currentValue=_a.current,Se(_a)}function Sa(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 Ca(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),Sa(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),Sa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Sa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):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 wa(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;Ur(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===De.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[X]:e.push(X))}a=a.return}return e!==null&&Ca(t,e,n,r),t.flags|=262144,e!==null}function Ta(e){for(e=e.firstContext;e!==null;){if(!Ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ea(e){va=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Da(e){return ka(va,e)}function Oa(e,t){return va===null&&Ea(e),ka(e,t)}function ka(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(i(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var Aa=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()})}},ja=t.unstable_scheduleCallback,Ma=t.unstable_NormalPriority,Na={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pa(){return{controller:new Aa,data:new Map,refCount:0}}function Fa(e){e.refCount--,e.refCount===0&&ja(Ma,function(){e.controller.abort()})}function Ia(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var La=null;function Ra(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var za=null,Ba=0,Va=0,Ha=null;function Ua(e,t){if(za===null){var n=za=[];Ba=0,Va=zf(),Ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ba++,t.then(Wa,Wa),t}function Wa(){if(--Ba===0&&(La=null,za!==null)){Ha!==null&&(Ha.status=`fulfilled`);var e=za;za=null,Va=0,Ha=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 Ka=N.S;N.S=function(e,t){if(yd=We(),typeof t==`object`&&t&&typeof t.then==`function`&&Ua(e,t),La!==null)for(var n=Tf;n!==null;)Ia(n,La),n=n.next;if(n=e.types,n!==null){for(var r=Tf;r!==null;)Ia(r,n),r=r.next;if(Va!==0){r=La,r===null&&(r=La=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ka!==null&&Ka(e,t)};var qa=xe(null);function Ja(){var e=qa.current;return e===null?id.pooledCache:e}function Ya(e,t){t===null?Ce(qa,qa.current):Ce(qa,t.pool)}function Xa(){var e=Ja();return e===null?null:{parent:Na._currentValue,pool:e}}var Za=Error(i(460)),Qa=Error(i(474)),$a=Error(i(542)),eo={then:function(){}};function to(e){return e=e.status,e===`fulfilled`||e===`rejected`}function no(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(bn,bn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,oo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(bn,bn);else{if(e=id,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,oo(e),e}throw io=t,Za}}function ro(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(io=e,Za):e}}var io=null;function ao(){if(io===null)throw Error(i(459));var e=io;return io=null,e}function oo(e){if(e===Za||e===$a)throw Error(i(483))}var so=null,co=0;function lo(e){var t=co;return co+=1,so===null&&(so=[]),no(so,e,t)}function uo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function fo(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function po(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=Ii(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|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Bi(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===te?(e=d(e,t,n.props.children,r,n.key),uo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===se&&ro(i)===t.type)?(t=a(t,n.props),uo(t,n),t.return=e,t):(t=Ri(n.type,n.key,n.props,null,e.mode,r),uo(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=zi(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=Bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=Ri(t.type,t.key,t.props,null,e.mode,n),uo(n,t),n.return=e,n;case k:return t=Hi(t,e.mode,n),t.return=e,t;case se:return t=ro(t),f(e,t,n)}if(_e(t)||me(t))return t=zi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,lo(t),n);if(t.$$typeof===j)return f(e,Oa(e,t),n);fo(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 ee:return n.key===i?l(e,t,n,r):null;case k:return n.key===i?u(e,t,n,r):null;case se:return n=ro(n),p(e,t,n,r)}if(_e(n)||me(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,lo(n),r);if(n.$$typeof===j)return p(e,t,Oa(e,n),r);fo(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 ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case k:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case se:return r=ro(r),m(e,t,n,r,i)}if(_e(r)||me(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,lo(r),i);if(r.$$typeof===j)return m(e,t,n,Oa(t,r),i);fo(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),R&&ea(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 R&&ea(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(_.key===null?h:_.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)}),R&&ea(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),R&&ea(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 R&&ea(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(_.key===null?g:_.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)}),R&&ea(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===te&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ee:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===te){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===se&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===te?(c=zi(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Ri(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case k: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}n(e,r);break}t(e,r),r=r.sibling}c=Hi(o,e.mode,c),c.return=e,e=c}return s(e);case se:return o=ro(o),_(e,r,o,c)}if(_e(o))return h(e,r,o,c);if(me(o)){if(l=me(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,lo(o),c);if(o.$$typeof===j)return _(e,r,Oa(e,o),c);fo(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=Bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(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 yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ji(e),Ai(e,null,n),t}return Di(e,r,t,n),ji(e)}function xo(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,vt(e,n)}}function So(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}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!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?(W&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:go=!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),dd|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Eo(n[e],t)}var Oo=xe(null),ko=xe(0);function Ao(e,t){e=ld,Ce(ko,e),Ce(Oo,t),ld=e|t.baseLanes}function jo(){Ce(ko,ld),Ce(Oo,Oo.current)}function Mo(){ld=ko.current,Se(Oo),Se(ko)}var No=xe(null),z=null;function Po(e){var t=e.alternate;Ce(zo,zo.current&1),Ce(No,e),z===null&&(t===null||Oo.current!==null||t.memoizedState!==null)&&(z=e)}function Fo(e){Ce(zo,zo.current),Ce(No,e),z===null&&(z=e)}function Io(e){e.tag===22?(Ce(zo,zo.current),Ce(No,e),z===null&&(z=e)):Lo()}function Lo(){Ce(zo,zo.current),Ce(No,No.current)}function Ro(e){Se(No),z===e&&(z=null),Se(zo)}var zo=xe(0);function Bo(e,t){Ce(No,No.current),Ce(zo,t)}function Vo(e){Se(zo),Se(No),z===e&&(z=null)}function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||J(n)||Y(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 Uo=0,B=null,Wo=null,Go=null,Ko=!1,qo=!1,Jo=!1,Yo=0,Xo=0,Zo=null,Qo=0;function $o(){throw Error(i(321))}function es(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function ts(e,t,n,r,i,a){return Uo=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?vc:yc,Jo=!1,a=n(r,i),Jo=!1,qo&&(a=rs(t,n,r,i)),ns(e),a}function ns(e){N.H=_c;var t=Wo!==null&&Wo.next!==null;if(Uo=0,Go=Wo=B=null,Ko=!1,Xo=0,Zo=null,t)throw Error(i(300));e===null||Ic||(e=e.dependencies,e!==null&&Ta(e)&&(Ic=!0))}function rs(e,t,n,r){B=e;var a=0;do{if(qo&&(Zo=null),Xo=0,qo=!1,25<=a)throw Error(i(301));if(a+=1,Go=Wo=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=bc,o=t(n,r)}while(qo);return o}function is(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?ds(t):t,e=e.useState()[0],(Wo===null?null:Wo.memoizedState)!==e&&(B.flags|=1024),t}function as(){var e=Yo!==0;return Yo=0,e}function os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ss(e){if(Ko){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ko=!1}Uo=0,Go=Wo=B=null,qo=!1,Xo=Yo=0,Zo=null}function cs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Go===null?B.memoizedState=Go=e:Go=Go.next=e,Go}function ls(){if(Wo===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=Wo.next;var t=Go===null?B.memoizedState:Go.next;if(t!==null)Go=t,Wo=e;else{if(e===null)throw B.alternate===null?Error(i(467)):Error(i(310));Wo=e,e={memoizedState:Wo.memoizedState,baseState:Wo.baseState,baseQueue:Wo.baseQueue,queue:Wo.queue,next:null},Go===null?B.memoizedState=Go=e:Go=Go.next=e}return Go}function us(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ds(e){var t=Xo;return Xo+=1,Zo===null&&(Zo=[]),e=no(Zo,e,t),t=B,(Go===null?t.memoizedState:Go.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?vc:yc),e}function fs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ds(e);if(e.$$typeof===fe)return;if(e.$$typeof===j)return Da(e)}throw Error(i(438,String(e)))}function ps(e){var t=null,n=B.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=B.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=us(),B.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]=ue;return t.index++,n}function ms(e,t){return typeof t==`function`?t(e):t}function hs(e){return gs(ls(),Wo,e)}function gs(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?(Uo&f)===f:(W&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===Va&&(d=!0);else if((Uo&p)===p){u=u.next,p===Va&&(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,B.lanes|=p,dd|=p;f=u.action,Jo&&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,B.lanes|=f,dd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ur(o,e.memoizedState)&&(Ic=!0,d&&(n=Ha,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 _s(e){var t=ls(),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);Ur(o,t.memoizedState)||(Ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vs(e,t,n){var r=B,a=ls(),o=R;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ur((Wo||a).memoizedState,n);if(s&&(a.memoizedState=n,Ic=!0),a=a.queue,Us(xs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Go!==null&&!!(Go.memoizedState.tag&1),Rs(e?9:8,{destroy:void 0},bs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,id===null)throw Error(i(349));o||Uo&127||ys(r,t,n)}return n}function ys(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=us(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function bs(e,t,n,r){t.value=n,t.getSnapshot=r,Ss(t)&&Cs(e)}function xs(e,t,n){return n(function(){Ss(t)&&Cs(e)})}function Ss(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function Cs(e){var t=ki(e,2);t!==null&&Rd(t,e,2)}function ws(e){var t=cs();if(typeof e==`function`){var n=e;if(e=n(),Jo){et(!0);try{n()}finally{et(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:e},t}function Ts(e,t,n,r){return e.baseState=n,gs(e,Wo,typeof r==`function`?r:ms)}function Es(e,t,n,r,a){if(mc(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,Ds(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ds(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};o.types=a===null?null:a.types,N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Os(e,t,s)}catch(n){As(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Os(e,t,a)}catch(n){As(e,t,n)}}function Os(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ks(e,t,n)},function(n){return As(e,t,n)}):ks(e,t,n)}function ks(e,t,n){t.status=`fulfilled`,t.value=n,js(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ds(e,n)))}function As(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,js(t),t=t.next;while(t!==r)}e.action=null}function js(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ms(e,t){return t}function Ns(e,t){if(R){var n=id.formState;if(n!==null){a:{var r=B;if(R){if(oa){b:{for(var i=oa,a=ca;i.nodeType!==8;)if(!a||(i=pm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){oa=pm(i.nextSibling),r=i.data===`F!`;break a}}ua(r)}r=!1}r&&(t=n[0])}}return n=cs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:t},n.queue=r,n=dc.bind(null,B,r),r.dispatch=n,r=ws(!1),a=pc.bind(null,B,!1,r.queue),r=cs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Es.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ps(e){return Fs(ls(),Wo,e)}function Fs(e,t,n){if(t=gs(e,t,Ms)[0],e=hs(ms)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ds(t)}catch(e){throw e===Za?$a:e}else r=t;t=ls();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,Rs(9,{destroy:void 0},Is.bind(null,i,n),null)),[r,a,e]}function Is(e,t){e.action=t}function Ls(e){var t=ls(),n=Wo;if(n!==null)return Fs(t,n,e);ls(),t=t.memoizedState,n=ls();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=B.updateQueue,t===null&&(t=us(),B.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 zs(){return ls().memoizedState}function Bs(e,t,n,r){var i=cs();B.flags|=e,i.memoizedState=Rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Vs(e,t,n,r){var i=ls();r=r===void 0?null:r;var a=i.memoizedState.inst;Wo!==null&&r!==null&&es(r,Wo.memoizedState.deps)?i.memoizedState=Rs(t,a,n,r):(B.flags|=e,i.memoizedState=Rs(1|t,a,n,r))}function Hs(e,t){Bs(8390656,8,e,t)}function Us(e,t){Vs(2048,8,e,t)}function Ws(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=us(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gs(e){var t=ls().memoizedState;return Ws({ref:t,nextImpl:e}),function(){if(H&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ks(e,t){return Vs(4,2,e,t)}function qs(e,t){return Vs(4,4,e,t)}function Js(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 Ys(e,t,n){n=n==null?null:n.concat([e]),Vs(4,4,Js.bind(null,t,e),n)}function Xs(){}function Zs(e,t){var n=ls();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qs(e,t){var n=ls();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&es(t,r[1]))return r[0];if(r=e(),Jo){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r}function $s(e,t,n){return n===void 0||Uo&1073741824&&!(W&261930)?e.memoizedState=t:(e.memoizedState=n,e=Id(),B.lanes|=e,dd|=e,n)}function ec(e,t,n,r){return Ur(n,t)?n:Oo.current===null?!(Uo&106)||Uo&1073741824&&!(W&261930)?(Ic=!0,e.memoizedState=n):(e=Id(),B.lanes|=e,dd|=e,t):(e=$s(e,n,r),Ur(e,t)||(Ic=!0),e)}function tc(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};s.types=o===null?null:o.types,N.T=s,pc(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?fc(e,t,Ga(c,r),Fd(e)):fc(e,t,r,Fd(e))}catch(n){fc(e,t,{then:function(){},status:`rejected`,reason:n},Fd())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function nc(){}function rc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ic(e).queue;tc(e,a,t,ve,n===null?nc:function(){return ac(e),n(r)})}function ic(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:ve},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ac(e){var t=ic(e);t.next===null&&(t=e.alternate.memoizedState),fc(e,t.next.queue,{},Fd())}function oc(){return Da(X)}function sc(){return ls().memoizedState}function cc(){return ls().memoizedState}function lc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Fd();e=yo(n);var r=bo(t,e,n);r!==null&&(Rd(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function uc(e,t,n){var r=Fd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mc(e)?hc(t,n):(n=Oi(e,t,n,r),n!==null&&(Rd(n,e,r),gc(n,t,r)))}function dc(e,t,n){fc(e,t,n,Fd())}function fc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mc(e))hc(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,Ur(s,o))return Di(e,t,i,0),id===null&&Ei(),!1}catch{}if(n=Oi(e,t,i,r),n!==null)return Rd(n,e,r),gc(n,t,r),!0}return!1}function pc(e,t,n,r){if(r={lane:2,revertLane:zf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},mc(e)){if(t)throw Error(i(479))}else t=Oi(e,n,r,2),t!==null&&Rd(t,e,2)}function mc(e){var t=e.alternate;return e===B||t!==null&&t===B}function hc(e,t){qo=Ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vt(e,n)}}var _c={readContext:Da,use:fs,useCallback:$o,useContext:$o,useEffect:$o,useImperativeHandle:$o,useLayoutEffect:$o,useInsertionEffect:$o,useMemo:$o,useReducer:$o,useRef:$o,useState:$o,useDebugValue:$o,useDeferredValue:$o,useTransition:$o,useSyncExternalStore:$o,useId:$o,useHostTransitionStatus:$o,useFormState:$o,useActionState:$o,useOptimistic:$o,useMemoCache:$o,useCacheRefresh:$o,useEffectEvent:$o},vc={readContext:Da,use:fs,useCallback:function(e,t){return cs().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:Hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Bs(4194308,4,Js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){Bs(4,2,e,t)},useMemo:function(e,t){var n=cs();t=t===void 0?null:t;var r=e();if(Jo){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=cs();if(n!==void 0){var i=n(t);if(Jo){et(!0);try{n(t)}finally{et(!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=uc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=cs();return e={current:e},t.memoizedState=e},useState:function(e){e=ws(e);var t=e.queue,n=dc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xs,useDeferredValue:function(e,t){return $s(cs(),e,t)},useTransition:function(){var e=ws(!1);return e=tc.bind(null,B,e.queue,!0,!1),cs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=cs();if(R){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),id===null)throw Error(i(349));W&127||ys(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Hs(xs.bind(null,r,o,e),[e]),r.flags|=2048,Rs(9,{destroy:void 0},bs.bind(null,r,o,n,t),null),n},useId:function(){var e=cs(),t=id.identifierPrefix;if(R){var n=$i,r=Qi;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Yo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:oc,useFormState:Ns,useActionState:Ns,useOptimistic:function(e){var t=cs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=pc.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:ps,useCacheRefresh:function(){return cs().memoizedState=lc.bind(null,B)},useEffectEvent:function(e){var t=cs(),n={impl:e};return t.memoizedState=n,function(){if(H&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},yc={readContext:Da,use:fs,useCallback:Zs,useContext:Da,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:hs,useRef:zs,useState:function(){return hs(ms)},useDebugValue:Xs,useDeferredValue:function(e,t){return ec(ls(),Wo.memoizedState,e,t)},useTransition:function(){var e=hs(ms)[0],t=ls().memoizedState;return[typeof e==`boolean`?e:ds(e),t]},useSyncExternalStore:vs,useId:sc,useHostTransitionStatus:oc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){return Ts(ls(),Wo,e,t)},useMemoCache:ps,useCacheRefresh:cc,useEffectEvent:Gs},bc={readContext:Da,use:fs,useCallback:Zs,useContext:Da,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:_s,useRef:zs,useState:function(){return _s(ms)},useDebugValue:Xs,useDeferredValue:function(e,t){var n=ls();return Wo===null?$s(n,e,t):ec(n,Wo.memoizedState,e,t)},useTransition:function(){var e=_s(ms)[0],t=ls().memoizedState;return[typeof e==`boolean`?e:ds(e),t]},useSyncExternalStore:vs,useId:sc,useHostTransitionStatus:oc,useFormState:Ls,useActionState:Ls,useOptimistic:function(e,t){var n=ls();return Wo===null?(n.baseState=e,[e,n.queue.dispatch]):Ts(n,Wo,e,t)},useMemoCache:ps,useCacheRefresh:cc,useEffectEvent:Gs};function xc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=yo(r);i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Rd(t,e,r),xo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=yo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Rd(t,e,r),xo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fd(),r=yo(n);r.tag=2,t!=null&&(r.callback=t),t=bo(e,r,n),t!==null&&(Rd(t,e,n),xo(t,e,n))}};function Cc(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?!Wr(n,r)||!Wr(i,a):!0}function wc(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&&Sc.enqueueReplaceState(t,t.state,null)}function Tc(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=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ec(e){Si(e)}function Dc(e){console.error(e)}function Oc(e){Si(e)}function kc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ac(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 jc(e,t,n){return n=yo(n),n.tag=3,n.payload={element:null},n.callback=function(){kc(e,t)},n}function Mc(e){return e=yo(e),e.tag=3,e}function Nc(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(){Ac(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ac(t,n,r),typeof i!=`function`&&(Sd===null?Sd=new Set([this]):Sd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Pc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&wa(t,n,a,!0),n=No.current,n!==null){switch(n.tag){case 31:case 13:case 19:return z===null?Xd():n.alternate===null&&ud===0&&(ud=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===eo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),yf(e,r,a)),!1;case 22:return n.flags|=65536,r===eo?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)),yf(e,r,a)),!1}throw Error(i(435,n.tag))}return yf(e,r,a),Xd(),!1}if(R)return t=No.current,t===null?(r!==la&&(t=Error(i(423),{cause:r}),ga(Wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Wi(r,n),a=jc(e.stateNode,r,a),So(e,a),ud!==4&&(ud=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==la&&(e=Error(i(422),{cause:r}),ga(Wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Wi(o,n),gd===null?gd=[o]:gd.push(o),ud!==4&&(ud=2),t===null)return!0;r=Wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=jc(n.stateNode,r,e),So(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`&&(Sd===null||!Sd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Mc(a),Nc(a,e,n,r),So(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Fc=Error(i(461)),Ic=!1;function Lc(e,t,n,r){t.child=e===null?ho(t,null,n,r):mo(t,e.child,n,r)}function Rc(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=ts(e,t,n,o,a,i),s=as(),e!==null&&!Ic?(os(e,t,i),fl(e,t,i)):(R&&s&&na(t),t.flags|=1,Lc(e,t,r,i),t.child)}function zc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Bc(e,t,a,r,i)):(e=Ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!pl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return fl(e,t,i)}return t.flags|=1,e=Ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function Bc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref){if(Ic=!1,t.pendingProps=r=a,pl(e,i))e.flags&131072&&(Ic=!0);else return t.lanes=e.lanes,fl(e,t,i)}}return Jc(e,t,n,r,i)}function Vc(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&&Ya(t,a===null?null:a.cachePool),a===null?jo():Ao(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&&Ya(t,null),jo(),Lo()):(Ya(t,a.cachePool),Ao(t,a),Lo(),t.memoizedState=null);return Lc(e,t,i,n),t.child}function Hc(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=Ja();return a=a===null?null:{parent:Na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ya(t,null),jo(),Io(t),e!==null&&wa(e,t,r,!0),t.childLanes=i,null}function Wc(e,t){return t=rl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gc(e,t,n){return mo(t,e.child,null,n),e=Wc(t,t.pendingProps),e.flags|=2,Ro(t),t.memoizedState=null,e}function Kc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=Wc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Hc(null,e);if(Fo(t),(e=oa)?(e=dm(e,ca),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=536870912,null}return Wc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Fo(t),a){if(t.flags&256)t.flags&=-257,t=Gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ic||wa(e,t,n,!1),a=(n&e.childLanes)!==0,Ic||a){if(Oo.current===null){if(r=id,r!==null&&(s=yt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ki(e,s),Rd(r,e,s),Fc;Xd()}t=Gc(e,t,n)}else e=o.treeContext,oa=pm(s.nextSibling),aa=t,R=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=Wc(t,r),t.flags|=134221824;return t}return e=Ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qc(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 Jc(e,t,n,r,i){return Ea(t),n=ts(e,t,n,r,void 0,i),r=as(),e!==null&&!Ic?(os(e,t,i),fl(e,t,i)):(R&&r&&na(t),t.flags|=1,Lc(e,t,n,i),t.child)}function Yc(e,t,n,r,i,a){return Ea(t),t.updateQueue=null,n=rs(t,r,n,i),ns(e),r=as(),e!==null&&!Ic?(os(e,t,a),fl(e,t,a)):(R&&r&&na(t),t.flags|=1,Lc(e,t,n,a),t.child)}function Xc(e,t,n,r,i){if(Ea(t),t.stateNode===null){var a=Mi,o=n.contextType;typeof o==`object`&&o&&(a=Da(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Sc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},_o(t),o=n.contextType,a.context=typeof o==`object`&&o?Da(o):Mi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(xc(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&&Sc.enqueueReplaceState(a,a.state,null),To(t,r,a,i),wo(),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=Tc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Mi,typeof u==`object`&&u&&(o=Da(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)&&wc(t,a,r,o),go=!1;var f=t.memoizedState;a.state=f,To(t,r,a,i),wo(),l=t.memoizedState,s||f!==l||go?(typeof d==`function`&&(xc(t,n,d,r),l=t.memoizedState),(c=go||Cc(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,vo(e,t),o=t.memoizedProps,u=Tc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Mi,typeof l==`object`&&l&&(c=Da(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)&&wc(t,a,r,c),go=!1,f=t.memoizedState,a.state=f,To(t,r,a,i),wo();var p=t.memoizedState;o!==d||f!==p||go||e!==null&&e.dependencies!==null&&Ta(e.dependencies)?(typeof s==`function`&&(xc(t,n,s,r),p=t.memoizedState),(u=go||Cc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ta(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,qc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=mo(t,e.child,null,i),t.child=mo(t,null,n,i)):Lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=fl(e,t,i),e}function Zc(e,t,n,r){return ma(),t.flags|=256,Lc(e,t,n,r),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $c(e){return{baseLanes:e,cachePool:Xa()}}function el(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=md),e}function tl(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(zo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(R){if(i?Po(t):Lo(),(e=oa)?(e=dm(e,ca),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=Y(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Lo(),i=t.mode,a=rl({mode:`hidden`,children:a},i),r=zi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=$c(n),r.childLanes=el(e,o,n),t.memoizedState=Qc,Hc(null,r)):(Po(t),nl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return al(e,t,a,o,r,c,s,n)}return i?(Lo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ii(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=zi(i,a,n,null),i.flags|=2):i=Ii(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Hc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=$c(n):(a=i.cachePool,a===null?a=Xa():(s=Na._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=el(e,o,n),t.memoizedState=Qc,Hc(e.child,r)):(Po(t),n=e.child,e=n.sibling,n=Ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function nl(e,t){return t=rl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function rl(e,t){return e=Pi(22,e,null,t),e.lanes=0,e}function il(e,t,n){return mo(t,e.child,null,n),e=nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function al(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Po(t),t.flags&=-257,il(e,t,c)):t.memoizedState===null?(Lo(),o=a.fallback,s=t.mode,a=rl({mode:`visible`,children:a.children},s),o=zi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,mo(t,e.child,null,c),a=t.child,a.memoizedState=$c(c),a.childLanes=el(e,r,c),t.memoizedState=Qc,Hc(null,a)):(Lo(),t.child=e.child,t.flags|=128,null);if(Po(t),Y(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ga({value:a,source:null,stack:null})),il(e,t,c)}if(Ic||wa(e,t,c,!1),r=(c&e.childLanes)!==0,Ic||r){if(Oo.current!==null)return il(e,t,c);if(r=id,r!==null&&(a=yt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,ki(e,a),Rd(r,e,a),Fc;return J(o)||Xd(),il(e,t,c)}return J(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,oa=pm(o.nextSibling),aa=t,R=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=nl(t,a.children),t.flags|=134221824,t)}function ol(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sa(e.return,t,n)}function sl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ho(n)===null&&(t=e),e=e.sibling}return t}function cl(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 ll(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ul(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=zo.current;if(t.flags&128)return Bo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Bo(t,o),i===`backwards`&&e!==null?(ll(e),Lc(e,t,r,n),ll(e)):Lc(e,t,r,n),r=R?Ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ol(e,n,t);else if(e.tag===19)ol(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`backwards`:n=sl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ll(t)),cl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}cl(t,!0,n,null,a,r);break;case`together`:cl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=sl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),cl(t,!1,i,n,a,r)}return t.child}function dl(e,t,n){var r=t.pendingProps;return ba(t,t.type,r.value),Lc(e,t,r.children,n),t.child}function fl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(wa(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=Ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ta(e)))}function ml(e,t,n){switch(t.tag){case 3:Oe(t,t.stateNode.containerInfo),ba(t,Na,e.memoizedState.cache),ma();break;case 27:case 5:Ae(t);break;case 4:Oe(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Po(t),t.flags|=128,null;r=wa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?tl(e,t,n):(Po(t),e=fl(e,t,n),e===null?null:e.sibling)}Po(t);break;case 19:if(t.flags&128)return ul(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(wa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ul(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Bo(t,zo.current),r)break;return null;case 22:return t.lanes=0,Vc(e,t,n,t.pendingProps);case 24:ba(t,Na,e.memoizedState.cache)}return fl(e,t,n)}function hl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ic=!0;else{if(!pl(e,n)&&!(t.flags&128))return Ic=!1,ml(e,t,n);Ic=!!(e.flags&131072)}}else Ic=!1,R&&t.flags&1048576&&ta(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,typeof e==`function`)Fi(e)?(r=Tc(e,r),t.tag=1,t=Xc(null,t,e,r,n)):(t.tag=0,t=Jc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=Rc(null,t,e,r,n);break a}if(a===oe){t.tag=14,t=zc(null,t,e,r,n);break a}if(a===j){t.tag=10,t.type=e,t=dl(null,t,n);break a}}throw t=ge(e)||e,Error(i(306,t,``))}}return t;case 0:return Jc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Tc(r,t.pendingProps),Xc(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,vo(e,t),To(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ba(t,Na,r),r!==o.cache&&Ca(t,[Na],n,!0),wo(),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=Zc(e,t,r,n);break a}if(r!==a){a=Wi(Error(i(424)),t),ga(a),t=Zc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(oa=pm(e.firstChild),aa=t,R=!0,sa=null,ca=!0,n=ho(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ma(),r===a){t=fl(e,t,n);break a}Lc(e,t,r,n)}t=t.child}return t;case 26:return qc(e,t),e===null?(n=Lm(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(t.stateNode=vp(t.type,t.pendingProps,Ee.current,t)):t.memoizedState=Lm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ae(t),e===null&&R&&(r=t.stateNode=ym(t.type,t.pendingProps,Ee.current),aa=t,ca=!0,a=oa,Op(t.type)?(mm=a,oa=pm(r.firstChild)):oa=a),Lc(e,t,t.pendingProps.children,n),qc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((a=r=oa)&&(r=lm(r,t.type,t.pendingProps,ca),r===null?a=!1:(t.stateNode=r,aa=t,oa=pm(r.firstChild),ca=!1,a=!0)),a||ua(t)),Ae(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,yp(a,o)?r=null:s!==null&&yp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ts(e,t,is,null,null,n),X._currentValue=a),qc(e,t),Lc(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=oa)&&(n=um(n,t.pendingProps,ca),n===null?e=!1:(t.stateNode=n,aa=t,oa=null,e=!0)),e||ua(t)),null;case 13:return tl(e,t,n);case 4:return Oe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mo(t,null,r,n):Lc(e,t,r,n),t.child;case 11:return Rc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,qc(e,t),Lc(e,t,r,n),t.child;case 8:return Lc(e,t,t.pendingProps.children,n),t.child;case 12:return Lc(e,t,t.pendingProps.children,n),t.child;case 10:return dl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ea(t),a=Da(a),r=r(a),t.flags|=1,Lc(e,t,r,n),t.child;case 14:return zc(e,t,t.type,t.pendingProps,n);case 15:return Bc(e,t,t.type,t.pendingProps,n);case 19:return ul(e,t,n);case 31:return Kc(e,t,n);case 22:return Vc(e,t,n,t.pendingProps);case 24:return Ea(t),r=Da(Na),e===null?(a=Ja(),a===null&&(a=id,o=Pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},_o(t),ba(t,Na,a)):((e.lanes&n)!==0&&(vo(e,t),To(t,null,null,n),wo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ba(t,Na,r),r!==a.cache&&Ca(t,[Na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ba(t,Na,r))),Lc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:R&&na(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:qc(e,t),Lc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function gl(e){e.flags|=4}function _l(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Qm(t,r):Qm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(qd())e.flags|=8192;else throw io=eo,Qa}}else e.flags&=-16777217}function vl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$m(t)){if(qd())e.flags|=8192;else throw io=eo,Qa}}function yl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:pt(),e.lanes|=t,hd|=t)}function bl(e,t){if(!R)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function xl(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&1206910976,r|=i.flags&1206910976,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 Sl(e,t,n){var r=t.pendingProps;switch(ra(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xl(t),null;case 1:return xl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xa(Na),ke(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?gl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ha())),xl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(gl(t),o===null?(xl(t),_l(t,a,null,r,n)):(xl(t),vl(t,o))):o?o===e.memoizedState?(xl(t),t.flags&=-16777217):(gl(t),xl(t),vl(t,o)):(e=e.memoizedProps,e!==r&&gl(t),xl(t),_l(t,a,e,r,n)),null;case 27:if(je(t),n=Ee.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}e=we.current,pa(t)?da(t,e):(e=ym(a,r,n),t.stateNode=e,gl(t))}return xl(t),t.subtreeFlags&=-33554433,null;case 5:if(je(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}if(o=we.current,pa(t))da(t,o);else{var s=hp(Ee.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[wt]=t,o[Tt]=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(cp(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&&gl(t)}}return xl(t),t.subtreeFlags&=-33554433,_l(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ee.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=aa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[wt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ap(e.nodeValue,n)),e||ua(t,!0)}else e=hp(e).createTextNode(r),e[wt]=t,t.stateNode=e}return xl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=pa(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[wt]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),e=!1}else n=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ro(t),t):(Ro(t),null);if(t.flags&128)throw Error(i(558))}return xl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=pa(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[wt]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),a=!1}else a=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ro(t),t):(Ro(t),null)}return Ro(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),yl(t,t.updateQueue),xl(t),null);case 4:return ke(),e===null&&Yf(t.stateNode.containerInfo),t.flags|=67108864,xl(t),null;case 10:return xa(t.type),xl(t),null;case 19:if(Vo(t),r=t.memoizedState,r===null)return xl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)bl(r,!1);else{if(ud!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,bl(r,!1),e=o.updateQueue,t.updateQueue=e,yl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Li(n,e),n=n.sibling;return Bo(t,zo.current&1|2),R&&ea(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&We()>bd&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,yl(t,e),bl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!R)return xl(t),null}else 2*We()-r.renderingStartTime>bd&&n!==536870912&&(t.flags|=128,a=!0,bl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=We(),e.sibling=null,o=zo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||R?Bo(t,o):(n=o,Ce(No,t),Ce(zo,n),z===null&&(z=t)),R&&ea(t,r.treeForkCount),e}return xl(t),null;case 22:case 23:return Ro(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(xl(t),t.subtreeFlags&6&&(t.flags|=8192)):xl(t),n=t.updateQueue,n!==null&&yl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Se(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xa(Na),xl(t),null;case 25:return null;case 30:return t.flags|=33554432,xl(t),null}throw Error(i(156,t.tag))}function Cl(e,t){switch(ra(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(Na),ke(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(Ro(t),t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ro(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ke(),null;case 10:return xa(t.type),null;case 22:case 23:return Ro(t),Mo(),e!==null&&Se(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(Na),null;case 25:return null;default:return null}}function wl(e,t){switch(ra(t),t.tag){case 3:xa(Na),ke();break;case 26:case 27:case 5:je(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Ro(t);break;case 13:Ro(t);break;case 19:Vo(t);break;case 10:xa(t.type);break;case 22:case 23:Ro(t),Mo(),e!==null&&Se(qa);break;case 24:xa(Na)}}function Tl(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){vf(t,t.return,e)}}function El(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){vf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){vf(t,t.return,e)}}function Dl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){vf(e,e.return,t)}}}function Ol(e,t,n){n.props=Tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){vf(e,t,n)}}function kl(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:var i=e.stateNode,a=yi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Bp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Vp(e);m(e.child,!1,im,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){vf(e,t,n)}}function Al(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){vf(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){vf(e,t,n)}else n.current=null}}function jl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)om(e.stateNode,t[n])}function V(e){for(var t=e.return;t!==null&&(Pl(t)&&om(e.stateNode,t.stateNode),!Nl(t));)t=t.return}function Ml(e){for(var t=e.return;t!==null&&(Pl(t)&&sm(e.stateNode,t.stateNode),!Nl(t));)t=t.return}function Nl(e){return e.tag===5||e.tag===3||e.tag===27}function Pl(e){return e&&e.tag===7&&e.stateNode!==null}function Fl(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){vf(e,e.return,t)}}function Il(e,t,n){try{var r=e.stateNode;up(r,e.type,n,t),r[Tt]=t}catch(t){vf(e,e.return,t)}}function Ll(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Op(e.type)||e.tag===4}function Rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ll(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&&Op(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 zl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bn)),jl(e,r),L=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Op(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(zl(e,t,n,r),e=e.sibling;e!==null;)zl(e,t,n,r),e=e.sibling}function Bl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),jl(e,r),L=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Op(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Bl(e,t,n,r),e=e.sibling;e!==null;)Bl(e,t,n,r),e=e.sibling}function Vl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);cp(t,r,n),t[wt]=e,t[Tt]=n}catch(t){vf(e,e.return,t)}}var Hl=!1,Ul=null;function Wl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Hl=!0)}var Gl=null;function Kl(){var e=Gl;return Gl=null,e}var ql=0;function Jl(e,t,n,r,i){return ql=0,Yl(e.child,t,n,r,i)}function Yl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Pp(o);r.push(s),s.view&&(a=!0)}else a||Pp(o).view&&(a=!0);Hl=!0,jp(o,ql===0?t:t+`_`+ql,n),ql++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Yl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Xl(e,t){for(;e!==null;)e.tag===5?Mp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Xl(e.child,t),e=e.sibling}function Zl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Zl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=xi(t.default,t.share),t!==`none`&&(Jl(e,n,t,null,!1)||Xl(e.child,!1))}e=e.sibling}}function Ql(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=yi(r,n),a=xi(r.default,n.paired?r.share:r.enter);a===`none`?Zl(e):Jl(e,i,a,null,!1)?(Zl(e),n.paired||t||Ld(e,r.onEnter)):Xl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e,t),e=e.sibling;else Zl(e)}function $l(e){if(Ul!==null&&Ul.size!==0){var t=Ul;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=xi(n.default,n.share);if(a!==`none`&&(Jl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Ld(e,n.onShare)):Xl(e.child,!1)),t.delete(r),t.size===0)break}}}$l(e)}e=e.sibling}}}function eu(e){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode),r=Ul===null?void 0:Ul.get(n),i=xi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Jl(e,n,i,null,!1)?r===void 0?Ld(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Ul.delete(n),Ld(e,t.onShare)):Xl(e.child,!1)),Ul!==null&&$l(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else Ul!==null&&$l(e)}function tu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode);t=xi(t.default,t.update),e.flags&=-5,t!==`none`&&Jl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&tu(e);e=e.sibling}}function nu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Xl(e.child,!1))}nu(e)}e=e.sibling}}function ru(e){if(e.tag===30)e.stateNode.paired=null,Xl(e.child,!1),nu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ru(e),e=e.sibling;else nu(e)}function iu(e){for(e=e.child;e!==null;)e.tag===30?Xl(e.child,!1):e.subtreeFlags&33554432&&iu(e),e=e.sibling}function au(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&ql<a.length){var l=a[ql],u=Pp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&jp(c,ql===0?n:n+`_`+ql,i),s&&e.flags&4||(Gl===null&&(Gl=[]),Gl.push(c,ql===0?r:r+`_`+ql,t.memoizedProps)),ql++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:au(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ou(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=yi(n,r),a=xi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Fp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;ql=0,i=au(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Ld(e,n.onUpdate))}else e.subtreeFlags&33554432&&ou(e,t);e=e.sibling}}var su=!1,cu=!1,lu=!1,uu=!1,du=typeof WeakSet==`function`?WeakSet:Set,fu=null,pu=!1,mu=!1,hu=!1,gu=!1;function _u(e,t,n){if(e=e.containerInfo,pp=vh,e=Yr(e),Xr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(mp={focusedElem:e,selectionRange:r},vh=!1,n=(n&335544064)===n,fu=t,t=n?9270:1024;fu!==null;){if(e=fu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&eu(r[a]);if(e.alternate===null&&e.flags&2)n&&Wl(e),vu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&eu(r),vu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Wl(e),vu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,fu=r):(n&&tu(e),vu(n))}}Ul=null}function vu(e){for(;fu!==null;){var t=fu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Tc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){vf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)cm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:cm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=yi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=xi(a.default,a.update),a!==`none`&&Jl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,fu=r;break}fu=t.return}}function yu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:zu(e,n),r&4&&Tl(5,n);break;case 1:if(zu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){vf(n,n.return,e)}else{var i=Tc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){vf(n,n.return,e)}}}r&64&&Dl(n),r&512&&kl(n,n.return);break;case 3:if(zu(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{Do(e,t)}catch(e){vf(n,n.return,e)}}break;case 27:t===null&&r&4&&Vl(n);case 26:case 5:zu(e,n),t===null&&r&4&&Fl(n),r&512&&kl(n,n.return);break;case 12:zu(e,n);break;case 31:zu(e,n),r&4&&Ou(e,n);break;case 13:zu(e,n),r&4&&ku(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Sf.bind(null,n),fm(e,n))));break;case 22:if(r=n.memoizedState!==null||su,!r){var a=t!==null&&t.memoizedState!==null||cu;t=su,i=cu,su=r,(cu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Vu(e,n,r)):zu(e,n),su=t,cu=i}break;case 30:zu(e,n),r&512&&kl(n,n.return);break;case 7:r&512&&kl(n,n.return);default:zu(e,n)}}function bu(e,t){for(e=e.child;e!==null;)xu(e,t),e=e.sibling}function xu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){vf(e,e.return,t)}Su(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,L=!0}catch(t){vf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ap(s,!0):Ap(e.stateNode,!1)}catch(t){vf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&bu(e,t);break;default:bu(e,t)}}function Su(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:xu(n,r);break a;case 22:n.memoizedState===null&&Su(n,r);break a;default:Su(n,r)}}e=e.sibling}}function Cu(e){var t=e.alternate;t!==null&&(e.alternate=null,Cu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Nt(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 wu=null,Tu=!1;function Eu(e,t,n){for(n=n.child;n!==null;)Du(e,t,n),n=n.sibling}function Du(e,t,n){if($e&&typeof $e.onCommitFiberUnmount==`function`)try{$e.onCommitFiberUnmount(Qe,n)}catch{}switch(n.tag){case 26:cu||Al(n,t),Eu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!cu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:cu||Al(n,t),Ml(n);var r=wu,i=Tu;Op(n.type)&&(wu=n.stateNode,Tu=!1),Eu(e,t,n),bm(n.stateNode,n.type,n.memoizedProps),wu=r,Tu=i;break;case 5:cu||Al(n,t),Ml(n);case 6:if(n.tag===6&&Ml(n),r=wu,i=Tu,wu=null,Eu(e,t,n),wu=r,Tu=i,wu!==null){if(Tu)try{(wu.nodeType===9?wu.body:wu.nodeName===`HTML`?wu.ownerDocument.body:wu).removeChild(n.stateNode),L=!0}catch(e){vf(n,t,e)}else try{wu.removeChild(n.stateNode),L=!0}catch(e){vf(n,t,e)}}break;case 18:wu!==null&&(Tu?(e=wu,kp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wh(e)):kp(wu,n.stateNode));break;case 4:r=wu,i=Tu,wu=n.stateNode.containerInfo,Tu=!0,Eu(e,t,n),wu=r,Tu=i;break;case 0:case 11:case 14:case 15:El(2,n,t),cu||El(4,n,t),Eu(e,t,n);break;case 1:cu||(Al(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ol(n,t,r)),Eu(e,t,n);break;case 21:Eu(e,t,n);break;case 22:cu=(r=cu)||n.memoizedState!==null,Eu(e,t,n),cu=r;break;case 30:Al(n,t),Eu(e,t,n);break;case 7:cu||Al(n,t),Eu(e,t,n);break;default:Eu(e,t,n)}}function Ou(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wh(e)}catch(e){vf(t,t.return,e)}}}function ku(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wh(e)}catch(e){vf(t,t.return,e)}}function Au(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new du),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new du),t;default:throw Error(i(435,e.tag))}}function ju(e,t){var n=Au(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Cf.bind(null,e,t);t.then(r,r)}})}function Mu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Op(l.type)){wu=l.stateNode,Tu=!1;break a}break;case 5:wu=l.stateNode,Tu=!1;break a;case 3:case 4:wu=l.stateNode.containerInfo,Tu=!0;break a}l=l.return}if(wu===null)throw Error(i(160));Du(s,c,o),wu=null,Tu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Pu(t,e,n),t=t.sibling}var Nu=null;function Pu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Mu(t,e,n),Fu(e),a&4&&(El(3,e,e.return),Tl(3,e),El(5,e,e.return));break;case 1:Mu(t,e,n),Fu(e),a&512&&(cu||r===null||Al(r,r.return)),a&64&&su&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Nu,Mu(t,e,n),Fu(e),a&512&&(cu||r===null||Al(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(su)e.stateNode=vp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[jt]||r[wt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),cp(r,t,n),r[wt]=e,Rt(r),t=r;break a;case`link`:if(o=Ym(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),cp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Ym(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),cp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[wt]=e,Rt(r),t=r}e.stateNode=t}}else su||Xm(o,e.type,e.stateNode)}else e.stateNode=Wm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Il(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||cu||t.parentNode.removeChild(t)):a.count--,n===null?su||Xm(o,e.type,e.stateNode):Wm(o,n,e.memoizedProps))}break;case 27:Mu(t,e,n),Fu(e),a&512&&(cu||r===null||Al(r,r.return)),r!==null&&a&4&&Il(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=lu,lu=!1,Mu(t,e,n),lu=o,Fu(e),a&512&&(cu||r===null||Al(r,r.return)),e.flags&32){t=e.stateNode;try{fn(t,``),L=!0}catch(t){vf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Il(e,t,r===null?t:r.memoizedProps)),a&1024&&(uu=!0);break;case 6:if(Mu(t,e,n),Fu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,L=!0}catch(t){vf(e,e.return,t)}}break;case 3:if(L=!1,Jm=null,o=Nu,Nu=wm(t.containerInfo),Mu(t,e,n),Nu=o,Fu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Wh(t.containerInfo)}catch(t){vf(e,e.return,t)}uu&&(uu=!1,Iu(e)),L=!1;break;case 4:a=lu,lu=su,r=Jt(),o=Nu,Nu=wm(e.stateNode.containerInfo),Mu(t,e,n),Fu(e),Nu=o,L&&mu&&(hu=!0),L=r,lu=a;break;case 12:Mu(t,e,n),Fu(e);break;case 31:Mu(t,e,n),Fu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 13:Mu(t,e,n),Fu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(vd=We()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=su,l=cu,u=lu;su=c||o,lu=u||o,cu=l||s,Mu(t,e,n),cu=l,lu=u,su=c,Fu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||su||cu||(t=s||cu,n=su,r=cu,su=o||su,cu=t,Bu(e,2),su=n,cu=r),!o&&lu||bu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,ju(e,n))));break;case 19:Mu(t,e,n),Fu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 30:a&512&&(cu||r===null||Al(r,r.return)),a=Jt(),o=mu,s=(n&335544064)===n,c=e.memoizedProps,mu=s&&xi(c.default,c.update)!==`none`,Mu(t,e,n),Fu(e),s&&r!==null&&L&&(e.flags|=4),mu=o,L=a;break;case 21:break;case 7:a&512&&(cu||r===null||Al(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Mu(t,e,n),Fu(e)}}function Fu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ll(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Pl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Nl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Bl(e,Rl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(fn(l,``),n.flags&=-33),Bl(e,Rl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;zl(e,Rl(e),u,s);break;default:throw Error(i(161))}}catch(t){vf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Iu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Iu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,vh=!0,t.reset(),vh=!1),e=e.sibling}}function Lu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ru(t,e),t=t.sibling;else ou(t,!1)}function Ru(e,t){var n=e.alternate;if(n===null)Ql(e,!1);else switch(e.tag){case 3:if(gu=pu=!1,Kl(),Lu(t,e),!pu&&!hu){if(e=Gl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Mp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),gu=!0}Gl=null;break;case 5:Lu(t,e);break;case 4:r=pu,pu=!1,Lu(t,e),pu&&(hu=!0),pu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Lu(t,e):Ql(e,!1));break;case 30:r=pu,i=Kl(),pu=!1,Lu(t,e),pu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=yi(a,o),o=yi(n.memoizedProps,o);var s=xi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,ql=0,t=au(e,n,t,o,s,a,!0),ql!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Ld(e,e.memoizedProps.onUpdate),Gl=i):i!==null&&(i.push.apply(i,Gl),Gl=i),pu=e.flags&32?!0:r;break;default:Lu(t,e)}}function zu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yu(e,t.alternate,t),t=t.sibling}function Bu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:El(4,n,n.return),Bu(n,r);break;case 1:Al(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ol(n,n.return,i),Bu(n,r);break;case 27:r&2&&bm(n.stateNode,n.type,n.memoizedProps);case 5:Al(n,n.return),n.tag!==5&&n.tag!==27||Ml(n),Bu(n,r);break;case 6:Ml(n);break;case 26:Al(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||cu||i.parentNode.removeChild(i),Bu(n,r);break;case 22:n.memoizedState===null&&Bu(n,r);break;case 30:Al(n,n.return),Bu(n,r);break;case 7:Al(n,n.return);default:Bu(n,r)}e=e.sibling}}function Vu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Vu(i,a,n),Tl(4,a);break;case 1:if(Vu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){vf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Eo(l[i],c)}catch(e){vf(r,r.return,e)}}s&&o&64&&Dl(a),kl(a,a.return);break;case 27:n&2&&Vl(a);case 5:a.tag!==5&&a.tag!==27||V(a),Vu(i,a,n),s&&r===null&&o&4&&Fl(a),kl(a,a.return);break;case 6:V(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||su||Xm(wm(c.ownerDocument),a.type,c),Vu(i,a,n),s&&r===null&&o&4&&Fl(a),kl(a,a.return);break;case 12:Vu(i,a,n);break;case 31:Vu(i,a,n),s&&o&4&&Ou(i,a);break;case 13:Vu(i,a,n),s&&o&4&&ku(i,a);break;case 22:a.memoizedState===null&&Vu(i,a,n),kl(a,a.return);break;case 30:Vu(i,a,n),kl(a,a.return);break;case 7:kl(a,a.return);default:Vu(i,a,n)}t=t.sibling}}function Hu(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&&Fa(n))}function Uu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Fa(e))}function Wu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Gu(e,t,n,r),t=t.sibling;else i&&iu(t)}function Gu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&ru(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Wu(e,t,n,r),a&2048&&Tl(9,t);break;case 1:Wu(e,t,n,r);break;case 3:Wu(e,t,n,r),i&&gu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Fa(a)));break;case 12:if(a&2048){Wu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){vf(t,t.return,e)}}else Wu(e,t,n,r);break;case 31:Wu(e,t,n,r);break;case 13:Wu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&ru(t),o._visibility&2?Wu(e,t,n,r):(o._visibility|=2,Ku(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&ru(s),o._visibility&2?Wu(e,t,n,r):qu(e,t)),a&2048&&Hu(s,t);break;case 24:Wu(e,t,n,r),a&2048&&Uu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Xl(a.child,!0),Xl(t.child,!0))),Wu(e,t,n,r);break;default:Wu(e,t,n,r)}}function Ku(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!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:Ku(a,o,s,c,i),Tl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ku(a,o,s,c,i)):u._visibility&2?Ku(a,o,s,c,i):qu(a,o),i&&l&2048&&Hu(o.alternate,o);break;case 24:Ku(a,o,s,c,i),i&&l&2048&&Uu(o.alternate,o);break;default:Ku(a,o,s,c,i)}t=t.sibling}}function qu(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:qu(n,r),i&2048&&Hu(r.alternate,r);break;case 24:qu(n,r),i&2048&&Uu(r.alternate,r);break;default:qu(n,r)}t=t.sibling}}var Ju=8192;function Yu(e,t,n){if(e.subtreeFlags&Ju)for(e=e.child;e!==null;)Xu(e,t,n),e=e.sibling}function Xu(e,t,n){switch(e.tag){case 26:Yu(e,t,n),e.flags&Ju&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&th(n,e)):nh(n,Nu,e.memoizedState,e.memoizedProps));break;case 5:Yu(e,t,n),e.flags&Ju&&(e=e.stateNode,(t&335544128)===t&&th(n,e));break;case 3:case 4:var r=Nu;Nu=wm(e.stateNode.containerInfo),Yu(e,t,n),Nu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ju,Ju=16777216,Yu(e,t,n),Ju=r):Yu(e,t,n));break;case 30:if((e.flags&Ju)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ul===null&&(Ul=new Map),Ul.set(r,i)}Yu(e,t,n);break;default:Yu(e,t,n)}}function Zu(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 Qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,td(r,e)}Zu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)$u(e),e=e.sibling}function $u(e){switch(e.tag){case 0:case 11:case 15:Qu(e),e.flags&2048&&El(9,e,e.return);break;case 3:Qu(e);break;case 12:Qu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ed(e)):Qu(e);break;default:Qu(e)}}function ed(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,td(r,e)}Zu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:El(8,t,t.return),ed(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ed(t));break;default:ed(t)}e=e.sibling}}function td(e,t){for(;fu!==null;){var n=fu;switch(n.tag){case 0:case 11:case 15:El(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:Fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,fu=r;else a:for(n=e;fu!==null;){r=fu;var i=r.sibling,a=r.return;if(Cu(r),r===n){fu=null;break a}if(i!==null){i.return=a,fu=i;break a}fu=a}}}var nd={getCacheForType:function(e){var t=Da(Na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Da(Na).controller.signal}},rd=typeof WeakMap==`function`?WeakMap:Map,H=0,id=null,U=null,W=0,G=0,ad=null,od=!1,sd=!1,cd=!1,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=0,gd=null,_d=null,K=!1,vd=0,yd=0,bd=1/0,xd=null,Sd=null,Cd=0,wd=null,Td=null,Ed=0,Dd=0,Od=null,kd=null,Ad=null,jd=null,Md=null,Nd=0,Pd=null;function Fd(){return H&2&&W!==0?W&-W:N.T===null?St():zf()}function Id(){if(md===0){if(!(W&536870912)||R){var e=ot;ot<<=1,!(ot&3932160)&&(ot=262144),md=e}else md=536870912}return e=No.current,e!==null&&(e.flags|=32),md}function Ld(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Bp(yi(e.memoizedProps,n))),jd===null&&(jd=[]),jd.push(t.bind(null,r))}}function Rd(e,t,n){(e===id&&(G===2||G===9)||e.cancelPendingCommit!==null)&&(Gd(e,0),Hd(e,W,md,!1)),ht(e,n),H&2&&e===id||(e===id&&(!(H&2)&&(fd|=n),ud===4&&Hd(e,W,md,!1)),jf(e))}function zd(e,t,n){if(H&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ut(e,t),a=r?$d(e,t):Zd(e,t,!0),o=r;do{if(a===0){sd&&!r&&Hd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Vd(n))a=Zd(e,t,!1),o=!1;else{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=gd;var l=c.current.memoizedState.isDehydrated;if(l&&(Gd(c,s).flags|=256),s=Zd(c,s,!1),s!==2&&s!==6){if(cd&&!l){c.errorRecoveryDisabledLanes|=o,fd|=o,a=4;break a}o=_d,_d=a,o!==null&&(_d===null?_d=o:_d.push.apply(_d,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Gd(e,0),Hd(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&&(t&62914560)!==t)break;case 6:Hd(r,t,md,!od);break a;case 2:_d=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=vd+300-We(),10<a)){if(Hd(r,t,md,!od),lt(r,0,!0)!==0)break a;Ed=t,r.timeoutHandle=Sp(Bd.bind(null,r,n,_d,xd,K,t,md,fd,hd,od,o,`Throttled`,-0,0),a);break a}Bd(r,n,_d,xd,K,t,md,fd,hd,od,o,null,-0,0)}break}}while(1);jf(e)}function Bd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},Ul=null,Xu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=oh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?vd-We():(a&4194048)===a?yd-We():0,m=ih(d,m),m!==null)?(Ed=a,e.cancelPendingCommit=m(sf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Hd(e,a,o,!l)):sf(e,t,a,n,r,i,o,s,c,l,u,d)}function Vd(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(!Ur(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 Hd(e,t,n,r){t=dt(e,t),t&=~pd,t&=~fd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-tt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&_t(e,n,t)}function Ud(){return H&6?!0:(Mf(0,!1),!1)}function Wd(){if(U!==null){if(G===0)var e=U.return;else e=U,ya=va=null,ss(e),so=null,co=0,e=U;for(;e!==null;)wl(e.alternate,e),e=e.return;U=null}}function Gd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Cp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ed=0,Wd(),id=e,U=n=Ii(e.current,null),W=t,G=0,ad=null,od=!1,sd=ut(e,t),cd=!1,hd=md=pd=fd=dd=ud=0,_d=gd=null,K=!1,ld=dt(e,t),Ei(),n}function Kd(e,t){B=null,N.H=_c,t===Za||t===$a?(t=ao(),G=3):t===Qa?(t=ao(),G=4):G=t===Fc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ad=t,U===null&&(ud=1,kc(e,Wi(t,e.current)))}function qd(){var e=No.current;return e===null?!0:(W&4194048)===W?z===null:(W&62914560)===W||W&536870912?e===z:!1}function Jd(){var e=N.H;return N.H=_c,e===null?_c:e}function Yd(){var e=N.A;return N.A=nd,e}function Xd(){ud=4,od||(W&4194048)!==W&&No.current!==null||(sd=!0),!(dd&134217727)&&!(fd&134217727)||id===null||Hd(id,W,md,!1)}function Zd(e,t,n){var r=H;H|=2;var i=Jd(),a=Yd();(id!==e||W!==t)&&(xd=null,Gd(e,t)),t=!1;var o=ud;a:do try{if(G!==0&&U!==null){var s=U,c=ad;switch(G){case 8:Wd(),o=6;break a;case 3:case 2:case 9:case 6:No.current===null&&(t=!0);var l=G;if(G=0,ad=null,rf(e,s,c,l),n&&sd){o=0;break a}break;default:l=G,G=0,ad=null,rf(e,s,c,l)}}Qd(),o=ud;break}catch(t){Kd(e,t)}while(1);return t&&e.shellSuspendCounter++,ya=va=null,H=r,N.H=i,N.A=a,U===null&&(id=null,W=0,Ei()),o}function Qd(){for(;U!==null;)tf(U)}function $d(e,t){var n=H;H|=2;var r=Jd(),a=Yd();id!==e||W!==t?(xd=null,bd=We()+500,Gd(e,t)):sd=ut(e,t);a:do try{if(G!==0&&U!==null){t=U;var o=ad;b:switch(G){case 1:G=0,ad=null,rf(e,t,o,1);break;case 2:case 9:if(to(o)){G=0,ad=null,nf(t);break}t=function(){G!==2&&G!==9||id!==e||(G=7),jf(e)},o.then(t,t);break a;case 3:G=7;break a;case 4:G=5;break a;case 7:to(o)?(G=0,ad=null,nf(t)):(G=0,ad=null,rf(e,t,o,7));break;case 5:var s=null;switch(U.tag){case 26:s=U.memoizedState;case 5:case 27:var c=U;if(s?$m(s):c.stateNode.complete){G=0,ad=null;var l=c.sibling;if(l!==null)U=l;else{var u=c.return;u===null?U=null:(U=u,af(u))}break b}}G=0,ad=null,rf(e,t,o,5);break;case 6:G=0,ad=null,rf(e,t,o,6);break;case 8:Wd(),ud=6;break a;default:throw Error(i(462))}}ef();break}catch(t){Kd(e,t)}while(1);return ya=va=null,N.H=r,N.A=a,H=n,U===null?(id=null,W=0,Ei(),ud):0}function ef(){for(;U!==null&&!He();)tf(U)}function tf(e){var t=hl(e.alternate,e,ld);e.memoizedProps=e.pendingProps,t===null?af(e):U=t}function nf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Yc(n,t,t.pendingProps,t.type,void 0,W);break;case 11:t=Yc(n,t,t.pendingProps,t.type.render,t.ref,W);break;case 5:ss(t);var r=t;r===aa&&(R?(fa(r),r.tag===5&&r.stateNode!=null&&(oa=r.stateNode)):(fa(r),R=!0));default:wl(n,t),t=U=Li(t,ld),t=hl(n,t,ld)}e.memoizedProps=e.pendingProps,t===null?af(e):U=t}function rf(e,t,n,r){ya=va=null,ss(t),so=null,co=0;var i=t.return;try{if(Pc(e,i,t,n,W)){ud=1,kc(e,Wi(n,e.current)),U=null;return}}catch(t){if(i!==null)throw U=i,t;ud=1,kc(e,Wi(n,e.current)),U=null;return}t.flags&32768?(R||r===1?e=!0:sd||W&536870912?e=!1:(od=e=!0,(r===2||r===9||r===3||r===6)&&(r=No.current,r!==null&&r.tag===13&&(r.flags|=16384))),of(t,e)):af(t)}function af(e){var t=e;do{if(t.flags&32768){of(t,od);return}e=t.return;var n=Sl(t.alternate,t,ld);if(n!==null){U=n;return}if(t=t.sibling,t!==null){U=t;return}U=t=e}while(t!==null);ud===0&&(ud=5)}function of(e,t){do{var n=Cl(e.alternate,e);if(n!==null){n.flags&=32767,U=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){U=e;return}U=e=n}while(e!==null);ud=6,U=null}function sf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do hf();while(Cd!==0);if(H&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===id&&(U=id=null,W=0),Td=t,wd=e,Ed=n,Od=a,kd=r,cf(e,t,n,s,c,l,f)}}function cf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Dd=s,s|=Ti,gt(e,n,s,r,i,a),jd=null,(n&335544064)===n?(Md=Ra(e),r=10262):(Md=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,wf(Je,function(){return gf(),null})):(e.callbackNode=null,e.callbackPriority=0),Hl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=N.T,N.T=null,i=P.p,P.p=2,a=H,H|=4;try{_u(e,t,n)}finally{H=a,P.p=i,N.T=r}}Cd=1,Hl?Ad=Rp(o,e.containerInfo,Md,df,ff,uf,pf,gf,lf,null,null):(df(),ff(),pf())}function lf(e){if(Cd!==0){var t=wd.onRecoverableError;t(e,{componentStack:null})}}function uf(){Cd===3&&(Cd=0,Ru(Td,wd),Cd=4)}function df(){if(Cd===1){Cd=0;var e=wd,t=Td,n=Ed,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=N.T,N.T=null;var i=P.p;P.p=2;var a=H;H|=4;try{mu=hu=!1,Pu(t,e,n),n=mp;var o=Yr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Jr(s.ownerDocument.documentElement,s)){if(c!==null&&Xr(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 _=qr(s,h),v=qr(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}}vh=!!pp,mp=pp=null}finally{H=a,P.p=i,N.T=r}}e.current=t,Cd=2}}function ff(){if(Cd===2){Cd=0;var e=wd,t=Td,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=H;H|=4;try{yu(e,t.alternate,t)}finally{H=i,P.p=r,N.T=n}}Cd=3}}function pf(){if(Cd===4||Cd===3){Cd=0;var e=Ad;Ad=null,Ue();var t=wd,n=Td,r=Ed,i=kd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Cd=5:(Cd=0,Td=wd=null,mf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Sd=null),xt(r),n=n.stateNode,$e&&typeof $e.onCommitFiberRoot==`function`)try{$e.onCommitFiberRoot(Qe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=N.T,a=P.p,P.p=2,N.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{N.T=n,P.p=a}}if(i=jd,o=Md,Md=null,i!==null&&(jd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Ed&3&&hf(),jf(t),a=t.pendingLanes,r&261930&&a&42?t===Pd?Nd++:(Nd=0,Pd=t):(Nd=0,Pd=null),Mf(0,!1)}}function mf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Fa(t)))}function hf(){return Ad!==null&&(Ad.skipTransition(),Ad=null),df(),ff(),pf(),gf()}function gf(){if(Cd!==5)return!1;var e=wd,t=Dd;Dd=0;var n=xt(Ed),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=Od,Od=null;var o=wd,s=Ed;if(Cd=0,Td=wd=null,Ed=0,H&6)throw Error(i(331));var c=H;if(H|=4,$u(o.current),Gu(o,o.current,s,n),H=c,Mf(0,!1),$e&&typeof $e.onPostCommitFiberRoot==`function`)try{$e.onPostCommitFiberRoot(Qe,o)}catch{}return!0}finally{P.p=a,N.T=r,mf(e,t)}}function _f(e,t,n){t=Wi(n,t),t=jc(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(ht(e,2),jf(e))}function vf(e,t,n){if(e.tag===3)_f(e,e,n);else for(;t!==null;){if(t.tag===3){_f(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Sd===null||!Sd.has(r))){e=Wi(n,e),n=Mc(2),r=bo(t,n,2),r!==null&&(Nc(n,r,t,e),ht(r,2),jf(r));break}}t=t.return}}function yf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new rd;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)||(cd=!0,i.add(n),e=bf.bind(null,e,t,n),t.then(e,e))}function bf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,id===e&&(W&n)===n&&(ud===4||ud===3&&(W&62914560)===W&&300>We()-vd?H&2?pd|=n:Gd(e,0):pd|=n,hd===W&&(hd=0)),jf(e)}function xf(e,t){t===0&&(t=pt()),e=ki(e,t),e!==null&&(ht(e,t),jf(e))}function Sf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xf(e,n)}function Cf(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),xf(e,n)}function wf(e,t){return Be(e,t)}var Tf=null,Ef=null,Df=!1,Of=!1,kf=!1,Af=0;function jf(e){e!==Ef&&e.next===null&&(Ef===null?Tf=Ef=e:Ef=Ef.next=e),Of=!0,Df||(Df=!0,Rf())}function Mf(e,t){if(!kf&&Of){kf=!0;do for(var n=!1,r=Tf;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-tt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Lf(r,a))}else a=W,a=lt(r,r===id?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ut(r,a)||(n=!0,Lf(r,a))}r=r.next}while(n);kf=!1}}function Nf(){Pf()}function Pf(){Of=Df=!1;var e=0;Af!==0&&xp()&&(e=Af);for(var t=We(),n=null,r=Tf;r!==null;){var i=r.next,a=Ff(r,t);a===0?(r.next=null,n===null?Tf=i:n.next=i,i===null&&(Ef=n)):(n=r,(e!==0||a&3)&&(Of=!0)),r=i}Cd!==0&&Cd!==5||Mf(e,!1),Af!==0&&(Af=0)}function Ff(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-tt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ft(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=id,n=W,n=lt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(G===2||G===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ve(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ut(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ve(r),xt(n)){case 2:case 8:n=qe;break;case 32:n=Je;break;case 268435456:n=Xe;break;default:n=Je}return r=If.bind(null,e),n=Be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ve(r),e.callbackPriority=2,e.callbackNode=null,2}function If(e,t){if(Cd!==0&&Cd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(hf()&&e.callbackNode!==n)return null;var r=W;return r=lt(e,e===id?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(zd(e,r,t),Ff(e,We()),e.callbackNode!=null&&e.callbackNode===n?If.bind(null,e):null)}function Lf(e,t){if(hf())return null;zd(e,t,!0)}function Rf(){Ep(function(){H&6?Be(Ke,Nf):Pf()})}function zf(){if(Af===0){var e=Va;e===0&&(e=at,at<<=1,!(at&261888)&&(at=256)),Af=e}return Af}function Bf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:yn(e)}function Vf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Bf((i[Tt]||null).action),o=r.submitter;o&&(t=(t=o[Tt]||null)?Bf(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(Af!==0){var e=new FormData(i,o);rc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),rc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Hf=0;Hf<gi.length;Hf++){var Uf=gi[Hf];_i(Uf.toLowerCase(),`on`+(Uf[0].toUpperCase()+Uf.slice(1)))}_i(ci,`onAnimationEnd`),_i(li,`onAnimationIteration`),_i(ui,`onAnimationStart`),_i(`dblclick`,`onDoubleClick`),_i(`focusin`,`onFocus`),_i(`focusout`,`onBlur`),_i(di,`onTransitionRun`),_i(fi,`onTransitionStart`),_i(pi,`onTransitionCancel`),_i(mi,`onTransitionEnd`),Ut(`onMouseEnter`,[`mouseout`,`mouseover`]),Ut(`onMouseLeave`,[`mouseout`,`mouseover`]),Ut(`onPointerEnter`,[`pointerout`,`pointerover`]),Ut(`onPointerLeave`,[`pointerout`,`pointerover`]),Ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Wf=`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(` `),Gf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Wf));function Kf(e,t){t=!!(t&4);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){Si(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){Si(e)}i.currentTarget=null,a=c}}}}function q(e,t){var n=t[Dt];n===void 0&&(n=t[Dt]=new Set);var r=e+`__bubble`;n.has(r)||(Xf(t,e,2,!1),n.add(r))}function qf(e,t,n){var r=0;t&&(r|=4),Xf(n,e,r,t)}var Jf=`_reactListening`+Math.random().toString(36).slice(2);function Yf(e){if(!e[Jf]){e[Jf]=!0,Bt.forEach(function(t){t!==`selectionchange`&&(Gf.has(t)||qf(t,!1,e),qf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jf]||(t[Jf]=!0,qf(`selectionchange`,!1,t))}}function Xf(e,t,n,r){switch(Th(t)){case 2:var i=yh;break;case 8:i=bh;break;default:i=xh}n=i.bind(null,t,n,e),i=void 0,!An||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 Zf(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=Pt(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}Dn(function(){var r=a,i=Sn(n),s=[];a:{var c=hi.get(e);if(c!==void 0){var l=Vn,u=e;switch(e){case`keypress`:if(In(n)===0)break a;case`keydown`:case`keyup`:l=ar;break;case`focusin`:u=`focus`,l=Xn;break;case`focusout`:u=`blur`,l=Xn;break;case`beforeblur`:case`afterblur`:l=Xn;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=Jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=cr;break;case ci:case li:case ui:l=Zn;break;case mi:l=lr;break;case`scroll`:case`scrollend`:l=Un;break;case`wheel`:l=ur;break;case`copy`:case`cut`:case`paste`:l=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=or;break;case`submit`:l=sr;break;case`toggle`:case`beforetoggle`:l=dr}var d=!!(t&4),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=On(m,p),g!=null&&d.push(Qf(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(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==xn&&(u=n.relatedTarget||n.fromElement)&&(Pt(u)||u[Et]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Pt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=or,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:It(c),h=l==null?u:It(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Pt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,ep):null,c!==null&&tp(s,u,c,d,!1),l!==null&&f!==null&&tp(s,f,l,d,!0)))}a:{if(c=r?It(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=jr;else if(Tr(c)){if(Mr)_=Vr;else{_=zr;var v=Rr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&gn(r.elementType)&&(_=jr):_=Br;if(_&&=_(e,r)){Er(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?It(r):window,e){case`focusin`:(Tr(v)||v.contentEditable===`true`)&&(Qr=v,$r=r,ei=null);break;case`focusout`:ei=$r=Qr=null;break;case`mousedown`:ti=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ti=!1,ni(s,n,i);break;case`selectionchange`:if(Zr)break;case`keydown`:case`keyup`:ni(s,n,i)}var y;if(pr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else xr?yr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(gr&&n.locale!==`ko`&&(xr||b!==`onCompositionStart`?b===`onCompositionEnd`&&xr&&(y=Fn()):(Mn=i,Nn=`value`in Mn?Mn.value:Mn.textContent,xr=!0)),v=$f(r,b),0<v.length&&(b=new $n(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=br(n),y!==null&&(b.data=y)))),(y=hr?Sr(e,n):Cr(e,n))&&(b=$f(r,`onBeforeInput`),0<b.length&&(v=new $n(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Vf(s,e,r,n,i)}Kf(s,t)})}function Qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $f(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=On(e,n),i!=null&&r.unshift(Qf(e,i,a)),i=On(e,t),i!=null&&r.push(Qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function ep(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tp(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=On(n,a),l!=null&&o.unshift(Qf(n,l,c))):i||(l=On(n,a),l!=null&&o.push(Qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var np=/\r\n?/g,rp=/\u0000|\uFFFD/g;function ip(e){return(typeof e==`string`?e:``+e).replace(np,`
9
+ `).replace(rp,``)}function ap(e,t){return t=ip(t),ip(e)===t}function op(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&fn(e,``+r);else return;break;case`className`:Xt(e,`class`,r);break;case`tabIndex`:Xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Xt(e,n,r);break;case`style`:hn(e,r,o);return;case`data`:if(t!==`object`){Xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&op(e,t,`name`,a.name,a,null),op(e,t,`formEncType`,a.formEncType,a,null),op(e,t,`formMethod`,a.formMethod,a,null),op(e,t,`formTarget`,a.formTarget,a,null)):(op(e,t,`encType`,a.encType,a,null),op(e,t,`method`,a.method,a,null),op(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=bn);return;case`onScroll`:r!=null&&q(`scroll`,e);return;case`onScrollEnd`:r!=null&&q(`scrollend`,e);return;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));o?.__html!==n&&(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=yn(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`credentialless`: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),Yt(e,`popover`,r);break;case`xlinkActuate`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Yt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=_n.get(n)||n,Yt(e,n,r);else return}L=!0}function sp(e,t,n,r,a,o){switch(n){case`style`:hn(e,r,o);return;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));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)fn(e,``+r);else return;break;case`onScroll`:r!=null&&q(`scroll`,e);return;case`onScrollEnd`:r!=null&&q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=bn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Vt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Tt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}L=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Yt(e,n,r)}return}L=!0}function cp(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:op(e,t,o,s,n,null)}}a&&op(e,t,`srcSet`,n.srcSet,n,null),r&&op(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:op(e,t,r,d,n,null)}}sn(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:op(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&ln(e,!!r,n,!0):ln(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:op(e,t,s,c,n,null)}dn(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:op(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<Wf.length;r++)q(Wf[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:op(e,t,u,r,n,null)}return;default:if(gn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&sp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&op(e,t,c,r,n,null))}var lp={};function up(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)||op(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`:m!==f&&(L=!0),o=m;break;case`name`:m!==f&&(L=!0),a=m;break;case`checked`:m!==f&&(L=!0),u=m;break;case`defaultChecked`:m!==f&&(L=!0),d=m;break;case`value`:m!==f&&(L=!0),s=m;break;case`defaultValue`:m!==f&&(L=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&op(e,t,p,m,r,f)}}on(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)||op(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`:o!==l&&(L=!0),p=o;break;case`defaultValue`:o!==l&&(L=!0),c=o;break;case`multiple`:o!==l&&(L=!0),s=o;default:o!==l&&op(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?ln(e,!!n,n?[]:``,!1):ln(e,!!n,t,!0)):ln(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:op(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`:a!==o&&(L=!0),p=a;break;case`defaultValue`:a!==o&&(L=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&op(e,t,s,a,r,o)}un(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:op(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`:p!==m&&(L=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:op(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)&&op(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:op(e,t,u,p,r,m)}return;default:if(gn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&sp(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||sp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&op(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||op(e,t,f,p,r,m)}function dp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function fp(){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&&dp(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&&dp(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 pp=null,mp=null;function hp(e){return e.nodeType===9?e:e.ownerDocument}function gp(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 _p(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 vp(e,t,n,r){return n=hp(n).createElement(e),n[wt]=r,n[Tt]=t,cp(n,e,t),Rt(n),n}function yp(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 bp=null;function xp(){var e=window.event;return e&&e.type===`popstate`?e!==bp&&(bp=e,!0):(bp=null,!1)}var Sp=typeof setTimeout==`function`?setTimeout:void 0,Cp=typeof clearTimeout==`function`?clearTimeout:void 0,wp=typeof Promise==`function`?Promise:void 0,Tp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Sp,Ep=typeof queueMicrotask==`function`?queueMicrotask:wp===void 0?Sp:function(e){return wp.resolve(null).then(e).catch(Dp)};function Dp(e){setTimeout(function(){throw e})}function Op(e){return e===`head`}function kp(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),Wh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)xm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,xm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[jt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&xm(e.ownerDocument.body)}n=i}while(n);Wh(t)}function Ap(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 jp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Mp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Np(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Pp(e){return Np(e.getBoundingClientRect(),getComputedStyle(e),e)}function Fp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Np(t,n,e)}function Ip(e){return e.documentElement.clientHeight}function Lp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Rp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ip(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=eh(f),u>rh){s.length=o;break}f=new Promise(Lp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function zp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}zp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},zp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},zp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Bp(e){return{name:e,group:new zp(`group`,e),imagePair:new zp(`image-pair`,e),old:new zp(`old`,e),new:new zp(`new`,e)}}function Vp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Vp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Kp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Wp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Hp,e,s,r)}this._eventListeners=a}};function Hp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Vp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Kp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Wp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Up,e,n,i),r.splice(t,1),a!==null&&a()}};function Up(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Wp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Gp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Kp(e,t,n,r){if(e.length===0)return-1;r=Gp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Gp(a.optionsOrUseCapture)===r)return i}return-1}Vp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Wp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Wp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Vp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,qp,e,void 0,void 0)};function qp(e,t){return e.tag!==6&&(e=b(e),_m(e,t))}Vp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Jp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!qp(t[n],e);n--);};function Jp(e,t){return t.push(e),!1}Vp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=hp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Yp,e,void 0,void 0))};function Yp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Vp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Xp,e,void 0,void 0)};function Xp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Vp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Zp,e,void 0,void 0);for(var n=t=0;n<Qp.length;n++){var r=Qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Qp[t++]=r}Qp.length=t}};function Zp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Qp=[],$p=!1;function em(e,t,n){Qp.push({fragmentInstance:e,observer:t,instance:n}),$p||($p=!0,vm(function(){$p=!1;var e=Qp;Qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Vp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,tm,e,void 0,void 0),e};function tm(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Vp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Vp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Jp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||nm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function nm(e,t,n,r,i){var a=Pt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function rm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Vp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Jp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),rm(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),rm(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function im(e,t){return e=b(e),am(e,t),!1}function am(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function om(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Wp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Qp.length;i++){var a=Qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Qp[r++]=a)}Qp.length=r,n.observe(e)}),am(e,t))}function sm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Wp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?em(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function cm(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`:cm(n),Nt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function lm(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[jt])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=pm(e.nextSibling),e===null)break}return null}function um(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pm(e.nextSibling),e===null))return null;return e}function dm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pm(e.nextSibling),e===null))return null;return e}function J(e){return e.data===`$?`||e.data===`$~`}function Y(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function fm(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 pm(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 mm=null;function hm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gm(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 _m(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function vm(e){Tp(function(){Tp(function(t){return e(t)})})}function ym(e,t,n){switch(t=hp(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 bm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&op(e,t,r,null,lp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===bn&&(e.onclick=null),Nt(e)}function xm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Nt(e)}var Sm=new Map,Cm=new Set;function wm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Tm=P.d;P.d={f:Em,r:Dm,D:Am,C:jm,L:Mm,m:Nm,X:Fm,S:Pm,M:Im};function Em(){var e=Tm.f(),t=Ud();return e||t}function Dm(e){var t=Ft(e);t!==null&&t.tag===5&&t.type===`form`?ac(t):Tm.r(e)}var Om=typeof document>`u`?null:document;function km(e,t,n){var r=Om;if(r&&typeof t==`string`&&t){var i=an(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cm.has(i)||(Cm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),cp(t,`link`,e),Rt(t),r.head.appendChild(t)))}}function Am(e){Tm.D(e),km(`dns-prefetch`,e,null)}function jm(e,t){Tm.C(e,t),km(`preconnect`,e,t)}function Mm(e,t,n){Tm.L(e,t,n);var r=Om;if(r&&e&&t){var i=`link[rel="preload"][as="`+an(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+an(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+an(n.imageSizes)+`"]`)):i+=`[href="`+an(e)+`"]`;var a=i;switch(t){case`style`:a=Rm(e);break;case`script`:a=Hm(e)}if(!(Sm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(zm(a))||t===`script`&&r.querySelector(Um(a))))){var o=r.createElement(`link`);cp(o,`link`,e),t===`style`&&(o[Mt]=!0,o.onload=o.onerror=function(){zt(o)}),Rt(o),r.head.appendChild(o)}}}function Nm(e,t){Tm.m(e,t);var n=Om;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+an(r)+`"][href="`+an(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Hm(e)}if(!Sm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Sm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Um(a)))return}r=n.createElement(`link`),cp(r,`link`,e),Rt(r),n.head.appendChild(r)}}}function Pm(e,t,n){Tm.S(e,t,n);var r=Om;if(r&&e){var i=Lt(r).hoistableStyles,a=Rm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(zm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sm.get(a))&&Km(e,n);var c=o=r.createElement(`link`);Rt(c),cp(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,Gm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Fm(e,t){Tm.X(e,t);var n=Om;if(n&&e){var r=Lt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=D({src:e,async:!0},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Rt(a),cp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t){Tm.M(e,t);var n=Om;if(n&&e){var r=Lt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Rt(a),cp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t,n,r){var a=(a=Ee.current)?wm(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`?(n=Rm(n.href),t=Lt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Rm(n.href);var o=Lt(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(zm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Sm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sm.set(e,o)),Vm(a,e,o,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`?(n=Hm(n),t=Lt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rm(e){return`href="`+an(e)+`"`}function zm(e){return`link[rel="stylesheet"][`+e+`]`}function Bm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Vm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Mt]){r.loading=1;return}}else t=e.createElement(`link`),t[Mt]=!0,t.onload=t.onerror=zt.bind(null,t),cp(t,`link`,n),Rt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Hm(e){return`[src="`+an(e)+`"]`}function Um(e){return`script[async]`+e}function Wm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+an(n.href)+`"]`);if(r)return t.instance=r,Rt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Rt(r),cp(r,`style`,a),Gm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Rm(n.href);var o=e.querySelector(zm(a));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;r=Bm(n),(a=Sm.get(a))&&Km(r,a),o=(e.ownerDocument||e).createElement(`link`),Rt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),cp(o,`link`,r),t.state.loading|=4,Gm(o,n.precedence,e),t.instance=o;case`script`:return o=Hm(n.src),(a=e.querySelector(Um(o)))?(t.instance=a,Rt(a),a):(r=n,(a=Sm.get(o))&&(r=D({},n),qm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Rt(a),cp(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,Gm(r,n.precedence,e));return t.instance}function Gm(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 Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Jm=null;function Ym(e,t,n){if(Jm===null){var r=new Map,i=Jm=new Map;i.set(n,r)}else i=Jm,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[jt]||a[wt]||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 Xm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Zm(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 Qm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function $m(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function eh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function th(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=eh(t),e.suspenseyImages.push(t)),e=sh.bind(e),t.decode().then(e,e))}function nh(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=Rm(r.href),a=t.querySelector(zm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Rt(a);return}a=t.ownerDocument||t,r=Bm(r),(i=Sm.get(i))&&Km(r,i),a=a.createElement(`link`),Rt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),cp(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=oh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rh=0;function ih(e,t){return e.stylesheets&&e.count===0&&lh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rh===0&&(rh=62500*fp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ah(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)lh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function oh(){this.count--,ah(this)}function sh(){this.imgCount--,ah(this)}var ch=null;function lh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ch=new Map,t.forEach(uh,e),ch=null,oh.call(e))}function uh(e,t){if(!(t.state.loading&4)){var n=ch.get(e);if(n)var r=n.get(null);else{n=new Map,ch.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=oh.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 X={$$typeof:j,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function dh(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=mt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.hiddenUpdates=mt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function fh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Pi(3,null,null,t),e.current=a,a.stateNode=e,t=Pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},_o(a),e}function Z(e){return e?(e=Mi,e):Mi}function ph(e,t,n,r,i,a){i=Z(i),r.context===null?r.context=i:r.pendingContext=i,r=yo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=bo(e,r,t),n!==null&&(Rd(n,e,t),xo(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=ki(e,67108864);t!==null&&Rd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=Fd();t=bt(t);var n=ki(e,t);n!==null&&Rd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,xh(e,t,n,r)}finally{P.p=a,N.T=i}}function bh(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,xh(e,t,n,r)}finally{P.p=a,N.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)Zf(e,t,r,Ch,n),Ph(e,r);else if(Ih(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<Nh.indexOf(e)){for(;i!==null;){var a=Ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ct(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-tt(o);s.entanglements[1]|=c,o&=~c}jf(a),!(H&6)&&(bd=We()+500,Mf(0,!1))}}break;case 31:case 13:s=ki(a,2),s!==null&&Rd(s,a,2),Ud(),hh(a,2)}if(a=Sh(r),a===null&&Zf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Zf(e,t,r,null,n)}}function Sh(e){return e=Sn(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=Pt(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 Ch=e,null}function Th(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ge()){case Ke:return 2;case qe:return 8;case Je:case Ye:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,jh=new Map,Mh=[],Nh=`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 Ph(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jh.delete(t.pointerId)}}function Fh(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=Ft(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ih(e,t,n,r,i){switch(t){case`focusin`:return Dh=Fh(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Fh(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Fh(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Fh(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jh.set(a,Fh(jh.get(a)||null,e,t,n,r,i)),!0}return!1}function Lh(e){var t=Pt(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,Ct(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ct(e.priority,function(){_h(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 Rh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xn=r,n.target.dispatchEvent(r),xn=null}else return t=Ft(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Rh(e)&&n.delete(t)}function Bh(){Eh=!1,Dh!==null&&Rh(Dh)&&(Dh=null),Oh!==null&&Rh(Oh)&&(Oh=null),kh!==null&&Rh(kh)&&(kh=null),Ah.forEach(zh),jh.forEach(zh)}function Vh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bh)))}var Hh=null;function Uh(e){Hh!==e&&(Hh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hh===e&&(Hh=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(wh(r||n)===null)continue;break}var a=Ft(n);a!==null&&(e.splice(t,3),t-=3,rc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Vh(t,e)}Dh!==null&&Vh(Dh,e),Oh!==null&&Vh(Oh,e),kh!==null&&Vh(kh,e),Ah.forEach(t),jh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&(n=Mh[0],n.blockedOn===null);)Lh(n),n.blockedOn===null&&Mh.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[Tt]||null;if(typeof a==`function`)o||Uh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Tt]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Uh(n)}}}function Gh(){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 Kh(e){this._internalRoot=e}qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,Fd(),e,t,null,null)},qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),Ud(),t[Et]=null}};function qh(e){this._internalRoot=e}qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&t!==0&&t<Mh[n].priority;n++);Mh.splice(n,0,e),n===0&&Lh(e)}};var Jh=n.version;if(Jh!==`19.3.1`)throw Error(i(527,Jh,`19.3.1`));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:f(e),e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{Qe=Xh.inject(Yh),$e=Xh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ec,s=Dc,c=Oc;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=fh(e,1,!1,null,null,n,r,null,o,s,c,Gh),e[Et]=t.current,Yf(e),new Kh(t)}})),_=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=g()})),v=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})),y=o(((e,t)=>{t.exports=v()})),b=l(d(),1),x=(0,b.createContext)({});function S(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var C=typeof window<`u`?b.useLayoutEffect:b.useEffect,w=(0,b.createContext)(null);function T(e,t){e.indexOf(t)===-1&&e.push(t)}function E(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var D=(e,t,n)=>n>t?t:n<e?e:n,O={},ee=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),k=e=>typeof e==`object`&&!!e,te=e=>/^0[^.\s]+$/u.test(e);function ne(e){let t;return()=>(t===void 0&&(t=e()),t)}var A=e=>e,re=(...e)=>e.reduce((e,t)=>n=>t(e(n))),j=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ie=class{constructor(){this.subscriptions=[]}add(e){return T(this.subscriptions,e),()=>this.remove(e)}remove(e){E(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},ae=e=>e*1e3,M=e=>e/1e3,oe=(e,t)=>t?1e3/t*e:0,se=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function ce(e,t,n,r){return e===t&&n===r?A:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=se(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(se(s+1e-7,e,n)-i-r)}return se(s,t,r)}}var le=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ue=e=>t=>1-e(1-t),de=ce(.33,1.53,.69,.99),fe=ue(de),pe=le(fe),me=e=>e>=1?1:(e*=2)<1?.5*fe(e):.5*(2-2**(-10*(e-1))),he=e=>1-Math.sin(Math.acos(e)),ge=ue(he),_e=le(he),N=ce(.42,0,1,1),P=ce(0,0,.58,1),ve=ce(.42,0,.58,1),ye=e=>Array.isArray(e)&&typeof e[0]!=`number`,be=e=>Array.isArray(e)&&typeof e[0]==`number`,xe={linear:A,easeIn:N,easeInOut:ve,easeOut:P,circIn:he,circInOut:_e,circOut:ge,backIn:fe,backInOut:pe,backOut:de,anticipate:me},Se=e=>typeof e==`string`,Ce=e=>{if(be(e)){e.length;let[t,n,r,i]=e;return ce(t,n,r,i)}return Se(e)?(xe[e],`${e}`,xe[e]):e},we={delta:0,timestamp:0,isProcessing:!1},Te;function Ee(){Te=void 0}var De={now:()=>(Te===void 0&&De.set(we.isProcessing||O.useManualTiming?we.timestamp:performance.now()),Te),set:e=>{Te=e,queueMicrotask(Ee)}},Oe=e=>Math.round(e*1e5)/1e5,ke=e=>t=>typeof t==`string`&&t.startsWith(e),Ae=ke(`--`),je=ke(`var(--`),Me=e=>je(e)?Ne.test(e.split(`/*`)[0].trim()):!1,Ne=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pe(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Fe={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ie={...Fe,transform:e=>D(0,1,e)},Le={...Fe,default:1},Re=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ze(e){return e==null}var Be=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ve=(e,t)=>n=>!!(typeof n==`string`&&Be.test(n)&&n.startsWith(e)||t&&!ze(n)&&Object.prototype.hasOwnProperty.call(n,t)),He=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Re);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ue=e=>D(0,255,e),We={...Fe,transform:e=>Math.round(Ue(e))},Ge={test:Ve(`rgb`,`red`),parse:He(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+We.transform(e)+`, `+We.transform(t)+`, `+We.transform(n)+`, `+Oe(Ie.transform(r))+`)`};function Ke(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var qe={test:Ve(`#`),parse:Ke,transform:Ge.transform},Je=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ye=Je(`deg`),Xe=Je(`%`),F=Je(`px`),Ze=Je(`vh`),Qe=Je(`vw`),$e={...Xe,parse:e=>Xe.parse(e)/100,transform:e=>Xe.transform(e*100)},et={test:Ve(`hsl`,`hue`),parse:He(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Xe.transform(Oe(t))+`, `+Xe.transform(Oe(n))+`, `+Oe(Ie.transform(r))+`)`},tt={test:e=>Ge.test(e)||qe.test(e)||et.test(e),parse:e=>Ge.test(e)?Ge.parse(e):et.test(e)?et.parse(e):qe.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Ge.transform(e):et.transform(e),getAnimatableNone:e=>{let t=tt.parse(e);return t.alpha=0,tt.transform(t)}},nt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,rt=new RegExp(Re.source),it=new RegExp(nt.source,`i`);function at(e){return isNaN(e)&&typeof e==`string`&&(rt.test(e)||it.test(e))}var ot=`number`,st=`color`,ct=`var`,lt=`var(`,ut="${}",dt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function ft(e){let t=e.toString();return rt.test(t)||it.test(t)}function pt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(dt,e=>(tt.test(e)?(r.color.push(a),i.push(st),n.push(tt.parse(e))):e.startsWith(lt)?(r.var.push(a),i.push(ct),n.push(e)):(r.number.push(a),i.push(ot),n.push(parseFloat(e))),++a,ut)).split(ut),indexes:r,types:i}}function mt(e){return pt(e).values}function ht({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===ot?Oe(r[a]):e===st?tt.transform(r[a]):r[a]}return i}}function gt(e){return ht(pt(e))}var _t=e=>typeof e==`number`?0:tt.test(e)?tt.getAnimatableNone(e):e,vt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:_t(e);function yt(e){let t=pt(e);return ht(t)(t.values.map((e,n)=>vt(e,t.split[n])))}var bt={test:at,parse:mt,createTransformer:gt,getAnimatableNone:yt};function xt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function St({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=xt(s,r,e+1/3),a=xt(s,r,e),o=xt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Ct(e,t){return n=>n>0?t:e}var I=(e,t,n)=>e+(t-e)*n,wt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Tt=[qe,Ge,et],Et=e=>Tt.find(t=>t.test(e));function Dt(e){let t=Et(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===et&&(n=St(n)),n}var Ot=(e,t)=>{let n=Dt(e),r=Dt(t);if(!n||!r)return Ct(e,t);let i={...n};return e=>(i.red=wt(n.red,r.red,e),i.green=wt(n.green,r.green,e),i.blue=wt(n.blue,r.blue,e),i.alpha=I(n.alpha,r.alpha,e),Ge.transform(i))},kt=new Set([`none`,`hidden`]);function At(e,t){return kt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jt(e,t){return n=>I(e,t,n)}function Mt(e){return typeof e==`number`?jt:typeof e==`string`?Me(e)?Ct:tt.test(e)?Ot:It:Array.isArray(e)?Nt:typeof e==`object`?tt.test(e)?Ot:Pt:Ct}function Nt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Mt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Pt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Mt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Ft(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var It=(e,t)=>{let n=bt.createTransformer(t),r=pt(e),i=pt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?kt.has(e)&&!i.values.length||kt.has(t)&&!r.values.length?At(e,t):re(Nt(Ft(r,i),i.values),n):(`${e}${t}`,Ct(e,t))},Lt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Rt(e,t){let n=Lt.exec(e);if(!n)return;let r=Lt.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Oe(I(a,o,e))+i}function zt(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return I(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Rt(e,t);if(n)return n}return Mt(e)(e,t)}var Bt=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Vt(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var Ht=40;function Ut(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Bt.reduce((e,t)=>(e[t]=Vt(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=O.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,Ht),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:Bt.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Bt.length;t++)o[Bt[t]].cancel(e)},state:n,steps:o}}var{schedule:Wt,cancel:Gt,steps:Kt}=Ut(typeof requestAnimationFrame<`u`?requestAnimationFrame:A,!0,we),qt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Wt.update(t,e),stop:()=>Gt(t),now:()=>we.isProcessing?we.timestamp:De.now()}},L=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Jt=2e4;function Yt(e,t=50,n=Jt,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function Xt(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(Yt(o),Jt);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:M(s)}}var Zt={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},Qt=e=>e<0?1/Math.max(1+e,Zt.minDamping):Math.max(1-e,Zt.minDamping);function $t(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return nn(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function en(e,t){return e*Math.sqrt(1-t*t)}var tn=12;function nn(e,t,n){let r=n;for(let n=1;n<tn;n++)r-=e(r)/t(r);return r}var rn=.001;function an({duration:e=Zt.duration,bounce:t=Zt.bounce}){let n,r;Zt.maxDuration;let i=Qt(t);e=D(Zt.minDuration,Zt.maxDuration,M(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=en(t,i),o=Math.exp(-r);return rn-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=en(t*t,i);return(-n(t)+rn>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=nn(n,r,a),s=o*$t(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:ae(e)}}var on=(e,t)=>(t?e>=0:e>0)&&e<1/0;function sn(e,t){if(on(e,t))return e}function cn(e){let t=sn(e.stiffness),n=sn(e.damping,!0),r=sn(e.mass),i={...e,stiffness:t??Zt.stiffness,damping:n??Zt.damping,mass:r??Zt.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Qt(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*$t(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,an(i)),i.isResolvedFromDuration=!0;on(i.stiffness)&&on(i.damping,!0)||(i.stiffness=Zt.stiffness,i.damping=Zt.damping)}return i}function ln(e=Zt.visualDuration,t=Zt.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=cn({...n}),f=e=>d?0:-M(e),p=s/(2*Math.sqrt(o*c)),m=M(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?Zt.restSpeed.granular:Zt.restSpeed.default),g.restDelta=n.restDelta||(e?Zt.restDelta.granular:Zt.restDelta.default)};_();let v,y,b;if(p<1){let e=en(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>ae(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=ae(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(Yt(S),Jt),t=L(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}var un=Object.assign(ln,{applyToOptions:e=>{let t=Xt(e,100,ln);return e.ease=t.ease,e.duration=ae(t.duration),e.type=`keyframes`,e}});function dn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=un({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function fn(e,t,n){let r=[],i=n||O.mix||zt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=re(Array.isArray(t)?t[n]||A:t,a)),r.push(a)}return r}function pn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=fn(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=j(e[r],e[r+1],n);return s[r](i)};return n?t=>l(D(e[0],e[a-1],t)):l}function mn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=j(0,t,r);e.push(I(n,1,i))}}function hn(e){let t=[0];return mn(t,e.length-1),t}function gn(e,t){return e.map(e=>e*t)}function _n(e,t){return e.map(()=>t||ve).splice(0,e.length-1)}function vn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ye(r)?r.map(Ce):Ce(r)||ve,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(O.mix||zt)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?D(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=pn(gn(n&&n.length===t.length?n:hn(t),e),t,{ease:Array.isArray(i)?i:_n(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var yn=5;function bn(e,t,n){let r=Math.max(t-yn,0);return oe(n-e(r),t-r)}function xn(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):bn(t=>e.next(t).value,t,e.next(t).value)}var Sn=e=>e!==null;function Cn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Sn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var wn={decay:dn,inertia:dn,tween:vn,keyframes:vn,spring:un};function Tn(e){typeof e.type==`string`&&(e.type=wn[e.type])}var En=40,Dn=(e,t)=>t-e>En&&!O.useManualTiming?t:e;function On(e,t){return{kind:e,animation:t,timestamp:De.now(),frameTimestamp:we.timestamp,frameIsProcessing:we.isProcessing}}function kn(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...On(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function An(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...On(`layout-animation-start`,e),node:t})}catch{}}var jn=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Mn=e=>e/100,Nn=e=>Math.round(e*1e4)/1e4,Pn=class extends jn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==De.now()&&this.tick(De.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),kn(this,this.options)}initAnimation(){let{options:e}=this;Tn(e);let{type:t=vn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||vn;s!==vn&&typeof o[0]!=`number`&&(this.mixKeyframes=re(Mn,zt(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Yt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Dn(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;!d&&i!==null&&(p=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==dn&&(f.value=Cn(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??Nn((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==dn?Cn(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=D(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}then(e,t){return this.finished.then(e,t)}get duration(){return M(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+M(e)}get time(){return M(this.currentTime)}set time(e){e=ae(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return xn(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(De.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=M(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=qt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(De.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Fn=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function In(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Re)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Fn.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Ln=/\b([a-z-]*)\(.*?\)/gu,Rn={...bt,getAnimatableNone:e=>{let t=e.match(Ln);return t?t.map(In).join(` `):e}},zn={...bt,getAnimatableNone:e=>{let t=bt.parse(e);return bt.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Bn={...Fe,transform:Math.round},Vn={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,rotate:Ye,pathRotation:Ye,rotateX:Ye,rotateY:Ye,rotateZ:Ye,scale:Le,scaleX:Le,scaleY:Le,scaleZ:Le,skew:Ye,skewX:Ye,skewY:Ye,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Ie,originX:$e,originY:$e,originZ:F,zIndex:Bn,fillOpacity:Ie,strokeOpacity:Ie,numOctaves:Bn},Hn={...Vn,color:tt,backgroundColor:tt,outlineColor:tt,fill:tt,stroke:tt,borderColor:tt,borderTopColor:tt,borderRightColor:tt,borderBottomColor:tt,borderLeftColor:tt,filter:Rn,WebkitFilter:Rn,mask:zn,WebkitMask:zn},Un=e=>Hn[e],Wn=new Set([Rn,zn]);function Gn(e,t){let n=Un(e);return Wn.has(n)||(n=bt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function Kn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var qn=e=>e*180/Math.PI,Jn=e=>Xn(qn(Math.atan2(e[1],e[0]))),Yn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Jn,rotateZ:Jn,skewX:e=>qn(Math.atan(e[1])),skewY:e=>qn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xn=e=>(e%=360,e<0&&(e+=360),e),Zn=Jn,Qn=e=>Math.hypot(e[0],e[1]),$n=e=>Math.hypot(e[4],e[5]),er={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Qn,scaleY:$n,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(Qn(e)+$n(e))/2,rotateX:e=>Xn(qn(Math.atan2(e[6],e[5]))),rotateY:e=>Xn(qn(Math.atan2(-e[2],e[0]))),rotateZ:Zn,rotate:Zn,skewX:e=>qn(Math.atan(e[4])),skewY:e=>qn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function tr(e){return+!!e.includes(`scale`)}function nr(e,t){if(!e||e===`none`)return tr(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=er,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Yn,i=t}if(!i)return tr(t);let a=r[t],o=i[1].split(`,`).map(ir);return typeof a==`function`?a(o):o[a]}var rr=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return nr(n,t)};function ir(e){return parseFloat(e.trim())}var ar=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],or=new Set([...ar,`pathRotation`]),sr=e=>e===Fe||e===F,cr=new Set([`x`,`y`,`z`]),lr=ar.filter(e=>!cr.has(e));function ur(e){let t=[];return lr.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var dr=new Set([`bottom`,`right`]);function fr(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var pr=({transform:e})=>nr(e,`x`),mr=({transform:e})=>nr(e,`y`),hr={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>fr(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>fr(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:pr,y:mr,translateX:pr,translateY:mr},gr=new Set,_r=!1,vr=!1,yr=!1;function br(){if(vr){let e=[],t=new Set,n=new Set;gr.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),dr.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=ur(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}vr=!1,_r=!1,gr.forEach(e=>e.complete(yr)),gr.clear()}function xr(){gr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vr=!0)})}function Sr(){yr=!0,xr(),br(),yr=!1}function Cr(e,t,n){if(typeof e==`string`){if(ee(e)||te(e))return parseFloat(e);if(!bt.test(e)&&bt.test(n))return Gn(t,n)}return e??void 0}var wr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(gr.add(this),_r||(_r=!0,Wt.read(xr),Wt.resolveKeyframes(br))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Cr(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Kn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),gr.delete(this)}cancel(){this.state===`scheduled`&&(gr.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Tr=e=>e.startsWith(`--`);function Er(e,t,n){Tr(t)?e.style.setProperty(t,n):e.style[t]=n}var Dr={};function Or(e,t){let n=ne(e);return()=>Dr[t]??n()}var kr=Or(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Ar=Or(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),jr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Mr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:jr([0,.65,.55,1]),circOut:jr([.55,0,1,.45]),backIn:jr([.31,.01,.66,-.59]),backOut:jr([.33,1.53,.69,.99])};function Nr(e,t){if(e)return typeof e==`function`?Ar()?L(e,t):`ease-out`:be(e)?jr(e):Array.isArray(e)?e.map(e=>Nr(e,t)||Mr.easeOut):Mr[e]}function Pr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Nr(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Fr(e){return typeof e==`function`&&`applyToOptions`in e}function Ir({type:e,...t}){return Fr(e)&&Ar()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Lr=class extends jn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Ir(e);this.animation=Pr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Cn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Er(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},kn(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return M(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+M(e)}get time(){return M(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ae(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&kr()?(this.animation.timeline=e,t?.(this.animation),A):n(this)}},Rr={anticipate:me,backInOut:pe,circInOut:_e};function zr(e){return e in Rr}function Br(e){typeof e.ease==`string`&&zr(e.ease)&&(e.ease=Rr[e.ease])}var Vr=class extends Lr{constructor(e){Br(e),Tn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(De.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new Pn({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?D(0,10,a):0,s=this.sample(a);n&&r&&Er(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},Hr=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(bt.test(e)||e===`0`)&&!e.startsWith(`url(`));function Ur(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Wr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Hr(i,t),s=Hr(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):Ur(e)||(n===`spring`||Fr(n))&&r}function Gr(e){e.duration=0,e.type=`keyframes`}var Kr=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),qr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Jr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&qr.test(e[t]))return!0;return!1}var Yr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Xr=()=>!O.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function Zr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Kr.has(n)||Yr.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Xr()&&(Kr.has(n)||Yr.has(n)&&Jr(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Qr=(e,t)=>t&&typeof e==`number`?t.transform(e):e,$r={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ei=ar.length;function ti(e,t,n){let r=``,i=!0;for(let a=0;a<ei;a++){let o=ar[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Qr(s,Vn[o]);if(!c){i=!1;let t=$r[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Qr(a,Vn.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}var ni=new WeakMap,ri=200,ii=.001,ai=.1,oi=.001,si=100,ci=e=>/^(linear|ease(In|Out|InOut))$/.test(e),li=(e,t)=>e-t,ui=(e,t,n)=>{let r=[];for(let i=0;i<=n;i++)r.push(I(e,t,i/n));return r},di=e=>e.motionValue.owner,fi=e=>ni.get(e),pi=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),mi=({name:e,motionValue:t})=>e&&ar.includes(e)&&t?.owner?.current instanceof HTMLElement&&Xr()&&Ar();function hi(e){let t=di(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(pi(t,`transform`)||`none`)===`none`&&!pi(t,`pathRotation`)&&!t.projection?.isProjecting()}var gi=class extends Pn{constructor(e){let t=di(e).current,{driver:n=qt}=e,r,i=hi(e);e.driver=e=>{let i=n(e);return{js:i,now:i.now,start:(e=!0)=>{let n=fi(t);!n||n.isJS?i.start(e):n.schedule(!1,!e)},stop:()=>{i.stop();let e=fi(t);e&&!e.isFinishing&&e.release(r)}}},super(e),r=this,this.canAccelerate=i;let{stop:a}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),a()}}get group(){return fi(di(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(De.now()):void 0}tween(){let{keyframes:e,type:t,ease:n,times:r,repeat:i,delay:a=0}=this.options,o=be(n)?jr(n):ci(n)&&Mr[n];if(o&&!i&&!r&&e.length===2&&t===vn&&this.holdTime===null){let e=this.startTime+a/this.speed;return[e,e+this.resolvedDuration/this.speed,o]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,times:u,keyframes:d,type:f}=a,p=(f||vn)===vn?u||hn(d):[0,1],m=n+o/r,h=[];if(this.holdTime!==null||!(i>0))return h;for(let n=Math.max(0,Math.floor((e-m)*r/i));n<=s;n++){let a=m+n*i/r;if(a>t)break;for(let o of p){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&h.push(s)}}return h}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=De.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-10,!0),this.sampleAt(e,!0),10)}play(){this.isStopped||((this.group||_i(di(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.canAccelerate&&this.tick(De.now())}get time(){return this.isAccelerated()?M(D(0,this.totalDuration,this.at(De.now())-(this.options.delay||0))):super.time}set time(e){super.time=e,this.isAccelerated()&&this.sync()}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}};function _i(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p=e=>{for(let t of n)if(t.name===e)return!0},m=(t,n)=>{let o={};for(let s of t===void 0?ar:a){let a=r.get(s),c=t===void 0?pi(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},h=(e,t)=>{let n=``,r=m(e,t);for(let e in r)n+=($r[e]||e)+`(`+Qr(r[e],Vn[e])+`) `;return n||`none`},g=(e=m())=>{t.style.transform=ti(e,{})},_=(e=!0)=>{e&&g(),s.forEach(({animation:e})=>e.cancel()),s=[]},v=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=De.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(e.cancel(),s=s.filter(e=>e!==r)),O.schedule(!1)}),e.oncancel=()=>s.includes(r)&&O.demote(),s.push(r)},y=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},b=(e,t,n,r)=>{let i=Math.min(ri,Math.max(2,Math.ceil((n-t)/10)));if(r.length*4>i)return;let a=ui(t,n,i).concat(r).sort(li),o=e=>j(t,n,e),s,c;for(let t of e){let e=a.map(e=>t.numberAt(e)),[n]=e,r=e.map(e=>e-n),i=r[r.length-1],o=r.some(e=>Math.abs(e)*ii>Math.abs(i))?0:i,l=r.map(e=>o?e/o:e);if(!o){if(l.some(e=>!(Math.abs(e)<=ii)))return}else if(!s)s=l,c=e=>(t.numberAt(e)-n)/o;else if(l.some((e,t)=>!(Math.abs(e-s[t])<=ii)))return}if(!s||s.every((e,t)=>Math.abs(e-o(a[t]))<=ii))return`linear`;let l=[],u=(e,t=c(e))=>l.push(Nn(t)+` `+Nn(o(e)*100)+`%`);return s.forEach((e,t)=>{t&&Math.abs(e-s[t-1])>.2&&y(c,a[t-1],a[t]).forEach(e=>u(e)),u(a[t],e)}),`linear(`+l+`)`},x=(e,t,n,r)=>{let i=[t],a=(t,n)=>e.every(e=>!(Math.abs(e.numberAt((t+n)/2)-(e.numberAt(t)+e.numberAt(n))/2)>(e.name.startsWith(`scale`)?oi:ai))),o=(t,n,r)=>{if(n-t<1||a(t,n))i.push(n);else if(r<4)o(t,(t+n)/2,r+1),o((t+n)/2,n,r+1);else{for(let r of e)i.push(...y(e=>r.numberAt(e),t,n));i.push(n)}},s=ui(t,n,Math.ceil((n-t)/100));for(let e of r)s.push(e,Math.min(e+.01,n));let c=t;for(let e of s.sort(li))e>c&&o(c,e,0),c=e;return i.sort(li)},S=e=>{let t;for(let n of e){let e=n.tween();if(!e||t?.some((t,n)=>n<2?Math.abs(e[n]-t)>1:e[n]!==t))return;t=e}return t},C=(e,n,r,i={fill:`both`},a,o)=>{let s=e.flatMap(e=>e.boundaries(n,r)),c=o||b(e,n,r,s),l=c?[n,r]:x(e,n,r,s),u=l.map(e=>h(e,a)),d={transform:u};return c||(d.offset=l.map(e=>j(n,r,e))),u.every(e=>e===u[0])&&(g(m(n,a)),d=null),t.animate(d,{...i,duration:r-n,easing:c||`linear`})},w=c=>{let l=c,u=0,d=0,f=[],p=[],m=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[t,n]=e.timing(),i=t===1/0;if(o.set(e,[e.at(c),e.speed,i]),i)e.sync();else{if(e.speed<0)return;if(n){if(u){let e=(t-d)/n;if(Math.abs(n-u)>1||Math.abs(e-Math.round(e))*u>1)return}else u=n,d=t;p.push(e)}else m.add(t);f.push(e),l=Math.max(l,t)}}i={},a=ar.filter(t=>{if(r.has(t))return!0;let n=i[t]=pi(e,t);return n!==void 0&&parseFloat(n)!==+!!t.startsWith(`scale`)}),_(!1);let h=!u&&S(f);try{if(h&&h[1]>c){let[e,t,n]=h;v(C(f,e,t,void 0,void 0,n),e-c,t-e)}else l>c&&(v(C(f,c,l),0,l-c),m.forEach(e=>e<l-1&&v(t.animate(null,{duration:e-c}),0,e-c)));if(u){let e=d+Math.floor((l-d)/u)*u;v(C(p,e,e+u,{iterations:1/0,iterationStart:(l-e)/u,fill:`forwards`},l),l-c)}}catch{return}return s.length||_(),!0},T=e=>{let t,r=0;for(let i of n){let n=o.get(i);if(!n)return!1;let[a,s,c]=n,l=i.at(e),u=i.timing()[0]===1/0;if(c){if(u&&l===a)continue;return!1}let d=(l-a)/s,f=u?0:i.speed/s;if(t===void 0)t=d,r=f;else if(Math.abs(d-t)>1||f!==r)return!1}if(t===void 0)return!0;if(!s.length)return!1;for(let{offset:e,end:n,isDone:r}of s){let i=t-e;if(n<1/0&&(r?i<n-1:i<0||i>=n))return!1}for(let{animation:n,offset:i,isDone:a}of s){if(a)continue;let o=t-i;r?(n.playbackRate=r,n.startTime=e-o/r):(n.pause(),n.currentTime=o)}return!0},E=()=>!n.size&&(u=!0,fi(t)===O&&ni.delete(t),O.isJS||_(),!0),D=()=>{let t=De.now();if(O.isJS||(O.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=pi(e,n.name),o.has(n)||(c=!0))}),O.isFinishing=!1),l=!1,u||(n.forEach(({state:e},t)=>{(e===`idle`||e===`finished`)&&n.delete(t)}),E()))return;for(let e of n)if(!e.canAccelerate)return O.demote(!0);O.isJS&&(O.isJS=!1,c=!0,n.forEach(e=>e.js?.stop()));let r=c,a=d;if(c=d=!1,r||!T(t)){if(a){if(t-f<si)return O.demote();f=t}if(!w(t))return O.demote()}},O={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,we.isProcessing?Wt.render(D,!1,!0):queueMicrotask(D)))},release(e){let{state:t}=e;(t===`idle`||t===`finished`)&&n.delete(e),E()||O.schedule(!0)},check(){if(!O.isJS){for(let t in i)if(pi(e,t)!==i[t]&&!p(t))return O.schedule(!0,!0)}},demote(e){O.isJS||u||(n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),O.isJS=!0,o=new Map,_(),n.forEach(e=>e.state===`running`&&e.js?.start()))}};return ni.set(t,O),O}var vi=class extends jn{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=De.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||wr;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=De.now();let u=!0;Wr(e,i,a,o)||(u=!1,(O.instantAnimations||!s)&&l?.(Cn(e,n,t)),e[0]=e[e.length-1],Gr(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&Zr(n),p=!f&&mi(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=Dn(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new Vr(n)}catch{m=new Pn(n)}}else m=p?new gi(n):new Pn(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Sr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function yi(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var bi=30,xi=e=>!isNaN(parseFloat(e)),Si={current:void 0},Ci=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=De.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=De.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=xi(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new ie)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new ie,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){Wt.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){Si.current&&Si.current.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=De.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>bi)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,bi);return oe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function wi(e,t){return new Ci(e,t)}function Ti(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Ei(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Ti(n,e)}var Di={type:`spring`,stiffness:500,damping:25,restSpeed:10},Oi=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ki={type:`keyframes`,duration:.8},Ai={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},ji=(e,{keyframes:t})=>t.length>2?ki:or.has(e)?e.startsWith(`scale`)?Oi(t[1]):Di:Ai,Mi=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Ni(e){for(let t in e)if(!Mi.has(t))return!0;return!1}var Pi=(e,t,n,r={},i,a)=>o=>{let s=Ei(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ae(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};Ni(s)||Object.assign(u,ji(e,u)),u.duration&&=ae(u.duration),u.repeatDelay&&=ae(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Gr(u),u.delay===0&&(d=!0)),(O.instantAnimations||O.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Gr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Cn(u.keyframes,s);if(e!==void 0){Wt.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Pn(u):new vi(u)},Fi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ii(e){let t=Fi.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Li(e,t,n=1){`${e}`;let[r,i]=Ii(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ee(e)?parseFloat(e):e}return Me(i)?Li(i,t,n+1):i}function Ri(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function zi(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Ri(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Bi(e,t,n){return zi(e.getProps(),t,n,e)}var Vi=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Hi=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...ar]),Ui=e=>Array.isArray(e);function Wi(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wi(n))}function Gi(e){return Ui(e)?e[e.length-1]||0:e}function Ki(e,t){let{transitionEnd:n={},transition:r={},...i}=Bi(e,t)||{};i={...i,...n};for(let t in i)Wi(e,t,Gi(i[t]))}var qi=e=>!!(e&&e.getVelocity);function Ji(e){return!!(qi(e)&&e.add)}function Yi(e,t){let n=e.getValue(`willChange`);if(Ji(n))return n.add(t);if(!n&&O.WillChange){let n=new O.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var Xi=`data-framer-appear-id`;function Zi(e){return e.props[Xi]}var Qi=typeof window<`u`;function $i({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function ea(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Ti(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&$i(f,t))continue;let o={delay:n,...Ei(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Wt.update(()=>r.set(i));continue}let p=!1;if(Qi&&window.MotionHandoffAnimation){let n=Zi(e);if(n){let e=window.MotionHandoffAnimation(n,t,Wt);e!==null&&(o.startTime=e,p=!0)}}Yi(e,t);let m=l??e.shouldReduceMotion;r.start(Pi(t,r,i,m&&Hi.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Wt.update(()=>{o&&Ki(e,o)});d.length?Promise.all(d).then(t):t()}return d}function ta(e,t,n={}){let r=Bi(e,t,Vi(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?ea(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(ta(e,t,{...n,delay:r+(typeof o==`function`?0:o)+yi(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function na(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>ta(e,t,n))):typeof t==`string`?ta(e,t,n):Promise.all(ea(e,Bi(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var ra={test:e=>e===`auto`,parse:e=>e},ia=e=>t=>t.test(e),aa=[Fe,F,Xe,Ye,Qe,Ze,ra],oa=e=>aa.find(ia(e));function R(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||te(e)}var sa=new Set([`auto`,`none`,`0`]);function ca(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!sa.has(t)&&ft(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=Gn(n,i))}var la=class extends wr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(Pe(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Me(r))){let i=Li(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Hi.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=oa(r),o=oa(i);if(Pe(r)!==Pe(i)&&hr[n])this.needsMeasurement=!0;else if(a!==o){if(sr(a)&&sr(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else hr[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||R(e[t]))&&n.push(t);n.length&&ca(e,n,t)}measure(){let{element:e,name:t}=this;return hr[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},ua=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function da(e){return k(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function fa(e){return k(e)&&`ownerSVGElement`in e}var pa={};function ma(e){return pa.current?.add(e),e}var ha=e=>pa.current?pa.current.bind(e):e;function ga(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:pa.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function _a(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function va(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(or.has(e))o=!0;else if(Ae(e))i[e]=n;else{let t=Qr(n,Vn[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=ti(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var ya={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ba={offset:`strokeDashoffset`,array:`strokeDasharray`};function xa(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ya:ba;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Sa=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ca(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(va(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Sa)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&xa(d,i,a,o,!1)}function wa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ta({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ea(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Da(e){return e===void 0||e===1}function Oa({scale:e,scaleX:t,scaleY:n}){return!Da(e)||!Da(t)||!Da(n)}function ka(e){return Oa(e)||Aa(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function Aa(e){return ja(e.x)||ja(e.y)}function ja(e){return e&&e!==`0%`}function Ma(e,t,n){return n+t*(e-n)}function Na(e,t,n,r,i){return i!==void 0&&(e=Ma(e,i,r)),Ma(e,n,r)+t}function Pa(e,t=0,n=1,r,i){e.min=Na(e.min,t,n,r,i),e.max=Na(e.max,t,n,r,i)}function Fa(e,{x:t,y:n}){Pa(e.x,t.translate,t.scale,t.originPoint),Pa(e.y,n.translate,n.scale,n.originPoint)}var Ia=.999999999999,La=1.0000000000001;function Ra(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(za(e.x,-a.scroll.offset.x),za(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Fa(e,o)),r&&ka(a.latestValues)&&Ha(e,a.latestValues,a.layout?.layoutBox))}t.x<La&&t.x>Ia&&(t.x=1),t.y<La&&t.y>Ia&&(t.y=1)}function za(e,t){e.min+=t,e.max+=t}function Ba(e,t,n,r,i=.5){Pa(e,t,n,I(e.min,e.max,i),r)}function Va(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Ha(e,t,n){let r=n??e;Ba(e.x,Va(t.x,r.x),t.scaleX,t.scale,t.originX),Ba(e.y,Va(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ua(e,t){return wa(Ea(e.getBoundingClientRect(),t))}function Wa(e,t,n){let r=Ua(e,n),{scroll:i}=t;return i&&(za(r.x,i.offset.x),za(r.y,i.offset.y)),r}var{schedule:Ga,cancel:Ka}=Ut(queueMicrotask,!1);function qa(e,t,n){let r=qi(e)?e:wi(e);return r.start(Pi(``,r,t,n)),r.animation}var Ja={},Ya={value:null,addProjectionMetrics:null};function Xa(e,t){let n=De.now();e=ha(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(Gt(r),e(a-t))};return Wt.setup(r,!0),ma(()=>Gt(r))}function Za(e){return fa(e)&&e.tagName===`svg`}function Qa(e){return qi(e)?e.get():e}var $a=e=>typeof e==`number`?e:parseFloat(e),eo=ua.length,to=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`],no=to.length,ro=e=>typeof e==`number`||F.test(e);function io(e,t,n,r,i,a){i?(e.opacity=I(0,n.opacity??1,oo(r)),e.opacityExit=I(t.opacity??1,0,so(r))):a&&(e.opacity=I(t.opacity??1,n.opacity??1,r));for(let i=0;i<eo;i++){let a=ua[i],o=ao(t,a),s=ao(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||ro(o)===ro(s)?(e[a]=Math.max(I($a(o),$a(s),r),0),(Xe.test(s)||Xe.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<no;i++){let a=to[i];(t[a]||n[a])&&(e[a]=I(t[a]||0,n[a]||0,r))}}function ao(e,t){return e[t]===void 0?e.borderRadius:e[t]}var oo=co(0,.5,ge),so=co(.5,.95,A);function co(e,t,n){return r=>r<e?0:r>t?1:n(j(e,t,r))}function lo(e,t){e.min=t.min,e.max=t.max}function uo(e,t){lo(e.x,t.x),lo(e.y,t.y)}function fo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var po=.9999,mo=1.0001,ho=-.01,go=.01;function _o(e){return e.max-e.min}function vo(e,t,n){return Math.abs(e-t)<=n}function yo(e,t,n,r=.5){e.origin=r,e.originPoint=I(t.min,t.max,e.origin),e.scale=_o(n)/_o(t),e.translate=I(n.min,n.max,e.origin)-e.originPoint,(e.scale>=po&&e.scale<=mo||isNaN(e.scale))&&(e.scale=1),(e.translate>=ho&&e.translate<=go||isNaN(e.translate))&&(e.translate=0)}function bo(e,t,n,r){yo(e.x,t.x,n.x,r?r.originX:void 0),yo(e.y,t.y,n.y,r?r.originY:void 0)}function xo(e,t,n,r=0){e.min=(r?I(n.min,n.max,r):n.min)+t.min,e.max=e.min+_o(t)}function So(e,t,n,r){xo(e.x,t.x,n.x,r?.x),xo(e.y,t.y,n.y,r?.y)}function Co(e,t,n,r=0){let i=r?I(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+_o(t)}function wo(e,t,n,r){Co(e.x,t.x,n.x,r?.x),Co(e.y,t.y,n.y,r?.y)}function To(e,t,n,r,i){return e-=t,e=Ma(e,1/n,r),i!==void 0&&(e=Ma(e,1/i,r)),e}function Eo(e,t=0,n=1,r=.5,i,a=e,o=e){if(Xe.test(t)&&(t=parseFloat(t),t=I(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=I(a.min,a.max,r);e===a&&(s-=t),e.min=To(e.min,t,n,s,i),e.max=To(e.max,t,n,s,i)}function Do(e,t,[n,r,i],a,o){Eo(e,t[n],t[r],t[i],t.scale,a,o)}var Oo=[`x`,`scaleX`,`originX`],ko=[`y`,`scaleY`,`originY`];function Ao(e,t,n,r){Do(e.x,t,Oo,n?n.x:void 0,r?r.x:void 0),Do(e.y,t,ko,n?n.y:void 0,r?r.y:void 0)}var jo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mo=()=>({x:jo(),y:jo()}),No=()=>({min:0,max:0}),z=()=>({x:No(),y:No()});function Po(e){return e.translate===0&&e.scale===1}function Fo(e){return Po(e.x)&&Po(e.y)}function Io(e,t){return e.min===t.min&&e.max===t.max}function Lo(e,t){return Io(e.x,t.x)&&Io(e.y,t.y)}function Ro(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function zo(e,t){return Ro(e.x,t.x)&&Ro(e.y,t.y)}function Bo(e){return _o(e.x)/_o(e.y)}function Vo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Ho=class{constructor(){this.members=[]}add(e){T(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(E(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(E(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function Uo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var B={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(F.test(e))e=parseFloat(e);else return e}return`${Uo(e,t.target.x)}% ${Uo(e,t.target.y)}%`}},Wo={borderRadius:Object.assign({},B,{applyTo:ua.slice()}),borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomLeftRadius:B,borderBottomRightRadius:B,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=bt.parse(e);if(i.length>5)return r;let a=bt.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=I(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function Go(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,rotateZ:s,skewX:c,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`rotateZ(${s}deg) `),c&&(r+=`skewX(${c}deg) `),l&&(r+=`skewY(${l}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function Ko(e){return[e(`x`),e(`y`)]}var qo=(e,t)=>e.depth-t.depth,Jo=class{constructor(){this.children=[],this.isDirty=!1}add(e){T(this.children,e),this.isDirty=!0}remove(e){E(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(qo),this.isDirty=!1,this.children.forEach(e)}},Yo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Xo={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Zo=[``,`X`,`Y`,`Z`],Qo=1e3,$o=0;function es(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var ts=({instance:e})=>e&&ni.get(e)?.demote();function ns(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Zi(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Wt,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ns(r)}function rs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Ja,{...Wo,...Ja}),class{constructor(e={},n=t?.()){this.id=$o++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ya.value&&(Xo.nodes=Xo.calculatedTargetDeltas=Xo.calculatedProjections=0),this.nodes.forEach(os),this.nodes.forEach(_s),this.nodes.forEach(vs),this.nodes.forEach(ss),Ya.addProjectionMetrics&&Ya.addProjectionMetrics(Xo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Jo)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ie),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=fa(t)&&!Za(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;Wt.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Xa(i,250),Yo.hasAnimatedSinceResize&&(Yo.hasAnimatedSinceResize=!1,this.nodes.forEach(gs)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||ws,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!zo(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Ei(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||gs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ys),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ns(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;ts(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,ts(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(us),this.nodes.forEach(ls);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ds);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ps),this.nodes.forEach(ms),this.nodes.forEach(hs),this.nodes.forEach(is),this.nodes.forEach(as)):this.nodes.forEach(ds),this.clearAllSnapshots();let e=De.now();we.delta=D(0,1e3/60,e-we.timestamp),we.timestamp=e,we.isProcessing=!0,Kt.update.process(we),Kt.preRender.process(we),Kt.render.process(we),we.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ga.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cs),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!_o(this.snapshot.measuredBox.x)&&!_o(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=z(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&ts(this);let t=this.projectionDelta&&!Fo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||ka(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Os(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return z();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(As))){let{scroll:e}=this.root;e&&(za(t.x,e.offset.x),za(t.y,e.offset.y))}return t}removeElementScroll(e){let t=z();if(uo(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&uo(t,e),za(t.x,i.offset.x),za(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r){let i=n||z();uo(i,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(za(i.x,-n.scroll.offset.x),za(i.y,-n.scroll.offset.y)),ka(n.latestValues)&&Ha(i,n.latestValues,n.layout?.layoutBox)}return!r&&ka(this.latestValues)&&Ha(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(e){let t=z();uo(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!ka(n.latestValues))continue;let r;n.instance&&(Oa(n.latestValues)&&n.updateSnapshot(),r=z(),uo(r,n.measurePageBox())),Ao(t,n.latestValues,n.snapshot?.layoutBox,r)}return ka(this.latestValues)&&Ao(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==we.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=we.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),So(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):uo(this.target,this.layout.layoutBox),Fa(this.target,this.targetDelta)):uo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Ya.value&&Xo.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Oa(this.parent.latestValues)||Aa(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),wo(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),uo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===we.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;uo(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ra(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=z());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fo(this.prevProjectionDelta.x,this.projectionDelta.x),fo(this.prevProjectionDelta.y,this.projectionDelta.y)),bo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Vo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Vo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Ya.value&&Xo.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mo(),this.projectionDelta=Mo(),this.projectionDeltaWithTransform=Mo()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Mo();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=z(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Cs));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=I(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=I(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(bs(o.x,e.x,n),bs(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wo(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ss(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Lo(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=z(),uo(f,this.relativeTarget)),c&&(this.animationValues=a,io(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Gt(this.pendingAnimation),void 0),this.pendingAnimation=Wt.update(()=>{Yo.hasAnimatedSinceResize=!0,this.motionValue||=wi(0),this.motionValue.jump(0,!1),this.currentAnimation=qa(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),An(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qo),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&ks(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||z();let t=_o(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=_o(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}uo(t,i),Ha(t,r),bo(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ho),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&es(`z`,e,r,this.animationValues);for(let t=0;t<Zo.length;t++)es(`rotate${Zo[t]}`,e,r,this.animationValues),es(`skew${Zo[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Qa(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Qa(t?.pointerEvents)||``),this.hasProjected&&!ka(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Go(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Ja){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Ja[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Qa(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ls),this.root.sharedNodes.clear()}}}function is(e){e.updateLayout(),fs(e)}function as(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Ko(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=_o(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;lo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else ks(i,t.layoutBox,n)&&Ko(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=_o(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Mo();bo(o,n,t.layoutBox);let s=Mo();a?bo(s,e.applyTransform(r,!0),t.measuredBox):bo(s,n,t.layoutBox);let c=!Fo(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=z();wo(s,t.layoutBox,i.layoutBox,o);let c=z();wo(c,n,a.layoutBox,o),zo(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function os(e){Ya.value&&Xo.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function ss(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cs(e){e.clearSnapshot()}function ls(e){e.clearMeasurements()}function us(e){e.isLayoutDirty=!0,e.updateLayout()}function ds(e){e.isLayoutDirty=!1}function fs(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;Ko(e=>za(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function ps(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function ms(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function hs(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function gs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _s(e){e.resolveTargetDelta()}function vs(e){e.calcProjection()}function ys(e){e.resetSkewAndRotation()}function bs(e,t,n){e.translate=I(t.translate,0,n),e.scale=I(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function xs(e,t,n,r){e.min=I(t.min,n.min,r),e.max=I(t.max,n.max,r)}function Ss(e,t,n,r){xs(e.x,t.x,n.x,r),xs(e.y,t.y,n.y,r)}function Cs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var ws={duration:.45,ease:[.4,0,.1,1]},Ts=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Es=Ts(`applewebkit/`)&&!Ts(`chrome/`)?Math.round:A;function Ds(e){e.min=Es(e.min),e.max=Es(e.max)}function Os(e){Ds(e.x),Ds(e.y)}function ks(e,t,n){return e===`position`||e===`preserve-aspect`&&!vo(Bo(t),Bo(n),.2)}function As(e){return e!==e.root&&e.scroll?.wasRoot}function js(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Ms=rs({attachResizeListener:(e,t)=>js(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ns={current:void 0},Ps=rs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ns.current){let e=new Ms({});e.mount(window),e.setOptions({layoutScroll:!0}),Ns.current=e}return Ns.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Fs=new WeakMap;function Is(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Ls(e){return typeof e==`string`||Array.isArray(e)}var Rs=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],zs=[`initial`].concat(Rs);function Bs(e){if(Is(e.animate))return!0;for(let t=0;t<zs.length;t++)if(Ls(e[zs[t]]))return!0;return!1}function Vs(e){return!!(Bs(e)||e.variants)}function Hs(e,t,n){for(let r in t){let i=t[r],a=n[r];if(qi(i))e.addValue(r,i);else if(qi(a))e.addValue(r,wi(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,wi(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Us={current:null},Ws={current:!1},Gs=typeof window<`u`;function Ks(){if(Ws.current=!0,Gs){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Us.current=e.matches;e.addEventListener(`change`,t),t()}else Us.current=!1}}var qs=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Js={};function Ys(e){Js=e}function Xs(){return Js}var Zs=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=wr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=De.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Wt.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Bs(t),this.isVariantNode=Vs(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&qi(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,Fs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Ws.current||Ks(),this.shouldReduceMotion=Us.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Kr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Lr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:ae(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=or.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Wt.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),ni.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Js){let t=Js[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&ni.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<qs.length;t++){let n=qs[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Hs(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=wi(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ee(n)||te(n))?n=parseFloat(n):typeof n!=`number`&&!bt.test(n)&&bt.test(t)&&(n=Gn(e,t)),this.setBaseTarget(e,qi(n)?n.get():n)),qi(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new ie),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Ga.render(this.render)}},Qs=class extends Zs{constructor(){super(...arguments),this.KeyframeResolver=la}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;qi(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function $s(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function ec(e,{layout:t,layoutId:n}){return or.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Ja[e]||e===`opacity`)}function tc(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(qi(r[t])||i&&qi(i[t])||ec(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function nc(e){return window.getComputedStyle(e)}var rc=class extends Qs{constructor(){super(...arguments),this.type=`html`,this.renderInstance=$s}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(or.has(t))return this.projection?.isProjecting?tr(t):rr(e,t);{let n=nc(e),r=(Ae(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ua(e,t)}build(e,t,n){va(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return tc(e,t,n)}},ic=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function ac(e){return{point:{x:e.pageX,y:e.pageY}}}var oc=e=>t=>ic(t)&&e(t,ac(t));function sc(e,t,n,r){return js(e,t,oc(n),r)}var cc=new WeakMap,lc,uc=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:fa(r)&&`getBBox`in r?r.getBBox()[t]:r[n],dc=uc(`inline`,`width`,`offsetWidth`),fc=uc(`block`,`height`,`offsetHeight`);function pc({target:e,borderBoxSize:t}){cc.get(e)?.forEach(n=>{n(e,{get width(){return dc(e,t)},get height(){return fc(e,t)}})})}function mc(e){e.forEach(pc)}function hc(){typeof ResizeObserver<`u`&&(lc=new ResizeObserver(mc))}function gc(e,t){lc||hc();let n=ga(e);return n.forEach(e=>{let n=cc.get(e);n||(n=new Set,cc.set(e,n)),n.add(t),lc?.observe(e)}),()=>{n.forEach(e=>{let n=cc.get(e);n?.delete(t),n?.size||lc?.unobserve(e)})}}var _c=new Set,vc;function yc(){vc=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};_c.forEach(t=>t(e))},window.addEventListener(`resize`,vc)}function bc(e){return _c.add(e),vc||yc(),()=>{_c.delete(e),!_c.size&&typeof vc==`function`&&(window.removeEventListener(`resize`,vc),vc=void 0)}}function xc(e,t){return ma(typeof e==`function`?bc(e):gc(e,t))}var Sc=(e,t)=>Math.abs(e-t);function Cc(e,t){let n=Sc(e.x,t.x),r=Sc(e.y,t.y);return Math.sqrt(n**2+r**2)}var wc=new Set([`auto`,`scroll`]),Tc=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ec(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Oc(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Cc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:De.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Ec(t,this.transformPagePoint),this.hasPendingMove=!0,Wt.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Oc(e.type===`pointercancel`?this.lastMoveEventInfo:Ec(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ic(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Ec(ac(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=we;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Oc(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=re(sc(this.contextWindow,`pointermove`,this.handlePointerMove,d),sc(this.contextWindow,`pointerup`,this.handlePointerUp,d),sc(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(wc.has(e.overflowX)||wc.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Wt.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Gt(this.updatePoint)}};function Ec(e,t){return t?{point:t(e.point)}:e}function Dc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Oc({point:e},t){return{point:e,delta:Dc(e,Ac(t)),offset:Dc(e,kc(t)),velocity:jc(t,.1)}}function kc(e){return e[0]}function Ac(e){return e[e.length-1]}function jc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Ac(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ae(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ae(t)*2&&(r=e[1]);let a=M(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var Mc=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Nc(e){return Mc.has(e.tagName)||e.isContentEditable===!0}var Pc=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Fc(e){return Pc.has(e.tagName)||e.isContentEditable===!0}var Ic={x:!1,y:!1};function Lc(){return Ic.x||Ic.y}function Rc(e){return e===`x`||e===`y`?Ic[e]?null:(Ic[e]=!0,()=>{Ic[e]=!1}):Ic.x||Ic.y?null:(Ic.x=Ic.y=!0,()=>{Ic.x=Ic.y=!1})}function zc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?I(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?I(n,e,r.max):Math.min(e,n)),e}function Bc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Vc(e,{top:t,left:n,bottom:r,right:i}){return{x:Bc(e.x,n,i),y:Bc(e.y,t,r)}}function Hc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Uc(e,t){return{x:Hc(e.x,t.x),y:Hc(e.y,t.y)}}function Wc(e,t){let n=.5,r=_o(e),i=_o(t);return i>r?n=j(t.min,t.max-r,e.min):r>i&&(n=j(e.min,e.max-i,t.min)),D(0,1,n)}function Gc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Kc=.35;function qc(e=Kc){return e===!1?e=0:e===!0&&(e=Kc),{x:Jc(e,`left`,`right`),y:Jc(e,`top`,`bottom`)}}function Jc(e,t,n){return{min:Yc(e,t),max:Yc(e,n)}}function Yc(e,t){return typeof e==`number`?e:e[t]||0}var Xc=new WeakMap,Zc=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Rc(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ko(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Me(t)&&(t=Li(t,this.visualElement.current)||0),F.test(t))t=parseFloat(t);else if(Xe.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=_o(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&Wt.update(()=>i(e,t),!1,!0),Yi(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=rl(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&Wt.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Tc(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&Wt.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!nl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=zc(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;Qc(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Vc(n.layoutBox,e):!1,this.elastic=qc(t),r!==this.constraints&&!Qc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ko(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Gc(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!Qc(e))return!1;let n=$c(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=Wa(n,r.root,this.visualElement.getTransformPagePoint()),a=Uc(r.layout.layoutBox,i);if(t){let e=t(Ta(a));this.hasMutatedConstraints=!!e,e&&(a=wa(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=Ko(s=>{if(!nl(s,t||n,this.currentDirection))return;let l=c&&c[s]||{};(o===!0||o===s)&&(l={min:0,max:0});let u=i?200:1e6,d=i?40:1e7,f={type:`inertia`,velocity:r?e[s]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(s,f)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Yi(this.visualElement,e),n.start(Pi(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ko(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();Ko(e=>{if(!nl(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-I(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Qc(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Ko(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Wc({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ko(t=>{let n=this.getAxisMotionValue(t);if(!nl(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(I(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Xc.set(this.visualElement,this);let e=this.visualElement.current,t=sc(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Fc(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=Qc(t)&&$c(t);r&&(this.constraints=this.resolveRefConstraints(),n||=tl(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Wt.read(r);let o=js(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ko(t=>{if(!nl(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.readProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Kc,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Qc(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var $c=e=>`current`in e?e.current:e;function el(e){let t=!0;return()=>{t?t=!1:e()}}function tl(e,t,n){let r=xc(e,el(n)),i=xc(t,el(n));return()=>{r(),i()}}function nl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function rl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function il(e,t){let n=ga(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},ma(()=>r.abort())]}function al(e){return!(e.pointerType===`touch`||Lc())}function ol(e,t,n={}){t=ha(t);let[r,i,a]=il(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!al(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var sl=(e,t)=>t?e===t||sl(e,t.parentElement):!1,cl=new WeakSet;function ll(e){return t=>{t.key===`Enter`&&e(t)}}function ul(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var dl=(e,t)=>{let n=!1,r=ll(()=>{cl.has(e)||(n=!0,ul(e,`down`))}),i=ll(()=>{n&&(n=!1,ul(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&ul(e,`cancel`)},{...t,once:!0})};function fl(e){return ic(e)&&!Lc()}var pl=new WeakSet;function ml(e,t,n={}){t=ha(t);let[r,i,a]=il(e,n),o=e=>{let r=e.currentTarget;if(!fl(e)||pl.has(e))return;cl.add(r),n.stopPropagation&&pl.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),cl.has(r)&&cl.delete(r),fl(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||sl(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),da(e)&&(e.addEventListener(`focus`,()=>dl(e,i),i),!Nc(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var hl=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},gl=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),_l=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function vl(e,t,n,r){$s(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(gl.has(n)?n:_a(n),t.attrs[n])}function yl(e,t,n){let r=tc(e,t,n);for(let n in e)if(n!==`children`&&(qi(e[n])||qi(t[n]))){let t=ar.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var bl=class extends Qs{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(e,t){return or.has(t)?super.getBaseTargetFromProps(e,t)??tr(t):e[t]}getDefaultValue(e){return or.has(e)?this.latestValues[e]??tr(e):void 0}readValueFromInstance(e,t){if(or.has(t)){let e=Un(t);return e&&e.default||0}if(Sa.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=gl.has(t)?t:_a(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return yl(e,t,n)}build(e,t,n){Ca(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){vl(e,t,n,r)}mount(e){this.isSVGTag=_l(e.tagName),super.mount(e)}};function xl(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Sl=[...Rs].reverse();function Cl(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>na(e,t,n))),n=Tl(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(Sl.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?Ls(g)||g===!1?g:void 0:h,v=Ls(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||Is(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=wl(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=Bi(e,n,Vi(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:E}=i;for(let t in{...E,...T}){if(t in f)continue;let n=T[t],r=E[t],a=Array.isArray(n)&&Array.isArray(r)?!xl(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=Bi(s,n)?.transition?.delayChildren;r.delay=yi(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&Bi(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!qi(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Tl(),i=!0}}}function wl(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!xl(t,e):!1}function Tl(){let e={};for(let t of Rs)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}var El=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Dl(){let e=new Set,t=new WeakMap,n=()=>e.forEach(El);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}var Ol=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function kl(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Al(...e){return t=>{let n=!1,r=e.map(e=>{let r=kl(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():kl(e[t],null)}}}}function jl(...e){return b.useCallback(Al(...e),e)}var V=y(),Ml=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.getElement();if(da(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=da(e)&&e.offsetWidth||0,r=da(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Nl({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a,popNode:o}){let s=(0,b.useId)(),c=(0,b.useRef)(null),l=(0,b.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:u}=(0,b.useContext)(Ol),d=jl(c,a===!1?void 0:e.props?.ref??e?.ref),f=()=>c.current||o?.current?.current;return(0,b.useInsertionEffect)(()=>{let{width:e,height:o,top:c,left:d,right:p,bottom:m,direction:h}=l.current,g=f();if(t||a===!1||!g||!e||!o)return;let _=h===`rtl`,v=n===`left`?_?`right: ${p}`:`left: ${d}`:_?`left: ${d}`:`right: ${p}`,y=r===`bottom`?`bottom: ${m}`:`top: ${c}`;g.dataset.motionPopId=s;let b=g.ownerDocument,x=b.createElement(`style`);u&&(x.nonce=u);let S=i??b.head;return S.appendChild(x),x.sheet&&x.sheet.insertRule(`
10
+ [data-motion-pop-id="${s}"] {
11
+ position: absolute !important;
12
+ width: ${e}px !important;
13
+ height: ${o}px !important;
14
+ ${v}px !important;
15
+ ${y}px !important;
16
+ }
17
+ `),()=>{g.removeAttribute(`data-motion-pop-id`),S.contains(x)&&S.removeChild(x)}},[t]),(0,V.jsx)(Ml,{isPresent:t,getElement:f,sizeRef:l,pop:a,children:a===!1?e:b.cloneElement(e,{ref:d})})}var Pl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=S(Fl),d=(0,b.useId)(),f=(0,b.useRef)(),p=(0,b.useRef)(n),m=(0,b.useRef)(r);C(()=>{p.current=n,m.current=r});let h=!0,g=(0,b.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:(e,t)=>(u.set(e,!1),t&&t.parent?.presenceContext?.id!==d&&(f.current=t),()=>{u.delete(e),!p.current&&!u.size&&m.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,b.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,V.jsx)(Nl,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:f,children:e}),(0,V.jsx)(w.Provider,{value:g,children:e})};function Fl(){return new Map}function Il(e=!0){let t=(0,b.useContext)(w);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Ll=e=>e.key||``;function Rl(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var zl=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=Il(o),f=(0,b.useMemo)(()=>Rl(e),[e]),p=o&&!u?[]:f.map(Ll),m=(0,b.useRef)(!0),h=S(()=>new Map),g=(0,b.useRef)(new Set),[_,v]=(0,b.useState)(f),[y,w]=(0,b.useState)(f);C(()=>{o&&!u&&!y.length&&d?.()},[u,o,y.length,d]);let T=(0,b.useRef)();(0,b.useEffect)(()=>()=>{let e=T.current;T.current=void 0,e?.()},[y]),C(()=>{m.current=!1;for(let e=0;e<y.length;e++){let t=Ll(y[e]);p.includes(t)?(h.delete(t),g.current.delete(t)):h.get(t)!==!0&&h.set(t,!1)}},[y,p.length,p.join(`-`)]);let E=[];if(f!==_){let e=[...f],t=0;for(let n of y){let r=p.indexOf(Ll(n));r===-1?(e.splice(t++,0,n),E.push(n)):t=r+E.length+1}return E.every(e=>h.get(Ll(e)))?e=f:a===`wait`&&(e=E),w(Rl(e)),v(f),null}let{forceRender:D}=(0,b.useContext)(x);return(0,V.jsx)(V.Fragment,{children:y.map(e=>{let _=Ll(e),b=o&&!u?!1:f===y||p.includes(_);return(0,V.jsx)(Pl,{isPresent:b,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(g.current.has(_))return;if(h.has(_))g.current.add(_),h.set(_,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(D?.(),v([]),o&&d?.(),T.current=r)},anchorX:s,anchorY:c,children:e},_)})})},Bl=(0,b.createContext)(null);function Vl(){let e=(0,b.useRef)(!1);return C(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Hl(){let e=Vl(),[t,n]=(0,b.useState)(0),r=(0,b.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,b.useCallback)(()=>Wt.postRender(r),[r]),t]}var Ul=e=>e===!0,Wl=e=>Ul(e===!0)||e===`id`,Gl=({children:e,id:t,inherit:n=!0})=>{let r=(0,b.useContext)(x),i=(0,b.useContext)(Bl),[a,o]=Hl(),s=(0,b.useRef)(null),c=r.id||i;s.current===null&&(Wl(n)&&c&&(t=t?c+`-`+t:c),s.current={id:t,group:Ul(n)&&r.group||Dl()});let l=(0,b.useMemo)(()=>({...s.current,forceRender:a}),[o]);return(0,V.jsx)(x.Provider,{value:l,children:e})},Kl=(0,b.createContext)({strict:!1}),ql={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Jl=!1;function Yl(){if(Jl)return;let e={};for(let t in ql)e[t]={isEnabled:e=>ql[t].some(t=>!!e[t])};Ys(e),Jl=!0}function Xl(){return Yl(),Xs()}function Zl(e){let t=Xl();for(let n in e)t[n]={...t[n],...e[n]};Ys(t)}var Ql=(0,b.createContext)({});function $l(e,t){if(Bs(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Ls(t)?t:void 0,animate:Ls(n)?n:void 0}}return e.inherit===!1?{}:t}function eu(e){let{initial:t,animate:n}=$l(e,(0,b.useContext)(Ql));return(0,b.useMemo)(()=>({initial:t,animate:n}),[tu(t),tu(n)])}function tu(e){return Array.isArray(e)?e.join(` `):e}var nu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ru(e,t,n){for(let r in t)!qi(t[r])&&!ec(r,n)&&(e[r]=t[r])}function iu({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=nu();return va(n,t,e),Object.assign({},n.vars,n.style)},[t])}function au(e,t){let n=e.style||{},r={};return ru(r,n,e),Object.assign(r,iu(e,t)),r}function ou(e,t){let n={},r=au(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var su=()=>({...nu(),attrs:{}});function cu(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=su();return Ca(n,t,_l(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return ru(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var lu=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function uu(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||lu.has(e)}function du(e,t){return e.startsWith(`on`)?!uu(e):t?.(e)??!uu(e)}function fu(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||qi(e[a])||(du(a,r)||n===!0&&uu(a)||!t&&!uu(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var pu=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function mu(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(pu.indexOf(e)>-1||/[A-Z]/u.test(e))}function hu(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??mu(e)?cu:ou)(t,r,i,e),l=fu(t,typeof e==`string`,a,s),u=e===b.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,b.useMemo)(()=>qi(d)?d.get():d,[d]);return(0,b.createElement)(e,{...u,children:f})}function gu({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:_u(n,r,i,e),renderState:t()}}function _u(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Qa(a[e]);let{initial:o,animate:s}=e,c=Bs(e),l=Vs(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Is(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=zi(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var vu=e=>(t,n)=>{let r=(0,b.useContext)(Ql),i=(0,b.useContext)(w),a=()=>gu(e,t,r,i);return n?a():S(a)},yu=vu({scrapeMotionValuesFromProps:tc,createRenderState:nu}),bu=vu({scrapeMotionValuesFromProps:yl,createRenderState:su}),xu=Symbol.for(`motionComponentSymbol`);function Su(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Cu=(0,b.createContext)({});function wu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Tu(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(Ql),s=(0,b.useContext)(Kl),c=(0,b.useContext)(w),l=(0,b.useContext)(Ol),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(Cu);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Eu(f.current,n,i,h),(0,b.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[Xi],_=(0,b.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return C(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),C(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function Eu(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t,f=e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Du(e.parent));f.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&wu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u});let p=f.getStack()?.lead;p&&!f.root.isUpdateBlocked()&&(p.willUpdate(),p.scheduleCheckAfterUnmount())}function Du(e){if(e)return e.options.allowProjection===!1?Du(e.parent):e.projection}function Ou(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Zl(r);let a=n?n===`svg`:mu(e),o=a?bu:yu;function s(n,s){let c,l=ku(n);S(()=>!!Ns.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,b.useContext)(Ol),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=eu(n),m=o(n,d);if(!d&&typeof window<`u`){Au(u,r);let t=ju(u);c=t.MeasureLayout,p.visualElement=Tu(e,m,u,i,t.ProjectionNode,a)}return(0,V.jsxs)(Ql.Provider,{value:p,children:[c&&p.visualElement?(0,V.jsx)(c,{visualElement:p.visualElement,...u}):null,hu(e,n,Su(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[xu]=e,c}function ku({layoutId:e}){let t=(0,b.useContext)(x).id;return t&&e!==void 0?t+`-`+e:e}function Au(e,t){(0,b.useContext)(Kl).strict}function ju(e){let{drag:t,layout:n}=Xl();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Mu(e,t){if(typeof Proxy>`u`)return Ou;let n=new Map,r=(n,r)=>Ou(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ou(a,void 0,e,t)),n.get(a))})}var Nu=(e,t)=>t.isSVG??mu(e)?new bl(t):new rc(t,{allowProjection:e!==b.Fragment}),Pu=class extends hl{constructor(e){super(e),e.animationState||=Cl(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Is(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Fu=0,Iu={animation:{Feature:Pu},exit:{Feature:class extends hl{constructor(){super(...arguments),this.id=Fu++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Bi(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},Lu=class extends hl{constructor(e){super(e),this.removeGroupControls=A,this.removeListeners=A,this.controls=new Zc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||A}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ru=({current:e})=>e?e.ownerDocument.defaultView:null,zu=e=>(t,n)=>{e&&Wt.update(()=>e(t,n),!1,!0)},Bu=class extends hl{constructor(){super(...arguments),this.removePointerDownListener=A}onPointerDown(e){this.session=new Tc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ru(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:zu(e),onStart:zu(t),onMove:zu(n),onEnd:(e,t)=>{delete this.session,r&&Wt.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=sc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Vu=!1,Hu=({layout:e,layoutDependency:t})=>({layout:e,layoutDependency:t,animationType:typeof e==`string`?e:`both`}),Uu=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Vu&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,...Hu(this.props),onExitComplete:()=>this.safeToRemove()})),Yo.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layout:t,layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,(e.layoutDependency!==n||e.layout!==t)&&o.setOptions({...o.options,...Hu(this.props)}),Vu=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Wt.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Ga.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Vu=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Wu(e){let[t,n]=Il(),r=(0,b.useContext)(x);return(0,V.jsx)(Uu,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(Cu),isPresent:t,safeToRemove:n})}var Gu={pan:{Feature:Bu},drag:{Feature:Lu,ProjectionNode:Ps,MeasureLayout:Wu}};function Ku(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&Wt.postRender(()=>i(t,ac(t)))}var qu=class extends hl{mount(){let{current:e}=this.node;e&&(this.unmount=ol(e,(e,t)=>(Ku(this.node,t,`Start`),e=>Ku(this.node,e,`End`))))}unmount(){}},Ju=class extends hl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=re(js(this.node.current,`focus`,()=>this.onFocus()),js(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Yu(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&Wt.postRender(()=>i(t,ac(t)))}var Xu=class extends hl{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=ml(e,(e,t)=>(Yu(this.node,t,`Start`),(e,{success:t})=>Yu(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Zu=new WeakMap,Qu=new WeakMap,$u=e=>{let t=Zu.get(e.target);t&&t(e)},ed=e=>{e.forEach($u)};function td({root:e,...t}){let n=e||document;Qu.has(n)||Qu.set(n,{});let r=Qu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ed,{root:e,...t})),r[i]}function nd(e,t,n){let r=td(t);return Zu.set(e,n),r.observe(e),()=>{Zu.delete(e),r.unobserve(e)}}var rd={some:0,all:1},H=class extends hl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:rd[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=nd(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(id(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function id({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var U=Mu(Object.assign({},Iu,{inView:{Feature:H},tap:{Feature:Xu},focus:{Feature:Ju},hover:{Feature:qu}},Gu,{layout:{ProjectionNode:Ps,MeasureLayout:Wu}}),Nu),W=_(),G=U,ad=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function od(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:ad(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var sd=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},cd=e=>{let t=sd(e);return t.charAt(0).toUpperCase()+t.slice(1)},ld=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ud={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function dd(e){return e!=null}function fd(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??ud.width,a=e.size??e.height??ud.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?ld(...c):ld(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??ud[`stroke-width`])*Number(e.size??e.width??ud.width)/Number(t.size??t.width??ud.width):t.strokeWidth??ud[`stroke-width`];return[`svg`,{...Object.entries(ud).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&dd(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&dd(t.width)&&{[r(`width`)]:t.width},...`height`in t&&dd(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function pd(e,t={}){return fd(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var md=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},hd=(0,b.createContext)({}),gd=()=>(0,b.useContext)(hd),_d=(0,b.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=gd()??{},y=!!c||md(d),[x,S,C=[]]=pd(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:ld(v,s),hasA11yProp:y,attributes:d});return(0,b.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function K(e,t=[],n=[]){let r=typeof e==`string`?od(e,t,n):e,i=(0,b.forwardRef)(({className:e,...t},n)=>(0,b.createElement)(_d,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=cd(r.name)),i}var vd={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};vd.node;var yd=K(vd),bd={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};bd.node;var xd=K(bd),Sd={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Sd.node;var Cd=K(Sd),wd={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};wd.node;var Td=K(wd),Ed={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};Ed.node;var Dd=K(Ed),Od={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};Od.node;var kd=K(Od),Ad={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Ad.node;var jd=K(Ad),Md={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Md.node;var Nd=K(Md),Pd={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Pd.node;var Fd=K(Pd),Id={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Id.node;var Ld=K(Id),Rd={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};Rd.node;var zd=K(Rd),Bd={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};Bd.node;var Vd=K(Bd),Hd={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};Hd.node;var Ud=K(Hd),Wd={name:`circle-pause`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]],aliases:[`pause-circle`]};Wd.node;var Gd=K(Wd),Kd={name:`circle-stop`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]],aliases:[`stop-circle`]};Kd.node;var qd=K(Kd),Jd={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Jd.node;var Yd=K(Jd),Xd={name:`clipboard-list`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]};Xd.node;var Zd=K(Xd),Qd={name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]};Qd.node;var $d=K(Qd),ef={name:`coins`,size:24,node:[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]};ef.node;var tf=K(ef),nf={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};nf.node;var rf=K(nf),af={name:`crown`,size:24,node:[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]};af.node;var of=K(af),sf={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};sf.node;var cf=K(sf),lf={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};lf.node;var uf=K(lf),df={name:`eraser`,size:24,node:[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]};df.node;var ff=K(df),pf={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};pf.node;var mf=K(pf),hf={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};hf.node;var gf=K(hf),_f={name:`file-spreadsheet`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]};_f.node;var vf=K(_f),yf={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};yf.node;var bf=K(yf),xf={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};xf.node;var Sf=K(xf),Cf={name:`folder-input`,size:24,node:[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]};Cf.node;var wf=K(Cf),Tf={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};Tf.node;var Ef=K(Tf),Df={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Df.node;var Of=K(Df),kf={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};kf.node;var Af=K(kf),jf={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};jf.node;var Mf=K(jf),Nf={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Nf.node;var Pf=K(Nf),Ff={name:`hard-drive`,size:24,node:[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]};Ff.node;var If=K(Ff),Lf={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};Lf.node;var Rf=K(Lf),zf={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};zf.node;var Bf=K(zf),Vf={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Vf.node;var Hf=K(Vf),Uf={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};Uf.node;var Wf=K(Uf),Gf={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Gf.node;var Kf=K(Gf),q={name:`lock-open`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]],aliases:[`unlock`]};q.node;var qf=K(q),Jf={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};Jf.node;var Yf=K(Jf),Xf={name:`message-circle-question-mark`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`message-circle-question`]};Xf.node;var Zf=K(Xf),Qf={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};Qf.node;var $f=K(Qf),ep={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};ep.node;var tp=K(ep),np={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};np.node;var rp=K(np),ip={name:`octagon-alert`,size:24,node:[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]],aliases:[`alert-octagon`]};ip.node;var ap=K(ip),op={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};op.node;var sp=K(op),cp={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};cp.node;var lp=K(cp),up={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};up.node;var dp=K(up),fp={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};fp.node;var pp=K(fp),mp={name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]};mp.node;var hp=K(mp),gp={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};gp.node;var _p=K(gp),vp={name:`power`,size:24,node:[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]};vp.node;var yp=K(vp),bp={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};bp.node;var xp=K(bp),Sp={name:`repeat`,size:24,node:[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]};Sp.node;var Cp=K(Sp),wp={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};wp.node;var Tp=K(wp),Ep={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};Ep.node;var Dp=K(Ep),Op={name:`scale`,size:24,node:[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]};Op.node;var kp=K(Op),Ap={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Ap.node;var jp=K(Ap),Mp={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};Mp.node;var Np=K(Mp),Pp={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};Pp.node;var Fp=K(Pp),Ip={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Ip.node;var Lp=K(Ip),Rp={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};Rp.node;var zp=K(Rp),Bp={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Bp.node;var Vp=K(Bp),Hp={name:`shield-question-mark`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`shield-question`]};Hp.node;var Up=K(Hp),Wp={name:`square-kanban`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 7v7`,key:`1x2jlm`}],[`path`,{d:`M12 7v4`,key:`xawao1`}],[`path`,{d:`M16 7v9`,key:`1hp2iy`}]],aliases:[`kanban-square`]};Wp.node;var Gp=K(Wp),Kp={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Kp.node;var qp=K(Kp),Jp={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};Jp.node;var Yp=K(Jp),Xp={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Xp.node;var Zp=K(Xp),Qp={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Qp.node;var $p=K(Qp);function em(e){return e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(+(e<1e4))}k`:`${(e/1e6).toFixed(1)}M`}function tm(e){return e.input+e.output+e.reasoning+e.cacheRead+e.cacheWrite}var nm=`symbio:token`,rm=(()=>{let e=new URL(location.href),t=e.searchParams.get(`token`);return t&&(localStorage.setItem(nm,t),e.searchParams.delete(`token`),history.replaceState(null,``,e.pathname+e.search+e.hash)),localStorage.getItem(nm)??``})();function im(e,t,n){am(`/api/projects/${e}/docs/raw?path=${encodeURIComponent(t)}`,t.split(`/`).pop()??`file`,{page:n})}function am(e,t,n={}){let r=n.download?null:window.open(``,`_blank`);fetch(e,{headers:{"x-symbio-token":rm}}).then(async e=>{if(!e.ok)throw Error((await e.json().catch(()=>null))?.error??e.statusText);let i=(e.headers.get(`content-disposition`)??``).startsWith(`inline`),a=URL.createObjectURL(await e.blob());if(i&&r){r.location.href=a+(n.page?`#page=${n.page}`:``);return}r?.close();let o=document.createElement(`a`);o.href=a,o.download=t,o.click(),setTimeout(()=>URL.revokeObjectURL(a),6e4)}).catch(e=>{r?.close(),alert(`Couldn't open ${t}: ${e.message}`)})}var om=(e,t)=>`/api/projects/${e}/attachments/${t}/file`;function sm(e,t,n=!1){am(om(e,t.id),t.name,{download:n})}var cm=new Map;function lm(e,t){let n=cm.get(t);return n||(n=fetch(om(e,t),{headers:{"x-symbio-token":rm}}).then(async e=>{if(!e.ok)throw Error(e.statusText);return URL.createObjectURL(await e.blob())}),n.catch(()=>cm.delete(t)),cm.set(t,n)),n}function um(e,t,n){return new Promise((r,i)=>{let a=new FormData;for(let e of t)a.append(`files`,e,e.name||`pasted.png`);let o=new XMLHttpRequest;o.open(`POST`,`/api/projects/${e}/attachments`),o.setRequestHeader(`x-symbio-token`,rm),o.upload.onprogress=e=>e.lengthComputable&&n?.(e.loaded/e.total),o.onload=()=>{let e=(()=>{try{return JSON.parse(o.responseText)}catch{return{}}})();o.status>=200&&o.status<300?r(e):i(Error(e.error??`Upload failed (${o.status})`))},o.onerror=()=>i(Error(`Upload failed (connection)`)),o.send(a)})}var dm=`symbio:locked`;async function J(e,t,n){let r=await fetch(`/api${t}`,{method:e,headers:{"x-symbio-token":rm,...n===void 0?{}:{"content-type":`application/json`}},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));if(r.status===401&&i.code===`locked`&&dispatchEvent(new Event(dm)),r.status===401&&i.code===`remote-login`&&(location.href=`/remote-login`),!r.ok)throw Error(i.error??r.statusText);return i}var Y={runtime:()=>J(`GET`,`/runtime`),models:()=>J(`GET`,`/models`),projects:()=>J(`GET`,`/projects`),project:e=>J(`GET`,`/projects/${e}`),inspect:e=>J(`GET`,`/inspect?dir=${encodeURIComponent(e)}`),pickFolder:e=>J(`POST`,`/pick-folder`,{initial:e}),listDirs:e=>J(`GET`,`/fs/dirs${e?`?path=${encodeURIComponent(e)}`:``}`),providers:()=>J(`GET`,`/providers`),connectProviderKey:(e,t,n)=>J(`POST`,`/providers/${encodeURIComponent(e)}/key`,{key:t,answer:n}),beginProviderOauth:(e,t,n)=>J(`POST`,`/providers/${encodeURIComponent(e)}/oauth`,{methodID:t,answer:n}),providerOauthStatus:(e,t)=>J(`GET`,`/providers/${encodeURIComponent(e)}/oauth/${encodeURIComponent(t)}`),completeProviderOauth:(e,t,n)=>J(`POST`,`/providers/${encodeURIComponent(e)}/oauth/${encodeURIComponent(t)}/complete`,{code:n}),cancelProviderOauth:(e,t)=>J(`DELETE`,`/providers/${encodeURIComponent(e)}/oauth/${encodeURIComponent(t)}`),removeProviderLogin:e=>J(`DELETE`,`/providers/logins/${encodeURIComponent(e)}`),createProject:e=>J(`POST`,`/projects`,e),permissions:e=>J(`GET`,`/projects/${e}/permissions`),answerPermission:(e,t,n,r)=>J(`POST`,`/projects/${e}/permissions/${t}`,{decision:n,note:r}),approvals:e=>J(`GET`,`/projects/${e}/approvals`),decideApproval:(e,t,n,r)=>J(`POST`,`/projects/${e}/approvals/${t}`,{approved:n,note:r}),rules:e=>J(`GET`,`/projects/${e}/rules`),searchDocs:(e,t)=>J(`GET`,`/projects/${e}/docs/search?q=${encodeURIComponent(t)}`),docs:e=>J(`GET`,`/projects/${e}/docs`),readDoc:(e,t)=>J(`GET`,`/projects/${e}/docs/file?path=${encodeURIComponent(t)}`),writeDoc:(e,t,n)=>J(`PUT`,`/projects/${e}/docs/file`,{path:t,content:n}),updateProject:(e,t)=>J(`PATCH`,`/projects/${e}`,t),connections:()=>J(`GET`,`/connections`),createConnection:e=>J(`POST`,`/connections`,e),updateConnection:(e,t)=>J(`PATCH`,`/connections/${e}`,t),deleteConnection:e=>J(`DELETE`,`/connections/${e}`),testConnection:e=>J(`POST`,`/connections/${e}/test`),deleteProject:(e,t)=>J(`DELETE`,`/projects/${e}?deleteData=${t}`),start:e=>J(`POST`,`/projects/${e}/start`),history:(e,t)=>J(`GET`,`/projects/${e}/agents/${t}/history`),projectUsage:e=>J(`GET`,`/projects/${e}/usage`),prices:()=>J(`GET`,`/prices`),update:()=>J(`GET`,`/update`),checkUpdate:()=>J(`POST`,`/update/check`),setUpdateMode:e=>J(`PUT`,`/update/settings`,{mode:e}),applyUpdate:()=>J(`POST`,`/update/apply`,{force:!0}),remote:()=>J(`GET`,`/remote`),startRemote:()=>J(`POST`,`/remote/start`),stopRemote:()=>J(`POST`,`/remote/stop`),housekeeping:e=>J(`GET`,`/projects/${e}/housekeeping`),checkHousekeeping:e=>J(`POST`,`/projects/${e}/housekeeping/check`),cleanHelper:(e,t)=>J(`POST`,`/projects/${e}/agents/${t}/clean`),setPrice:(e,t)=>J(`PUT`,`/prices`,{model:e,price:t}),historyPage:(e,t,n,r,i)=>J(`GET`,`/projects/${e}/agents/${t}/history?limit=${n}${r?`&before=${encodeURIComponent(r)}`:``}${i?`&session=${encodeURIComponent(i)}`:``}`),renewSession:(e,t)=>J(`POST`,`/projects/${e}/agents/${t}/renew`),send:(e,t,n,r=!1,i=[])=>J(`POST`,`/projects/${e}/agents/${t}/messages`,{text:n,urgent:r,attachments:i}),attachments:e=>J(`GET`,`/projects/${e}/attachments`),deleteAttachment:(e,t)=>J(`DELETE`,`/projects/${e}/attachments/${t}`),interrupt:(e,t)=>J(`POST`,`/projects/${e}/agents/${t}/interrupt`),renameAgent:(e,t,n)=>J(`POST`,`/projects/${e}/agents/${t}/rename`,{name:n}),setAgentModel:(e,t,n)=>J(`POST`,`/projects/${e}/agents/${t}/model`,{model:n}),restartAgent:(e,t)=>J(`POST`,`/projects/${e}/agents/${t}/restart`),moveToProjectFolder:(e,t)=>J(`POST`,`/projects/${e}/agents/${t}/move-to-project-folder`),stopAgent:(e,t)=>J(`POST`,`/projects/${e}/agents/${t}/stop`),forms:(e,t)=>J(`GET`,`/projects/${e}/agents/${t}/forms`),answerForm:(e,t,n,r,i)=>J(`POST`,`/projects/${e}/agents/${t}/forms/${n}`,{answer:r,summary:i}),log:e=>J(`GET`,`/projects/${e}/log`),assets:e=>J(`GET`,`/projects/${e}/assets`),retryModels:e=>J(`POST`,`/projects/${e}/retry-models`),pauseTeam:e=>J(`POST`,`/projects/${e}/pause`),resumeTeam:e=>J(`POST`,`/projects/${e}/resume`),pauseAll:()=>J(`POST`,`/pause-all`),plan:e=>J(`GET`,`/projects/${e}/plan`),decidePlan:(e,t,n)=>J(`POST`,`/projects/${e}/plan/decision`,{approved:t,feedback:n})},fm=new Set,pm=!1,mm=e=>{for(let t of fm)t(e)};function hm(e){if(fm.add(e),!pm){pm=!0;let e=!1,t=new EventSource(`/api/events?token=${encodeURIComponent(rm)}`);t.onmessage=t=>{e=!0,t.data&&mm(JSON.parse(t.data))},t.addEventListener(`ping`,()=>e=!0),setTimeout(()=>{e||(t.close(),gm())},6e3)}return()=>fm.delete(e)}async function gm(){let e=null;for(;;)try{let t=await J(`GET`,e===null?`/events/poll`:`/events/poll?after=${e}`);t.gap&&location.reload(),e=t.seq,t.events.forEach(mm)}catch{await new Promise(e=>setTimeout(e,3e3))}}function _m({type:e,small:t}){let n=t?12:15;return(0,V.jsx)(`span`,{className:`conn-icon ${t?`sm`:``}`,children:e===`github`?(0,V.jsx)(Mf,{size:n}):e===`azure`?(0,V.jsx)($d,{size:n}):(0,V.jsx)(Fp,{size:n})})}function vm(e){return e.type===`github`?e.account?`GitHub · ${e.account}`:`GitHub`:e.type===`azure`?`Azure DevOps · ${e.organization}${e.account?` · ${e.account}`:``}`:`${e.username}@${e.host}`}function ym({value:e,onChange:t}){let[n,r]=(0,b.useState)(null);if((0,b.useEffect)(()=>{Y.connections().then(r).catch(()=>r([]))},[]),!n)return(0,V.jsx)(`div`,{className:`subtle small`,children:`Loading connections…`});if(n.length===0)return(0,V.jsxs)(`div`,{className:`subtle small`,children:[`No connections yet — add GitHub, Azure DevOps or servers in `,(0,V.jsx)(`a`,{className:`link`,href:`#/settings`,children:`Settings`}),`.`]});let i=t=>e.find(e=>e.id===t),a=n=>t(i(n)?e.filter(e=>e.id!==n):[...e,{id:n,policy:`ask`}]),o=(n,r)=>t(e.map(e=>e.id===n?{...e,policy:r}:e));return(0,V.jsx)(`div`,{children:n.map(e=>{let t=i(e.id);return(0,V.jsxs)(`div`,{className:`pick-row ${t?`on`:``}`,children:[(0,V.jsxs)(`label`,{className:`pick-main`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:!!t,onChange:()=>a(e.id)}),(0,V.jsx)(_m,{type:e.type,small:!0}),(0,V.jsxs)(`span`,{className:`grow ellipsis`,children:[(0,V.jsx)(`span`,{style:{fontWeight:500},children:e.name}),` `,(0,V.jsx)(`span`,{className:`subtle small`,children:vm(e)})]})]}),t&&(0,V.jsxs)(`div`,{className:`seg`,children:[(0,V.jsx)(`button`,{className:t.policy===`ask`?`on`:``,onClick:()=>o(e.id,`ask`),title:`Every action waits for your approval`,children:`Ask me`}),(0,V.jsx)(`button`,{className:t.policy===`allow`?`on`:``,onClick:()=>o(e.id,`allow`),title:`Agents act without asking`,children:`Allowed`})]})]},e.id)})})}var bm={documents:`documents`,spreadsheets:`spreadsheets`,presentations:`presentations`,images:`images`,"audio-video":`audio/video`,code:`code`,data:`data`,archives:`archives`,other:`other`};function xm(e){return e<1024?`${e} B`:e<1024**2?`${(e/1024).toFixed(1)} KB`:e<1024**3?`${(e/1024**2).toFixed(1)} MB`:`${(e/1024**3).toFixed(2)} GB`}function Sm({inspection:e}){let t=Object.entries(e.kinds).sort((e,t)=>t[1]-e[1]),n=t.reduce((e,[,t])=>e+t,0)||1,r;return r=e.exists?e.empty?`Empty folder — a new project`:`Existing folder · ${e.fileCount}${e.truncated?`+`:``} files · ${xm(e.totalBytes)}`:`New folder — it will be created`,(0,V.jsxs)(G.div,{className:`folder-summary`,initial:{opacity:0,y:-4},animate:{opacity:1,y:0},children:[(0,V.jsxs)(`div`,{className:`folder-headline`,children:[e.empty||!e.exists?(0,V.jsx)(Of,{size:15}):(0,V.jsx)(Ef,{size:15}),(0,V.jsx)(`strong`,{children:r}),e.isGit&&(0,V.jsxs)(`span`,{className:`tag`,children:[(0,V.jsx)(Mf,{}),`git`]}),e.repos.length>0&&(0,V.jsxs)(`span`,{className:`tag`,title:e.repos.join(`
18
+ `),children:[(0,V.jsx)(Mf,{}),e.repos.length===1?`1 repository inside`:`${e.repos.length} repositories inside`]}),e.guidance.map(e=>(0,V.jsxs)(`span`,{className:`tag`,children:[(0,V.jsx)(bf,{}),e]},e))]}),t.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`kind-bar`,children:t.map(([e,t],r)=>(0,V.jsx)(G.span,{className:`kind-seg k${r%6}`,initial:{width:0},animate:{width:`${t/n*100}%`},transition:{duration:.5,delay:r*.05},title:`${bm[e]??e}: ${t}`},e))}),(0,V.jsx)(`div`,{className:`kind-legend`,children:t.map(([e,t],n)=>(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`i`,{className:`k${n%6}`}),bm[e]??e,` `,t]},e))})]}),e.topLevel.length>0&&(0,V.jsxs)(`div`,{className:`top-level`,title:`Top-level contents`,children:[e.topLevel.slice(0,14).join(` · `),e.topLevel.length>14&&` · …`]})]})}function Cm({start:e,onPick:t,onCancel:n}){let[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(!1),l=async e=>{c(!0);try{i(await Y.listDirs(e)),o(null)}catch(e){o(e.message)}finally{c(!1)}};(0,b.useEffect)(()=>{l(e||void 0).then(()=>{})},[]);let u=(e,t)=>e.endsWith(r.sep)?e+t:e+r.sep+t;return(0,V.jsxs)(`div`,{className:`folder-browser`,children:[(0,V.jsxs)(`div`,{className:`folder-browser-head`,children:[(0,V.jsx)(`button`,{className:`btn ghost icon sm`,title:`Up one level`,disabled:!r?.parent||s,onClick:()=>l(r.parent),children:(0,V.jsx)(Cd,{size:14})}),(0,V.jsx)(`code`,{className:`folder-browser-path ellipsis`,title:r?.path,children:r?.path??`…`})]}),(0,V.jsxs)(`div`,{className:`folder-browser-places`,children:[r&&(0,V.jsxs)(`button`,{className:`btn ghost sm`,onClick:()=>l(r.home),children:[(0,V.jsx)(Rf,{size:13}),`Home`]}),r?.roots.map(e=>(0,V.jsxs)(`button`,{className:`btn ghost sm`,onClick:()=>l(e),children:[(0,V.jsx)(If,{size:13}),e]},e))]}),(0,V.jsxs)(`div`,{className:`folder-browser-list`,children:[a&&(0,V.jsx)(`div`,{className:`error`,children:a}),r?.dirs.length===0&&!a&&(0,V.jsx)(`div`,{className:`section-empty`,children:`No folders here.`}),r?.dirs.map(e=>(0,V.jsxs)(`button`,{className:`folder-browser-item`,disabled:s,onClick:()=>l(u(r.path,e)),children:[(0,V.jsx)(Af,{size:14}),(0,V.jsx)(`span`,{className:`ellipsis`,children:e})]},e))]}),(0,V.jsxs)(`div`,{className:`folder-browser-foot`,children:[(0,V.jsx)(`span`,{className:`small subtle`,children:`Open a folder, then choose it. To start somewhere new, choose its parent and add the new folder's name to the path.`}),(0,V.jsx)(`span`,{className:`spacer`}),(0,V.jsx)(`button`,{className:`btn ghost sm`,onClick:n,children:`Cancel`}),(0,V.jsx)(`button`,{className:`btn primary sm`,disabled:!r,onClick:()=>r&&t(r.path),children:`Choose this folder`})]})]})}function wm(e){let{allowed:t,coordinator:n,onChange:r}=e,[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(null),[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(!1),[m]=(0,b.useState)(()=>new Set(t));(0,b.useEffect)(()=>{Y.models().then(a).catch(e=>s(e.message))},[]);let h=(0,b.useMemo)(()=>{let e=c.toLowerCase(),t=[],n=new Map;for(let r of i??[])u&&!r.free||f&&!r.vision||e&&!r.ref.toLowerCase().includes(e)&&!r.name.toLowerCase().includes(e)||(m.has(r.ref)?t.push(r):(n.has(r.providerID)||n.set(r.providerID,[]),n.get(r.providerID).push(r)));let r=[...n.entries()].sort(([e],[t])=>e.localeCompare(t));return t.length?[[`Selected`,t],...r]:r},[i,c,u,f,m]),g=e=>{if(t.includes(e)){let i=t.filter(t=>t!==e);r(i,n===e?i[0]??``:n)}else r([...t,e],n||e)},_=e=>r(t.includes(e)?t:[...t,e],e);return o?(0,V.jsxs)(`div`,{className:`error`,children:[`Could not load models: `,o]}):i?(0,V.jsxs)(`div`,{className:`model-picker`,children:[(0,V.jsxs)(`div`,{className:`model-picker-head`,children:[(0,V.jsx)(jp,{size:14,className:`subtle`}),(0,V.jsx)(`input`,{placeholder:`Search models…`,value:c,onChange:e=>l(e.target.value)}),(0,V.jsxs)(`label`,{className:`check`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),` Free`]}),(0,V.jsxs)(`label`,{className:`check`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>p(e.target.checked)}),` Vision`]})]}),(0,V.jsx)(`div`,{className:`model-summary`,children:t.length===0?(0,V.jsx)(`span`,{className:`subtle`,children:`Select the models agents may use. Agents switch to the next one if a model fails.`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`span`,{children:[t.length,` selected ·`]}),(0,V.jsxs)(`span`,{className:`row`,style:{gap:4},children:[(0,V.jsx)(of,{size:12,style:{color:`var(--amber)`}}),`core runs on `,(0,V.jsx)(`strong`,{style:{color:`var(--text)`},children:n?(e=>i?.find(t=>t.ref===e)?.name??e)(n):`—`})]})]})}),(0,V.jsxs)(`div`,{className:`model-groups`,children:[h.map(([e,r])=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`model-group-title`,children:e}),r.map(e=>{let r=t.includes(e.ref),i=n===e.ref;return(0,V.jsxs)(`div`,{className:`model-row ${r?`on`:``}`,onClick:()=>g(e.ref),children:[(0,V.jsx)(`span`,{className:`check-box`,children:r&&(0,V.jsx)(jd,{size:11,strokeWidth:3})}),(0,V.jsxs)(`span`,{className:`model-name`,title:e.ref,children:[e.name,m.has(e.ref)&&(0,V.jsxs)(`span`,{className:`subtle`,children:[` · `,e.providerID]})]}),e.free&&(0,V.jsx)(`span`,{className:`tag green`,children:`Free`}),(0,V.jsx)(`span`,{className:`subtle`,title:e.vision?`Can read images`:void 0,style:{display:`inline-flex`,width:14,opacity:+!!e.vision},children:(0,V.jsx)(gf,{size:13})}),(0,V.jsx)(`button`,{className:`lead-btn ${i?`on`:``}`,title:i?`core runs on this model`:`Run core on this model`,onClick:t=>{t.stopPropagation(),_(e.ref)},children:(0,V.jsx)(of,{size:14})})]},e.ref)})]},e)),h.length===0&&(0,V.jsx)(`div`,{className:`section-empty`,children:`No models match.`})]})]}):(0,V.jsx)(`div`,{className:`subtle`,children:`Loading models…`})}var Tm=[`#5b5fc7`,`#2f8f6f`,`#a87326`,`#a2508f`,`#3b78cc`,`#3c8c9b`,`#8a5bb5`,`#7c7448`];function Em(e){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)>>>0;return Tm[t%Tm.length]}function Dm({name:e,status:t,size:n,kind:r=`agent`}){let i=r===`human`?`Y`:r===`system`?`S`:e.slice(0,1);return(0,V.jsxs)(`span`,{className:`avatar ${n??``} ${r===`agent`?``:r}`,style:r===`agent`?{background:Em(e)}:void 0,title:e,children:[i,t&&(0,V.jsx)(`span`,{className:`dot ${t}`})]})}function Om(e){switch(e){case`busy`:return`Working`;case`waiting`:return`Waiting for you`;case`stuck`:return`Recovering`;case`error`:return`Needs attention`;case`stopped`:return`Stopped`;default:return`Idle`}}function km({size:e=22}){return(0,V.jsxs)(`svg`,{className:`brand-logo`,width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,V.jsx)(`circle`,{cx:`9`,cy:`12`,r:`6.5`,fill:`none`,stroke:`#6d6af5`,strokeWidth:`2.2`}),(0,V.jsx)(`circle`,{cx:`15`,cy:`12`,r:`6.5`,fill:`none`,stroke:`#3fb27f`,strokeWidth:`2.2`})]})}function Am(e){(0,b.useEffect)(()=>{let t=t=>t.key===`Escape`&&e();return addEventListener(`keydown`,t),()=>removeEventListener(`keydown`,t)},[e])}function jm({title:e,subtitle:t,onClose:n,children:r,footer:i,wide:a,header:o}){return Am(n),(0,V.jsx)(G.div,{className:`backdrop`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.12},onMouseDown:e=>e.target===e.currentTarget&&n(),children:(0,V.jsxs)(G.div,{className:`dialog ${a?`wide`:``}`,initial:{opacity:0,y:8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.98},transition:{duration:.15},onClick:e=>e.stopPropagation(),children:[(0,V.jsxs)(`div`,{className:`dialog-head`,children:[(0,V.jsx)(`h2`,{children:e}),(0,V.jsx)(`button`,{className:`btn ghost icon sm`,onClick:n,"aria-label":`Close`,children:(0,V.jsx)($p,{size:15})})]}),t&&(0,V.jsx)(`div`,{className:`dialog-sub`,children:t}),o,(0,V.jsx)(`div`,{className:`dialog-body`,children:r}),i&&(0,V.jsx)(`div`,{className:`dialog-foot`,children:i})]})})}function Mm({title:e,onClose:t,children:n,actions:r}){return Am(t),(0,V.jsx)(G.div,{className:`drawer-backdrop`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:e=>e.target===e.currentTarget&&t(),children:(0,V.jsxs)(G.aside,{className:`drawer`,initial:{x:40,opacity:0},animate:{x:0,opacity:1},exit:{x:40,opacity:0},transition:{type:`spring`,stiffness:380,damping:34},children:[(0,V.jsxs)(`div`,{className:`drawer-head`,children:[(0,V.jsx)(`h2`,{children:e}),r,(0,V.jsx)(`button`,{className:`btn ghost icon sm`,onClick:t,"aria-label":`Close`,children:(0,V.jsx)($p,{size:15})})]}),(0,V.jsx)(`div`,{className:`drawer-body`,children:n})]})})}function Nm({icon:e,title:t,children:n,action:r}){return(0,V.jsxs)(`div`,{className:`empty`,children:[(0,V.jsx)(`div`,{className:`empty-icon`,children:e}),(0,V.jsx)(`h3`,{children:t}),n&&(0,V.jsx)(`p`,{children:n}),r]})}function Pm(e){let t=Math.round((Date.now()-e)/1e3);return t<45?`just now`:t<3600?`${Math.round(t/60)}m ago`:t<86400?`${Math.round(t/3600)}h ago`:new Date(e).toLocaleDateString()}function Fm(e){return new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}function Im({project:e,onRemoved:t}){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(null),o=(0,b.useRef)(null);(0,b.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||r(!1)};return addEventListener(`mousedown`,e),()=>removeEventListener(`mousedown`,e)},[n]);let s=e=>t=>{t.preventDefault(),t.stopPropagation(),r(!1),a(e)};return(0,V.jsxs)(`div`,{className:`menu`,ref:o,onClick:e=>e.preventDefault(),children:[(0,V.jsx)(`button`,{className:`btn ghost icon sm`,title:`Project options`,"aria-label":`Project options`,onClick:e=>{e.preventDefault(),e.stopPropagation(),r(e=>!e)},children:(0,V.jsx)(uf,{size:16})}),(0,V.jsx)(zl,{children:n&&(0,V.jsxs)(G.div,{className:`menu-list`,initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.1},children:[(0,V.jsxs)(`button`,{onClick:s(`rename`),children:[(0,V.jsx)(dp,{size:14}),`Rename`]}),(0,V.jsxs)(`button`,{className:`danger`,onClick:s(`remove`),children:[(0,V.jsx)(qp,{size:14}),`Remove from Symbio…`]})]})}),(0,V.jsxs)(zl,{children:[i===`rename`&&(0,V.jsx)(Lm,{project:e,onClose:()=>a(null)}),i===`remove`&&(0,V.jsx)(Rm,{project:e,onClose:()=>a(null),onRemoved:t})]})]})}function Lm({project:e,onClose:t}){let[n,r]=(0,b.useState)(e.name),[i,a]=(0,b.useState)(null),o=n.trim()&&n.trim()!==e.name;async function s(){try{await Y.updateProject(e.id,{name:n.trim()}),t()}catch(e){a(e.message)}}return(0,V.jsxs)(jm,{title:`Rename project`,onClose:t,footer:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{className:`btn ghost`,onClick:t,children:`Cancel`}),(0,V.jsx)(`button`,{className:`btn primary`,onClick:s,disabled:!o,children:`Rename`})]}),children:[(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Name`}),(0,V.jsx)(`input`,{autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>e.key===`Enter`&&o&&s()}),(0,V.jsx)(`span`,{className:`hint`,children:`Only the name shown in Symbio changes; the folder stays where it is.`})]}),i&&(0,V.jsx)(`div`,{className:`error`,children:i})]})}function Rm({project:e,onClose:t,onRemoved:n}){let[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)(null),l=e.agents.filter(e=>e.status===`busy`||e.status===`waiting`).length;async function u(){o(!0);try{await Y.deleteProject(e.id,r),t(),n?.()}catch(e){c(e.message),o(!1)}}return(0,V.jsxs)(jm,{title:`Remove “${e.name}”?`,onClose:t,footer:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{className:`btn ghost`,onClick:t,children:`Cancel`}),(0,V.jsx)(`button`,{className:`btn danger-solid`,onClick:u,disabled:a,children:a?`Removing…`:`Remove project`})]}),children:[(0,V.jsxs)(`p`,{className:`muted`,children:[`Symbio stops its agents and removes their workspaces. `,(0,V.jsx)(`strong`,{style:{color:`var(--text)`},children:`Your project files are not touched`}),` —`,` `,(0,V.jsx)(`code`,{children:e.directory}),` stays exactly as it is, including its git history and any branches helpers created.`]}),l>0&&(0,V.jsxs)(`div`,{className:`notice`,children:[l,` agent(s) are working right now and will be stopped.`]}),(0,V.jsxs)(`label`,{className:`choice`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked)}),(0,V.jsxs)(`span`,{className:`choice-body`,children:[(0,V.jsx)(`span`,{className:`choice-title`,children:`Also delete Symbio's data for it`}),(0,V.jsxs)(`span`,{className:`choice-desc`,children:[`The plan, message log and asset register (`,(0,V.jsx)(`code`,{children:`.symbio`}),` folder) and the agents' conversations. Leave unchecked to be able to add the folder again later and continue where you left off.`]})]})]}),s&&(0,V.jsx)(`div`,{className:`error`,children:s})]})}function zm(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()??``}function Bm({runtime:e}){let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(!1);(0,b.useEffect)(()=>{let e=()=>Y.projects().then(n).catch(()=>n([]));return e(),hm(t=>{(t.type===`project.updated`||t.type===`agent.status`)&&e()})},[]);let a=e?.state===`running`,[o,s]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{e?.state===`running`&&Y.providers().then(e=>s(e.connected.every(e=>e.models===0))).catch(()=>{})},[e?.state]),(0,V.jsxs)(`div`,{className:`page-inner`,children:[(0,V.jsxs)(`div`,{className:`page-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h1`,{children:`Projects`}),(0,V.jsx)(`p`,{children:`Each project gets core, an agent that talks the scope through with you and coordinates the work.`})]}),(0,V.jsxs)(`button`,{className:`btn primary`,onClick:()=>i(!0),disabled:!a,children:[(0,V.jsx)(_p,{size:15}),`New project`]})]}),o&&(0,V.jsxs)(`div`,{className:`notice row`,style:{justifyContent:`space-between`,gap:12},children:[(0,V.jsx)(`span`,{children:`No model provider is connected yet, so agents have no models to run on.`}),(0,V.jsx)(`a`,{className:`btn sm`,href:`#/settings`,children:`Connect a provider`})]}),t&&t.length===0&&(0,V.jsx)(`div`,{className:`section`,children:(0,V.jsx)(Nm,{icon:(0,V.jsx)(Of,{size:20}),title:`No projects yet`,action:(0,V.jsxs)(`button`,{className:`btn primary`,onClick:()=>i(!0),disabled:!a,children:[(0,V.jsx)(_p,{size:15}),`New project`]}),children:`Point Symbio at a folder — empty or existing — and core will take it from there.`})}),t&&t.length>0&&(0,V.jsx)(`div`,{className:`project-list`,children:t.map(e=>(0,V.jsx)(Vm,{project:e},e.id))}),(0,V.jsx)(zl,{children:r&&(0,V.jsx)(Um,{onClose:()=>i(!1)})})]})}function Vm({project:e}){let t=e.agents.filter(e=>e.status!==`stopped`),n=t.filter(e=>e.status===`busy`).length,r=t.filter(e=>e.status===`waiting`).length,i=t.filter(e=>e.problem||e.status===`error`).length,a=Math.max(e.createdAt,...e.agents.map(e=>e.lastActivity??0)),o=(0,V.jsx)(`span`,{className:`subtle`,children:t.length?`Idle`:`Not started`});return e.paused?o=(0,V.jsx)(`span`,{className:`tag blue`,children:`Paused`}):i?o=(0,V.jsx)(`span`,{className:`tag red`,children:`Needs attention`}):r?o=(0,V.jsx)(`span`,{className:`tag amber`,children:`Waiting for you`}):n&&(o=(0,V.jsxs)(`span`,{className:`tag green`,children:[n,` working`]})),(0,V.jsxs)(`a`,{className:`project-row`,href:`#/p/${e.id}`,children:[(0,V.jsxs)(`div`,{style:{minWidth:0},children:[(0,V.jsx)(`div`,{className:`project-name`,children:e.name}),(0,V.jsx)(`div`,{className:`project-dir ellipsis`,title:e.directory,children:e.directory})]}),(0,V.jsx)(`div`,{className:`avatar-stack`,title:t.map(e=>e.name).join(`, `),children:t.slice(0,5).map(e=>(0,V.jsx)(Dm,{name:e.name,size:`sm`},e.id))}),(0,V.jsxs)(`div`,{className:`project-meta`,children:[o,(0,V.jsxs)(`span`,{className:`subtle`,children:[`· `,Pm(a)]})]}),(0,V.jsx)(`div`,{onClick:e=>e.preventDefault(),children:(0,V.jsx)(Im,{project:e})})]})}var Hm=[`Folder`,`Setup`,`Models`];function Um({onClose:e}){let[t,n]=(0,b.useState)(0),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)(``),[l,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(null),[p,m]=(0,b.useState)(!0),[h,g]=(0,b.useState)(`project`),[_,v]=(0,b.useState)(!0),[y,x]=(0,b.useState)([]),[S,C]=(0,b.useState)([]),[w,T]=(0,b.useState)(``),[E,D]=(0,b.useState)(!1),[O,ee]=(0,b.useState)(!1),[k,te]=(0,b.useState)(!1),[ne,A]=(0,b.useState)(!1);(0,b.useEffect)(()=>{Y.remote().then(e=>A(e.active&&e.code===void 0)).catch(()=>{})},[]);let[re,j]=(0,b.useState)(null);(0,b.useEffect)(()=>{let e=s.trim();if(u(null),f(null),!e)return;let t=setTimeout(()=>{Y.inspect(e).then(e=>{u(e),a||i(zm(e.directory))}).catch(e=>f(e.message))},400);return()=>clearTimeout(t)},[s]);let ie=l?.existingProject,ae=l&&!l.isGit&&!l.repos.length&&l.gitAvailable,M=[!!(r.trim()&&l&&!ie),!0,!!w][t];async function oe(){if(ne)return te(!0);ee(!0),f(null);try{let{path:e}=await Y.pickFolder(s.trim()||void 0);e&&c(e)}catch(e){f(e.message)}finally{ee(!1)}}async function se(){D(!0),j(null);try{let e=await Y.createProject({name:r.trim(),directory:s.trim(),allowedModels:S,coordinatorModel:w,docsLocation:h,rulesRegister:_,initGit:!!ae&&p,connections:y});await Y.start(e.id),location.hash=`#/p/${e.id}`}catch(e){j(e.message),D(!1)}}return(0,V.jsxs)(jm,{title:`New project`,onClose:e,wide:t===2,header:(0,V.jsx)(`div`,{className:`steps`,children:Hm.map((e,n)=>(0,V.jsxs)(`span`,{className:`row`,style:{gap:6},children:[n>0&&(0,V.jsx)(`span`,{className:`sep`}),(0,V.jsxs)(`span`,{className:`step ${n===t?`on`:n<t?`done`:``}`,children:[(0,V.jsx)(`span`,{className:`step-num`,children:n+1}),e]})]},e))}),footer:(0,V.jsxs)(V.Fragment,{children:[re&&(0,V.jsx)(`div`,{className:`error grow`,children:re}),t>0&&(0,V.jsxs)(`button`,{className:`btn ghost`,onClick:()=>n(t-1),disabled:E,children:[(0,V.jsx)(yd,{size:14}),`Back`]}),t<Hm.length-1?(0,V.jsxs)(`button`,{className:`btn primary`,onClick:()=>n(t+1),disabled:!M,children:[`Continue`,(0,V.jsx)(xd,{size:14})]}):(0,V.jsx)(`button`,{className:`btn primary`,onClick:se,disabled:!M||E,children:E?`Starting core…`:`Create project`})]}),children:[t===0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Folder`}),(0,V.jsxs)(`span`,{className:`input-row`,children:[(0,V.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`C:\\Users\\you\\projects\\my-project`,autoFocus:!0}),(0,V.jsxs)(`button`,{type:`button`,className:`btn`,onClick:oe,disabled:O,children:[(0,V.jsx)(Ef,{size:14}),O?`Choosing…`:`Browse…`]})]}),(0,V.jsx)(`span`,{className:`hint`,children:`An empty folder starts a new project; an existing one is studied first. Created if it doesn't exist.`})]}),k&&(0,V.jsx)(Cm,{start:s.trim()||void 0,onCancel:()=>te(!1),onPick:e=>{c(e),te(!1)}}),(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Name`}),(0,V.jsx)(`input`,{value:r,onChange:e=>{i(e.target.value),o(!0)},placeholder:`My project`})]}),d&&(0,V.jsx)(`div`,{className:`error`,children:d}),ie&&(0,V.jsxs)(`div`,{className:`error`,children:[`This folder already belongs to the project `,(0,V.jsxs)(`a`,{href:`#/p/${ie.id}`,children:[`“`,ie.name,`”`]}),`.`]}),l&&!ie&&(0,V.jsx)(Sm,{inspection:l}),ae&&(0,V.jsxs)(`label`,{className:`choice`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),(0,V.jsxs)(`span`,{className:`choice-body`,children:[(0,V.jsx)(`span`,{className:`choice-title`,children:`Set up version history (git)`}),(0,V.jsxs)(`span`,{className:`choice-desc`,children:[`Lets several agents work in parallel without stepping on each other, and keeps a history you can roll back. Adds a hidden `,(0,V.jsx)(`code`,{children:`.git`}),` folder with a first snapshot.`]})]})]}),l&&!ie&&l.repos.length>0&&(0,V.jsxs)(`div`,{className:`notice`,children:[`This folder holds `,l.repos.length===1?`a git repository`:`${l.repos.length} git repositories`,` (`,l.repos.join(`, `),`). Symbio keeps them as they are: each helper works in one of them, and pushes go to that repository's own remote.`]}),l&&!ie&&l.swallowed&&(0,V.jsxs)(`div`,{className:`notice`,children:[`This folder is a git repository that contains other repositories (`,l.swallowed.inner.join(`, `),`) without tracking their files`,l.swallowed.createdBySymbio?`, created on top of them by an earlier version of Symbio`:``,`. Agents would commit to the outer one. core can switch the project to work in each inner repository instead (nothing on disk changes), and Settings → Team switches it back.`]}),l&&!l.isGit&&!l.repos.length&&!l.gitAvailable&&(0,V.jsx)(`div`,{className:`notice`,children:`Git isn't installed, so agents will share the folder directly.`})]}),t===1&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Project documentation`}),(0,V.jsxs)(`label`,{className:`choice`,children:[(0,V.jsx)(`input`,{type:`radio`,checked:h===`project`,onChange:()=>g(`project`)}),(0,V.jsxs)(`span`,{className:`choice-body`,children:[(0,V.jsxs)(`span`,{className:`choice-title`,children:[`In the project `,(0,V.jsx)(`span`,{className:`tag accent`,children:`Recommended`})]}),(0,V.jsxs)(`span`,{className:`choice-desc`,children:[(0,V.jsx)(`code`,{children:`AGENTS.md`}),` and a `,(0,V.jsx)(`code`,{children:`docs/`}),` folder — useful to any agent or person working on it.`]})]})]}),(0,V.jsxs)(`label`,{className:`choice`,children:[(0,V.jsx)(`input`,{type:`radio`,checked:h===`private`,onChange:()=>g(`private`)}),(0,V.jsxs)(`span`,{className:`choice-body`,children:[(0,V.jsx)(`span`,{className:`choice-title`,children:`Private`}),(0,V.jsxs)(`span`,{className:`choice-desc`,children:[`Kept in `,(0,V.jsx)(`code`,{children:`.symbio/docs`}),`, outside your files — for folders you don't want AI documentation in.`]})]})]})]}),(0,V.jsxs)(`label`,{className:`choice`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),(0,V.jsxs)(`span`,{className:`choice-body`,children:[(0,V.jsx)(`span`,{className:`choice-title`,children:`Keep a rules register`}),(0,V.jsx)(`span`,{className:`choice-desc`,children:`Agents record the project's rules (requirements, decisions, constraints) with where each came from and whether it's met. You browse and filter them in the Docs tab. You can turn it off later.`})]})]}),(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Connections`}),(0,V.jsx)(`span`,{className:`hint`,children:`GitHub accounts and servers agents may use. Optional — you can change this later.`}),(0,V.jsx)(ym,{value:y,onChange:x})]})]}),t===2&&(0,V.jsx)(wm,{allowed:S,coordinator:w,onChange:(e,t)=>{C(e),T(t)}}),t===0&&!l&&!d&&s.trim()===``&&(0,V.jsxs)(`div`,{className:`row subtle small`,children:[(0,V.jsx)(Ef,{size:14}),`Browse for a folder, or paste its full path.`]})]})}var Wm=e=>e>=100?`$${Math.round(e)}`:`$${e.toFixed(2)}`;function Gm(e){let[t,n]=(0,b.useState)(null),r=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let t=()=>Y.projectUsage(e).then(n).catch(()=>{});t();let i=hm(n=>{if(n.type===`project.updated`&&n.projectId===e||n.type===`prices.updated`){if(r.current)return;r.current=setTimeout(()=>{r.current=null,t()},4e3)}});return()=>{i(),r.current&&clearTimeout(r.current)}},[e]),t}function Km({project:e,onOpen:t}){let n=Gm(e.id);if(!n||n.tokens===0)return null;let r=n.agents.filter(e=>e.tokens>0).map(e=>`${e.name}: ${em(e.tokens)}${e.cost>0?` · ≈ ${Wm(e.cost)}`:``}`).join(`
19
+ `);return(0,V.jsxs)(`button`,{className:`usage-line`,onClick:t,title:`${r}\n\nIncludes cache reads. Click for details.`,children:[(0,V.jsx)(tf,{size:13}),(0,V.jsxs)(`span`,{className:`tnum`,children:[em(n.tokens),` tokens`]}),n.cost>0&&(0,V.jsxs)(`span`,{className:`subtle tnum`,children:[`· ≈ `,Wm(n.cost)]})]})}function qm({project:e}){let t=Gm(e.id);return(0,V.jsxs)(`section`,{className:`section`,id:`usage`,children:[(0,V.jsxs)(`div`,{className:`section-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Usage`}),(0,V.jsx)(`p`,{children:`Tokens used by every agent of this project, including stopped ones and earlier sessions. The cost is an estimate from the prices in Settings → Model prices.`})]}),t&&t.tokens>0&&(0,V.jsxs)(`div`,{className:`usage-total`,children:[(0,V.jsx)(`strong`,{className:`tnum`,children:t.cost>0?`≈ ${Wm(t.cost)}`:`—`}),(0,V.jsxs)(`span`,{className:`subtle small tnum`,children:[em(t.tokens),` tokens`]})]})]}),t?t.tokens===0?(0,V.jsx)(`div`,{className:`section-empty`,children:`No usage yet.`}):(0,V.jsxs)(`div`,{style:{padding:`4px 12px 12px`,overflowX:`auto`},children:[(0,V.jsxs)(`table`,{className:`usage-table`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`Agent`}),(0,V.jsx)(`th`,{children:`Model`}),(0,V.jsx)(`th`,{className:`num`,children:`Input`}),(0,V.jsx)(`th`,{className:`num`,children:`Output`}),(0,V.jsx)(`th`,{className:`num`,children:`Cache read`}),(0,V.jsx)(`th`,{className:`num`,children:`Cache write`}),(0,V.jsx)(`th`,{className:`num`,children:`≈ Cost`})]})}),(0,V.jsx)(`tbody`,{children:t.agents.flatMap(e=>e.byModel.map((t,n)=>(0,V.jsxs)(`tr`,{className:e.status===`stopped`?`muted`:``,children:[(0,V.jsx)(`td`,{children:n===0?`${e.name}${e.status===`stopped`?` (stopped)`:``}${e.sessions>1?` · ${e.sessions} sessions`:``}`:``}),(0,V.jsx)(`td`,{className:`mono small`,children:t.model}),(0,V.jsx)(`td`,{className:`num tnum`,children:em(t.usage.input)}),(0,V.jsx)(`td`,{className:`num tnum`,children:em(t.usage.output+t.usage.reasoning)}),(0,V.jsx)(`td`,{className:`num tnum`,children:em(t.usage.cacheRead)}),(0,V.jsx)(`td`,{className:`num tnum`,children:em(t.usage.cacheWrite)}),(0,V.jsx)(`td`,{className:`num tnum`,children:t.cost===null?`no price`:Wm(t.cost)})]},`${e.id}-${t.model}`)))}),(0,V.jsx)(`tfoot`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`td`,{colSpan:2,children:`Total`}),(0,V.jsx)(`td`,{className:`num tnum`,children:em(t.total.input)}),(0,V.jsx)(`td`,{className:`num tnum`,children:em(t.total.output+t.total.reasoning)}),(0,V.jsx)(`td`,{className:`num tnum`,children:em(t.total.cacheRead)}),(0,V.jsx)(`td`,{className:`num tnum`,children:em(t.total.cacheWrite)}),(0,V.jsx)(`td`,{className:`num tnum`,children:Wm(t.cost)})]})})]}),t.unpriced.length>0&&(0,V.jsxs)(`div`,{className:`notice`,style:{marginTop:10},children:[`No price for `,t.unpriced.join(`, `),`, so their tokens aren't in the estimate. Add it in Settings → Model prices.`]})]}):(0,V.jsx)(`div`,{className:`section-empty`,children:`Loading…`})]})}var Jm=[{key:`input`,label:`Input`},{key:`output`,label:`Output`},{key:`cacheRead`,label:`Cache read`},{key:`cacheWrite`,label:`Cache write`}];function Ym(){let[e,t]=(0,b.useState)(null),n=()=>Y.prices().then(t).catch(()=>{});return(0,b.useEffect)(()=>{n()},[]),(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsx)(`div`,{className:`section-head`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Model prices`}),(0,V.jsx)(`p`,{children:`USD per million tokens, used to estimate what projects cost. Models whose provider doesn't publish prices (like a company Azure deployment) get a suggestion from the same model in OpenCode's catalog: check it against your contract and save.`})]})}),e?(0,V.jsx)(`div`,{className:`section-body`,children:Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>(0,V.jsx)(Xm,{model:e,info:t,onSaved:n},e))}):(0,V.jsx)(`div`,{className:`section-empty`,children:`Loading…`})]})}function Xm({model:e,info:t,onSaved:n}){let r=()=>Object.fromEntries(Jm.map(e=>[e.key,t.price?String(t.price[e.key]):``])),[i,a]=(0,b.useState)(r),[o,s]=(0,b.useState)(!1);(0,b.useEffect)(()=>a(r()),[t]);let c={input:Number(i.input),output:Number(i.output),cacheRead:Number(i.cacheRead),cacheWrite:Number(i.cacheWrite)},l=Jm.every(e=>i[e.key].trim()!==``&&Number.isFinite(c[e.key])&&c[e.key]>=0),u=Jm.some(e=>i[e.key]!==(t.price?String(t.price[e.key]):``)),d=l&&(u||t.source===`suggested`);async function f(t){s(!0);try{await Y.setPrice(e,t),n()}catch(e){alert(e.message)}finally{s(!1)}}let p=t.source===`yours`?`Your price`:t.source===`opencode`?`From OpenCode`:t.source===`suggested`?`Suggested from ${t.from} — not saved yet`:`No price`;return(0,V.jsxs)(`div`,{className:`list-row price-row`,children:[(0,V.jsxs)(`div`,{className:`grow`,style:{minWidth:0},children:[(0,V.jsx)(`div`,{className:`list-title mono small ellipsis`,children:e}),(0,V.jsx)(`div`,{className:`list-sub ${t.source===`suggested`||t.source===`none`?`warn`:``}`,children:p})]}),Jm.map(e=>(0,V.jsxs)(`label`,{className:`price-field`,children:[(0,V.jsx)(`span`,{children:e.label}),(0,V.jsx)(`input`,{type:`number`,min:0,step:`any`,value:i[e.key],onChange:t=>a({...i,[e.key]:t.target.value})})]},e.key)),(0,V.jsx)(`button`,{className:`btn sm`,onClick:()=>f(c),disabled:!d||o,children:t.source===`suggested`&&!u?`Accept`:`Save`}),t.source===`yours`&&(0,V.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>f(null),disabled:o,title:`Forget your price`,children:`Reset`})]})}function Zm(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Qm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$m=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eh={};function th(e,t){return((t||eh).jsx?$m:Qm).test(e)}var nh=/[ \t\n\f\r]/g;function rh(e){return typeof e==`object`?e.type===`text`&&ih(e.value):ih(e)}function ih(e){return e.replace(nh,``)===``}var ah=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ah.prototype.normal={},ah.prototype.property={},ah.prototype.space=void 0;function oh(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ah(n,r,t)}function sh(e){return e.toLowerCase()}var ch=class{constructor(e,t){this.attribute=t,this.property=e}};ch.prototype.attribute=``,ch.prototype.booleanish=!1,ch.prototype.boolean=!1,ch.prototype.commaOrSpaceSeparated=!1,ch.prototype.commaSeparated=!1,ch.prototype.defined=!1,ch.prototype.mustUseProperty=!1,ch.prototype.number=!1,ch.prototype.overloadedBoolean=!1,ch.prototype.property=``,ch.prototype.spaceSeparated=!1,ch.prototype.space=void 0;var lh=s({boolean:()=>X,booleanish:()=>dh,commaOrSpaceSeparated:()=>hh,commaSeparated:()=>mh,number:()=>Z,overloadedBoolean:()=>fh,spaceSeparated:()=>ph}),uh=0,X=gh(),dh=gh(),fh=gh(),Z=gh(),ph=gh(),mh=gh(),hh=gh();function gh(){return 2**++uh}var _h=Object.keys(lh),vh=class extends ch{constructor(e,t,n,r){let i=-1;if(super(e,t),yh(this,`space`,r),typeof n==`number`)for(;++i<_h.length;){let e=_h[i];yh(this,_h[i],(n&lh[e])===lh[e])}}};vh.prototype.defined=!0;function yh(e,t,n){n&&(e[t]=n)}function bh(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new vh(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[sh(r)]=r,n[sh(a.attribute)]=r}return new ah(t,n,e.space)}var xh=bh({properties:{ariaActiveDescendant:null,ariaAtomic:dh,ariaAutoComplete:null,ariaBusy:dh,ariaChecked:dh,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:ph,ariaCurrent:null,ariaDescribedBy:ph,ariaDetails:null,ariaDisabled:dh,ariaDropEffect:ph,ariaErrorMessage:null,ariaExpanded:dh,ariaFlowTo:ph,ariaGrabbed:dh,ariaHasPopup:null,ariaHidden:dh,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ph,ariaLevel:Z,ariaLive:null,ariaModal:dh,ariaMultiLine:dh,ariaMultiSelectable:dh,ariaOrientation:null,ariaOwns:ph,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:dh,ariaReadOnly:dh,ariaRelevant:null,ariaRequired:dh,ariaRoleDescription:ph,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:dh,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Sh(e,t){return t in e?e[t]:t}function Ch(e,t){return Sh(e,t.toLowerCase())}var wh=bh({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:mh,acceptCharset:ph,accessKey:ph,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alpha:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:ph,autoFocus:X,autoPlay:X,blocking:ph,capture:null,charSet:null,checked:X,cite:null,className:ph,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:dh,controls:X,controlsList:ph,coords:Z|mh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:fh,draggable:dh,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:ph,height:Z,hidden:fh,high:Z,href:null,hrefLang:null,htmlFor:ph,httpEquiv:ph,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:ph,itemRef:ph,itemScope:X,itemType:ph,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:X,optimum:Z,pattern:null,ping:ph,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:ph,required:X,reversed:X,rows:Z,rowSpan:Z,sandbox:ph,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootCustomElementRegistry:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shadowRootSerializable:X,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:dh,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:dh,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ph,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:dh,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:X,disablePictureInPicture:X,disableRemotePlayback:X,exportParts:mh,part:ph,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:Ch}),Th=bh({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:hh,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:ph,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:mh,g2:mh,glyphName:mh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:hh,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ph,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hh,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hh,rev:hh,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hh,requiredFeatures:hh,requiredFonts:hh,requiredFormats:hh,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:hh,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hh,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hh,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Sh}),Eh=bh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Dh=bh({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Ch}),Oh=bh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),kh={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Ah=/[A-Z]/g,jh=/-[a-z]/g,Mh=/^data[-\w.:]+$/i;function Nh(e,t){let n=sh(t),r=t,i=ch;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Mh.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(jh,Fh);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!jh.test(e)){let n=e.replace(Ah,Ph);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=vh}return new i(r,t)}function Ph(e){return`-`+e.toLowerCase()}function Fh(e){return e.charAt(1).toUpperCase()}var Ih=oh([xh,wh,Eh,Dh,Oh],`html`),Lh=oh([xh,Th,Eh,Dh,Oh],`svg`);function Rh(e){return e.join(` `).trim()}var zh=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
20
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Bh=o(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(zh());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Vh=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Hh=o(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Bh()),i=Vh();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),Uh=Gh(`end`),Wh=Gh(`start`);function Gh(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Kh(e){let t=Wh(e),n=Uh(e);if(t&&n)return{start:t,end:n}}function qh(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Yh(e.position):`start`in e||`end`in e?Yh(e):`line`in e||`column`in e?Jh(e):``}function Jh(e){return Xh(e&&e.line)+`:`+Xh(e&&e.column)}function Yh(e){return Jh(e&&e.start)+`-`+Jh(e&&e.end)}function Xh(e){return e&&typeof e==`number`?e:1}var Zh=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=qh(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Zh.prototype.file=``,Zh.prototype.name=``,Zh.prototype.reason=``,Zh.prototype.message=``,Zh.prototype.stack=``,Zh.prototype.column=void 0,Zh.prototype.line=void 0,Zh.prototype.ancestors=void 0,Zh.prototype.cause=void 0,Zh.prototype.fatal=void 0,Zh.prototype.place=void 0,Zh.prototype.ruleId=void 0,Zh.prototype.source=void 0;var Qh=l(Hh(),1),$h={}.hasOwnProperty,eg=new Map,tg=/[A-Z]/g,ng=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),rg=new Set([`td`,`th`]),ig=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function ag(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=gg(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=hg(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Lh:Ih,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=og(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function og(e,t,n){if(t.type===`element`)return sg(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return cg(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return ug(e,t,n);if(t.type===`mdxjsEsm`)return lg(e,t);if(t.type===`root`)return dg(e,t,n);if(t.type===`text`)return fg(e,t)}function sg(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Lh,e.schema=i),e.ancestors.push(t);let a=Sg(e,t.tagName,!1),o=_g(e,t),s=yg(e,t);return ng.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!rh(e)})),pg(e,o,a,t),mg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function cg(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Cg(e,t.position)}function lg(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Cg(e,t.position)}function ug(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Lh,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Sg(e,t.name,!0),o=vg(e,t),s=yg(e,t);return pg(e,o,a,t),mg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function dg(e,t,n){let r={};return mg(r,yg(e,t)),e.create(t,e.Fragment,r,n)}function fg(e,t){return t.value}function pg(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function mg(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function hg(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function gg(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Wh(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function _g(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&$h.call(t.properties,i)){let a=bg(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&rg.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function vg(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Cg(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Cg(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function yg(e,t){let n=[],r=-1,i=e.passKeys?new Map:eg;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=og(e,a,o);s!==void 0&&n.push(s)}return n}function bg(e,t,n){let r=Nh(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Zm(n):Rh(n)),r.property===`style`){let t=typeof n==`object`?n:xg(e,String(n));return e.stylePropertyNameCase===`css`&&(t=wg(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?kh[r.property]||r.property:r.attribute,n]}}function xg(e,t){try{return(0,Qh.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Zh("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=ig+`#cannot-parse-style-attribute`,r}}function Sg(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=th(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=th(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return $h.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Cg(e)}function Cg(e,t){let n=new Zh("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=ig+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function wg(e){let t={},n;for(n in e)$h.call(e,n)&&(t[Tg(n)]=e[n]);return t}function Tg(e){let t=e.replace(tg,Eg);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Eg(e){return`-`+e.toLowerCase()}var Dg={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Og={};function kg(e,t){let n=t||Og;return Ag(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Ag(e,t,n){if(Mg(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return jg(e.children,t,n)}return Array.isArray(e)?jg(e,t,n):``}function jg(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Ag(e[i],t,n);return r.join(``)}function Mg(e){return!!(e&&typeof e==`object`)}var Ng=document.createElement(`i`);function Pg(e){let t=`&`+e+`;`;Ng.innerHTML=t;let n=Ng.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Fg(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Ig(e,t){return e.length>0?(Fg(e,e.length,0,t),e):t}var Lg={}.hasOwnProperty;function Rg(e){let t={},n=-1;for(;++n<e.length;)zg(t,e[n]);return t}function zg(e,t){let n;for(n in t){let r=(Lg.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Lg.call(r,a)||(r[a]=[]);let e=i[a];Bg(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Bg(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Fg(e,0,0,r)}function Vg(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Hg(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Ug=$g(/[A-Za-z]/),Wg=$g(/[\dA-Za-z]/),Gg=$g(/[#-'*+\--9=?A-Z^-~]/);function Kg(e){return e!==null&&(e<32||e===127)}var qg=$g(/\d/),Jg=$g(/[\dA-Fa-f]/),Yg=$g(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function Xg(e){return e!==null&&(e<0||e===32)}function $(e){return e===-2||e===-1||e===32}var Zg=$g(/\p{P}|\p{S}/u),Qg=$g(/\s/);function $g(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function e_(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Wg(e.charCodeAt(n+1))&&Wg(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function t_(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $(r)?(e.enter(n),s(r)):t(r)}function s(r){return $(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function n_(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&$(t)?(e.enter(r),c(t)):l(t)}function c(t){return $(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var r_={tokenize:i_};function i_(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),t_(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var a_=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){o_(this,e,t,n,!1)}addBefore(e,t,n){o_(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function o_(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var s_={tokenize:l_},c_={tokenize:u_};function l_(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new a_;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(c_,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(c_,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return Q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new a_;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function u_(e,t,n){return t_(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function d_(e){if(e===null||Xg(e)||Qg(e))return 1;if(Zg(e))return 2}function f_(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var p_={name:`attention`,resolveAll:m_,tokenize:h_};function m_(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};g_(o,-a),g_(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Ig(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=Ig(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=Ig(r,f_(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Ig(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=Ig(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),Fg(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function h_(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=d_(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=d_(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function g_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var __={name:`autolink`,tokenize:v_};function v_(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Ug(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Wg(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Wg(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Kg(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Gg(t)?(e.consume(t),l):n(t)}function u(e){return Wg(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Wg(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var y_={partial:!0,tokenize:b_};function b_(e,t,n){return r;function r(t){return $(t)?t_(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var x_={continuation:{tokenize:C_},exit:w_,name:`blockQuote`,tokenize:S_};function S_(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return $(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function C_(e,t,n){let r=this;return i;function i(t){return $(t)?t_(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(x_,t,n)(r)}}function w_(e){e.exit(`blockQuote`)}var T_={name:`characterEscape`,tokenize:E_};function E_(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Yg(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var D_={name:`characterReference`,tokenize:O_};function O_(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Wg,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Jg,u):(e.enter(`characterReferenceValue`),a=7,o=qg,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Wg&&!Pg(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var k_={partial:!0,tokenize:A_};function A_(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var j_={concrete:!0,name:`codeFenced`,tokenize:M_};function M_(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),$(t)?t_(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(k_,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),t_(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&$(t)?t_(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(k_,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$(t)?t_(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$(t)?t_(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var N_={name:`codeIndented`,tokenize:F_},P_={partial:!0,tokenize:I_};function F_(e,t,n){return r;function r(t){return e.enter(`codeIndented`),n_(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Q(t)?e.attempt(P_,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function I_(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Q(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):n_(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Q(e)?i(e):n(e)}}var L_={name:`codeText`,previous:z_,resolve:R_,tokenize:B_};function R_(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function z_(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function B_(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var V_=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&H_(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),H_(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),H_(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);H_(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);H_(this.left,t.reverse())}}}};function H_(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function U_(e){let t={},n=-1,r,i,a,o,s,c,l,u=new V_(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,W_(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Fg(e,0,1/0,u.slice(0)),!l}function W_(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var G_={resolve:q_,tokenize:J_},K_={partial:!0,tokenize:Y_};function q_(e){return U_(e),e}function J_(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Q(t)?e.check(K_,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Y_(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),t_(e,a,`linePrefix`)}function a(i){if(i===null||Q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function X_(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Kg(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Xg(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Kg(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Z_(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Q_(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),t_(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function $_(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$(i)?t_(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ev={name:`definition`,tokenize:nv},tv={partial:!0,tokenize:rv};function nv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Z_.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Hg(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Xg(t)?$_(e,l)(t):l(t)}function l(t){return X_(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(tv,d,d)(t)}function d(t){return $(t)?t_(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function rv(e,t,n){return r;function r(t){return Xg(t)?$_(e,i)(t):n(t)}function i(t){return Q_(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $(t)?t_(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var iv={name:`hardBreakEscape`,tokenize:av};function av(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var ov={name:`headingAtx`,resolve:sv,tokenize:cv};function sv(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};Fg(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function cv(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Xg(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):$(n)?t_(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Xg(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var lv=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),uv=[`pre`,`script`,`style`,`textarea`],dv={concrete:!0,name:`htmlFlow`,resolveTo:pv,tokenize:mv},fv={partial:!0,tokenize:hv};function pv(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function mv(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ie):Ug(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Ug(a)?(e.consume(a),i=4,r.interrupt?t:ie):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ie):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Ug(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Xg(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&uv.includes(l)?(i=1,r.interrupt?t(s):O(s)):lv.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Wg(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Ug(t)?(e.consume(t),b):$(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Wg(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Xg(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Q(t)?O(t):$(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),ne):t===60&&i===1?(e.consume(t),A):t===62&&i===4?(e.consume(t),ae):t===63&&i===3?(e.consume(t),ie):t===93&&i===5?(e.consume(t),j):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(fv,M,ee)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(k_,k,M)(t)}function k(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||Q(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function ne(t){return t===45?(e.consume(t),ie):O(t)}function A(t){return t===47?(e.consume(t),o=``,re):O(t)}function re(t){if(t===62){let n=o.toLowerCase();return uv.includes(n)?(e.consume(t),ae):O(t)}return Ug(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),re):O(t)}function j(t){return t===93?(e.consume(t),ie):O(t)}function ie(t){return t===62?(e.consume(t),ae):t===45&&i===2?(e.consume(t),ie):O(t)}function ae(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),M(t)):(e.consume(t),ae)}function M(n){return e.exit(`htmlFlow`),t(n)}}function hv(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(y_,t,n)}}var gv={name:`htmlText`,tokenize:_v};function _v(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Ug(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Ug(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Q(t)?(o=d,A(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ne(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Q(t)?(o=h,A(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ne(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ne(t):Q(t)?(o=v,A(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,A(t)):(e.consume(t),y)}function b(e){return e===62?ne(e):y(e)}function x(t){return Ug(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Wg(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,A(t)):$(t)?(e.consume(t),C):ne(t)}function w(t){return t===45||Wg(t)?(e.consume(t),w):t===47||t===62||Xg(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ne):t===58||t===95||Ug(t)?(e.consume(t),E):Q(t)?(o=T,A(t)):$(t)?(e.consume(t),T):ne(t)}function E(t){return t===45||t===46||t===58||t===95||Wg(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,A(t)):$(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):Q(t)?(o=O,A(t)):$(t)?(e.consume(t),O):(e.consume(t),k)}function ee(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):Q(t)?(o=ee,A(t)):(e.consume(t),ee)}function k(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Xg(t)?T(t):(e.consume(t),k)}function te(e){return e===47||e===62||Xg(e)?T(e):n(e)}function ne(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function A(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return $(t)?t_(e,j,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):j(t)}function j(t){return e.enter(`htmlTextData`),o(t)}}var vv={name:`labelEnd`,resolveAll:Sv,resolveTo:Cv,tokenize:wv},yv={tokenize:Tv},bv={tokenize:Ev},xv={tokenize:Dv};function Sv(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Fg(e,0,e.length,n),e}function Cv(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=Ig(o,e.slice(i+1,i+r+3)),o=Ig(o,[[`enter`,l,t]]),o=Ig(o,f_(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Ig(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=Ig(o,e.slice(a+1)),o=Ig(o,[[`exit`,s,t]]),Fg(e,i,e.length,o),e}function wv(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Hg(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(yv,u,o?u:d)(t):t===91?e.attempt(bv,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(xv,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Tv(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Xg(t)?$_(e,a)(t):a(t)}function a(t){return t===41?u(t):X_(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Xg(t)?$_(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Q_(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Xg(t)?$_(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ev(e,t,n){let r=this;return i;function i(t){return Z_.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Hg(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Dv(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Ov={name:`labelStartImage`,resolveAll:vv.resolveAll,tokenize:kv};function kv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Av={name:`labelStartLink`,resolveAll:vv.resolveAll,tokenize:jv};function jv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Mv={name:`lineEnding`,tokenize:Nv};function Nv(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),t_(e,t,`linePrefix`)}}var Pv={name:`thematicBreak`,tokenize:Fv};function Fv(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$(t)?t_(e,s,`whitespace`)(t):s(t))}}var Iv={continuation:{tokenize:Bv},exit:Hv,name:`list`,tokenize:zv},Lv={partial:!0,tokenize:Uv},Rv={partial:!0,tokenize:Vv};function zv(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:qg(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Pv,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return qg(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(y_,r.interrupt?n:u,e.attempt(Lv,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Bv(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(y_,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,t_(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Rv,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,t_(e,e.attempt(Iv,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Vv(e,t,n){let r=this;return t_(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Hv(e){e.exit(this.containerState.type)}function Uv(e,t,n){let r=this;return t_(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Wv={name:`setextUnderline`,resolveTo:Gv,tokenize:Kv};function Gv(e,t){let n=new a_,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function Kv(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$(t)?t_(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var qv={tokenize:Jv};function Jv(e){let t=this,n=e.attempt(y_,r,e.attempt(this.parser.constructs.flowInitial,i,t_(e,e.attempt(this.parser.constructs.flow,i,e.attempt(G_,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Yv={resolveAll:$v()},Xv=Qv(`string`),Zv=Qv(`text`);function Qv(e){return{resolveAll:$v(e===`text`?ey:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function $v(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function ey(e,t){let n=new a_,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var ty=s({attentionMarkers:()=>ly,contentInitial:()=>ry,disable:()=>uy,document:()=>ny,flow:()=>ay,flowInitial:()=>iy,insideSpan:()=>cy,string:()=>oy,text:()=>sy}),ny={42:Iv,43:Iv,45:Iv,48:Iv,49:Iv,50:Iv,51:Iv,52:Iv,53:Iv,54:Iv,55:Iv,56:Iv,57:Iv,62:x_},ry={91:ev},iy={[-2]:N_,[-1]:N_,32:N_},ay={35:ov,42:Pv,45:[Wv,Pv],60:dv,61:Wv,95:Pv,96:j_,126:j_},oy={38:D_,92:T_},sy={[-5]:Mv,[-4]:Mv,[-3]:Mv,33:Ov,38:D_,42:p_,60:[__,gv],91:Av,92:[iv,T_],93:vv,95:p_,96:L_},cy={null:[p_,Yv]},ly={null:[42,95]},uy={null:[]};function dy(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Ig(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=f_(a,l.events,l),l.events):[]}function f(e,t){return py(p(e),t)}function p(e){return fy(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Fg(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function fy(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function py(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
21
+ `;break;case-3:o=`\r
22
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function my(e){let t={constructs:Rg([ty,...(e||{}).extensions||[]]),content:n(r_),defined:[],document:n(s_),flow:n(qv),lazy:{},string:n(Xv),text:n(Zv)};return t;function n(e){return n;function n(n){return dy(t,e,n)}}}function hy(e){for(;!U_(e););return e}var gy=/[\0\t\n\r]/g;function _y(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){gy.lastIndex=c;let n=gy.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var vy=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yy(e){return e.replace(vy,by)}function by(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Vg(n.slice(t?2:1),t?16:10)}return Pg(n)||e}var xy={}.hasOwnProperty;function Sy(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Cy(n)(hy(my(n).document().write(_y()(e,t,!0))))}function Cy(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(xe),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(P),blockQuote:o(me),characterEscape:E,characterReference:E,codeFenced:o(he),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(he,s),codeText:o(ge,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(_e),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(N),hardBreakEscape:o(ve),hardBreakTrailing:o(ve),htmlFlow:o(ye,s),htmlFlowData:E,htmlText:o(ye,s),htmlTextData:E,image:o(be),label:s,link:o(xe),listItem:o(Ce),listItemValue:p,listOrdered:o(Se,f),listUnordered:o(Se),paragraph:o(we),reference:se,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(P),strong:o(Te),thematicBreak:o(De)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:pe,autolinkProtocol:fe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ue,characterReference:de,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(ne),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(ee),hardBreakTrailing:l(ee),htmlFlow:l(k),htmlFlowData:D,htmlText:l(te),htmlTextData:D,image:l(re),label:ie,labelText:j,lineEnding:O,link:l(A),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ce,resourceDestinationString:ae,resourceTitleString:M,resource:oe,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Ty(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),xy.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Dy).call(o,void 0,e[0])}for(r.position={start:wy(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:wy(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:wy(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+qh({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Dy).call(this,e,r[0])),n.position.end=wy(e.end)}function d(){return kg(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Hg(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Ee(),n.position={start:wy(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=wy(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=wy(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function ee(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function re(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=yy(t),n.identifier=Hg(t).toLowerCase()}function ie(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function oe(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Hg(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function le(e){this.data.characterReferenceType=e.type}function ue(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Vg(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Pg(t);let i=this.stack[this.stack.length-1];i.value+=r}function de(e){let t=this.stack.pop();t.position.end=wy(e.end)}function fe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function pe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function me(){return{type:`blockquote`,children:[],position:void 0}}function he(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ge(){return{type:`inlineCode`,value:``,position:void 0}}function _e(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function N(){return{type:`emphasis`,children:[],position:void 0}}function P(){return{type:`heading`,depth:0,children:[],position:void 0}}function ve(){return{type:`break`,position:void 0}}function ye(){return{type:`html`,value:``,position:void 0}}function be(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function xe(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function Se(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function Ce(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function we(){return{type:`paragraph`,children:[],position:void 0}}function Te(){return{type:`strong`,children:[],position:void 0}}function Ee(){return{type:`text`,value:``,position:void 0}}function De(){return{type:`thematicBreak`,position:void 0}}}function wy(e){return{line:e.line,column:e.column,offset:e.offset}}function Ty(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Ty(e,r):Ey(e,r)}}function Ey(e,t){let n;for(n in t)if(xy.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Dy(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+qh({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qh({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+qh({start:t.start,end:t.end})+`) is still open`)}function Oy(e){let t=this;t.parser=n;function n(n){return Sy(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ky(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ay(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
23
+ `}]}function jy(e,t){let n=t.value?t.value+`
24
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function My(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ny(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Py(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=e_(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Fy(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iy(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ly(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Ry(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ly(e,t);let i={src:e_(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function zy(e,t){let n={src:e_(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function By(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Vy(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ly(e,t);let i={href:e_(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Hy(e,t){let n={href:e_(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Uy(e,t,n){let r=e.all(t),i=n?Wy(n):Gy(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
25
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
26
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Wy(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Gy(n[r])}return t}function Gy(e){return e.spread??e.children.length>1}function Ky(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function qy(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jy(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Yy(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xy(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Wh(t.children[1]),o=Uh(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Zy(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Qy(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var $y=9,eb=32;function tb(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(nb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(nb(t.slice(i),i>0,!1)),a.join(``)}function nb(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===$y||t===eb;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===$y||t===eb;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function rb(e,t){let n={type:`text`,value:tb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ib(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var ab={blockquote:ky,break:Ay,code:jy,delete:My,emphasis:Ny,footnoteReference:Py,heading:Fy,html:Iy,imageReference:Ry,image:zy,inlineCode:By,linkReference:Vy,link:Hy,listItem:Uy,list:Ky,paragraph:qy,root:Jy,strong:Yy,table:Xy,tableCell:Qy,tableRow:Zy,text:rb,thematicBreak:ib,toml:ob,yaml:ob,definition:ob,footnoteDefinition:ob};function ob(){}var{defineProperty:sb}=Object,cb=typeof self==`object`?self:globalThis,lb=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new cb[e](t)},ub=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?sb(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof cb[e]==`function`?lb(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(lb(a,o),i)};return r},db=e=>ub(new Map,e)(0),fb=``,{toString:pb}={},{keys:mb,is:hb}=Object,gb=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=pb.call(e).slice(8,-1);switch(n){case`Array`:return[1,fb];case`Object`:return[2,fb];case`Date`:return[3,fb];case`RegExp`:return[4,fb];case`Map`:return[5,fb];case`Set`:return[6,fb];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},_b=([e,t])=>e===0&&(t===`function`||t===`symbol`),vb=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=gb(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&hb(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of mb(o))(e||!_b(gb(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?fb:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(_b(gb(n))||_b(gb(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!_b(gb(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},yb=(e,{json:t,lossy:n}={})=>{let r=[];return vb(!(t||n),!!t,new Map,r)(e),r},bb=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?db(yb(e,t)):structuredClone(e):(e,t)=>db(yb(e,t));function xb(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Sb(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Cb(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||xb,r=e.options.footnoteBackLabel||Sb,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=e_(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...bb(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
27
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
28
+ `}]}}var wb=(function(e){if(e==null)return kb;if(typeof e==`function`)return Ob(e);if(typeof e==`object`)return Array.isArray(e)?Tb(e):Eb(e);if(typeof e==`string`)return Db(e);throw Error(`Expected function, string, or object as test`)});function Tb(e){let t=[],n=-1;for(;++n<e.length;)t[n]=wb(e[n]);return Ob(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Eb(e){let t=e;return Ob(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Db(e){return Ob(t);function t(t){return t&&t.type===e}}function Ob(e){return t;function t(t,n,r){return!!(Ab(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function kb(){return!0}function Ab(e){return typeof e==`object`&&!!e&&`type`in e}function jb(e){return e}var Mb=[];function Nb(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=wb(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+jb(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Mb,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Pb(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Pb(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Mb:[e]}function Fb(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Nb(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Ib={}.hasOwnProperty,Lb={};function Rb(e,t){let n=t||Lb,r=new Map,i=new Map,a={all:s,applyData:Bb,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...ab,...n.handlers},one:o,options:n,patch:zb,wrap:Hb};return Fb(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Ib.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=bb(n);return r.children=a.all(e),r}return bb(e)}return(a.options.unknownHandler||Vb)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Ub(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Ub(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function zb(e,t){e.position&&(t.position=Kh(e))}function Bb(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,bb(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Vb(e,t){let n=t.data||{},r=`value`in t&&!(Ib.call(n,`hProperties`)||Ib.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Hb(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
29
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
30
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
31
+ `}),n}function Ub(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Wb(e,t){let n=Rb(e,t),r=n.one(e,void 0),i=Cb(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
32
+ `},i)),a}function Gb(e,t){return e&&`run`in e?async function(n,r){let i=Wb(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Wb(n,{file:r,...e||t})}}function Kb(e){if(e)throw e}var qb=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Jb(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yb(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Xb(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Xb(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Zb={basename:Qb,dirname:$b,extname:ex,join:tx,sep:`/`};function Qb(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);ix(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function $b(e){if(ix(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function ex(e){ix(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function tx(...e){let t=-1,n;for(;++t<e.length;)ix(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:nx(n)}function nx(e){ix(e);let t=e.codePointAt(0)===47,n=rx(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function rx(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function ix(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var ax={cwd:ox};function ox(){return`/`}function sx(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function cx(e){if(typeof e==`string`)e=new URL(e);else if(!sx(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return lx(e)}function lx(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var ux=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],dx=class{constructor(e){let t;t=e?sx(e)?{path:e}:typeof e==`string`||hx(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:ax.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<ux.length;){let e=ux[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)ux.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Zb.basename(this.path):void 0}set basename(e){px(e,`basename`),fx(e,`basename`),this.path=Zb.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Zb.dirname(this.path):void 0}set dirname(e){mx(this.basename,`dirname`),this.path=Zb.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Zb.extname(this.path):void 0}set extname(e){if(fx(e,`extname`),mx(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Zb.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){sx(e)&&(e=cx(e)),px(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Zb.basename(this.path,this.extname):void 0}set stem(e){px(e,`stem`),fx(e,`stem`),this.path=Zb.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Zh(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function fx(e,t){if(e&&e.includes(Zb.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Zb.sep+"`")}function px(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function mx(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function hx(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var gx=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),_x=l(qb(),1),vx={}.hasOwnProperty,yx=new class e extends gx{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Yb()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,_x.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Sx(`data`,this.frozen),this.namespace[e]=t,this):vx.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Sx(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Tx(e),n=this.parser||this.Parser;return bx(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),bx(`process`,this.parser||this.Parser),xx(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Tx(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Dx(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),bx(`processSync`,this.parser||this.Parser),xx(`processSync`,this.compiler||this.Compiler),this.process(e,r),wx(`processSync`,`process`,t),n;function r(e,r){t=!0,Kb(e),n=r}}run(e,t,n){Cx(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Tx(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),wx(`runSync`,`run`,n),r;function i(e,t){Kb(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Tx(t),r=this.compiler||this.Compiler;return xx(`stringify`,r),Cx(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Sx(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,_x.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Jb(o)&&Jb(r)&&(r=(0,_x.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function bx(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function xx(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Sx(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Cx(e){if(!Jb(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function wx(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tx(e){return Ex(e)?e:new dx(e)}function Ex(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Dx(e){return typeof e==`string`||Ox(e)}function Ox(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var kx=[],Ax={allowDangerousHtml:!0},jx=/^(https?|ircs?|mailto|xmpp)$/i,Mx=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Nx(e){let t=Px(e),n=Fx(e);return Ix(t.runSync(t.parse(n),n),e)}function Px(e){let t=e.rehypePlugins||kx,n=e.remarkPlugins||kx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ax}:Ax;return yx().use(Oy).use(n).use(Gb,r).use(t)}function Fx(e){let t=e.children||``,n=new dx;return typeof t==`string`?n.value=t:``+t,n}function Ix(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Lx;for(let e of Mx)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Fb(e,l),ag(e,{Fragment:V.Fragment,components:i,ignoreInvalidStyle:!0,jsx:V.jsx,jsxs:V.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Dg)if(Object.hasOwn(Dg,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Dg[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Lx(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||jx.test(e.slice(0,t))?e:``}function Rx(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function zx(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Bx(e,t,n){let r=wb((n||{}).ignore||[]),i=Vx(t),a=-1;for(;++a<i.length;)Nb(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1)r.lastIndex=n+1;else{if(s!==n&&f({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a))for(let e of a)f(e);else a&&f(a);s=n+d[0].length,l=!0}if(!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&f({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Vx(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Hx(e[0]),Ux(e[1])])}return t}function Hx(e){return typeof e==`string`?new RegExp(zx(e),`g`):e}function Ux(e){return typeof e==`function`?e:function(){return e}}var Wx=`phrasing`,Gx=[`autolink`,`link`,`image`,`label`];function Kx(){return{transforms:[eS],enter:{literalAutolink:Jx,literalAutolinkEmail:Yx,literalAutolinkHttp:Yx,literalAutolinkWww:Yx},exit:{literalAutolink:$x,literalAutolinkEmail:Qx,literalAutolinkHttp:Xx,literalAutolinkWww:Zx}}}function qx(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Wx,notInConstruct:Gx},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Wx,notInConstruct:Gx},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Wx,notInConstruct:Gx}]}}function Jx(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Yx(e){this.config.enter.autolinkProtocol.call(this,e)}function Xx(e){this.config.exit.autolinkProtocol.call(this,e)}function Zx(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Qx(e){this.config.exit.autolinkEmail.call(this,e)}function $x(e){this.exit(e)}function eS(e){Bx(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nS]],{ignore:[`link`,`linkReference`]})}function tS(e,t,n,r,i){let a=``;if(!aS(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!rS(n)))return!1;let o=iS(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function nS(e,t,n,r){return!aS(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function rS(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function iS(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Rx(e,`(`),a=Rx(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function aS(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Qg(n)||Zg(n))&&(!t||n!==47)}hS.peek=mS;function oS(){this.buffer()}function sS(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function cS(){this.buffer()}function lS(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function uS(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Hg(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dS(e){this.exit(e)}function fS(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Hg(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pS(e){this.exit(e)}function mS(){return`[`}function hS(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function gS(){return{enter:{gfmFootnoteCallString:oS,gfmFootnoteCall:sS,gfmFootnoteDefinitionLabelString:cS,gfmFootnoteDefinition:lS},exit:{gfmFootnoteCallString:uS,gfmFootnoteCall:dS,gfmFootnoteDefinitionLabelString:fS,gfmFootnoteDefinition:pS}}}function _S(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:hS},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
33
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?yS:vS))),s(),o}}function vS(e,t,n){return t===0?e:yS(e,t,n)}function yS(e,t,n){return(n?``:` `)+e}var bS=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];TS.attention=ES,TS.peek=DS;function xS(){return{canContainEols:[`delete`],enter:{strikethrough:CS},exit:{strikethrough:wS}}}function SS(){return{handlers:{delete:TS},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:bS}]}}function CS(e){this.enter({type:`delete`,children:[],position:void 0},e)}function wS(e){this.exit(e)}function TS(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function ES(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function DS(){return`~`}function OS(e){return e.length}function kS(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||OS,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=AS(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=jS(r[d]);else{let e=jS(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
34
+ `)}function AS(e){return e==null?``:String(e)}function jS(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var MS=wb([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function NS(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),PS);return i(),o}function PS(e,t,n){return`>`+(n?``:` `)+e}function FS(e,t){return IS(e,t.inConstruct,!0)&&!IS(e,t.notInConstruct,!1)}function IS(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function LS(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
35
+ `&&!e.before&&!e.after&&FS(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
36
+ `}function RS(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function zS(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function BS(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function VS(e,t,n,r){let i=BS(n),a=e.value||``;if(zS(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,HS);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(RS(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
37
+ `,encode:["`"],...o.current()})),t()}return u+=o.move(`
38
+ `),a&&(u+=o.move(a+`
39
+ `)),u+=o.move(s),c(),u}function HS(e,t,n){return(n?``:` `)+e}function US(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function WS(e,t,n,r){let i=US(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
40
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function GS(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}KS.attention=qS,KS.peek=JS;function KS(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function qS(e,t){return{construct:`emphasis`,markers:GS(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function JS(e,t,n){return n.options.emphasis||`*`}function YS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function XS(e,t){let n=!1;return Fb(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&kg(e)&&(t.options.setext||n))}function ZS(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(XS(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
41
+ `,after:`
42
+ `});return r(),t(),o+`
43
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
44
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
45
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=YS(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}QS.peek=$S;function QS(e){return e.value||``}function $S(){return`<`}eC.peek=tC;function eC(e,t,n,r){let i=US(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function tC(){return`!`}nC.peek=rC;function nC(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function rC(){return`!`}iC.peek=aC;function iC(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function aC(){return"`"}function oC(e,t){let n=kg(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}sC.peek=cC;function sC(e,t,n,r){let i=US(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(oC(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function cC(e,t,n){return oC(e,n)?`<`:`[`}lC.peek=uC;function lC(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function uC(){return`[`}function dC(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function fC(e){let t=dC(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function pC(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mC(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function hC(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?pC(n):dC(n),s=e.ordered?o===`.`?`)`:`.`:fC(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),mC(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function gC(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _C(e,t,n,r){let i=gC(n),a=n.bulletCurrent||dC(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function vC(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function yC(e,t,n,r){if(!e.children.some(function(e){return MS(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function bC(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}xC.attention=SC,xC.peek=CC;function xC(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function SC(e,t){return{construct:`strong`,markers:bC(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function CC(e,t,n){return n.options.strong||`*`}function wC(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function TC(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function EC(e,t,n){let r=(mC(n)+(n.options.ruleSpaces?` `:``)).repeat(TC(n));return n.options.ruleSpaces?r.slice(0,-1):r}var DC={blockquote:NS,break:LS,code:VS,definition:WS,emphasis:KS,hardBreak:LS,heading:ZS,html:QS,image:eC,imageReference:nC,inlineCode:iC,link:sC,linkReference:lC,list:hC,listItem:_C,paragraph:vC,root:yC,strong:xC,text:wC,thematicBreak:EC};function OC(){return{enter:{table:kC,tableData:NC,tableHeader:NC,tableRow:jC},exit:{codeText:PC,table:AC,tableData:MC,tableHeader:MC,tableRow:MC}}}function kC(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function AC(e){this.exit(e),this.data.inTable=void 0}function jC(e){this.enter({type:`tableRow`,children:[]},e)}function MC(e){this.exit(e)}function NC(e){this.enter({type:`tableCell`,children:[]},e)}function PC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,FC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function FC(e,t){return t===`|`?t:e}function IC(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
46
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
47
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return kS(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=DC.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function LC(){return{exit:{taskListCheckValueChecked:zC,taskListCheckValueUnchecked:zC,paragraph:BC}}}function RC(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:VC}}}function zC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function BC(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function VC(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=DC.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function HC(){return[Kx(),gS(),xS(),OC(),LC()]}function UC(e){return{extensions:[qx(),_S(e),SS(),IC(e),RC()]}}var WC={tokenize:iw,partial:!0},GC={tokenize:aw,partial:!0},KC={tokenize:ow,partial:!0},qC={tokenize:sw,partial:!0},JC={tokenize:cw,partial:!0},YC={name:`wwwAutolink`,tokenize:nw,previous:lw},XC={name:`protocolAutolink`,tokenize:rw,previous:uw},ZC={name:`emailAutolink`,tokenize:tw,previous:dw},QC={};function $C(){return{text:QC}}for(var ew=48;ew<123;)QC[ew]=ZC,ew++,ew===58?ew=65:ew===91&&(ew=97);QC[43]=ZC,QC[45]=ZC,QC[46]=ZC,QC[95]=ZC,QC[72]=[ZC,XC],QC[104]=[ZC,XC],QC[87]=[ZC,YC],QC[119]=[ZC,YC];function tw(e,t,n){let r=this,i,a;return o;function o(t){return!fw(t)||!dw.call(r,r.previous)||pw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return fw(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(JC,u,l)(t):t===45||t===95||Wg(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Ug(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function nw(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!lw.call(r,r.previous)||pw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(WC,e.attempt(GC,e.attempt(KC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function rw(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&uw.call(r,r.previous)&&!pw(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Ug(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Kg(t)||Xg(t)||Qg(t)||Zg(t)?n(t):e.attempt(GC,e.attempt(KC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function iw(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function aw(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(qC,c,s)(t):t===null||Xg(t)||Qg(t)||t!==45&&Zg(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function ow(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(qC,t,a)(o):o===null||Xg(o)||Qg(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function sw(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Xg(o)||Qg(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Xg(e)||Qg(e)?t(e):r(e)}function a(e){return Ug(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Ug(t)?(e.consume(t),o):n(t)}}function cw(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Wg(e)?n(e):t(e)}}function lw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Xg(e)}function uw(e){return!Ug(e)}function dw(e){return!(e===47||fw(e))}function fw(e){return e===43||e===45||e===46||e===95||Wg(e)}function pw(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var mw={tokenize:Sw,partial:!0};function hw(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:yw,continuation:{tokenize:bw},exit:xw}},text:{91:{name:`gfmFootnoteCall`,tokenize:vw},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:gw,resolveTo:_w}}}}function gw(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Hg(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function _w(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function vw(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Xg(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Hg(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Xg(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function yw(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Xg(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Hg(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Xg(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),t_(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function bw(e,t,n){return e.check(y_,t,e.attempt(mw,t,n))}function xw(e){e.exit(`gfmFootnoteDefinition`)}function Sw(e,t,n){let r=this;return t_(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Cw(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Fg(o,o.length,0,f_(s,e.slice(r+1,n),t)),Fg(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Fg(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=d_(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=d_(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var ww=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Tw(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Tw(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Ew(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Dw(){return{flow:{null:{name:`table`,tokenize:Ow,resolveAll:kw}}}}function Ow(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$(t)?t_(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Xg(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$(t)?t_(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $(t)?t_(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $(t)?t_(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):$(n)?t_(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Xg(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function kw(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new ww;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(jw(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Aw(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Aw(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Aw(f,t,o,i,n,d)):(o[0]=o[1],d=Aw(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&jw(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Ew(t.events,n))}return e}function Aw(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Mw(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Mw(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Mw(t.events,n[2]),a=Mw(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Mw(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function jw(e,t,n,r,i){let a=[],o=Mw(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Mw(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Nw={name:`tasklistCheck`,tokenize:Fw};function Pw(){return{text:{91:Nw}}}function Fw(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Xg(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):$(r)?e.check({tokenize:Iw},t,n)(r):n(r)}}function Iw(e,t,n){return t_(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Lw(e){return Rg([$C(),hw(),Cw(e),Dw(),Pw()])}var Rw={};function zw(e){let t=this,n=e||Rw,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Lw(n)),a.push(HC()),o.push(UC(n))}var Bw=e=>e.type===`multiselect`||e.type===`array`,Vw=e=>e.type===`number`||e.type===`integer`,Hw=(e,t)=>(e.when??[]).every(e=>e.op===`eq`?t[e.key]===e.value:e.op!==`neq`||t[e.key]!==e.value);function Uw({project:e,agent:t}){let[n,r]=(0,b.useState)([]),i=t.status===`waiting`||t.status===`busy`||t.status===`stuck`;return(0,b.useEffect)(()=>{if(!i){r([]);return}let n=!0,a=()=>Y.forms(e.id,t.id).then(e=>n&&r(e)).catch(()=>{});a();let o=setInterval(a,3e3);return()=>{n=!1,clearInterval(o)}},[e.id,t.id,i]),(0,V.jsx)(V.Fragment,{children:n.map(n=>(0,V.jsx)(Ww,{form:n,project:e,agent:t,onDone:()=>r(e=>e.filter(e=>e.id!==n.id))},n.id))})}function Ww({form:e,project:t,agent:n,onDone:r}){let[i,a]=(0,b.useState)(()=>Object.fromEntries(e.fields.map(e=>[e.key,e.default??(Bw(e)?[]:e.type!==`boolean`&&``)]))),o=e.fields.filter(e=>!e.hidden&&Hw(e,i)),[s,c]=(0,b.useState)({}),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(null),p=(0,b.useRef)(null);(0,b.useEffect)(()=>{p.current?.scrollIntoView({behavior:`smooth`,block:`nearest`})},[]);let m=(e,t)=>a(n=>({...n,[e]:t})),h=o.some(e=>e.required&&Gw(i[e.key])&&!s[e.key]);async function g(){u(!0),f(null);let a={},c=[];for(let e of o){if(e.type===`external`)continue;let t=i[e.key];if(s[e.key]?.trim()&&(t=Bw(e)?[...t??[],s[e.key].trim()]:s[e.key].trim()),Vw(e)&&typeof t==`string`&&t!==``&&(t=Number(t)),Gw(t)&&!e.required)continue;a[e.key]=t;let n=t=>e.options?.find(e=>e.value===t)?.label??String(t);c.push(`${e.title??e.key}: ${Array.isArray(t)?t.map(n).join(`, `):n(t)}`)}try{await Y.answerForm(t.id,n.id,e.id,a,c.join(`
48
+ `)),r()}catch(e){f(e.message),u(!1)}}return(0,V.jsxs)(G.div,{ref:p,className:`form-card`,initial:{opacity:0,y:6},animate:{opacity:1,y:0},children:[(0,V.jsxs)(`div`,{className:`form-card-head`,children:[(0,V.jsx)(Zf,{size:15}),n.name,` needs your answer`,e.title?` — ${e.title}`:``]}),(0,V.jsxs)(`div`,{className:`form-card-body`,children:[o.map(e=>{let t=e.options??e.items?.options;return(0,V.jsxs)(`div`,{className:`form-field`,children:[e.title&&(0,V.jsx)(`div`,{className:`form-field-title`,children:e.title}),e.description&&(0,V.jsx)(`div`,{className:`form-field-desc`,children:e.description}),e.type===`external`&&e.url?(0,V.jsx)(`a`,{className:`btn sm`,href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:`Open link`}):t?(0,V.jsxs)(`div`,{className:`form-options`,children:[t.map(t=>{let n=Bw(e),r=i[e.key],a=n?r.includes(t.value):r===t.value,o=n&&!a&&e.maxItems!==void 0&&r.length>=e.maxItems;return(0,V.jsxs)(`button`,{className:`form-option ${a?`on`:``}`,disabled:o,title:o?`Choose up to ${e.maxItems}`:void 0,onClick:()=>{if(n){let n=r;m(e.key,a?n.filter(e=>e!==t.value):[...n,t.value])}else m(e.key,t.value);n||c(t=>({...t,[e.key]:``}))},children:[(0,V.jsx)(`strong`,{style:{fontWeight:500},children:t.label}),t.description&&(0,V.jsx)(`span`,{children:t.description})]},t.value)}),e.custom!==!1&&(0,V.jsx)(`input`,{placeholder:`Or type your own answer…`,value:s[e.key]??``,onChange:t=>{c(n=>({...n,[e.key]:t.target.value})),Bw(e)||m(e.key,``)}})]}):e.type===`boolean`?(0,V.jsx)(`div`,{className:`form-options`,children:[!0,!1].map(t=>(0,V.jsx)(`button`,{className:`form-option ${i[e.key]===t?`on`:``}`,onClick:()=>m(e.key,t),children:(0,V.jsx)(`strong`,{children:t?`Yes`:`No`})},String(t)))}):(0,V.jsx)(`textarea`,{rows:2,placeholder:e.placeholder??`Your answer…`,value:String(i[e.key]??``),onChange:t=>m(e.key,t.target.value)})]},e.key)}),d&&(0,V.jsx)(`div`,{className:`error`,children:d}),(0,V.jsx)(`div`,{className:`row`,style:{justifyContent:`flex-end`},children:(0,V.jsx)(`button`,{className:`btn primary`,onClick:g,disabled:l||h,children:l?`Sending…`:`Send answer`})})]})]})}function Gw(e){return e==null||e===``||Array.isArray(e)&&e.length===0}var Kw=/\.(png|jpe?g|gif|webp|bmp)$/i,qw=e=>Kw.test(e),Jw=e=>e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:`${Math.max(1,Math.round(e/1024))} KB`;function Yw(e){let[t,n]=(0,b.useState)(null),r=()=>Y.attachments(e).then(n).catch(()=>{});return(0,b.useEffect)(()=>(r(),hm(t=>{t.type===`attachments.updated`&&t.projectId===e&&r()})),[e]),[t,r]}function Xw({name:e,size:t=18}){return/\.(xlsx?|csv|tsv|ods)$/i.test(e)?(0,V.jsx)(vf,{size:t}):/\.(pdf|docx?|odt|txt|md|pptx?)$/i.test(e)?(0,V.jsx)(bf,{size:t}):(0,V.jsx)(Sf,{size:t})}function Zw({projectId:e,a:t,size:n=40,local:r}){let[i,a]=(0,b.useState)(r??null);return(0,b.useEffect)(()=>{if(r||!t.id||!qw(t.name))return;let n=!0;return lm(e,t.id).then(e=>n&&a(e)).catch(()=>{}),()=>{n=!1}},[e,t.id,t.name,r]),(0,V.jsx)(`span`,{className:`att-thumb`,style:{width:n,height:n},children:i&&qw(t.name)?(0,V.jsx)(`img`,{src:i,alt:``}):(0,V.jsx)(Xw,{name:t.name,size:Math.round(n*.45)})})}function Qw(e){let[t,n]=(0,b.useState)([]),r=(e,t)=>n(n=>n.map(n=>n.key===e?{...n,...t}:n));return{files:t,add:t=>{for(let i of t){let t=`${Date.now()}-${Math.random()}`,a=i.name||`pasted-${new Date().toISOString().slice(0,19).replace(/[:T]/g,`-`)}.png`,o=i.name?i:new File([i],a,{type:i.type});n(e=>[...e,{key:t,name:a,size:i.size,preview:qw(a)?URL.createObjectURL(i):void 0,status:`uploading`,progress:0}]),um(e,[o],e=>r(t,{progress:e})).then(([e])=>r(t,{status:`ready`,id:e.id,progress:1})).catch(e=>r(t,{status:`error`,error:e.message}))}},remove:e=>n(t=>t.filter(t=>t.key!==e)),clear:()=>n([]),ready:t.filter(e=>e.status===`ready`).map(e=>e.id),uploading:t.some(e=>e.status===`uploading`)}}function $w({projectId:e,files:t,onRemove:n}){return t.length?(0,V.jsx)(`div`,{className:`att-pending`,children:t.map(t=>(0,V.jsxs)(`div`,{className:`att-chip ${t.status}`,title:t.error??t.name,children:[(0,V.jsx)(Zw,{projectId:e,a:t,size:34,local:t.preview}),(0,V.jsxs)(`span`,{className:`att-chip-text`,children:[(0,V.jsx)(`span`,{className:`ellipsis`,children:t.name}),(0,V.jsx)(`span`,{className:`att-chip-sub`,children:t.status===`uploading`?`Uploading… ${Math.round(t.progress*100)}%`:t.status===`error`?t.error:Jw(t.size)})]}),(0,V.jsx)(`button`,{className:`btn ghost icon xs`,onClick:()=>n(t.key),title:`Remove`,"aria-label":`Remove ${t.name}`,children:(0,V.jsx)($p,{size:12})})]},t.key))}):null}function eT({onFiles:e,disabled:t}){let n=(0,b.useRef)(null);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`input`,{ref:n,type:`file`,multiple:!0,hidden:!0,onChange:t=>{e([...t.target.files??[]]),t.target.value=``}}),(0,V.jsx)(`button`,{className:`btn ghost icon sm`,onClick:()=>n.current?.click(),disabled:t,title:`Attach files (or drop or paste them)`,"aria-label":`Attach files`,children:(0,V.jsx)(sp,{size:15})})]})}var tT=/\n\n\[Attached by the human[^\]]*\]\n([\s\S]*)$/;function nT(e){let t=tT.exec(e);if(!t)return{body:e,files:[]};let n=t[1].split(`
49
+ `).map(e=>/^- (.+?) \(/.exec(e)?.[1]).filter(e=>!!e).map(e=>e.split(/[\\/]/).pop());return{body:e.slice(0,t.index),files:n}}function rT({projectId:e,files:t}){let[n]=Yw(e);if(!t.length)return null;let r=new Map((n??[]).map(e=>[`${e.id.slice(4,12)}-${e.name}`,e]));return(0,V.jsx)(`div`,{className:`att-sent`,children:t.map(t=>{let n=r.get(t),i=n?.name??t.replace(/^[a-z0-9]{8}-/,``);return(0,V.jsxs)(`button`,{className:`att-chip sent`,disabled:!n,onClick:()=>n&&sm(e,n),title:n?`Open ${i}`:`${i} (no longer in the gallery)`,children:[(0,V.jsx)(Zw,{projectId:e,a:{id:n?.id,name:i},size:n&&qw(i)?64:30}),!(n&&qw(i))&&(0,V.jsx)(`span`,{className:`ellipsis`,children:i})]},t)})})}function iT({project:e}){let[t]=Yw(e.id),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(null),[c,l]=(0,b.useState)(null),u=e.agents.filter(e=>e.status!==`stopped`),d=t=>e.agents.find(e=>e.id===t)?.name??`an agent`;async function f(t){if(t.length){a(null),s(0);try{await um(e.id,t,s)}catch(e){a(e.message)}finally{s(null)}}}async function p(t,n){l(null);try{await Y.send(e.id,n,``,!1,[t.id])}catch(e){a(e.message)}}return(0,V.jsxs)(`div`,{className:`files ${n?`dragging`:``}`,onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),r(!0))},onDragLeave:()=>r(!1),onDrop:e=>{e.preventDefault(),r(!1),f([...e.dataTransfer.files])},children:[(0,V.jsxs)(`div`,{className:`files-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Files`}),(0,V.jsxs)(`p`,{className:`muted small`,children:[`Everything sent in this project's chats, kept in `,(0,V.jsx)(`code`,{children:`.symbio/attachments`}),` (not committed). Drop files here to add them, then send them to an agent.`]})]}),(0,V.jsx)(`span`,{className:`spacer`}),(0,V.jsx)(aT,{onFiles:f,busy:o!==null,progress:o})]}),i&&(0,V.jsx)(`div`,{className:`error`,children:i}),t&&t.length===0?(0,V.jsx)(Nm,{icon:(0,V.jsx)(sp,{size:20}),title:`No files yet`,children:`Attach files in a chat (the paperclip, drag and drop, or paste a screenshot), or drop them here.`}):(0,V.jsx)(`div`,{className:`files-grid`,children:t?.map(t=>(0,V.jsxs)(`div`,{className:`file-card`,children:[(0,V.jsx)(`button`,{className:`file-card-preview`,onClick:()=>sm(e.id,t),title:`Open ${t.name}`,children:(0,V.jsx)(Zw,{projectId:e.id,a:t,size:qw(t.name)?132:56})}),(0,V.jsxs)(`div`,{className:`file-card-body`,children:[(0,V.jsx)(`div`,{className:`ellipsis file-card-name`,title:t.name,children:t.name}),(0,V.jsxs)(`div`,{className:`file-card-sub`,children:[Jw(t.size),` · `,Pm(t.addedAt)]}),(0,V.jsx)(`div`,{className:`file-card-sub ellipsis`,children:t.sentTo.length?`Sent to ${[...new Set(t.sentTo.map(e=>d(e.agentId)))].join(`, `)}`:`Not sent yet`})]}),(0,V.jsxs)(`div`,{className:`file-card-actions`,children:[(0,V.jsxs)(`div`,{className:`file-send`,children:[(0,V.jsx)(`button`,{className:`btn ghost icon xs`,title:`Send to an agent`,onClick:()=>l(c===t.id?null:t.id),disabled:!u.length,children:(0,V.jsx)(Np,{size:13})}),c===t.id&&(0,V.jsx)(`div`,{className:`file-send-menu`,children:u.map(e=>(0,V.jsx)(`button`,{onClick:()=>p(t,e.id),children:e.name},e.id))})]}),(0,V.jsx)(`button`,{className:`btn ghost icon xs`,title:`Open`,onClick:()=>sm(e.id,t),children:(0,V.jsx)(mf,{size:13})}),(0,V.jsx)(`button`,{className:`btn ghost icon xs`,title:`Download`,onClick:()=>sm(e.id,t,!0),children:(0,V.jsx)(cf,{size:13})}),(0,V.jsx)(`button`,{className:`btn ghost icon xs`,title:`Delete`,onClick:()=>{confirm(`Delete ${t.name}? Agents that received it can no longer open it.`)&&Y.deleteAttachment(e.id,t.id).catch(e=>a(e.message))},children:(0,V.jsx)(qp,{size:13})})]})]},t.id))}),n&&(0,V.jsx)(oT,{label:`Drop to add to this project's files`})]})}function aT({onFiles:e,busy:t,progress:n}){let r=(0,b.useRef)(null);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`input`,{ref:r,type:`file`,multiple:!0,hidden:!0,onChange:t=>{e([...t.target.files??[]]),t.target.value=``}}),(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>r.current?.click(),disabled:t,children:[(0,V.jsx)(Yp,{size:13}),t?`Uploading… ${Math.round((n??0)*100)}%`:`Add files`]})]})}function oT({label:e}){return(0,V.jsxs)(`div`,{className:`drop-overlay`,children:[(0,V.jsx)(Yp,{size:22}),(0,V.jsx)(`span`,{children:e})]})}function sT(e,t,n){let r=n.assistantMessageID??``,i=e=>`${r}:${e}:${n.ordinal??0}`,a=(t,n)=>e.map(e=>e.key===t?n(e):e),o=t=>e.some(e=>e.key===t.key)?e:[...e,t];switch(t){case`session.text.started`:return o({kind:`text`,key:i(`text`),text:``});case`session.text.delta`:{let e=i(`text`);return o({kind:`text`,key:e,text:``}).map(t=>t.key===e?{...t,text:t.text+(n.delta??``)}:t)}case`session.text.ended`:return a(i(`text`),e=>({...e,text:n.text??e.text}));case`session.reasoning.started`:return o({kind:`reasoning`,key:i(`reasoning`),text:``});case`session.reasoning.delta`:{let e=i(`reasoning`);return o({kind:`reasoning`,key:e,text:``}).map(t=>t.key===e?{...t,text:t.text+(n.delta??``)}:t)}case`session.tool.input.started`:return o({kind:`tool`,key:n.id,name:n.name??`tool`,status:`running`});case`session.tool.called`:return a(n.id,e=>({...e,input:n.input}));case`session.tool.success`:return a(n.id,e=>({...e,status:`done`,output:cT(n.content)}));case`session.tool.failed`:case`session.tool.error`:return a(n.id,e=>({...e,status:`failed`,output:n.error?.message??cT(n.content)}));default:return e}}function cT(e){return Array.isArray(e)?e.map(e=>e?.type===`text`?e.text:``).join(``).trim():typeof e==`string`?e:void 0}var lT=/^Symbio( watchdog)?:\s*/,uT=/^\[from: ([^\]·]+?) · ([\w-]+)\]\n?/,dT={request:`Request`,info:`Update`,blocking:`Blocking`,urgent:`Urgent`,"asset-request":`Asset request`,"asset-granted":`Asset granted`,"asset-denied":`Asset denied`,"asset-released":`Asset released`,"task-review":`Ready for review`,"task-blocked":`Blocked`},fT={"asset-granted":`green`,"task-review":`amber`,"asset-denied":`red`,blocking:`red`,urgent:`red`,"task-blocked":`red`,request:`accent`,"asset-request":`accent`};function pT({project:e,agent:t}){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(t.name),[o,s]=(0,b.useState)(!1);async function c(){let n=i.trim();if(!n||n===t.name)return r(!1);s(!0);try{await Y.renameAgent(e.id,t.id,n),r(!1)}catch(e){alert(e.message)}finally{s(!1)}}return n?(0,V.jsx)(`input`,{className:`title-input`,autoFocus:!0,value:i,disabled:o,onChange:e=>a(e.target.value),onBlur:()=>void c(),onKeyDown:e=>{e.key===`Enter`&&c(),e.key===`Escape`&&(a(t.name),r(!1))}}):(0,V.jsxs)(`div`,{className:`title row`,style:{gap:6},children:[t.name,t.role!==`coordinator`&&(0,V.jsx)(`button`,{className:`btn ghost icon xs`,title:`Rename`,onClick:()=>{a(t.name),r(!0)},children:(0,V.jsx)(dp,{size:12})})]})}var mT=40,hT=120;function gT(e,t,n){let r=t.messages;if(!e?.length||!r.length)return{messages:r,hasOlder:t.hasMore};let i=new Set(r.map(e=>e.id));if(t.hasMore&&!e.some(e=>e.id===r[0].id))return{messages:r,hasOlder:!0};let a=r[0].time?.created??0,o=e.filter(e=>!i.has(e.id)&&(e.time?.created??0)<a);return{messages:[...o,...r],hasOlder:o.length?n:t.hasMore}}function _T({project:e,agent:t}){let[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(!1),c=(0,b.useRef)({messages:null,hasOlder:!1}),l=(0,b.useRef)(null),[u,d]=(0,b.useState)([]),[f,p]=(0,b.useState)(null),[m,h]=(0,b.useState)(null),[g,_]=(0,b.useState)(``),[v,y]=(0,b.useState)(!1),[x,S]=(0,b.useState)(!1),[C,w]=(0,b.useState)(!1),T=Qw(e.id),[E,D]=(0,b.useState)(!1),[O,ee]=(0,b.useState)(!1),[k,te]=(0,b.useState)(null),ne=(0,b.useRef)(null),A=(0,b.useRef)(!0),re=(e,t)=>{c.current={messages:e,hasOlder:t},r(e),a(t)},j=(0,b.useCallback)(()=>Y.historyPage(e.id,t.id,mT,void 0,k??void 0).then(e=>{let t=c.current,{messages:n,hasOlder:r}=gT(t.messages,e,t.hasOlder);A.current&&n.length>hT&&(n=n.slice(-80),r=!0),re(n,r)}).catch(e=>p(e.message)),[e.id,t.id,k]),ie=(0,b.useCallback)(async()=>{let{messages:n,hasOlder:r}=c.current;if(r&&n?.length&&!o){s(!0);try{let r=await Y.historyPage(e.id,t.id,mT,n[0].id,k??void 0);l.current=ne.current?.scrollHeight??null,re([...r.messages,...n],r.hasMore)}catch(e){p(e.message)}finally{s(!1)}}},[e.id,t.id,o,k]);(0,b.useLayoutEffect)(()=>{let e=ne.current;e&&l.current!==null&&(e.scrollTop+=e.scrollHeight-l.current,l.current=null)},[n]),(0,b.useEffect)(()=>{if(c.current={messages:null,hasOlder:!1},r(null),a(!1),d([]),A.current=!0,j(),!k)return hm(e=>{if(e.type!==`agent.stream`||e.agentId!==t.id)return;let{type:n,data:r}=e.event;/retr/i.test(n)?h(wT(r)):((n===`session.text.delta`||n===`session.tool.called`)&&h(null),n===`session.execution.started`?(p(null),j()):n.startsWith(`session.execution.`)?(h(null),n===`session.execution.failed`&&p(r.error?.message??`The agent's turn failed.`),j().then(()=>d([]))):d(e=>sT(e,n,r)))})},[t.id,t.sessionId,k,j]),(0,b.useEffect)(()=>{let e=ne.current;e&&A.current&&(e.scrollTop=e.scrollHeight)},[n,u,f]);async function ae(){let n=g.trim(),r=T.ready;if(!(!n&&!r.length||T.uploading)){y(!0),_(``),A.current=!0;try{await Y.send(e.id,t.id,n,!1,r),T.clear(),j()}catch(e){p(e.message),_(n)}finally{y(!1)}}}let M=t.status===`busy`||t.status===`stuck`;return(0,V.jsxs)(`div`,{className:`chat`,...k?{}:{onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),D(!0))},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||D(!1)},onDrop:e=>{e.preventDefault(),D(!1),T.add([...e.dataTransfer.files])}},children:[E&&(0,V.jsx)(oT,{label:`Drop to attach to your message to ${t.name}`}),(0,V.jsxs)(`div`,{className:`chat-head`,children:[(0,V.jsx)(Dm,{name:t.name,status:t.status,size:`lg`}),(0,V.jsxs)(`div`,{className:`grow`,children:[(0,V.jsx)(pT,{project:e,agent:t}),(0,V.jsxs)(`div`,{className:`sub ellipsis`,children:[Om(t.status),` ·`,` `,t.status===`stopped`?t.model:(0,V.jsx)(`select`,{className:`inline-select`,value:t.model,title:`Model ${t.name} runs on — applies from its next turn`,onChange:n=>Y.setAgentModel(e.id,t.id,n.target.value).catch(e=>alert(e.message)),children:[...new Set([t.model,...e.allowedModels])].map(t=>(0,V.jsx)(`option`,{value:t,disabled:!e.allowedModels.includes(t),children:t},t))}),t.branch?(0,V.jsxs)(V.Fragment,{children:[` · `,(0,V.jsx)(Mf,{size:11,style:{verticalAlign:-1}}),` `,t.repo?`${t.repo} · ${t.branch}`:t.branch]}):t.role!==`coordinator`&&(0,V.jsxs)(`span`,{title:`Works in the project folder itself: ${e.directory}`,children:[` · `,(0,V.jsx)(Af,{size:11,style:{verticalAlign:-1}}),` project folder`,t.repo?` · ${t.repo}`:``]}),(t.previousSessions?.length??0)>0&&(0,V.jsxs)(V.Fragment,{children:[` · `,(0,V.jsxs)(`select`,{className:`inline-select`,value:k??``,title:`Earlier sessions stay readable after the agent got a fresh one`,onChange:e=>te(e.target.value||null),children:[(0,V.jsx)(`option`,{value:``,children:`current session`}),[...t.previousSessions].reverse().map((e,n)=>(0,V.jsxs)(`option`,{value:e.sessionId,children:[`earlier session `,t.previousSessions.length-n,` (until `,new Date(e.endedAt).toLocaleString(),`)`]},e.sessionId))]})]})]})]}),t.status!==`stopped`&&(0,V.jsxs)(`button`,{className:`btn ghost sm`,disabled:C||M||t.status===`waiting`,title:M?`Available when the agent is idle`:`Continue in a fresh session: lighter and cheaper; a handoff note carries the essentials over`,onClick:()=>{confirm(`Give ${t.name} a fresh session? It keeps its name, folder, tasks and assets, and starts from a handoff note. The current conversation stays readable.`)&&(w(!0),te(null),Y.renewSession(e.id,t.id).catch(e=>alert(e.message)).finally(()=>w(!1)))},children:[(0,V.jsx)(xp,{size:14}),C?`Renewing…`:`New session`]}),t.role!==`coordinator`&&t.branch&&t.status!==`stopped`&&(0,V.jsxs)(`button`,{className:`btn ghost sm`,disabled:O||M||t.status===`waiting`,title:M?`Available when the agent is idle`:`Work in the project folder itself instead of its own copy: what it writes is there at once, nothing to merge`,onClick:()=>{confirm(`Move ${t.name} into the project folder? Its own copy (branch ${t.branch}) is removed, so its work must be merged first. It continues in a fresh session with a handoff note; the current conversation stays readable.`)&&(ee(!0),te(null),Y.moveToProjectFolder(e.id,t.id).catch(e=>alert(e.message)).finally(()=>ee(!1)))},children:[(0,V.jsx)(wf,{size:14}),O?`Moving…`:`Move to project folder`]}),t.role!==`coordinator`&&t.status!==`stopped`&&(0,V.jsxs)(`button`,{className:`btn ghost sm`,onClick:()=>{confirm(`Stop ${t.name}? Any assets it holds are released; unmerged work is kept.`)&&Y.stopAgent(e.id,t.id).catch(e=>alert(e.message))},children:[(0,V.jsx)(qd,{size:14}),`Stop agent`]}),t.role!==`coordinator`&&t.status===`stopped`&&(0,V.jsxs)(`button`,{className:`btn sm`,disabled:x,onClick:()=>{S(!0),Y.restartAgent(e.id,t.id).catch(e=>alert(e.message)).finally(()=>S(!1))},children:[(0,V.jsx)(Tp,{size:14}),x?`Restarting…`:`Restart agent`]})]}),(0,V.jsx)(`div`,{className:`chat-scroll`,ref:ne,onScroll:e=>{let t=e.currentTarget;A.current=t.scrollHeight-t.scrollTop-t.clientHeight<80,t.scrollTop<300&&ie()},children:(0,V.jsxs)(`div`,{className:`chat-col`,children:[n===null&&(0,V.jsx)(`div`,{className:`subtle center`,children:`Loading conversation…`}),i&&(0,V.jsx)(`button`,{className:`btn ghost sm load-older`,onClick:()=>void ie(),disabled:o,children:o?`Loading earlier messages…`:`Load earlier messages`}),n?.length===0&&u.length===0&&(0,V.jsxs)(`div`,{className:`chat-empty`,children:[(0,V.jsx)(`h2`,{children:`Let's talk about the project`}),(0,V.jsx)(`p`,{children:`Tell core what you want to build. It will ask questions, agree on the scope with you, and then plan the work.`})]}),(0,V.jsxs)(zl,{initial:!1,children:[n?.map(t=>(0,V.jsx)(vT,{message:t,projectId:e.id},t.id)),u.length>0&&(0,V.jsx)(G.div,{className:`msg-assistant`,initial:{opacity:0},animate:{opacity:1},children:u.map(e=>(0,V.jsx)(bT,{block:e},e.key))},`live`)]}),M&&u.length===0&&(0,V.jsx)(ET,{stuck:t.status===`stuck`,retry:m??TT(n)}),(0,V.jsx)(Uw,{project:e,agent:t}),f&&!CT(n)&&(0,V.jsxs)(`div`,{className:`msg-failure`,children:[(0,V.jsx)(Ld,{size:14}),f]})]})}),k?(0,V.jsx)(`div`,{className:`composer-wrap`,children:(0,V.jsxs)(`div`,{className:`session-note`,children:[`You're reading an earlier session of `,t.name,` (read-only).`,(0,V.jsx)(`button`,{className:`btn sm`,onClick:()=>te(null),children:`Back to the current session`})]})}):(0,V.jsx)(`div`,{className:`composer-wrap`,children:(0,V.jsxs)(`div`,{className:`composer`,children:[(0,V.jsx)($w,{projectId:e.id,files:T.files,onRemove:T.remove}),(0,V.jsx)(`textarea`,{value:g,placeholder:M?`${t.name} is working — your message will be queued`:`Message ${t.name}…`,onChange:e=>_(e.target.value),onPaste:e=>{let t=[...e.clipboardData.files];t.length&&!e.clipboardData.getData(`text/plain`)&&(e.preventDefault(),T.add(t))},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),ae())},rows:Math.min(10,Math.max(1,g.split(`
50
+ `).length))}),(0,V.jsxs)(`div`,{className:`composer-bar`,children:[(0,V.jsx)(eT,{onFiles:T.add}),(0,V.jsxs)(`span`,{className:`composer-hint`,children:[(0,V.jsx)(`span`,{className:`kbd`,children:`Enter`}),` to send · `,(0,V.jsx)(`span`,{className:`kbd`,children:`Shift`}),`+`,(0,V.jsx)(`span`,{className:`kbd`,children:`Enter`}),` for a new line`]}),(0,V.jsx)(`span`,{className:`spacer`}),M&&(0,V.jsxs)(`button`,{className:`btn ghost sm`,onClick:()=>Y.interrupt(e.id,t.id),title:`Interrupt the current turn`,children:[(0,V.jsx)(qd,{size:14}),`Stop`]}),(0,V.jsx)(`button`,{className:`btn primary icon sm`,onClick:ae,disabled:!g.trim()&&!T.ready.length||T.uploading||v,title:T.uploading?`Waiting for the files to upload`:`Send`,"aria-label":`Send`,children:(0,V.jsx)(Cd,{size:15})})]})]})})]})}function vT({message:e,projectId:t}){let n={initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.15}};if(e.type===`user`||e.type===`synthetic`){let r=e.text??``,i=r.match(uT);if(i&&i[1]!==`human`){let e=i[2];return(0,V.jsxs)(G.div,{className:`msg-agent`,...n,children:[(0,V.jsxs)(`div`,{className:`msg-agent-head`,children:[(0,V.jsx)(Dm,{name:i[1],size:`sm`}),(0,V.jsx)(`strong`,{children:i[1]}),(0,V.jsx)(`span`,{className:`tag ${fT[e]??``}`,children:dT[e]??e})]}),(0,V.jsx)(`div`,{className:`msg-agent-body md`,children:(0,V.jsx)(Nx,{remarkPlugins:[zw],children:r.slice(i[0].length)})})]})}if(i){let{body:e,files:a}=nT(r.slice(i[0].length));return(0,V.jsxs)(G.div,{className:`msg-user`,...n,children:[e,(0,V.jsx)(rT,{projectId:t,files:a})]})}if(lT.test(r))return(0,V.jsx)(G.div,{className:`msg-note`,...n,children:(0,V.jsxs)(`span`,{children:[(0,V.jsx)(Bf,{size:12,style:{verticalAlign:-2,marginRight:6}}),r.replace(lT,``)]})});let{body:a,files:o}=nT(r);return(0,V.jsxs)(G.div,{className:`msg-user`,...n,children:[a,(0,V.jsx)(rT,{projectId:t,files:o})]})}if(e.type===`assistant`){let t=e.content??[];return t.length===0&&!e.error?null:(0,V.jsxs)(G.div,{className:`msg-assistant`,...n,children:[t.map((e,t)=>(0,V.jsx)(bT,{block:yT(e,t)},t)),e.error&&(0,V.jsxs)(`div`,{className:`msg-failure`,children:[(0,V.jsx)(Ld,{size:14}),e.error.message??String(e.error)]})]})}return e.type===`model-switched`?(0,V.jsx)(G.div,{className:`msg-note`,...n,children:(0,V.jsxs)(`span`,{children:[(0,V.jsx)(Cp,{size:12,style:{verticalAlign:-2,marginRight:6}}),`Switched to `,e.model?.providerID,`/`,e.model?.id]})}):null}function yT(e,t){if(e.type===`text`)return{kind:`text`,key:String(t),text:e.text??``};if(e.type===`reasoning`)return{kind:`reasoning`,key:String(t),text:e.text??``};let n=e.state??{},r=n.status??e.status;return{kind:`tool`,key:String(t),name:e.name??e.type,input:n.input??e.input,status:r===`error`||r===`failed`?`failed`:r===`running`||r===`pending`?`running`:`done`,output:cT(n.content)||n.error?.message||void 0}}function bT({block:e}){return e.kind===`text`?(0,V.jsx)(`div`,{className:`md`,children:(0,V.jsx)(Nx,{remarkPlugins:[zw],children:e.text})}):e.kind===`reasoning`?e.text.trim()?(0,V.jsxs)(`details`,{className:`reasoning`,children:[(0,V.jsxs)(`summary`,{children:[(0,V.jsx)(kd,{size:13}),`Thinking`]}),(0,V.jsx)(`div`,{className:`reasoning-body`,children:e.text})]}):null:(0,V.jsx)(xT,{block:e})}function xT({block:e}){let t=ST(e.input);return(0,V.jsxs)(`details`,{className:`tool`,children:[(0,V.jsxs)(`summary`,{children:[(0,V.jsx)(`span`,{className:`tool-state ${e.status}`,children:e.status===`running`?(0,V.jsx)(Kf,{size:13,className:`spin`}):e.status===`failed`?(0,V.jsx)($p,{size:13}):(0,V.jsx)(jd,{size:13})}),(0,V.jsx)(Zp,{size:12,className:`subtle`}),(0,V.jsx)(`span`,{className:`tool-name`,children:e.name}),t&&(0,V.jsx)(`span`,{className:`tool-arg`,children:t})]}),e.input!==void 0&&(0,V.jsx)(`pre`,{className:`tool-io`,children:JSON.stringify(e.input,null,2)}),e.output&&(0,V.jsx)(`pre`,{className:`tool-io out`,children:e.output.slice(0,4e3)})]})}function ST(e){if(!e||typeof e!=`object`)return null;let t=e;if(typeof t.code==`string`){let e=[...new Set([...t.code.matchAll(/tools\.([\w$]+)\.([\w$]+)/g)].map(e=>`${e[1]}.${e[2]}`))];return e.length?e.join(`, `):t.code.split(`
51
+ `).find(e=>e.trim()&&!e.trim().startsWith(`//`))?.trim().slice(0,120)??null}let n=t.command??t.filePath??t.path??t.pattern??t.url??t.query;return typeof n==`string`?n.slice(0,120):null}function CT(e){let t=e?.findLast(e=>e.type===`assistant`||e.type===`user`);return t?.type===`assistant`&&!!t.error}function wT(e){let t=e?.retry??e,n=t?.error?.message??t?.message??`provider error`;return`Provider not responding — retrying${t?.attempt?` (attempt ${t.attempt})`:``}: ${n}`}function TT(e){let t=e?.[e.length-1];return t?.type===`assistant`&&t.retry&&!t.content?.length?wT(t):null}function ET({stuck:e,retry:t}){return(0,V.jsxs)(`div`,{className:`thinking ${t?`retrying`:``}`,children:[(0,V.jsxs)(`span`,{className:`typing`,children:[(0,V.jsx)(`i`,{}),(0,V.jsx)(`i`,{}),(0,V.jsx)(`i`,{})]}),e?`Looked stuck — recovering…`:t??`Working…`]})}var DT={done:{label:`Done`,icon:(0,V.jsx)(jd,{size:13}),className:`done`},partial:{label:`Partial`,icon:(0,V.jsx)(`span`,{className:`rule-dot`}),className:`partial`},missing:{label:`Missing`,icon:(0,V.jsx)($p,{size:13}),className:`missing`},"not-applicable":{label:`N/A`,icon:(0,V.jsx)(rp,{size:13}),className:`na`}},OT={found:{label:`Found`,className:``,hint:`Extracted from the source; nobody checked it yet`},"checked-by-agent":{label:`Checked (agent)`,className:`blue`,hint:`An agent compared text, location and excerpt with the source`},"checked-by-human":{label:`Checked (human)`,className:`green`,hint:`A person confirmed it`},contested:{label:`Contested`,className:`amber`,hint:`A source contradicts it; waiting for a decision`}};function kT({register:e,openSource:t}){let[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(``),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(new Set),v=(0,b.useMemo)(()=>new Set(e.rules.map(e=>e.id)),[e.rules]),y=(0,b.useMemo)(()=>new Map(e.sources.map(e=>[e.id,e])),[e.sources]),x=(0,b.useMemo)(()=>new Map(e.authorities.map(e=>[e.id,e.name])),[e.authorities]),S=(0,b.useMemo)(()=>[...new Set(e.rules.map(e=>e.imposedBy).filter(Boolean))].sort(),[e.rules]),C=e.areas.find(e=>e.id===c)?.stages??[],w=(0,b.useMemo)(()=>{let t=MT(n).split(/\s+/).filter(Boolean);return e.rules.filter(e=>{if(i&&e.status!==i||o&&e.confirmation!==o||c&&e.area!==c||u&&e.stage!==u||f&&e.imposedBy!==f)return!1;if(!t.length)return!0;let n=MT([e.id,e.text,e.action,e.current,e.check,e.imposedBy,...e.citations.flatMap(e=>[e.source,e.location,e.excerpt,y.get(e.source)?.name])].filter(Boolean).join(` `));return t.every(e=>n.includes(e))})},[e.rules,n,i,o,c,u,f,y]),T=!!(n||i||o||c||u||f),E=()=>{r(``),a(``),s(``),l(``),d(``),p(``)};if(!e.rules.length)return(0,V.jsx)(Nm,{icon:(0,V.jsx)(kp,{size:20}),title:`No rules recorded yet`,children:e.enabled?`Agents add the project's rules here as they come up: what each says, where it came from and whether it's met.`:`This project doesn't keep a rules register. Turn it on in the project's Settings.`});let D=e=>_(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),O=e=>{T&&!w.some(t=>t.id===e)&&E(),setTimeout(()=>{let t=document.getElementById(`rule-${e}`);t?.scrollIntoView({block:`center`}),t?.classList.add(`flash`),setTimeout(()=>t?.classList.remove(`flash`),1600)},50)},ee=e=>e?(0,V.jsx)(Nx,{remarkPlugins:[zw],components:{p:({children:e})=>(0,V.jsx)(`p`,{children:e}),a:({href:e=``,children:t})=>e.startsWith(`#rule:`)?(0,V.jsx)(`a`,{href:e,onClick:t=>{t.preventDefault(),O(e.slice(6))},children:t}):(0,V.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer noopener`,children:t})},children:FT(e,v)}):null,k=e.areas.map(e=>({area:e,rules:w.filter(t=>t.area===e.id)})).filter(e=>e.rules.length),te=w.filter(t=>!e.areas.some(e=>e.id===t.area));return(0,V.jsxs)(`div`,{className:`rules`,children:[(0,V.jsxs)(`div`,{className:`rules-filters`,children:[(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Search`}),(0,V.jsx)(`input`,{value:n,onChange:e=>r(e.target.value),placeholder:`id, text, source or excerpt`})]}),(0,V.jsx)(jT,{label:`Status`,value:i,onChange:a,options:Object.entries(DT).map(([e,t])=>[e,t.label])}),(0,V.jsx)(jT,{label:`Confirmation`,value:o,onChange:s,options:Object.entries(OT).map(([e,t])=>[e,t.label])}),(0,V.jsx)(jT,{label:`Area`,value:c,onChange:e=>{l(e),d(``)},options:e.areas.map(e=>[e.id,`${e.id} · ${e.name}`])}),(0,V.jsx)(jT,{label:`Stage`,value:u,onChange:d,options:C.map(e=>[e.id,`${e.id}. ${e.name}`]),disabled:!c}),(0,V.jsx)(jT,{label:`Imposed by`,value:f,onChange:p,options:S.map(e=>[e,x.get(e)?`${e} · ${x.get(e)}`:e])}),(0,V.jsxs)(`div`,{className:`rules-filters-foot`,children:[(0,V.jsxs)(`label`,{className:`rules-check`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:m,onChange:e=>h(e.target.checked)}),`Show all excerpts`]}),T&&(0,V.jsx)(`button`,{className:`btn ghost sm`,onClick:E,children:`Clear filters`}),(0,V.jsx)(`span`,{className:`spacer`}),(0,V.jsx)(`span`,{className:`muted small`,children:w.length===e.rules.length?`${e.rules.length} rules`:`${w.length} of ${e.rules.length} rules`})]})]}),w.length===0&&(0,V.jsx)(`div`,{className:`section-empty`,children:`No rules match these filters.`}),k.map(({area:e,rules:n})=>{let r=[...e.stages.map(e=>({...e,rules:n.filter(t=>t.stage===e.id)})),{id:``,name:``,rules:n.filter(t=>!t.stage||!e.stages.some(e=>e.id===t.stage))}].filter(e=>e.rules.length);return(0,V.jsxs)(`section`,{className:`rules-area`,children:[(0,V.jsxs)(`h2`,{children:[e.group&&(0,V.jsxs)(`span`,{className:`muted`,children:[e.group,` · `]}),e.name,` `,(0,V.jsx)(`span`,{className:`rules-prefix`,children:e.id})]}),e.description&&(0,V.jsx)(`p`,{className:`muted small`,children:e.description}),r.length>1&&(0,V.jsxs)(`div`,{className:`rules-stages`,children:[`Stages:`,` `,r.filter(e=>e.id).map(t=>(0,V.jsxs)(`a`,{href:`#stage-${e.id}-${t.id}`,onClick:n=>{n.preventDefault(),document.getElementById(`stage-${e.id}-${t.id}`)?.scrollIntoView({block:`start`})},children:[t.id,`. `,t.name]},t.id))]}),r.map(n=>(0,V.jsxs)(`div`,{className:`rules-stage`,children:[n.id&&(0,V.jsxs)(`h3`,{id:`stage-${e.id}-${n.id}`,children:[n.id,`. `,n.name]}),(0,V.jsx)(AT,{rules:n.rules,sources:y,authorities:x,excerptsOpen:e=>m||g.has(e),toggleExcerpt:D,openSource:t,md:ee,jumpTo:O})]},n.id||`none`))]},e.id)}),te.length>0&&(0,V.jsxs)(`section`,{className:`rules-area`,children:[(0,V.jsx)(`h2`,{children:`Without an area`}),(0,V.jsx)(AT,{rules:te,sources:y,authorities:x,excerptsOpen:e=>m||g.has(e),toggleExcerpt:D,openSource:t,md:ee,jumpTo:O})]})]})}function AT({rules:e,sources:t,authorities:n,excerptsOpen:r,toggleExcerpt:i,openSource:a,md:o,jumpTo:s}){return(0,V.jsx)(`div`,{className:`rules-table-wrap`,children:(0,V.jsxs)(`table`,{className:`rules-table`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{style:{width:76},children:`Id`}),(0,V.jsx)(`th`,{children:`Rule`}),(0,V.jsx)(`th`,{style:{width:`11%`},children:`Action`}),(0,V.jsx)(`th`,{style:{width:`17%`},children:`Source`}),(0,V.jsx)(`th`,{style:{width:56},children:`By`}),(0,V.jsx)(`th`,{style:{width:118},children:`Confirmation`}),(0,V.jsx)(`th`,{style:{width:92},children:`Status`}),(0,V.jsx)(`th`,{style:{width:`22%`},children:`Current state`})]})}),(0,V.jsx)(`tbody`,{children:e.map(e=>{let c=DT[e.status]??DT.missing,l=OT[e.confirmation]??OT.found,u=e.citations.filter(e=>e.excerpt),d=r(e.id);return(0,V.jsxs)(`tr`,{id:`rule-${e.id}`,className:e.supersededBy?`superseded`:``,children:[(0,V.jsxs)(`td`,{className:`rules-id`,children:[e.id,e.supersededBy&&(0,V.jsxs)(`div`,{className:`rules-superseded`,children:[`superseded by`,` `,(0,V.jsx)(`a`,{href:`#rule:${e.supersededBy}`,onClick:t=>{t.preventDefault(),s(e.supersededBy)},children:e.supersededBy})]})]}),(0,V.jsxs)(`td`,{className:`rules-md`,children:[o(e.text),e.check&&(0,V.jsxs)(`div`,{className:`rules-check-how`,children:[`Check: `,e.check]})]}),(0,V.jsx)(`td`,{className:`rules-md`,children:o(e.action)??(0,V.jsx)(`span`,{className:`muted`,children:`—`})}),(0,V.jsxs)(`td`,{children:[e.citations.length===0?(0,V.jsx)(`span`,{className:`tag amber`,title:`Nothing backs this rule yet`,children:`No source`}):(0,V.jsx)(`div`,{className:`rules-cites`,children:e.citations.map((n,r)=>{let i=t.get(n.source),o=NT(n.location),s=PT(n.location),c=!!i?.file,l=`${n.source}${n.location?` ${n.location}`:``}`;return(0,V.jsxs)(`span`,{children:[c?(0,V.jsx)(`a`,{href:`#${i.file}`,title:`${i.name} — open ${i.file}${o?` at line ${o}`:s?` at page ${s}`:``}`,onClick:e=>{e.preventDefault(),a(i.file,{line:o,page:s})},children:l}):(0,V.jsx)(`span`,{className:`rules-cite`,title:i?`${i.name}${i.file?` — ${i.file}`:``}`:`Unknown source`,children:l}),r<e.citations.length-1?`, `:``]},r)})}),u.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`button`,{className:`rules-excerpt-toggle`,onClick:()=>i(e.id),children:[d?(0,V.jsx)(Nd,{size:13}):(0,V.jsx)(Fd,{size:13}),`Literal excerpt`,u.length>1?`s (${u.length})`:``]}),d&&u.map((e,t)=>(0,V.jsxs)(`blockquote`,{className:`rules-excerpt`,children:[(0,V.jsxs)(`div`,{className:`rules-excerpt-src`,children:[e.source,e.location?` ${e.location}`:``]}),`“`,e.excerpt,`”`]},t))]})]}),(0,V.jsx)(`td`,{title:e.imposedBy?n.get(e.imposedBy):void 0,children:e.imposedBy??(0,V.jsx)(`span`,{className:`muted`,children:`—`})}),(0,V.jsx)(`td`,{children:(0,V.jsx)(`span`,{className:`tag ${l.className}`,title:l.hint,children:l.label})}),(0,V.jsx)(`td`,{children:(0,V.jsxs)(`span`,{className:`rules-status ${c.className}`,children:[c.icon,c.label]})}),(0,V.jsx)(`td`,{className:`rules-md`,children:o(e.current)??(0,V.jsx)(`span`,{className:`muted`,children:`—`})})]},e.id)})})]})})}function jT({label:e,value:t,onChange:n,options:r,disabled:i}){return(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:e}),(0,V.jsxs)(`select`,{value:t,onChange:e=>n(e.target.value),disabled:i,children:[(0,V.jsx)(`option`,{value:``,children:`All`}),r.map(([e,t])=>(0,V.jsx)(`option`,{value:e,children:t},e))]})]})}var MT=e=>e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase();function NT(e){let t=e&&/(?:^|\b)(?:l\.?|line|linha)\s*(\d+)/i.exec(e);return t?Number(t[1]):void 0}function PT(e){let t=e&&/(?:^|\b)(?:pp?\.?|p[aá]g\.?|page|p[aá]gina)\s*(\d+)/i.exec(e);return t?Number(t[1]):void 0}function FT(e,t){return e.split(/(`[^`]*`)/).map(e=>e.startsWith("`")?e:e.replace(/\b([A-Z]{1,6}-\d{2,4})\b/g,e=>t.has(e)?`[${e}](#rule:${e})`:e)).join(``)}var IT=`:rules`;function LT({project:e}){let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(null),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(``),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(null),[_,v]=(0,b.useState)(``),[y,x]=(0,b.useState)(null),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)([]),[E,D]=(0,b.useState)(null),[O,ee]=(0,b.useState)(new Set),[k,te]=(0,b.useState)(null),ne=(0,b.useRef)(!1);ne.current=l;let A=(0,b.useRef)(null),re=(0,b.useCallback)(()=>Promise.all([Y.docs(e.id).then(e=>(i(e.root),e.files)),Y.rules(e.id).catch(()=>null)]).then(([e,t])=>{te(t),n(e)}).catch(e=>g(e.message)),[e.id]),j=!!k&&(k.enabled||k.rules.length>0),ie=(0,b.useCallback)(t=>Y.readDoc(e.id,t).then(e=>c(e.content)).catch(e=>g(e.message)),[e.id]);(0,b.useEffect)(()=>{re();let t,n=hm(n=>{n.type===`agent.stream`&&n.projectId===e.id&&(n.event.type===`session.tool.success`||n.event.type.startsWith(`session.execution.`))&&(clearTimeout(t),t=setTimeout(()=>void re(),800))});return()=>{clearTimeout(t),n()}},[e.id,re]),(0,b.useEffect)(()=>{if(!t)return;let e=k?.rules.length?IT:t[0]?.path??(j?IT:null),n=a===IT?j?IT:e:a&&t.some(e=>e.path===a)?a:e;if(!n)return;n===a?n!==IT&&!ne.current&&ie(n):o(n);let r=t.filter(e=>e.path.includes(`/`)).map(e=>e.path.split(`/`)[0]);ee(e=>new Set([...e,...r]))},[t]),(0,b.useEffect)(()=>{a===IT?(u(!1),c(null)):a&&(u(!1),c(null),ie(a),ee(e=>new Set([...e,...BT(a)])))},[a,ie]),(0,b.useEffect)(()=>{let t=_.trim();if(t.length<2){x(null);return}C(!0);let n=setTimeout(()=>{Y.searchDocs(e.id,t).then(x).catch(e=>g(e.message)).finally(()=>C(!1))},250);return()=>clearTimeout(n)},[_,e.id]),(0,b.useEffect)(()=>{if(s===null||l||!E)return;let e=0,t=setInterval(()=>{(A.current&&XT(A.current,E)||++e>20)&&(clearInterval(t),D(null))},50);return()=>clearInterval(t)},[s]);let ae=(0,b.useMemo)(()=>new Set(t?.map(e=>e.path)),[t]),M=(e,t=null)=>{e===a?t&&A.current&&XT(A.current,t):(a&&T(e=>[...e.slice(-30),a]),D(t),o(e))},oe=()=>{let e=w.at(-1);e&&(T(e=>e.slice(0,-1)),D(null),o(e))},se=t=>{if(!a||/^[a-z][a-z0-9+.-]*:/i.test(t)||!/\.[a-z0-9]{2,5}(#.*)?$/i.test(t))return;let[n,r=``]=t.split(`#`),i=QT(a.includes(`/`)?a.slice(0,a.lastIndexOf(`/`)):``,$T(n).replace(/\\/g,`/`)),o=/^page=(\d+)$/i.exec(r)?.[1];i&&im(e.id,i,o?Number(o):void 0)},ce=e=>{if(!a||/^[a-z][a-z0-9+.-]*:/i.test(e))return null;let[t,n=``]=e.split(`#`),r=n?/^L\d+$/i.test(n)?{line:Number(n.slice(1))}:{anchor:$T(n)}:null;if(!t)return{path:a,to:r};let i=$T(t).replace(/\\/g,`/`),o=a.includes(`/`)?a.slice(0,a.lastIndexOf(`/`)):``;for(let e of[QT(o,i),QT(``,i),QT(`docs`,i)])if(e&&ae.has(e))return{path:e,to:r};return null};async function le(){if(a){m(!0);try{await Y.writeDoc(e.id,a,d),c(d),u(!1),re()}catch(e){g(e.message)}finally{m(!1)}}}if(t&&t.length===0&&!j)return(0,V.jsxs)(Nm,{icon:(0,V.jsx)(Td,{size:20}),title:`No documentation yet`,children:[`core writes it as it learns the project — `,e.docsLocation===`private`?`privately in .symbio/docs`:`in AGENTS.md and docs/`,`.`]});let ue=!!a&&/\.txt$/i.test(a),de=s&&!ue?qT(s):[];return(0,V.jsxs)(`div`,{className:`docs`,children:[(0,V.jsxs)(`nav`,{className:`docs-list`,children:[(0,V.jsxs)(`div`,{className:`docs-search`,children:[(0,V.jsx)(jp,{size:13}),(0,V.jsx)(`input`,{value:_,placeholder:`Search docs`,onChange:e=>v(e.target.value),onKeyDown:e=>e.key===`Escape`&&v(``)}),_&&(0,V.jsx)(`button`,{className:`btn ghost icon sm`,title:`Clear search`,onClick:()=>v(``),children:(0,V.jsx)($p,{size:12})})]}),y?(0,V.jsx)(VT,{query:_,results:y,searching:S,onOpen:e=>M(e.path,/\.txt$/i.test(e.path)?{line:e.line}:{text:e.text})}):(0,V.jsxs)(V.Fragment,{children:[j&&(0,V.jsxs)(`button`,{className:`docs-item docs-rules ${a===IT?`active`:``}`,onClick:()=>M(IT),children:[(0,V.jsx)(kp,{size:14}),(0,V.jsx)(`span`,{className:`grow`,children:`Rules`}),(0,V.jsx)(`span`,{className:`docs-item-time`,children:k.rules.length})]}),(0,V.jsx)(`div`,{className:`side-group-title`,title:r,children:e.docsLocation===`private`?`Private docs`:`Project docs`}),t&&(0,V.jsx)(zT,{nodes:RT(t),selected:a,expanded:O,setExpanded:ee,onOpen:e=>M(e)})]})]}),(0,V.jsxs)(`section`,{className:`docs-view`,children:[h&&(0,V.jsx)(`div`,{className:`error`,children:h}),a&&(0,V.jsxs)(`div`,{className:`docs-toolbar`,children:[(0,V.jsx)(`button`,{className:`btn ghost icon sm`,title:`Back`,disabled:!w.length||l,onClick:oe,children:(0,V.jsx)(yd,{size:14})}),a===IT?(0,V.jsx)(`strong`,{className:`small`,children:`Rules register`}):(0,V.jsx)(`code`,{className:`ellipsis`,title:a,children:a}),(0,V.jsx)(`div`,{className:`spacer`}),a===IT?null:l?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>u(!1),children:`Cancel`}),(0,V.jsxs)(`button`,{className:`btn primary sm`,onClick:le,disabled:p,children:[(0,V.jsx)(Dp,{size:13}),p?`Saving…`:`Save`]})]}):(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>{f(s??``),u(!0)},disabled:s===null,children:[(0,V.jsx)(dp,{size:13}),`Edit`]})]}),(0,V.jsx)(zl,{mode:`wait`,children:(0,V.jsx)(G.div,{ref:A,className:`docs-body`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.12},children:a===IT?k&&(0,V.jsx)(kT,{register:k,openSource:(t,n)=>{ae.has(t)?M(t,n.line?{line:n.line}:null):im(e.id,t,n.page)}}):l?(0,V.jsx)(`textarea`,{className:`docs-editor`,value:d,onChange:e=>f(e.target.value),spellCheck:!0}):s===null?(0,V.jsx)(`div`,{className:`muted`,children:`Loading…`}):ue?(0,V.jsx)(WT,{content:s}):(0,V.jsxs)(`div`,{className:`docs-page`,children:[(0,V.jsx)(`div`,{className:`md`,children:(0,V.jsx)(Nx,{remarkPlugins:[zw],components:YT(ce,M,se),children:s})}),de.length>=3&&(0,V.jsxs)(`aside`,{className:`docs-toc`,children:[(0,V.jsx)(`div`,{className:`docs-toc-title`,children:`On this page`}),de.map(e=>(0,V.jsx)(`button`,{className:`docs-toc-item level-${e.level}`,onClick:()=>M(a,{anchor:e.id}),title:e.text,children:e.text},e.id))]})]})},`${a}:${l}`)})]})]})}function RT(e){let t={name:``,path:``,children:[]};for(let n of e){let e=n.path.split(`/`),r=t;e.forEach((t,i)=>{let a=e.slice(0,i+1).join(`/`);if(i===e.length-1){r.children.push({name:t,path:a,file:n,children:[]});return}let o=r.children.find(e=>!e.file&&e.name===t);o||r.children.push(o={name:t,path:a,children:[]}),r=o})}let n=e=>{e.sort((e,t)=>e.path===`AGENTS.md`?-1:t.path===`AGENTS.md`?1:!!e.file==!!t.file?e.name.localeCompare(t.name):e.file?1:-1),e.forEach(e=>n(e.children))};return n(t.children),t.children}function zT({nodes:e,selected:t,expanded:n,setExpanded:r,onOpen:i,depth:a=0}){let o=e=>r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return(0,V.jsx)(V.Fragment,{children:e.map(e=>e.file?(0,V.jsxs)(`button`,{className:`docs-item ${t===e.path?`active`:``}`,style:{paddingLeft:8+a*14},onClick:()=>i(e.path),title:e.path,children:[(0,V.jsx)(bf,{size:14}),(0,V.jsx)(`span`,{className:`grow`,children:e.name}),(0,V.jsx)(`span`,{className:`docs-item-time`,children:Pm(e.file.modified)})]},e.path):(0,V.jsxs)(`div`,{className:`docs-tree-folder`,children:[(0,V.jsxs)(`button`,{className:`docs-item docs-folder`,style:{paddingLeft:8+a*14},onClick:()=>o(e.path),title:e.path,children:[n.has(e.path)?(0,V.jsx)(Nd,{size:14}):(0,V.jsx)(Fd,{size:14}),(0,V.jsx)(Af,{size:14}),(0,V.jsx)(`span`,{className:`grow`,children:e.name})]}),n.has(e.path)&&(0,V.jsx)(zT,{nodes:e.children,selected:t,expanded:n,setExpanded:r,onOpen:i,depth:a+1})]},e.path))})}var BT=e=>e.split(`/`).slice(0,-1).map((e,t,n)=>n.slice(0,t+1).join(`/`));function VT({query:e,results:t,searching:n,onOpen:r}){let i=new Map;for(let e of t.matches)i.set(e.path,[...i.get(e.path)??[],e]);let a=t.matches.length;return(0,V.jsxs)(`div`,{className:`docs-results`,children:[(0,V.jsx)(`div`,{className:`side-group-title`,children:n?`Searching…`:a===0?`No matches`:`${a}${t.truncated?`+`:``} match${a===1?``:`es`} in ${i.size} doc${i.size===1?``:`s`}`}),[...i].map(([t,n])=>(0,V.jsxs)(`div`,{className:`docs-result-file`,children:[(0,V.jsxs)(`div`,{className:`docs-result-path`,title:t,children:[(0,V.jsx)(bf,{size:12}),(0,V.jsx)(`span`,{className:`ellipsis`,children:t}),(0,V.jsx)(`span`,{className:`docs-item-time`,children:n.length})]}),n.slice(0,20).map(t=>(0,V.jsxs)(`button`,{className:`docs-result`,onClick:()=>r(t),title:`Line ${t.line}`,children:[(0,V.jsx)(`span`,{className:`docs-result-line`,children:t.line}),(0,V.jsx)(`span`,{className:`docs-result-text`,children:UT(t.text,e)})]},t.line)),n.length>20&&(0,V.jsxs)(`div`,{className:`docs-result-more`,children:[`+`,n.length-20,` more in this doc`]})]},t))]})}var HT=e=>e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase();function UT(e,t){let n=HT(t).split(/\s+/).filter(Boolean),r=``,i=[];for(let t=0;t<e.length;t++)for(let n of HT(e[t]))r+=n,i.push(t);let a=[];for(let e of n)for(let t=r.indexOf(e);t!==-1;t=r.indexOf(e,t+e.length))a.push([i[t],i[t+e.length-1]+1]);if(!a.length)return e;a.sort((e,t)=>e[0]-t[0]);let o=[],s=0;for(let[t,n]of a)t<s||(o.push(e.slice(s,t),(0,V.jsx)(`mark`,{children:e.slice(t,n)},t)),s=n);return o.push(e.slice(s)),o}function WT({content:e}){return(0,V.jsx)(`div`,{className:`docs-text`,children:e.split(/\r?\n/).map((e,t)=>(0,V.jsxs)(`div`,{id:`L${t+1}`,className:`docs-text-line`,children:[(0,V.jsx)(`span`,{className:`docs-text-no`,children:t+1}),(0,V.jsx)(`span`,{className:`docs-text-content`,children:e||` `})]},t))})}var GT=e=>e.trim().toLowerCase().replace(/[^\p{L}\p{N}\s-]/gu,``).replace(/\s/g,`-`);function KT(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(KT).join(``):e&&typeof e==`object`&&`props`in e?KT(e.props.children):``}function qT(e){let t=[],n=new Map,r=!1;for(let i of e.split(/\r?\n/)){/^\s*(```|~~~)/.test(i)&&(r=!r);let e=!r&&/^(#{1,4})\s+(.+?)\s*#*\s*$/.exec(i);if(!e)continue;let a=e[2].replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/[`*_]/g,``),o=JT(GT(a),n);e[1].length<=3&&t.push({id:o,text:a,level:e[1].length})}return t}function JT(e,t){let n=t.get(e)??0;return t.set(e,n+1),n?`${e}-${n}`:e}function YT(e,t,n){let r=new Map,i=e=>({children:t})=>(0,V.jsx)(e,{id:JT(GT(KT(t)),r),children:t}),a=(e,n,r)=>(0,V.jsx)(`a`,{href:`#${e.path}`,className:r,onClick:n=>{n.preventDefault(),t(e.path,e.to)},children:n});return{h1:i(`h1`),h2:i(`h2`),h3:i(`h3`),h4:i(`h4`),a:({href:t=``,children:r})=>{let i=e(t);return i?a(i,r):/^(https?|mailto):/i.test(t)?(0,V.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer noopener`,children:r}):/\.[a-z0-9]{2,5}(#.*)?$/i.test(t)?(0,V.jsx)(`a`,{href:t,title:t,onClick:e=>{e.preventDefault(),n(t)},children:r}):(0,V.jsx)(`span`,{title:t,children:r})},code:({className:t,children:n})=>{let r=KT(n),i=!t&&!r.includes(`
52
+ `)&&/\.(md|markdown|txt)(#\S*)?$/i.test(r)?e(r):null;return i?a(i,(0,V.jsx)(`code`,{children:n}),`doc-path`):(0,V.jsx)(`code`,{className:t,children:n})}}}function XT(e,t){let n=ZT(e,t);return n?(n.scrollIntoView({block:t.anchor?`start`:`center`}),n.classList.add(`flash`),setTimeout(()=>n.classList.remove(`flash`),1600),!0):!1}function ZT(e,t){if(t.anchor){let n=t.anchor;return e.querySelector(`[id="${CSS.escape(n)}"]`)??e.querySelector(`[id="${CSS.escape(GT(n))}"]`)}if(t.line)return e.querySelector(`[id="L${t.line}"]`);if(t.text){let n=e=>HT(e).replace(/\s+/g,``),r=n(t.text.replace(/^[#>*\-|\s\d.]+/,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/[`*_|]/g,` `)).slice(0,50);if(!r)return null;for(let t of e.querySelectorAll(`h1, h2, h3, h4, p, li, tr, pre, blockquote`))if(n(t.textContent??``).includes(r))return t}return null}function QT(e,t){let n=[];for(let r of(e?`${e}/${t}`:t).split(`/`))if(r&&r!==`.`){if(r===`..`){if(!n.length)return``;n.pop()}else n.push(r)}return n.join(`/`)}function $T(e){try{return decodeURIComponent(e)}catch{return e}}var eE={chat:{label:`Chat`},info:{label:`Update`},request:{label:`Request`,tone:`accent`},blocking:{label:`Blocking`,tone:`red`},urgent:{label:`Urgent`,tone:`red`},"needs-human":{label:`Question for you`,tone:`amber`},form:{label:`Question for you`,tone:`amber`},alert:{label:`Needs your action`,tone:`red`},approval:{label:`Approval requested`,tone:`amber`},permission:{label:`Permission request`,tone:`amber`},remote:{label:`Connection action`,tone:`blue`},system:{label:`Symbio`},"asset-request":{label:`Asset request`,tone:`accent`},"asset-granted":{label:`Asset granted`,tone:`green`},"asset-denied":{label:`Asset denied`,tone:`red`},"asset-released":{label:`Asset released`},plan:{label:`Plan proposed`,tone:`amber`},"task-review":{label:`Ready for review`,tone:`amber`},"task-blocked":{label:`Task blocked`,tone:`red`}};function tE(e){return e.filter(t=>(t.kind===`needs-human`||t.kind===`form`)&&t.from!==`symbio`&&!e.some(e=>e.from===`human`&&e.to===t.from&&e.time>t.time))}function nE(e){let[t,n]=(0,b.useState)(null);return(0,b.useEffect)(()=>(Y.log(e).then(n).catch(()=>n([])),hm(t=>{t.type===`message`&&t.projectId===e&&n(e=>e&&!e.some(e=>e.id===t.message.id)?[...e,t.message]:e)})),[e]),t}function rE({project:e,log:t,onOpenAgent:n}){let[r,i]=(0,b.useState)(!0),a=(0,b.useRef)(null),o=t=>t===`human`?`You`:t===`symbio`?`Symbio`:e.agents.find(e=>e.id===t)?.name??t,s=(t??[]).filter(e=>!(r&&e.kind===`chat`)),c=new Set(tE(t??[]).map(e=>e.id));return(0,b.useEffect)(()=>{let e=a.current;e&&(e.scrollTop=e.scrollHeight)},[s.length]),(0,V.jsxs)(`div`,{className:`chat`,children:[(0,V.jsxs)(`div`,{className:`timeline-toolbar`,children:[(0,V.jsx)(`span`,{children:`Everything agents say to each other and to you, and what Symbio tells them.`}),(0,V.jsx)(`span`,{className:`spacer`}),(0,V.jsxs)(`label`,{className:`check`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked)}),` Hide your direct chats`]})]}),(0,V.jsxs)(`div`,{className:`timeline`,ref:a,children:[t&&s.length===0&&(0,V.jsx)(Nm,{icon:(0,V.jsx)(tp,{size:20}),title:`No team messages yet`,children:`Requests, handoffs and questions between agents show up here as they happen.`}),(0,V.jsx)(`div`,{className:`timeline-inner`,children:s.map(t=>{let r=eE[t.kind]??{label:t.kind},i=t.kind===`system`||t.kind===`chat`,a=o(t.from);return(0,V.jsxs)(`div`,{className:`event ${i?`quiet`:``} ${c.has(t.id)?`open`:``}`,children:[(0,V.jsx)(Dm,{name:a,kind:t.from===`human`?`human`:t.from===`symbio`?`system`:`agent`}),(0,V.jsxs)(`div`,{style:{minWidth:0},children:[(0,V.jsxs)(`div`,{className:`event-head`,children:[(0,V.jsx)(`strong`,{children:a}),(0,V.jsx)(`span`,{className:`subtle`,children:`→`}),(0,V.jsx)(`span`,{children:o(t.to)}),(0,V.jsx)(`span`,{className:`tag ${r.tone??``}`,children:r.label}),(0,V.jsx)(`span`,{className:`when`,children:Fm(t.time)})]}),(0,V.jsx)(`div`,{className:`event-body md`,children:(0,V.jsx)(Nx,{remarkPlugins:[zw],children:t.text})}),c.has(t.id)&&t.kind===`needs-human`&&(0,V.jsx)(iE,{project:e,agentId:t.from}),c.has(t.id)&&t.kind===`form`&&n&&(0,V.jsxs)(`button`,{className:`btn primary sm`,style:{marginTop:8},onClick:()=>n(t.from),children:[`Answer in `,a,`'s chat`]})]})]},t.id)})})]})]})}function iE({project:e,agentId:t}){let[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(null);async function c(){if(n.trim()){a(!0);try{await Y.send(e.id,t,n.trim()),r(``)}catch(e){s(e.message)}finally{a(!1)}}}return(0,V.jsxs)(`div`,{className:`reply`,children:[(0,V.jsx)(`textarea`,{value:n,rows:2,placeholder:`Write your answer…`,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),c())}}),(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:c,disabled:!n.trim()||i,children:`Reply`}),o&&(0,V.jsx)(`div`,{className:`error`,children:o})]})}function aE(e,t,n){let[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)([]),s=e?.id;(0,b.useEffect)(()=>{if(!s)return;let e=()=>{Y.approvals(s).then(e=>i(e.filter(e=>e.status===`pending`))).catch(()=>{}),Y.permissions(s).then(o).catch(()=>{})};return e(),hm(t=>{t.type===`approvals.updated`&&t.projectId===s&&e()})},[s]);let c=tE(t??[]),l=e?.agents.filter(e=>e.problem&&e.status!==`stopped`).length??0,u=+(n?.status===`proposed`);return{approvals:r,permissions:a,questions:c,count:r.length+a.length+c.length+l+u}}function oE({project:e,plan:t,data:n,onClose:r,onOpenAgent:i,onOpenTab:a}){let o=e.agents.filter(e=>e.problem&&e.status!==`stopped`),s=t=>e.agents.find(e=>e.id===t)?.name??t;return(0,V.jsxs)(Mm,{title:`Needs you`,onClose:r,children:[n.count===0&&(0,V.jsx)(`div`,{className:`inbox-empty`,children:`Nothing is waiting for you.`}),(0,V.jsxs)(zl,{initial:!1,children:[o.length>0&&(0,V.jsxs)(sE,{icon:(0,V.jsx)(Ld,{size:14,style:{color:`var(--red)`}}),kind:`Agents stuck`,children:[(0,V.jsxs)(`div`,{className:`small`,children:[(0,V.jsx)(`strong`,{children:o.map(e=>e.name).join(`, `)}),` can't continue — every allowed model failed.`]}),(0,V.jsx)(`div`,{className:`inbox-reason`,children:o[0].problem}),(0,V.jsxs)(`div`,{className:`inbox-actions`,children:[(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>a(`settings`),children:`Add a model`}),(0,V.jsx)(`button`,{className:`btn sm`,onClick:()=>Y.retryModels(e.id).catch(e=>alert(e.message)),children:`Retry now`})]})]},`stuck`),t?.status===`proposed`&&(0,V.jsxs)(sE,{icon:(0,V.jsx)(Zd,{size:14}),kind:`Plan to review`,children:[(0,V.jsxs)(`div`,{className:`small`,children:[`core proposed a plan with `,(0,V.jsxs)(`strong`,{children:[t.tasks.length,` tasks`]}),`. Nothing starts until you approve it.`]}),(0,V.jsx)(`div`,{className:`inbox-actions`,children:(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>a(`plan`),children:`Review plan`})})]},`plan`),n.approvals.map(t=>(0,V.jsx)(cE,{project:e,approval:t},t.id)),n.permissions.map(t=>(0,V.jsx)(lE,{project:e,request:t},t.id)),n.questions.map(t=>t.kind===`form`?(0,V.jsxs)(sE,{icon:(0,V.jsx)(Zf,{size:14}),kind:`Question`,agent:s(t.from),time:t.time,children:[(0,V.jsxs)(`div`,{className:`small`,children:[s(t.from),` is asking you a multiple-choice question.`]}),(0,V.jsx)(`div`,{className:`inbox-actions`,children:(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>i(t.from),children:`Answer in chat`})})]},t.id):(0,V.jsx)(uE,{project:e,question:t,agentName:s(t.from)},t.id))]})]})}function sE({icon:e,kind:t,agent:n,time:r,children:i}){return(0,V.jsxs)(G.div,{className:`inbox-item`,layout:!0,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,height:0,padding:0,margin:0},children:[(0,V.jsxs)(`div`,{className:`inbox-item-head`,children:[n?(0,V.jsx)(Dm,{name:n,size:`sm`}):e,(0,V.jsx)(`span`,{className:`inbox-kind`,children:t}),n&&(0,V.jsxs)(`span`,{className:`small`,children:[`· `,n]}),r&&(0,V.jsx)(`span`,{className:`when`,children:Pm(r)})]}),i]})}function cE({project:e,approval:t}){let[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(!1);async function o(r){a(!0),await Y.decideApproval(e.id,t.id,r,n.trim()||void 0).catch(e=>alert(e.message))}let s=t.action.kind===`github_api`&&t.action.body!==void 0?JSON.stringify(t.action.body,null,2):null;return(0,V.jsxs)(sE,{icon:(0,V.jsx)(hp,{size:14}),kind:`Use ${t.connectionName}`,agent:t.agentName,time:t.createdAt,children:[(0,V.jsxs)(`div`,{className:`small`,children:[`Wants to `,t.summary]}),typeof t.action.command==`string`&&(0,V.jsx)(`pre`,{className:`command`,children:t.action.command}),s&&(0,V.jsx)(`pre`,{className:`command`,children:s}),(0,V.jsxs)(`div`,{className:`inbox-reason`,children:[`Why: `,t.reason]}),(0,V.jsx)(`input`,{placeholder:`Note for the agent (optional)`,value:n,onChange:e=>r(e.target.value)}),(0,V.jsxs)(`div`,{className:`inbox-actions`,children:[(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>o(!0),disabled:i,children:`Approve`}),(0,V.jsx)(`button`,{className:`btn danger sm`,onClick:()=>o(!1),disabled:i,children:`Deny`})]})]})}function lE({project:e,request:t}){let[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(!1);async function o(r){a(!0),await Y.answerPermission(e.id,t.id,r,n.trim()||void 0).catch(e=>alert(e.message))}let s=t.action===`shell`?`run a command`:t.action===`read`?`read a file`:t.action===`edit`?`change a file`:t.action;return(0,V.jsxs)(sE,{icon:(0,V.jsx)(Up,{size:14}),kind:`Permission`,agent:t.agentName,time:t.time,children:[(0,V.jsxs)(`div`,{className:`small`,children:[`Wants to `,s,`:`]}),(0,V.jsx)(`pre`,{className:`command`,children:t.resources.join(`
53
+ `)}),(0,V.jsx)(`input`,{placeholder:`Note for the agent (optional)`,value:n,onChange:e=>r(e.target.value)}),(0,V.jsxs)(`div`,{className:`inbox-actions`,children:[(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>o(`once`),disabled:i,children:`Allow once`}),t.save.length>0&&(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>o(`always`),disabled:i,title:`Remembered for this project`,children:[(0,V.jsx)(Hf,{size:13}),`Always allow `,(0,V.jsx)(`code`,{children:t.save.join(`, `)})]}),(0,V.jsx)(`button`,{className:`btn danger sm`,onClick:()=>o(`reject`),disabled:i,children:`Deny`})]})]})}function uE({project:e,question:t,agentName:n}){let[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(!1);async function s(){r.trim()&&(o(!0),await Y.send(e.id,t.from,r.trim()).catch(e=>alert(e.message)),o(!1),i(``))}return(0,V.jsxs)(sE,{icon:(0,V.jsx)(Zf,{size:14}),kind:`Question`,agent:n,time:t.time,children:[(0,V.jsx)(`div`,{className:`md small`,children:(0,V.jsx)(Nx,{remarkPlugins:[zw],children:t.text})}),(0,V.jsx)(`textarea`,{rows:2,placeholder:`Answer ${n}…`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),s())}}),(0,V.jsx)(`div`,{className:`inbox-actions`,children:(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:s,disabled:!r.trim()||a,children:`Send answer`})})]})}var dE=[{status:`todo`,title:`To do`,icon:(0,V.jsx)(Yd,{size:14})},{status:`in-progress`,title:`In progress`,icon:(0,V.jsx)(Ud,{size:14})},{status:`blocked`,title:`Blocked`,icon:(0,V.jsx)(ap,{size:14})},{status:`review`,title:`Review`,icon:(0,V.jsx)(gf,{size:14})},{status:`done`,title:`Done`,icon:(0,V.jsx)(Vd,{size:14})}];function fE({project:e,plan:t}){let[n,r]=(0,b.useState)(null);if(!t)return null;if(t.status===`none`)return(0,V.jsx)(Nm,{icon:(0,V.jsx)(Zd,{size:20}),title:`No plan yet`,children:`core proposes a plan once you've agreed on the scope. It shows up here for your approval, then turns into a live board.`});let i=new Map(e.agents.map(e=>[e.id,e])),a=t.tasks.filter(e=>e.status===`done`).length,o=t.tasks.length?a/t.tasks.length:0,s=e=>t.tasks.find(t=>t.id===e)?.status===`done`,c=t.tasks.find(e=>e.id===n);return(0,V.jsxs)(`div`,{className:`kanban`,children:[(0,V.jsxs)(`div`,{className:`kanban-head`,children:[(0,V.jsxs)(`div`,{className:`kanban-goal`,children:[(0,V.jsx)(`div`,{className:`kanban-goal-text`,children:t.goal}),(0,V.jsxs)(`div`,{className:`kanban-goal-meta`,children:[(0,V.jsx)(pE,{status:t.status}),(0,V.jsxs)(`span`,{children:[`Revision `,t.revision]})]})]}),(0,V.jsxs)(`div`,{className:`progress`,title:`${a} of ${t.tasks.length} tasks done`,children:[(0,V.jsxs)(`span`,{className:`tnum`,children:[a,`/`,t.tasks.length]}),(0,V.jsx)(`div`,{className:`progress-track`,children:(0,V.jsx)(G.div,{className:`progress-fill`,animate:{width:`${o*100}%`},transition:{type:`spring`,stiffness:80,damping:18}})})]})]}),(0,V.jsx)(zl,{children:t.status===`proposed`&&(0,V.jsx)(gE,{project:e,plan:t})}),t.status===`changes-requested`&&(0,V.jsx)(`div`,{className:`plan-banner`,children:(0,V.jsxs)(`span`,{className:`small muted`,children:[`You asked for changes`,t.feedback?`: “${t.feedback}”`:``,`. Waiting for core's revised plan…`]})}),(0,V.jsx)(Gl,{children:(0,V.jsx)(`div`,{className:`columns`,children:dE.map(e=>{let n=t.tasks.filter(t=>t.status===e.status);return(0,V.jsxs)(`div`,{className:`column col-${e.status}`,children:[(0,V.jsxs)(`div`,{className:`column-head`,children:[e.icon,e.title,(0,V.jsx)(`span`,{className:`column-count`,children:n.length})]}),(0,V.jsxs)(`div`,{className:`column-body`,children:[(0,V.jsx)(zl,{children:n.map(e=>(0,V.jsx)(mE,{task:e,agent:e.assignee?i.get(e.assignee):void 0,waitingOn:e.dependsOn.filter(e=>!s(e)),onOpen:()=>r(e.id)},e.id))}),n.length===0&&(0,V.jsx)(`div`,{className:`column-empty`,children:`—`})]})]},e.status)})})}),(0,V.jsx)(zl,{children:c&&(0,V.jsx)(hE,{task:c,agent:c.assignee?i.get(c.assignee):void 0,onClose:()=>r(null)})})]})}function pE({status:e}){return e===`proposed`?(0,V.jsx)(`span`,{className:`tag amber`,children:`Awaiting your approval`}):e===`changes-requested`?(0,V.jsx)(`span`,{className:`tag blue`,children:`Changes requested`}):e===`approved`?(0,V.jsx)(`span`,{className:`tag green`,children:`Approved`}):null}function mE({task:e,agent:t,waitingOn:n,onOpen:r}){return(0,V.jsxs)(G.button,{layout:!0,layoutId:e.id,className:`task-card ts-${e.status}`,onClick:r,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:`spring`,stiffness:300,damping:30},children:[(0,V.jsxs)(`div`,{className:`task-top`,children:[(0,V.jsx)(`span`,{className:`task-id`,children:e.id}),n.length>0&&e.status===`todo`&&(0,V.jsxs)(`span`,{className:`row`,style:{gap:3},title:`Waiting on these tasks`,children:[(0,V.jsx)(Wf,{size:11}),`after `,n.join(`, `)]})]}),(0,V.jsx)(`div`,{className:`task-title`,children:e.title}),e.assets.length>0&&(0,V.jsx)(`div`,{className:`task-meta`,children:e.assets.map(e=>(0,V.jsxs)(`span`,{className:`tag`,title:`Shared asset`,children:[(0,V.jsx)(Yf,{}),e]},e))}),(0,V.jsxs)(`div`,{className:`task-bottom`,children:[t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Dm,{name:t.name,size:`sm`,status:t.status===`busy`?`busy`:void 0}),(0,V.jsx)(`span`,{className:`ellipsis`,children:t.name})]}):(0,V.jsx)(`span`,{className:`subtle`,children:`Unassigned`}),e.notes.length>0&&(0,V.jsxs)(`span`,{className:`subtle`,title:e.notes[e.notes.length-1].text,children:[(0,V.jsx)($f,{size:11}),e.notes.length]})]})]})}function hE({task:e,agent:t,onClose:n}){let r=dE.find(t=>t.status===e.status);return(0,V.jsxs)(Mm,{title:`${e.id} · ${e.title}`,onClose:n,children:[(0,V.jsxs)(`dl`,{className:`task-detail-meta`,children:[(0,V.jsx)(`dt`,{children:`Status`}),(0,V.jsxs)(`dd`,{children:[r?.icon,r?.title]}),(0,V.jsx)(`dt`,{children:`Assignee`}),(0,V.jsx)(`dd`,{children:t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Dm,{name:t.name,size:`sm`}),t.name]}):(0,V.jsx)(`span`,{className:`subtle`,children:`Unassigned`})}),e.dependsOn.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`dt`,{children:`Depends on`}),(0,V.jsx)(`dd`,{children:e.dependsOn.join(`, `)})]}),e.assets.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`dt`,{children:`Shared assets`}),(0,V.jsx)(`dd`,{children:e.assets.map(e=>(0,V.jsxs)(`span`,{className:`tag`,children:[(0,V.jsx)(Yf,{}),e]},e))})]})]}),(0,V.jsx)(`div`,{className:`md`,children:(0,V.jsx)(Nx,{remarkPlugins:[zw],children:e.description||`_No description._`})}),e.notes.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`h3`,{children:`History`}),(0,V.jsx)(`div`,{className:`history`,children:e.notes.map((e,t)=>(0,V.jsxs)(`div`,{className:`history-item`,children:[(0,V.jsx)(`span`,{className:`when`,children:Fm(e.time)}),(0,V.jsxs)(`span`,{className:`what`,children:[(0,V.jsx)(`strong`,{children:e.by}),` `,e.text]})]},t))})]})]})}function gE({project:e,plan:t}){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(null);async function u(t){s(!0),l(null);try{await Y.decidePlan(e.id,t,i.trim()||void 0)}catch(e){l(e.message),s(!1)}}return(0,V.jsxs)(G.div,{className:`plan-banner`,initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0},children:[(0,V.jsxs)(`div`,{className:`plan-banner-row`,children:[(0,V.jsx)(Zd,{size:16,style:{color:`var(--amber)`}}),(0,V.jsxs)(`div`,{className:`grow`,children:[(0,V.jsxs)(`strong`,{children:[`core proposed this plan (`,t.tasks.length,` tasks).`]}),` `,(0,V.jsx)(`span`,{className:`muted`,children:`Nothing starts until you approve it.`})]}),!n&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{className:`btn sm`,onClick:()=>r(!0),disabled:o,children:`Request changes`}),(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>u(!0),disabled:o,children:`Approve plan`})]})]}),n&&(0,V.jsxs)(`div`,{className:`plan-banner-row`,children:[(0,V.jsx)(`textarea`,{autoFocus:!0,rows:2,placeholder:`What should change? e.g. “split T2 in two”, “use one helper only”…`,value:i,onChange:e=>a(e.target.value)}),(0,V.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>r(!1),disabled:o,children:`Cancel`}),(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>u(!1),disabled:o||!i.trim(),children:`Send`})]}),c&&(0,V.jsx)(`div`,{className:`error`,children:c})]})}var _E=e=>e>=1024**3?`${(e/1024**3).toFixed(1)} GB`:`${Math.round(e/1024**2)} MB`;function vE({project:e}){let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(null);(0,b.useEffect)(()=>{Y.housekeeping(e.id).then(n).catch(e=>c(e.message))},[e.id]);async function l(){i(!0);try{n(await Y.checkHousekeeping(e.id)),c(null)}catch(e){c(e.message)}finally{i(!1)}}async function u(t){o(t);try{await Y.cleanHelper(e.id,t),n(await Y.housekeeping(e.id))}catch(e){alert(e.message)}finally{o(null)}}let d=t?.folders.reduce((e,t)=>e+t.buildBytes,0)??0;return(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsxs)(`div`,{className:`section-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Storage & backups`}),(0,V.jsxs)(`p`,{children:[`Symbio backs up its state every day (the last 7 days, in `,(0,V.jsx)(`code`,{children:`~/.symbio/backups`}),`) and checks once a day for work that exists only on this computer and for build outputs piling up in helpers' folders. When it finds either, you and core are told.`]})]}),(0,V.jsxs)(`button`,{className:`btn sm`,onClick:l,disabled:r,children:[(0,V.jsx)(xp,{size:13,className:r?`spin`:void 0}),r?`Checking…`:`Check now`]})]}),s&&(0,V.jsx)(`div`,{style:{padding:12},children:(0,V.jsx)(`div`,{className:`error`,children:s})}),t?(0,V.jsxs)(`div`,{className:`stack`,style:{padding:16,gap:16},children:[(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Last backup`}),(0,V.jsx)(`div`,{className:`small`,children:t.lastBackup??`Not yet: the first one runs a few minutes after Symbio starts.`})]}),(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Work only on this computer`}),t.remote?t.unpushed.length===0?(0,V.jsxs)(`div`,{className:`small`,children:[`Everything is on the remote (`,t.remote,`).`]}):(0,V.jsx)(`div`,{className:`list-compact`,children:t.unpushed.map(e=>(0,V.jsxs)(`div`,{className:`small`,children:[(0,V.jsx)(`code`,{children:e.branch}),` — `,e.commits,` commit`,e.commits===1?``:`s`,` not on `,t.remote,(0,V.jsxs)(`span`,{className:`subtle`,children:[` · latest: `,e.latest]})]},e.branch))}):(0,V.jsx)(`div`,{className:`small subtle`,children:`This project has no git remote, so there's nowhere to push to.`})]}),(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsxs)(`span`,{children:[`Helpers' folders`,d>0?` · ${_E(d)} of build outputs`:``]}),t.folders.length===0?(0,V.jsx)(`div`,{className:`small subtle`,children:`No helper folders.`}):(0,V.jsxs)(`table`,{className:`usage-table`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`Helper`}),(0,V.jsx)(`th`,{className:`num`,children:`Folder`}),(0,V.jsx)(`th`,{className:`num`,children:`Build outputs`}),(0,V.jsx)(`th`,{})]})}),(0,V.jsx)(`tbody`,{children:t.folders.map(e=>(0,V.jsxs)(`tr`,{children:[(0,V.jsxs)(`td`,{children:[e.name,` `,(0,V.jsxs)(`span`,{className:`subtle`,children:[`(`,e.status,`)`]})]}),(0,V.jsx)(`td`,{className:`num tnum`,children:_E(e.bytes)}),(0,V.jsx)(`td`,{className:`num tnum`,children:e.buildBytes>0?_E(e.buildBytes):`—`}),(0,V.jsx)(`td`,{className:`num`,children:e.buildBytes>0&&(0,V.jsxs)(`button`,{className:`btn ghost sm`,disabled:a!==null||e.status===`busy`||e.status===`waiting`,title:e.status===`busy`||e.status===`waiting`?`Available when the helper is idle`:`Delete git-ignored build folders (bin, obj, node_modules…); work is never touched`,onClick:()=>u(e.agentId),children:[(0,V.jsx)(ff,{size:13}),a===e.agentId?`Cleaning…`:`Clean`]})})]},e.agentId))})]})]}),(0,V.jsxs)(`div`,{className:`small subtle`,children:[`Checked `,new Date(t.checkedAt).toLocaleString(),`.`]})]}):!s&&(0,V.jsx)(`div`,{className:`section-empty`,children:`Checking… (measuring folders can take a moment)`})]})}function yE({project:e,onChanged:t}){let[n,r]=(0,b.useState)(!1);return(0,V.jsxs)(`div`,{className:`settings-scroll`,children:[(0,V.jsxs)(`div`,{className:`settings-inner`,children:[(0,V.jsx)(xE,{project:e,onChanged:t}),(0,V.jsx)(TE,{project:e,onChanged:t}),(0,V.jsx)(EE,{project:e,onChanged:t}),(0,V.jsx)(CE,{project:e,onChanged:t}),(0,V.jsx)(qm,{project:e}),(0,V.jsx)(vE,{project:e}),(0,V.jsx)(DE,{project:e,onChanged:t}),(0,V.jsx)(`section`,{className:`section danger-zone`,children:(0,V.jsxs)(`div`,{className:`section-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Remove project`}),(0,V.jsx)(`p`,{children:`Stops the agents and removes their workspaces. Your files are never touched.`})]}),(0,V.jsxs)(`button`,{className:`btn danger`,onClick:()=>r(!0),children:[(0,V.jsx)(qp,{size:14}),`Remove…`]})]})})]}),(0,V.jsx)(zl,{children:n&&(0,V.jsx)(Rm,{project:e,onClose:()=>r(!1),onRemoved:()=>location.hash=`#/`})})]})}function bE({dirty:e,saving:t,onSave:n,onReset:r}){return e?(0,V.jsxs)(`div`,{className:`row`,style:{justifyContent:`flex-end`,padding:`10px 12px 4px`},children:[(0,V.jsx)(`button`,{className:`btn ghost sm`,onClick:r,disabled:t,children:`Discard`}),(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:n,disabled:t,children:t?`Saving…`:`Save changes`})]}):null}function xE({project:e,onChanged:t}){let[n,r]=(0,b.useState)(e.name),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(!!e.rulesRegister),c=n.trim()!==e.name&&!!n.trim()||o!==!!e.rulesRegister;async function l(){a(!0);try{t(await Y.updateProject(e.id,{name:n.trim()||e.name,rulesRegister:o}))}catch(e){alert(e.message)}finally{a(!1)}}return(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsx)(`div`,{className:`section-head`,children:(0,V.jsx)(`div`,{children:(0,V.jsx)(`h2`,{children:`General`})})}),(0,V.jsxs)(`div`,{className:`stack`,style:{padding:16,gap:14},children:[(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Name`}),(0,V.jsx)(`input`,{value:n,onChange:e=>r(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Folder`}),(0,V.jsx)(`code`,{className:`muted`,children:e.directory})]}),(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Documentation`}),(0,V.jsx)(`div`,{className:`muted small`,children:e.docsLocation===`private`?(0,V.jsxs)(V.Fragment,{children:[`Private — kept in `,(0,V.jsx)(`code`,{children:`.symbio/docs`}),` and handed to agents by Symbio.`]}):(0,V.jsxs)(V.Fragment,{children:[`In the project — `,(0,V.jsx)(`code`,{children:`AGENTS.md`}),` and `,(0,V.jsx)(`code`,{children:`docs/`}),`.`]})})]}),(0,V.jsxs)(`label`,{className:`choice`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked)}),(0,V.jsxs)(`span`,{className:`choice-body`,children:[(0,V.jsx)(`span`,{className:`choice-title`,children:`Rules register`}),(0,V.jsx)(`span`,{className:`choice-desc`,children:`Agents record the project's rules with where each came from and whether it's met; you browse them in the Docs tab. Turning it off keeps what's recorded.`})]})]})]}),(0,V.jsx)(bE,{dirty:c,saving:i,onSave:l,onReset:()=>{r(e.name),s(!!e.rulesRegister)}})]})}var SE=20;function CE({project:e,onChanged:t}){let n=e.messageLimit??SE,r=e.renewSessions??`manual`,[i,a]=(0,b.useState)(String(n)),[o,s]=(0,b.useState)(r),c=e.helperWorkspace??`own`,[l,u]=(0,b.useState)(c),[d,f]=(0,b.useState)(!1),p=Number(i),m=i.trim()!==``&&Number.isInteger(p)&&p>=0&&p<=1e3,h=m&&(p!==n||o!==r||l!==c);async function g(){f(!0);try{t(await Y.updateProject(e.id,{messageLimit:p,renewSessions:o,helperWorkspace:l}))}catch(e){alert(e.message)}finally{f(!1)}}return(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsx)(`div`,{className:`section-head`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Team`}),(0,V.jsx)(`p`,{children:`How the agents of this project work together.`})]})}),(0,V.jsxs)(`div`,{className:`stack`,style:{padding:16,gap:14},children:[(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Where new helpers work`}),(0,V.jsxs)(`div`,{className:`seg`,children:[(0,V.jsx)(`button`,{className:l===`own`?`on`:``,onClick:()=>u(`own`),children:`Their own copy`}),(0,V.jsx)(`button`,{className:l===`shared`?`on`:``,onClick:()=>u(`shared`),children:`The project folder`})]}),(0,V.jsxs)(`span`,{className:`hint`,children:[l===`own`?`Each helper gets its own copy of the project on its own branch, and core merges finished work. Best when helpers change the same files in parallel.`:`Helpers work in the project folder itself: what one writes, the next sees at once, with nothing to merge. Best for step-by-step work where each step uses the previous one's files.`,` `,`core can still choose per helper. Existing helpers stay where they are; move one from its chat. Only applies to git projects: without git, helpers always share the folder.`]})]}),e.subRepositories!==void 0&&(0,V.jsx)(wE,{project:e,onChanged:t}),(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Fresh sessions for helpers`}),(0,V.jsxs)(`div`,{className:`seg`,children:[(0,V.jsx)(`button`,{className:o===`manual`?`on`:``,onClick:()=>s(`manual`),children:`When I ask`}),(0,V.jsx)(`button`,{className:o===`after-task`?`on`:``,onClick:()=>s(`after-task`),children:`After each finished task`})]}),(0,V.jsx)(`span`,{className:`hint`,children:`Long conversations get slow and costly, since every step re-reads them. A fresh session keeps the helper's name, folder, tasks and assets and starts from a handoff note; the old conversation stays readable. "When I ask": use New session in the agent's chat.`})]}),(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Messages two agents may exchange in 30 minutes`}),(0,V.jsx)(`input`,{type:`number`,min:0,max:1e3,value:i,onChange:e=>a(e.target.value),style:{maxWidth:140}}),(0,V.jsx)(`span`,{className:`hint`,children:m&&p===0?`No limit: agents can message each other freely.`:`Guards against two agents going back and forth without progress; task assignments, shared-asset requests and review reports don't count. When two agents reach it, further messages between them wait until older ones are 30 minutes old, and you're told. 0 removes the limit. Default ${SE}.`})]})]}),(0,V.jsx)(bE,{dirty:h,saving:d,onSave:g,onReset:()=>{a(String(n)),s(r),u(c)}})]})}function wE({project:e,onChanged:t}){let[n,r]=(0,b.useState)(!1);async function i(n){if(n!==!!e.subRepositories){r(!0);try{t(await Y.updateProject(e.id,{subRepositories:n}))}catch(e){alert(e.message)}finally{r(!1)}}}return(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Git repositories`}),(0,V.jsxs)(`div`,{className:`seg`,children:[(0,V.jsx)(`button`,{className:e.subRepositories?`on`:``,disabled:n,onClick:()=>i(!0),children:`Each repository inside`}),(0,V.jsx)(`button`,{className:e.subRepositories?``:`on`,disabled:n,onClick:()=>i(!1),children:`The project folder's repository`})]}),(0,V.jsx)(`span`,{className:`hint`,children:`The project folder is a git repository with other repositories inside it. "Each repository inside": helpers get a copy of one of them, and merges and pushes go to it; the outer repository is left alone. Nothing on disk changes when you switch.`})]})}function TE({project:e,onChanged:t}){let[n,r]=(0,b.useState)(e.connections),[i,a]=(0,b.useState)(!1),o=JSON.stringify(n)!==JSON.stringify(e.connections);async function s(){a(!0);try{t(await Y.updateProject(e.id,{connections:n}))}catch(e){alert(e.message)}finally{a(!1)}}return(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsx)(`div`,{className:`section-head`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Connections`}),(0,V.jsxs)(`p`,{children:[`GitHub accounts, Azure DevOps organizations and servers this project's agents may use. They act through Symbio and never see the credentials. With`,` `,(0,V.jsx)(`strong`,{children:`Ask me`}),`, every push, deploy or remote command waits for your approval.`]})]})}),(0,V.jsx)(`div`,{style:{padding:12},children:(0,V.jsx)(ym,{value:n,onChange:r})}),(0,V.jsx)(bE,{dirty:o,saving:i,onSave:s,onReset:()=>r(e.connections)})]})}function EE({project:e,onChanged:t}){let[n,r]=(0,b.useState)(e.allowedModels),[i,a]=(0,b.useState)(e.coordinatorModel),[o,s]=(0,b.useState)(!1),c=i!==e.coordinatorModel||JSON.stringify(n)!==JSON.stringify(e.allowedModels);async function l(){s(!0);try{t(await Y.updateProject(e.id,{allowedModels:n,coordinatorModel:i}))}catch(e){alert(e.message)}finally{s(!1)}}return(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsx)(`div`,{className:`section-head`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Models`}),(0,V.jsx)(`p`,{children:`Agents may use any selected model and switch to the next one when a model fails. Adding a model also resumes agents that got stuck.`})]})}),(0,V.jsx)(`div`,{style:{padding:12},children:(0,V.jsx)(wm,{allowed:n,coordinator:i,onChange:(e,t)=>{r(e),a(t)}})}),(0,V.jsx)(bE,{dirty:c&&n.length>0&&!!i,saving:o,onSave:l,onReset:()=>{r(e.allowedModels),a(e.coordinatorModel)}})]})}function DE({project:e,onChanged:t}){async function n(n,r){try{t(await Y.updateProject(e.id,{allowedPatterns:e.allowedPatterns.filter(e=>e.action!==n||e.pattern!==r)}))}catch(e){alert(e.message)}}return(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsx)(`div`,{className:`section-head`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Always allowed`}),(0,V.jsx)(`p`,{children:`Permission requests you answered with “Always allow”. Matching requests are approved automatically.`})]})}),e.allowedPatterns.length===0?(0,V.jsx)(`div`,{className:`section-empty`,children:`Nothing yet.`}):(0,V.jsx)(`div`,{className:`section-body`,children:e.allowedPatterns.map(e=>(0,V.jsxs)(`div`,{className:`list-row`,children:[(0,V.jsx)(`span`,{className:`tag`,children:e.action}),(0,V.jsx)(`code`,{className:`grow`,children:e.pattern}),(0,V.jsxs)(`button`,{className:`btn ghost sm`,onClick:()=>n(e.action,e.pattern),title:`Ask me again for these`,children:[(0,V.jsx)($p,{size:13}),`Revoke`]})]},`${e.action}:${e.pattern}`))})]})}function OE({projectId:e}){let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(null),[l,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(!1),[p,m]=(0,b.useState)(`chat`),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(!1),y=nE(e),x=aE(t,y,a);if((0,b.useEffect)(()=>{let t=()=>Y.project(e).then(e=>{n(e),c(null)}).catch(e=>c(e.message)),r=()=>Y.assets(e).then(i).catch(()=>{}),a=()=>Y.plan(e).then(o).catch(()=>{});return t(),r(),a(),hm(i=>{i.type===`project.updated`&&i.projectId===e&&t(),i.type===`assets.updated`&&i.projectId===e&&r(),i.type===`plan.updated`&&i.projectId===e&&a(),i.type===`agent.status`&&i.projectId===e&&n(e=>e&&{...e,agents:e.agents.map(e=>e.id===i.agentId?{...e,status:i.status}:e)})})},[e]),s)return(0,V.jsx)(`div`,{className:`page-inner`,children:(0,V.jsx)(`div`,{className:`error`,children:s})});if(!t)return null;let S=t.agents.find(e=>e.id===l)??t.agents.find(e=>e.role===`coordinator`),C=t.agents.filter(e=>e.status!==`stopped`),w=t.agents.filter(e=>e.status===`stopped`),T=C.filter(e=>e.problem),E=e=>e===null?`core`:t.agents.find(t=>t.id===e)?.name??`?`,D=a?.tasks.filter(e=>e.status===`done`).length??0,O=e=>{u(e.id),m(`chat`)};async function ee(){f(!0);try{n((await Y.start(t.id)).project)}catch(e){c(e.message)}finally{f(!1)}}let k=[{id:`chat`,label:S&&S.role!==`coordinator`?`Chat · ${S.name}`:`Chat`,icon:(0,V.jsx)($f,{size:14})},{id:`plan`,label:`Plan`,icon:(0,V.jsx)(Gp,{size:14}),extra:a?.status===`proposed`?(0,V.jsxs)(G.span,{className:`tab-alert`,initial:{scale:0},animate:{scale:1},title:`A plan is waiting for your approval`,children:[(0,V.jsx)(`span`,{className:`tab-alert-dot`}),`Review`]}):a&&a.status!==`none`&&a.tasks.length>0?(0,V.jsxs)(`span`,{className:`count`,children:[D,`/`,a.tasks.length]}):null},{id:`messages`,label:`Messages`,icon:(0,V.jsx)(tp,{size:14})},{id:`docs`,label:`Docs`,icon:(0,V.jsx)(Td,{size:14})},{id:`files`,label:`Files`,icon:(0,V.jsx)(sp,{size:14})},{id:`settings`,label:`Settings`,icon:(0,V.jsx)(zp,{size:14})}];return(0,V.jsxs)(`div`,{className:`project-view`,children:[(0,V.jsxs)(`aside`,{className:`side`,children:[(0,V.jsxs)(`div`,{className:`side-scroll`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`side-group-title`,children:[`Team`,(0,V.jsx)(`span`,{className:`tnum`,children:C.length})]}),(0,V.jsx)(zl,{initial:!1,children:C.map(e=>(0,V.jsx)(kE,{agent:e,active:p===`chat`&&S?.id===e.id,onClick:()=>O(e)},e.id))}),t.agents.length===0&&(0,V.jsx)(`div`,{style:{padding:`4px 8px`},children:(0,V.jsx)(`button`,{className:`btn primary block`,onClick:ee,disabled:d,children:d?`Starting…`:`Start core`})}),w.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`button`,{className:`stopped-toggle`,onClick:()=>v(e=>!e),children:[_?(0,V.jsx)(Nd,{size:13}):(0,V.jsx)(Fd,{size:13}),w.length,` stopped`]}),_&&w.map(e=>(0,V.jsx)(kE,{agent:e,active:p===`chat`&&S?.id===e.id,onClick:()=>O(e)},e.id))]})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`side-group-title`,children:`Shared assets`}),r.length===0?(0,V.jsx)(`div`,{className:`subtle small`,style:{padding:`0 8px`},children:`None declared yet.`}):r.map(e=>(0,V.jsxs)(`div`,{className:`asset-row ${e.holder?`held`:``}`,title:e.description,children:[e.holder?(0,V.jsx)(Yf,{size:13}):(0,V.jsx)(qf,{size:13}),(0,V.jsxs)(`div`,{className:`grow`,children:[(0,V.jsx)(`div`,{className:`asset-name ellipsis`,children:e.name}),(0,V.jsxs)(`div`,{className:`asset-sub`,children:[e.holder?`Held by ${E(e.holder)}`:`Free`,e.queue.length>0&&` · ${e.queue.length} waiting`]})]})]},e.name))]})]}),(0,V.jsxs)(`div`,{className:`side-foot`,children:[(0,V.jsx)(Km,{project:t,onOpen:()=>{m(`settings`),setTimeout(()=>document.getElementById(`usage`)?.scrollIntoView({behavior:`smooth`,block:`start`}),150)}}),t.agents.length>0&&(0,V.jsxs)(`button`,{className:`btn sm block`,onClick:()=>(t.paused?Y.resumeTeam(t.id):Y.pauseTeam(t.id)).then(n).catch(e=>alert(e.message)),title:t.paused?`Deliver held messages and let agents continue`:`Interrupt working agents and hold their messages`,children:[t.paused?(0,V.jsx)(pp,{size:13}):(0,V.jsx)(lp,{size:13}),t.paused?`Resume team`:`Pause team`]})]})]}),(0,V.jsxs)(`section`,{className:`main`,children:[(0,V.jsxs)(`div`,{className:`main-head`,children:[(0,V.jsx)(`div`,{className:`tabs`,children:k.map(e=>(0,V.jsxs)(`button`,{className:`tab ${p===e.id?`active`:``}`,onClick:()=>m(e.id),children:[e.icon,e.label,e.extra,p===e.id&&(0,V.jsx)(G.span,{layoutId:`tab-underline`,className:`tab-underline`,transition:{duration:.15}})]},e.id))}),(0,V.jsxs)(`div`,{className:`main-actions`,children:[x.count>0&&(0,V.jsxs)(G.button,{className:`needs-you`,onClick:()=>g(!0),initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},children:[`Needs you`,(0,V.jsx)(`span`,{className:`count`,children:x.count})]}),(0,V.jsx)(Im,{project:t,onRemoved:()=>location.hash=`#/`})]})]}),t.paused&&(0,V.jsxs)(`div`,{className:`banner blue`,children:[(0,V.jsx)(lp,{size:15}),(0,V.jsxs)(`div`,{className:`grow`,children:[(0,V.jsx)(`strong`,{children:`The team is paused.`}),` `,(0,V.jsx)(`span`,{className:`muted`,children:t.heldMessages?.length?`${t.heldMessages.length} message(s) between agents will be delivered when you resume.`:`Agents won't start anything on their own; you can still talk to them.`})]}),(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>Y.resumeTeam(t.id).then(n).catch(e=>alert(e.message)),children:[(0,V.jsx)(pp,{size:13}),`Resume`]})]}),T.length>0&&(0,V.jsxs)(`div`,{className:`banner red`,children:[(0,V.jsx)(Ld,{size:15}),(0,V.jsxs)(`div`,{className:`grow ellipsis`,title:T[0].problem??``,children:[(0,V.jsxs)(`strong`,{children:[T.map(e=>e.name).join(`, `),` can't continue`]}),` `,(0,V.jsx)(`span`,{className:`muted`,children:`— every allowed model failed.`})]}),(0,V.jsx)(`button`,{className:`btn sm`,onClick:()=>Y.retryModels(t.id).catch(e=>alert(e.message)),children:`Retry now`}),(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>m(`settings`),children:`Add a model`})]}),(0,V.jsx)(`div`,{className:`main-body`,children:p===`docs`?(0,V.jsx)(LT,{project:t}):p===`files`?(0,V.jsx)(iT,{project:t}):p===`plan`?(0,V.jsx)(fE,{project:t,plan:a}):p===`messages`?(0,V.jsx)(rE,{project:t,log:y,onOpenAgent:e=>{u(e),m(`chat`)}}):p===`settings`?(0,V.jsx)(yE,{project:t,onChanged:n},t.id):S?(0,V.jsx)(_T,{project:t,agent:S},S.id):(0,V.jsx)(Nm,{icon:(0,V.jsx)($f,{size:20}),title:`Start the conversation`,children:`Start core to begin discussing the project.`})})]}),(0,V.jsx)(zl,{children:h&&(0,V.jsx)(oE,{project:t,plan:a,data:x,onClose:()=>g(!1),onOpenAgent:e=>{u(e),m(`chat`),g(!1)},onOpenTab:e=>{m(e),g(!1)}})})]})}function kE({agent:e,active:t,onClick:n}){let r=e.problem?`Needs attention`:e.status===`idle`?e.purpose??(e.role===`coordinator`?`Coordinates the team`:`Idle`):Om(e.status),i=e.problem?`problem`:e.status===`busy`?`working`:e.status===`waiting`?`waiting`:``;return(0,V.jsxs)(G.button,{layout:!0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`agent-row ${t?`active`:``}`,onClick:n,title:[e.purpose,e.model,e.usage&&`${em(tm(e.usage))} tokens`].filter(Boolean).join(`
54
+ `),children:[(0,V.jsx)(Dm,{name:e.name,status:e.problem?`error`:e.status}),(0,V.jsxs)(`span`,{className:`grow`,children:[(0,V.jsxs)(`span`,{className:`agent-name`,children:[e.name,e.role===`coordinator`&&(0,V.jsx)(`span`,{className:`tag accent`,children:`lead`})]}),(0,V.jsx)(`span`,{className:`agent-sub ellipsis ${i}`,style:{display:`block`},children:r})]})]})}function AE(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)([]),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(null),u=()=>Y.providers().then(e=>{t(e.connected),r(e.catalog),a(null)}).catch(e=>a(e.message));return(0,b.useEffect)(()=>{u()},[]),(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsxs)(`div`,{className:`section-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Model providers`}),(0,V.jsx)(`p`,{children:`The AI services OpenCode is signed in to. Every model you can pick for a project comes from one of these; remove the ones you don't use to keep that list short. Keys are handed to OpenCode and not kept by Symbio.`})]}),(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>s(!0),disabled:!n.length,children:[(0,V.jsx)(_p,{size:13}),`Add provider`]})]}),i&&(0,V.jsx)(`div`,{style:{padding:12},children:(0,V.jsx)(`div`,{className:`error`,children:i})}),!e&&!i&&(0,V.jsx)(`div`,{className:`section-empty`,children:`Loading providers…`}),e&&(0,V.jsx)(`div`,{className:`section-body`,children:e.map(e=>(0,V.jsxs)(`div`,{className:`list-row`,children:[(0,V.jsx)(`span`,{className:`conn-icon`,children:(0,V.jsx)(Dd,{size:16})}),(0,V.jsxs)(`div`,{className:`grow`,children:[(0,V.jsx)(`div`,{className:`list-title`,children:e.name}),(0,V.jsxs)(`div`,{className:`list-sub ellipsis`,children:[e.models,` model`,e.models===1?``:`s`,` · `,jE(e),e.usedBy.length>0&&` · used by ${e.usedBy.join(`, `)}`]})]}),e.logins.length>0?(0,V.jsx)(`button`,{className:`btn ghost icon sm`,onClick:()=>l(e),title:`Remove`,children:(0,V.jsx)(qp,{size:13})}):(0,V.jsx)(`span`,{className:`subtle small`,title:ME(e),children:`Can't remove here`})]},e.id))}),(0,V.jsxs)(zl,{children:[o&&(0,V.jsx)(PE,{catalog:n,connected:new Set(e?.map(e=>e.id)),onClose:()=>s(!1),onAdded:()=>{s(!1),u()}}),c&&(0,V.jsx)(NE,{provider:c,onClose:()=>l(null),onRemoved:()=>{l(null),u()}})]})]})}function jE(e){return e.source===`login`?e.logins.map(e=>e.label).join(`, `):e.source===`config`?`from your OpenCode config file`:e.source===`environment`?`from an environment variable`:`built in`}function ME(e){return e.source===`config`?`Defined in OpenCode's config file (opencode.jsonc). Remove it there.`:e.source===`environment`?`Comes from an environment variable on this computer. Remove the variable to disconnect it.`:`This provider is built into OpenCode.`}function NE({provider:e,onClose:t,onRemoved:n}){let[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(null);async function s(){i(!0);try{for(let t of e.logins)await Y.removeProviderLogin(t.id);n()}catch(e){o(e.message),i(!1)}}return(0,V.jsxs)(jm,{title:`Remove ${e.name}?`,onClose:t,footer:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{className:`btn ghost`,onClick:t,children:`Cancel`}),(0,V.jsx)(`button`,{className:`btn danger-solid`,onClick:s,disabled:r,children:r?`Removing…`:`Remove`})]}),children:[(0,V.jsxs)(`p`,{children:[`OpenCode signs out of `,e.name,` and deletes its saved login (`,e.logins.map(e=>e.label).join(`, `),`). Its`,` `,e.models,` models leave the model list. To use it again, add it back with its key or sign-in.`]}),e.usedBy.length>0&&(0,V.jsxs)(`div`,{className:`notice`,children:[`Selected in `,e.usedBy.join(`, `),`. Agents there switch to the project's other models; if it has none left, they stop and ask for one.`]}),a&&(0,V.jsx)(`div`,{className:`error`,children:a})]})}function PE({catalog:e,connected:t,onClose:n,onAdded:r}){let[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(null),c=(0,b.useMemo)(()=>{let t=i.trim().toLowerCase();return e.filter(e=>!t||e.name.toLowerCase().includes(t)||e.id.includes(t))},[e,i]);return o?(0,V.jsx)(LE,{entry:o,onBack:()=>s(null),onClose:n,onAdded:r}):(0,V.jsx)(jm,{title:`Add a model provider`,subtitle:`Pick the service you have an account or API key for.`,onClose:n,children:(0,V.jsxs)(`div`,{className:`model-picker`,children:[(0,V.jsxs)(`div`,{className:`model-picker-head`,children:[(0,V.jsx)(jp,{size:14,className:`subtle`}),(0,V.jsx)(`input`,{autoFocus:!0,placeholder:`Search ${e.length} providers…`,value:i,onChange:e=>a(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`model-groups`,style:{maxHeight:360},children:[c.map(e=>(0,V.jsxs)(`div`,{className:`model-row`,onClick:()=>s(e),children:[(0,V.jsx)(`span`,{className:`model-name`,children:e.name}),t.has(e.id)&&(0,V.jsx)(`span`,{className:`tag green`,children:`Connected`}),(0,V.jsx)(`span`,{className:`subtle small`,children:e.methods.map(e=>e.type===`key`?`API key`:`Sign-in`).filter(FE).join(` · `)})]},e.id)),c.length===0&&(0,V.jsx)(`div`,{className:`section-empty`,children:`No provider matches.`})]})]})})}var FE=(e,t,n)=>n.indexOf(e)===t;function IE(e,t){return e.filter(e=>!e.hidden&&(e.when??[]).every(e=>e.op===`eq`?t[e.key]===e.value:t[e.key]!==e.value))}function LE({entry:e,onBack:t,onClose:n,onAdded:r}){let[i,a]=(0,b.useState)(0),o=e.methods[i],[s,c]=(0,b.useState)({}),[l,u]=(0,b.useState)(``),[d,f]=(0,b.useState)(null),[p,m]=(0,b.useState)(``),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(null),y=(0,b.useRef)(null);(0,b.useEffect)(()=>{let e={};for(let t of o.form)t.default===void 0?t.options?.length&&(e[t.key]=t.options[0].value):e[t.key]=t.default;c(e),v(null)},[i]),(0,b.useEffect)(()=>{if(y.current=d,!d||d.mode!==`auto`)return;let t=setInterval(async()=>{let n=await Y.providerOauthStatus(e.id,d.attemptID).catch(()=>null);n&&n.status!==`pending`&&(clearInterval(t),y.current=null,n.status===`complete`?r():(f(null),v(n.status===`expired`?`The sign-in expired. Try again.`:n.message||`The sign-in failed.`)))},2e3);return()=>clearInterval(t)},[d]),(0,b.useEffect)(()=>()=>void(y.current&&Y.cancelProviderOauth(e.id,y.current.attemptID).catch(()=>{})),[]);let x=IE(o.form,s),S=()=>{let e={},t=new Set([...x.map(e=>e.key),...o.form.filter(e=>e.hidden).map(e=>e.key)]);for(let[n,r]of Object.entries(s))t.has(n)&&r.trim()&&(e[n]=r.trim());return e},C=x.some(e=>e.required&&!s[e.key]?.trim())||o.type===`key`&&!l.trim(),w=x.find(e=>e.pattern&&s[e.key]&&!new RegExp(e.pattern).test(s[e.key]));async function T(){g(!0),v(null);try{if(o.type===`key`)await Y.connectProviderKey(e.id,l,S()),r();else if(d)await Y.completeProviderOauth(e.id,d.attemptID,p),y.current=null,r();else{let t=await Y.beginProviderOauth(e.id,o.id,S());f(t),window.open(t.url,`_blank`,`noopener`)}}catch(e){v(e.message)}finally{g(!1)}}let E=o.type===`key`?h?`Connecting…`:`Connect`:d?h?`Finishing…`:`Finish`:h?`Starting…`:`Sign in`;return(0,V.jsxs)(jm,{title:`Connect ${e.name}`,onClose:n,footer:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`button`,{className:`btn ghost`,onClick:t,disabled:h,children:[(0,V.jsx)(yd,{size:14}),`Back`]}),!(d&&d.mode===`auto`)&&(0,V.jsx)(`button`,{className:`btn primary`,onClick:T,disabled:h||(d?!p.trim():C||!!w),children:E})]}),children:[d?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`p`,{children:[`Finish signing in to `,e.name,` in your browser. If it didn't open, use this link:`,` `,(0,V.jsxs)(`a`,{href:d.url,target:`_blank`,rel:`noopener noreferrer`,children:[d.url,` `,(0,V.jsx)(mf,{size:12})]})]}),d.instructions&&(0,V.jsx)(`div`,{className:`notice`,children:d.instructions}),d.mode===`code`?(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Code`}),(0,V.jsx)(`input`,{autoFocus:!0,value:p,onChange:e=>m(e.target.value),placeholder:`Paste the code shown after signing in`})]}):(0,V.jsxs)(`div`,{className:`row subtle small`,children:[(0,V.jsx)(Kf,{size:13,className:`spin`}),` Waiting for the sign-in to finish…`]})]}):(0,V.jsxs)(V.Fragment,{children:[e.methods.length>1&&(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`How to connect`}),(0,V.jsx)(`div`,{className:`seg`,children:e.methods.map((e,t)=>(0,V.jsx)(`button`,{className:t===i?`on`:``,onClick:()=>a(t),children:e.label},t))})]}),x.map(e=>(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:e.title}),e.options?(0,V.jsx)(`select`,{value:s[e.key]??``,onChange:t=>c({...s,[e.key]:t.target.value}),children:e.options.map(e=>(0,V.jsxs)(`option`,{value:e.value,children:[e.label,e.description?` — ${e.description}`:``]},e.value))}):(0,V.jsx)(`input`,{value:s[e.key]??``,onChange:t=>c({...s,[e.key]:t.target.value}),placeholder:e.placeholder}),e.description&&(0,V.jsx)(`span`,{className:`hint`,children:e.description}),w===e&&(0,V.jsx)(`span`,{className:`hint`,style:{color:`var(--red)`},children:`This doesn't look right.`})]},e.key)),o.type===`key`?(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`API key`}),(0,V.jsx)(`input`,{type:`password`,autoFocus:x.length===0,value:l,onChange:e=>u(e.target.value)})]}):(0,V.jsxs)(`p`,{className:`subtle`,children:[`You'll sign in on `,e.name,`'s website, then come back here.`]}),e.other.length>0&&(0,V.jsxs)(`p`,{className:`subtle small`,children:[`Also possible outside Symbio: `,e.other.join(`; `),`.`]})]}),_&&(0,V.jsx)(`div`,{className:`error`,children:_})]})}function RE(){let[e,t]=(0,b.useState)(null),n=()=>Y.remote().then(t).catch(()=>{});return(0,b.useEffect)(()=>(n(),hm(e=>{e.type===`remote.updated`&&n()})),[]),[e,n]}var zE=e=>`${e.slice(0,4)}-${e.slice(4)}`;function BE(){let[e]=RE(),[t,n]=(0,b.useState)(!1);if(!e?.active)return null;let r=e.code!==void 0;async function i(){confirm(r?`Turn remote access off? Remote sessions end and the link stops working.`:`Turn remote access off? This page stops working right away.`)&&(n(!0),await Y.stopRemote().catch(e=>alert(e.message)),n(!1))}return(0,V.jsxs)(`div`,{className:`remote-banner`,children:[(0,V.jsx)(Pf,{size:14}),(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`strong`,{children:`Remote access is on.`}),` `,r?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,children:e.url}),e.code&&(0,V.jsxs)(V.Fragment,{children:[` · code `,(0,V.jsx)(`code`,{className:`remote-code`,children:zE(e.code)})]}),` · `,e.sessions,` remote session`,e.sessions===1?``:`s`]}):`You're using Symbio through a temporary link.`]}),(0,V.jsx)(`span`,{className:`spacer`}),(0,V.jsxs)(`button`,{className:`btn sm`,onClick:i,disabled:t,children:[(0,V.jsx)(yp,{size:13}),t?`Turning off…`:`Turn off`]})]})}function VE(){let[e,t]=RE(),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(null),o=e?.code!==void 0;async function s(){r(!0),a(null);try{e?.active?await Y.stopRemote():await Y.startRemote(),t()}catch(e){a(e.message)}finally{r(!1)}}return(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsxs)(`div`,{className:`section-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Remote access`}),(0,V.jsxs)(`p`,{children:[`Opens a temporary Cloudflare link to this Symbio so you can use it from another device. Visitors need the access code; after 10 wrong codes the link is shut down. Whoever gets in controls your agents, which run commands on this computer: share the link and code only with yourself, and turn it off when you're done. Also available as `,(0,V.jsx)(`code`,{children:`sym remote`}),`.`]})]}),o&&(0,V.jsxs)(`button`,{className:`btn sm ${e?.active?``:`primary`}`,onClick:s,disabled:n||!e,children:[(0,V.jsx)(yp,{size:13}),n?e?.active?`Turning off…`:`Opening…`:e?.active?`Turn off`:`Turn on`]})]}),(0,V.jsxs)(`div`,{className:`stack`,style:{padding:16,gap:10},children:[i&&(0,V.jsx)(`div`,{className:`error`,children:i}),e?.active?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Link`}),(0,V.jsxs)(`div`,{className:`row`,style:{gap:8},children:[(0,V.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`mono small`,children:e.url}),(0,V.jsx)(`button`,{className:`btn ghost icon xs`,title:`Copy`,onClick:()=>navigator.clipboard.writeText(e.url),children:(0,V.jsx)(rf,{size:12})})]})]}),e.code&&(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Access code`}),(0,V.jsx)(`code`,{className:`remote-code big`,children:zE(e.code)})]}),(0,V.jsxs)(`div`,{className:`small subtle`,children:[`On since `,new Date(e.startedAt).toLocaleString(),` · `,e.sessions,` remote session`,e.sessions===1?``:`s`,`. A new link and code are made each time.`]})]}):(0,V.jsxs)(`div`,{className:`small subtle`,children:[`Off.`,e?.lastStop?` Last turned off ${new Date(e.lastStop.at).toLocaleString()}: ${e.lastStop.reason}.`:``,n&&` Opening the link (the first time, cloudflared is downloaded first)…`]})]})]})}function HE(){let[e,t]=(0,b.useState)(null);return(0,b.useEffect)(()=>{let e=()=>Y.update().then(t).catch(()=>{});e();let n=setInterval(e,6e5);return()=>clearInterval(n)},[]),[e,t]}function UE(){let[e]=HE();return!e?.available||e.install===`dev`?null:(0,V.jsxs)(`a`,{className:`btn ghost sm update-badge`,href:`#/settings`,title:e.waiting??`Symbio ${e.latest} is available`,children:[(0,V.jsx)(zd,{size:15}),e.latest]})}function WE(e){let t=setInterval(()=>{Y.update().then(n=>{(n.current!==e||n.lastResult&&!n.lastResult.ok)&&(clearInterval(t),location.reload())}).catch(()=>{})},3e3)}var GE=[{id:`auto`,label:`Automatic`,hint:`Installs new versions by itself, only when no agent has been working for 10 minutes and remote access is off; it backs up first and tells you in Messages.`},{id:`notify`,label:`Tell me`,hint:"Shows when a new version is available; you update with the button below or `sym update`."},{id:`off`,label:`Off`,hint:`Doesn't check for new versions.`}];function KE(){let[e,t]=HE(),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(!1);async function c(n){r(n),a(null);try{if(n===`check`)t(await Y.checkUpdate());else{let t=e?.busy?`\n\nRight now ${e.busy}: it's interrupted and continues after the restart.`:``;if(!confirm(`Update Symbio to ${e?.latest}? Symbio stops, installs it and starts again (a minute or two).${t}`))return;await Y.applyUpdate(),s(!0),WE(e.current)}}catch(e){a(e.message)}finally{r(null)}}async function l(e){try{t(await Y.setUpdateMode(e))}catch(e){a(e.message)}}return(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsxs)(`div`,{className:`section-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Updates`}),(0,V.jsxs)(`p`,{children:[`You have Symbio `,(0,V.jsx)(`strong`,{children:e?.current??`…`}),e?.latest&&!e.available&&e.install===`npm`?`, the latest version.`:`.`,` Also available as`,` `,(0,V.jsx)(`code`,{children:`sym update`}),`.`]})]}),e?.install===`npm`&&(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>c(`check`),disabled:!!n||o,children:[(0,V.jsx)(xp,{size:13}),n===`check`?`Checking…`:`Check now`]})]}),(0,V.jsxs)(`div`,{className:`stack`,style:{padding:16,gap:14},children:[i&&(0,V.jsx)(`div`,{className:`error`,children:i}),e?.install===`dev`?(0,V.jsxs)(`div`,{className:`small subtle`,children:[`This Symbio runs from a development folder, so it doesn't update itself: update it there with `,(0,V.jsx)(`code`,{children:`git pull`}),`,`,` `,(0,V.jsx)(`code`,{children:`npm install`}),` and `,(0,V.jsx)(`code`,{children:`npm run build`}),`.`]}):(0,V.jsxs)(V.Fragment,{children:[e?.lastResult&&!e.lastResult.ok&&(0,V.jsxs)(`div`,{className:`error`,children:[`The update to `,e.lastResult.to,` didn't complete: `,e.lastResult.error]}),e?.available&&(0,V.jsxs)(`div`,{className:`update-available`,children:[(0,V.jsxs)(`div`,{className:`row`,style:{gap:10},children:[(0,V.jsx)(zd,{size:16}),(0,V.jsxs)(`strong`,{className:`grow`,children:[`Symbio `,e.latest,` is available`]}),(0,V.jsx)(`button`,{className:`btn primary sm`,onClick:()=>c(`apply`),disabled:!!n||o,children:o?`Restarting…`:n===`apply`?`Starting…`:`Update now`})]}),o?(0,V.jsx)(`div`,{className:`small subtle`,children:`Symbio is restarting with the new version; this page reloads by itself.`}):e.waiting&&(0,V.jsx)(`div`,{className:`small subtle`,children:e.waiting}),e.notes.length>0&&(0,V.jsx)(`div`,{className:`update-notes`,children:e.notes.map(e=>(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`small`,style:{fontWeight:600},children:[`What's new in `,e.version]}),(0,V.jsx)(`ul`,{children:e.items.map((e,t)=>(0,V.jsx)(`li`,{children:e},t))})]},e.version))})]}),(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`New versions`}),(0,V.jsx)(`div`,{className:`seg`,children:GE.map(t=>(0,V.jsx)(`button`,{className:e?.mode===t.id?`on`:``,onClick:()=>l(t.id),disabled:!e,children:t.label},t.id))}),(0,V.jsx)(`span`,{className:`hint`,children:GE.find(t=>t.id===e?.mode)?.hint})]}),e?.error&&(0,V.jsx)(`div`,{className:`small subtle`,children:e.error}),e?.checkedAt&&(0,V.jsxs)(`div`,{className:`small subtle`,children:[`Last checked `,new Date(e.checkedAt).toLocaleString(),`.`]})]})]})]})}function qE(){let e=sessionStorage.getItem(`symbio:previous-page`);location.hash=e&&!e.startsWith(`#/settings`)?e:`#/`}function JE(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(null),c=()=>Y.connections().then(t).catch(e=>s(e.message));(0,b.useEffect)(()=>{c()},[]);async function l(e){a(e);try{await Y.testConnection(e),await c()}finally{a(null)}}async function u(e){confirm(`Delete the connection “${e.name}”? Its stored credentials are deleted too. Projects using it lose access.`)&&(await Y.deleteConnection(e.id).catch(e=>alert(e.message)),await c())}return(0,V.jsxs)(`div`,{className:`page-inner`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`button`,{className:`back`,onClick:qE,children:[(0,V.jsx)(yd,{size:14}),`Back`]}),(0,V.jsx)(`div`,{className:`page-head`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h1`,{children:`Settings`}),(0,V.jsx)(`p`,{children:`Set these once — every project can use them.`})]})})]}),(0,V.jsxs)(`section`,{className:`section`,children:[(0,V.jsxs)(`div`,{className:`section-head`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{children:`Connections`}),(0,V.jsx)(`p`,{children:`GitHub accounts, Azure DevOps organizations and servers agents can use to push, open pull requests and deploy. Credentials are encrypted on this computer, tied to your Windows login, and never shown to agents — they ask Symbio to act, and Symbio uses the credentials itself.`})]}),(0,V.jsxs)(`div`,{className:`row`,children:[(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>r(`new-github`),children:[(0,V.jsx)(_p,{size:13}),`GitHub`]}),(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>r(`new-azure`),children:[(0,V.jsx)(_p,{size:13}),`Azure DevOps`]}),(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>r(`new-server`),children:[(0,V.jsx)(_p,{size:13}),`Server`]})]})]}),o&&(0,V.jsx)(`div`,{style:{padding:12},children:(0,V.jsx)(`div`,{className:`error`,children:o})}),e?.length===0&&(0,V.jsx)(Nm,{icon:(0,V.jsx)(hp,{size:20}),title:`No connections yet`,children:`Add a GitHub account, an Azure DevOps organization or a server (SSH) so agents can push code, open pull requests or deploy for you.`}),e&&e.length>0&&(0,V.jsx)(`div`,{className:`section-body`,children:e.map(e=>(0,V.jsxs)(`div`,{className:`list-row`,children:[(0,V.jsx)(_m,{type:e.type}),(0,V.jsxs)(`div`,{className:`grow`,children:[(0,V.jsx)(`div`,{className:`list-title`,children:e.name}),(0,V.jsx)(`div`,{className:`list-sub ellipsis`,children:e.type===`github`?e.account?`GitHub · ${e.account}`:`GitHub · not tested yet`:e.type===`azure`?`Azure DevOps · ${e.organization}${e.account?` · ${e.account}`:` · not tested yet`}`:`${e.username}@${e.host}${e.port===22?``:`:${e.port}`} · ${e.auth===`password`?`password`:e.keyPath?`key file ${e.keyPath}`:`stored key`}`}),e.lastTest&&(0,V.jsxs)(`div`,{className:`conn-test ${e.lastTest.ok?`ok`:`bad`}`,children:[e.lastTest.ok?(0,V.jsx)(jd,{size:12}):(0,V.jsx)($p,{size:12}),e.lastTest.message]})]}),(0,V.jsxs)(`button`,{className:`btn sm`,onClick:()=>l(e.id),disabled:i===e.id,children:[(0,V.jsx)(Vp,{size:13}),i===e.id?`Testing…`:`Test`]}),(0,V.jsx)(`button`,{className:`btn ghost icon sm`,onClick:()=>r(e),title:`Edit`,children:(0,V.jsx)(dp,{size:13})}),(0,V.jsx)(`button`,{className:`btn ghost icon sm`,onClick:()=>u(e),title:`Delete`,children:(0,V.jsx)(qp,{size:13})})]},e.id))})]}),(0,V.jsx)(AE,{}),(0,V.jsx)(Ym,{}),(0,V.jsx)(VE,{}),(0,V.jsx)(KE,{}),(0,V.jsx)(zl,{children:n&&(0,V.jsx)(YE,{existing:typeof n==`string`?null:n,type:typeof n==`string`?n===`new-github`?`github`:n===`new-azure`?`azure`:`server`:n.type,onClose:()=>r(null),onSaved:async e=>{r(null),await c(),l(e)}})})]})}function YE({existing:e,type:t,onClose:n,onSaved:r}){let i=e?.type===`server`?e:null,[a,o]=(0,b.useState)(e?.name??``),[s,c]=(0,b.useState)(``),[l,u]=(0,b.useState)(e?.type===`azure`?e.organization:``),[d,f]=(0,b.useState)(i?.host??``),[p,m]=(0,b.useState)(String(i?.port??22)),[h,g]=(0,b.useState)(i?.username??``),[_,v]=(0,b.useState)(i?.auth??`key`),[y,x]=(0,b.useState)(i?.keyPath?`file`:i?`paste`:`file`),[S,C]=(0,b.useState)(i?.keyPath??`~/.ssh/id_ed25519`),[w,T]=(0,b.useState)(``),[E,D]=(0,b.useState)(``),[O,ee]=(0,b.useState)(``),[k,te]=(0,b.useState)(!1),[ne,A]=(0,b.useState)(null),re=t=>!!e?.secrets?.[t],j=e=>re(e)?`Saved — leave empty to keep`:``;async function ie(){te(!0),A(null);let n=t===`github`?{type:t,name:a,token:s}:t===`azure`?{type:t,name:a,organization:l,token:s}:{type:t,name:a,host:d,port:Number(p)||22,username:h,auth:_,keyPath:_===`key`&&y===`file`?S:null,privateKey:_===`key`&&y===`paste`?w:void 0,passphrase:_===`key`?E:void 0,password:_===`password`?O:void 0};try{r((e?await Y.updateConnection(e.id,n):await Y.createConnection(n)).id)}catch(e){A(e.message),te(!1)}}return(0,V.jsxs)(jm,{title:`${e?`Edit`:`New`} ${t===`github`?`GitHub connection`:t===`azure`?`Azure DevOps connection`:`server connection`}`,onClose:n,footer:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{className:`btn ghost`,onClick:n,children:`Cancel`}),(0,V.jsx)(`button`,{className:`btn primary`,onClick:ie,disabled:k||!a.trim(),children:k?`Saving…`:`Save and test`})]}),children:[(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Name`}),(0,V.jsx)(`input`,{autoFocus:!0,value:a,onChange:e=>o(e.target.value),placeholder:t===`github`?`My GitHub`:t===`azure`?`Company Azure DevOps`:`My VPS`})]}),t===`github`?(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Personal access token`}),(0,V.jsx)(`input`,{type:`password`,value:s,onChange:e=>c(e.target.value),placeholder:j(`token`)||`github_pat_… or ghp_…`}),(0,V.jsx)(`span`,{className:`hint`,children:`GitHub → Settings → Developer settings → Personal access tokens. A fine-grained token limited to the repositories agents should work on is safest; give it Contents (read & write), Pull requests and Issues as needed.`})]}):t===`azure`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Organization`}),(0,V.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`contoso, or https://dev.azure.com/contoso`}),(0,V.jsx)(`span`,{className:`hint`,children:`The name in your Azure DevOps address: https://dev.azure.com/<organization>.`})]}),(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Personal access token`}),(0,V.jsx)(`input`,{type:`password`,value:s,onChange:e=>c(e.target.value),placeholder:j(`token`)||`Paste the token`}),(0,V.jsx)(`span`,{className:`hint`,children:`Azure DevOps → User settings → Personal access tokens. Give it access to this organization only, with Code (Read & write) so agents can push and open pull requests; add Work Items if they should update boards. Pick a short expiry and renew it here.`})]})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`field-row`,children:[(0,V.jsxs)(`label`,{className:`field`,style:{flex:3},children:[(0,V.jsx)(`span`,{children:`Host`}),(0,V.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`203.0.113.10 or vps.example.com`})]}),(0,V.jsxs)(`label`,{className:`field`,style:{flex:1},children:[(0,V.jsx)(`span`,{children:`Port`}),(0,V.jsx)(`input`,{value:p,onChange:e=>m(e.target.value)})]})]}),(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`User`}),(0,V.jsx)(`input`,{value:h,onChange:e=>g(e.target.value),placeholder:`deploy`})]}),(0,V.jsxs)(`div`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Authentication`}),(0,V.jsxs)(`div`,{className:`seg`,children:[(0,V.jsx)(`button`,{className:_===`key`?`on`:``,onClick:()=>v(`key`),children:`SSH key`}),(0,V.jsx)(`button`,{className:_===`password`?`on`:``,onClick:()=>v(`password`),children:`Password`})]})]}),_===`key`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`seg`,children:[(0,V.jsx)(`button`,{className:y===`file`?`on`:``,onClick:()=>x(`file`),children:`Key file on this computer`}),(0,V.jsx)(`button`,{className:y===`paste`?`on`:``,onClick:()=>x(`paste`),children:`Paste the key`})]}),y===`file`?(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Key file`}),(0,V.jsx)(`input`,{value:S,onChange:e=>C(e.target.value),placeholder:`~/.ssh/id_ed25519`})]}):(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Private key`}),(0,V.jsx)(`textarea`,{rows:5,className:`mono`,value:w,onChange:e=>T(e.target.value),placeholder:j(`privateKey`)||`-----BEGIN OPENSSH PRIVATE KEY-----`}),(0,V.jsx)(`span`,{className:`hint`,children:`Stored encrypted.`})]}),(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Passphrase (if the key has one)`}),(0,V.jsx)(`input`,{type:`password`,value:E,onChange:e=>D(e.target.value),placeholder:j(`passphrase`)})]})]}):(0,V.jsxs)(`label`,{className:`field`,children:[(0,V.jsx)(`span`,{children:`Password`}),(0,V.jsx)(`input`,{type:`password`,value:O,onChange:e=>ee(e.target.value),placeholder:j(`password`)})]})]}),ne&&(0,V.jsx)(`div`,{className:`error`,children:ne})]})}function XE(){let[e,t]=(0,b.useState)(location.hash);(0,b.useEffect)(()=>{let e=e=>{let n=new URL(e.oldURL).hash||`#/`;n!==location.hash&&sessionStorage.setItem(`symbio:previous-page`,n),t(location.hash)};return addEventListener(`hashchange`,e),()=>removeEventListener(`hashchange`,e)},[]);let n=e.match(/^#\/p\/([\w-]+)/);return n?{page:`project`,id:n[1]}:e.startsWith(`#/settings`)?{page:`settings`}:{page:`home`}}function ZE(){let e=XE(),[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(null);(0,b.useEffect)(()=>{Y.runtime().then(n).catch(()=>{});let e=setInterval(()=>Y.runtime().then(n).catch(()=>{}),3e4),t=hm(e=>{e.type===`runtime`&&n(t=>({...e,memoryMB:e.memoryMB??t?.memoryMB??null}))});return()=>{clearInterval(e),t()}},[]),(0,b.useEffect)(()=>{if(e.page!==`project`)return i(null);let t=e.id,n=()=>Y.project(t).then(e=>i(e.name)).catch(()=>i(null));return n(),hm(e=>{e.type===`project.updated`&&e.projectId===t&&n()})},[e.page===`project`?e.id:null]);let[a,o]=(0,b.useState)(!1);(0,b.useEffect)(()=>{let e=()=>o(!0);return addEventListener(dm,e),()=>removeEventListener(dm,e)},[]);async function s(){if(!confirm(`Pause every project that has agents working? You can resume each project from its page.`))return;let{paused:e}=await Y.pauseAll();alert(e.length?`Paused: ${e.join(`, `)}`:`No agents were working.`)}return a?(0,V.jsx)(`div`,{className:`locked`,children:(0,V.jsxs)(Nm,{icon:(0,V.jsx)(Hf,{size:20}),title:`Open Symbio from its link`,children:[`This page doesn't have Symbio's key, so it can't show your projects. Use the link Symbio printed when it started, or start it again (`,(0,V.jsx)(`code`,{children:`sym`}),` or `,(0,V.jsx)(`code`,{children:`npm start`}),`): it opens the right link for you.`]})}):(0,V.jsxs)(`div`,{className:`app`,children:[(0,V.jsxs)(`header`,{className:`topbar`,children:[(0,V.jsxs)(`a`,{className:`brand`,href:`#/`,children:[(0,V.jsx)(km,{}),`Symbio`]}),(0,V.jsxs)(`nav`,{className:`crumbs`,children:[(0,V.jsx)(Fd,{size:14}),e.page===`settings`?(0,V.jsx)(`span`,{className:`current`,children:`Settings`}):e.page===`project`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`a`,{href:`#/`,children:`Projects`}),(0,V.jsx)(Fd,{size:14}),(0,V.jsx)(`span`,{className:`current ellipsis`,children:r??`…`})]}):(0,V.jsx)(`span`,{className:`current`,children:`Projects`})]}),(0,V.jsxs)(`div`,{className:`topbar-actions`,children:[(0,V.jsxs)(`button`,{className:`btn ghost sm`,onClick:s,title:`Pause every project that has agents working`,children:[(0,V.jsx)(Gd,{size:15}),`Pause all`]}),(0,V.jsxs)(`a`,{className:`btn ghost sm ${e.page===`settings`?`active`:``}`,href:`#/settings`,title:`Settings`,children:[(0,V.jsx)(Lp,{size:15}),`Settings`]}),(0,V.jsx)(UE,{}),(0,V.jsx)(QE,{runtime:t})]})]}),(0,V.jsx)(BE,{}),(0,V.jsx)(zl,{mode:`wait`,children:(0,V.jsx)(G.main,{className:`page`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.12},children:e.page===`project`?(0,V.jsx)(OE,{projectId:e.id}):e.page===`settings`?(0,V.jsx)(JE,{}):(0,V.jsx)(Bm,{runtime:t})},e.page===`project`?e.id:e.page)})]})}function QE({runtime:e}){if(!e)return(0,V.jsx)(`span`,{className:`runtime`,children:`Connecting…`});let t=e.memoryMB?e.memoryMB>=1024?`${(e.memoryMB/1024).toFixed(1)} GB`:`${e.memoryMB} MB`:null,n=e.state===`running`?`OpenCode ${e.version??``}`:e.state===`starting`?`Starting OpenCode…`:e.state===`crashed`?`OpenCode restarting`:`OpenCode stopped`;return(0,V.jsxs)(`span`,{className:`runtime`,title:[e.error,t&&`Memory: ${t}`].filter(Boolean).join(`
55
+ `)||void 0,children:[(0,V.jsx)(`span`,{className:`dot ${e.state}`}),n,t&&e.state===`running`&&(0,V.jsx)(`span`,{className:`subtle tnum`,children:t})]})}(0,W.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(b.StrictMode,{children:(0,V.jsx)(ZE,{})}));