duclaw-cli 1.7.3 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +11912 -9881
- package/dist/main.js +1 -1
- package/dist/web/assets/index-BPqv2UuT.js +96 -0
- package/dist/web/assets/index-o9OcdRwu.css +1 -0
- package/dist/web/favicon.svg +1 -0
- package/dist/web/icons.svg +24 -0
- package/dist/web/index.html +14 -0
- package/dist/worker-main.js +2 -0
- package/package.json +29 -6
- package/skills/.skills_store_lock.json +0 -11
- package/skills/github-api/LICENSE.txt +0 -21
- package/skills/github-api/SKILL.md +0 -763
- package/skills/github-api/_meta.json +0 -6
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,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,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var 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.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=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)},F={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),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&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),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`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),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){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function 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}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function I(e){return{current:e}}function L(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function R(e,t){ie++,re[ie]=e.current,e.current=t}var ae=I(null),oe=I(null),se=I(null),ce=I(null);function le(e,t){switch(R(se,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(ae),R(ae,e)}function ue(){L(ae),L(oe),L(se)}function de(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=Zd(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function fe(e){oe.current===e&&(L(ae),L(oe)),ce.current===e&&(L(ce),sp._currentValue=ne)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ge(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Le(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function $e(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function et(e,t){var n=t&-t;return n=n&42?1:tt(n),(n&(e.suspendedLanes|t))===0?n:0}function tt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function nt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function rt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function it(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var at=Math.random().toString(36).slice(2),ot=`__reactFiber$`+at,st=`__reactProps$`+at,ct=`__reactContainer$`+at,lt=`__reactEvents$`+at,ut=`__reactListeners$`+at,dt=`__reactHandles$`+at,ft=`__reactResources$`+at,pt=`__reactMarker$`+at;function mt(e){delete e[ot],delete e[st],delete e[lt],delete e[ut],delete e[dt]}function ht(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bf(e);e!==null;){if(n=e[ot])return n;e=bf(e)}return t}e=n,n=e.parentNode}return null}function gt(e){if(e=e[ot]||e[ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _t(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vt(e){var t=e[ft];return t||=e[ft]={hoistableStyles:new Map,hoistableScripts:new Map},t}function yt(e){e[pt]=!0}var bt=new Set,xt={};function St(e,t){Ct(e,t),Ct(e+`Capture`,t)}function Ct(e,t){for(xt[e]=t,e=0;e<t.length;e++)bt.add(t[e])}var wt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Tt={},Et={};function Dt(e){return be.call(Et,e)?!0:be.call(Tt,e)?!1:wt.test(e)?Et[e]=!0:(Tt[e]=!0,!1)}function Ot(e,t,n){if(Dt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function kt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function At(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Mt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Nt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pt(e){if(!e._valueTracker){var t=Mt(e)?`checked`:`value`;e._valueTracker=Nt(e,t,``+e[t])}}function Ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Mt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function It(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Lt=/[\n"\\]/g;function Rt(e){return e.replace(Lt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function zt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+jt(t)):e.value!==``+jt(t)&&(e.value=``+jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Vt(e,o,jt(n)):Vt(e,o,jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+jt(s):e.removeAttribute(`name`)}function Bt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Pt(e);return}n=n==null?``:``+jt(n),t=t==null?n:``+jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Pt(e)}function Vt(e,t,n){t===`number`&&It(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ht(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ut(e,t,n){if(t!=null&&(t=``+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+jt(n)}function Wt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Pt(e)}function Gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Kt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Jt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&qt(e,o,t[o])}function Yt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Xt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Zt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Qt(e){return Zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function $t(){}var en=null;function tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,rn=null;function an(e){var t=gt(e);if(t&&(e=t.stateNode)){var n=e[st]||null;a:switch(e=t.stateNode,t.type){case`input`:if(zt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Rt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[st]||null;if(!a)throw Error(i(90));zt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ft(r)}break a;case`textarea`:Ut(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ht(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(nn!==null||rn!==null)&&(Du(),nn&&(t=nn,e=rn,rn=nn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[st]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,`passive`,{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return mn=i.slice(e,1<r?1-r:void 0)}function gn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function _n(){return!0}function vn(){return!1}function yn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?_n:vn,this.isPropagationStopped=vn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=m({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=m({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(m({},Dn,{dataTransfer:0})),An=yn(m({},Sn,{relatedTarget:0})),jn=yn(m({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(m({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(m({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(m({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(m({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(m({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(m({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(m({},Dn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Wn=yn(m({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){nn?rn?rn.push(r):rn=[r]:nn=r,t=Pd(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){Dd(e,0)}function lr(e){if(Ft(_t(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(ln){var fr;if(ln){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){or&&(or.detachEvent(`onpropertychange`,gr),sr=or=null)}function gr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,tn(e)),sn(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),or=t,sr=n,or.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!be.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=It(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=It(e.document)}return t}function Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var kr=ln&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==It(r)||(r=Ar,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mr&&Cr(Mr,r)||(Mr=r,r=Pd(jr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};ln&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),Kr=zr(`transitionend`),qr=new Map,Jr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Jr.push(`scrollEnd`);function Yr(e,t){qr.set(e,t),St(t,[e])}var Xr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Zr=[],Qr=0,$r=0;function z(){for(var e=Qr,t=$r=Qr=0;t<e;){var n=Zr[t];Zr[t++]=null;var r=Zr[t];Zr[t++]=null;var i=Zr[t];Zr[t++]=null;var a=Zr[t];if(Zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ri(n,i,a)}}function ei(e,t,n,r){Zr[Qr++]=e,Zr[Qr++]=t,Zr[Qr++]=n,Zr[Qr++]=r,$r|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ti(e,t,n,r){return ei(e,t,n,r),ii(e)}function ni(e,t){return ei(e,null,null,t),ii(e)}function ri(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ii(e){if(50<vu)throw vu=0,yu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ai={};function oi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function si(e,t,n,r){return new oi(e,t,n,r)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function li(e,t){var n=e.alternate;return n===null?(n=si(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ui(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function di(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ci(e)&&(s=1);else if(typeof e==`string`)s=Qf(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=si(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return fi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=si(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=si(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=si(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function pi(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function mi(e){var t=si(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var vi=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,Ei=``;function Di(e,t){vi[yi++]=xi,vi[yi++]=bi,bi=e,xi=t}function Oi(e,t,n){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,wi=e;var r=Ti;e=Ei;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Le(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===bi;)bi=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ei=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,Pi=!1,Fi=null,Ii=!1,Li=Error(i(519));function Ri(e){throw Wi(_i(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Li}function zi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ot]=e,t[st]=r,n){case`dialog`:W(`cancel`,t),W(`close`,t);break;case`iframe`:case`object`:case`embed`:W(`load`,t);break;case`video`:case`audio`:for(n=0;n<Td.length;n++)W(Td[n],t);break;case`source`:W(`error`,t);break;case`img`:case`image`:case`link`:W(`error`,t),W(`load`,t);break;case`details`:W(`toggle`,t);break;case`input`:W(`invalid`,t),Bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:W(`invalid`,t);break;case`textarea`:W(`invalid`,t),Wt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Bd(t.textContent,n)?(r.popover!=null&&(W(`beforetoggle`,t),W(`toggle`,t)),r.onScroll!=null&&W(`scroll`,t),r.onScrollEnd!=null&&W(`scrollend`,t),r.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||Ri(e,!0)}function Bi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:Mi=Mi.return}}function Vi(e){if(e!==Mi)return!1;if(!Pi)return Bi(e),Pi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Qd(e.type,e.memoizedProps)),n=!n),n&&Ni&&Ri(e),Bi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=yf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=yf(e)}else t===27?(t=Ni,sf(e.type)?(e=vf,vf=null,Ni=e):Ni=t):Ni=Mi?_f(e.stateNode.nextSibling):null;return!0}function Hi(){Ni=Mi=null,Pi=!1}function Ui(){var e=Fi;return e!==null&&(iu===null?iu=e:iu.push.apply(iu,e),Fi=null),e}function Wi(e){Fi===null?Fi=[e]:Fi.push(e)}var Gi=I(null),Ki=null,qi=null;function Ji(e,t,n){R(Gi,t._currentValue),t._currentValue=n}function Yi(e){e._currentValue=Gi.current,L(Gi)}function Xi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Zi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Xi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Xi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Qi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}a=a.return}e!==null&&Zi(t,e,n,r),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){Ki=e,qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return ra(Ki,e)}function na(e,t){return Ki===null&&ea(e),ra(e,t)}function ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qi===null){if(e===null)throw Error(i(308));qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qi=qi.next=t;return n}var ia=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},aa=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new ia,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&aa(oa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=yd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var _a=P.S;P.S=function(e,t){su=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=I(null);function ya(){var e=va.current;return e===null?Wl.pooledCache:e}function ba(e,t){t===null?R(va,va.current):R(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:sa._currentValue,pool:e}}var B=Error(i(460)),Sa=Error(i(474)),Ca=Error(i(542)),wa={then:function(){}};function Ta(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ea(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($t,$t),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e;default:if(typeof t.status==`string`)t.then($t,$t);else{if(e=Wl,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,Aa(e),e}throw Oa=t,B}}function Da(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Oa=e,B):e}}var Oa=null;function ka(){if(Oa===null)throw Error(i(459));var e=Oa;return Oa=null,e}function Aa(e){if(e===B||e===Ca)throw Error(i(483))}var ja=null,Ma=0;function Na(e){var t=Ma;return Ma+=1,ja===null&&(ja=[]),Ea(ja,e,t)}function Pa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Fa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ia(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=li(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Da(i)===t.type)?(t=a(t,n.props),Pa(t,n),t.return=e,t):(t=di(n.type,n.key,n.props,null,e.mode,r),Pa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=hi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=di(t.type,t.key,t.props,null,e.mode,n),Pa(n,t),n.return=e,n;case v:return t=hi(t,e.mode,n),t.return=e,t;case O:return t=Da(t),f(e,t,n)}if(te(t)||M(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Na(t),n);if(t.$$typeof===C)return f(e,na(e,t),n);Fa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Da(n),p(e,t,n,r)}if(te(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Na(n),r);if(n.$$typeof===C)return p(e,t,na(e,n),r);Fa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Da(r),m(e,t,n,r,i)}if(te(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Na(r),i);if(r.$$typeof===C)return m(e,t,n,na(t,r),i);Fa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Pi&&Di(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Pi&&Di(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Pi&&Di(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Pi&&Di(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Pi&&Di(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Pi&&Di(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=di(o.type,o.key,o.props,null,e.mode,c),Pa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=hi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Da(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Na(o),c);if(o.$$typeof===C)return b(e,r,na(e,o),c);Fa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===B||t===Ca)throw t;var a=si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ul&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ii(e),ri(e,null,n),t}return ei(e,r,t,n),ii(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=pa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(U&f)===f:(r&f)===f){f!==0&&f===fa&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:za=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ql|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ya(n[e],t)}var Za=I(null),Qa=I(0);function $a(e,t){e=Xl,R(Qa,e),R(Za,t),Xl=e|t.baseLanes}function eo(){R(Qa,Xl),R(Za,Za.current)}function to(){Xl=Qa.current,L(Za),L(Qa)}var no=I(null),ro=null;function io(e){var t=e.alternate;R(lo,lo.current&1),R(no,e),ro===null&&(t===null||Za.current!==null||t.memoizedState!==null)&&(ro=e)}function ao(e){R(lo,lo.current),R(no,e),ro===null&&(ro=e)}function oo(e){e.tag===22?(R(lo,lo.current),R(no,e),ro===null&&(ro=e)):so(e)}function so(){R(lo,lo.current),R(no,no.current)}function co(e){L(no),ro===e&&(ro=null),L(lo)}var lo=I(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mf(n)||hf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fo=0,V=null,po=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return fo=a,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Vs:Hs,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){P.H=Bs;var t=po!==null&&po.next!==null;if(fo=0,mo=po=V=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||ac||(e=e.dependencies,e!==null&&$i(e)&&(ac=!0))}function Eo(e,t,n,r){V=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Us,o=t(n,r)}while(go);return o}function Do(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(po===null?null:po.memoizedState)!==e&&(V.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}fo=0,mo=po=V=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?V.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(po===null){var e=V.alternate;e=e===null?null:e.memoizedState}else e=po.next;var t=mo===null?V.memoizedState:mo.next;if(t!==null)mo=t,po=e;else{if(e===null)throw V.alternate===null?Error(i(467)):Error(i(310));po=e,e={memoizedState:po.memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},mo===null?V.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Ea(bo,e,t),t=V,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Vs:Hs),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===C)return ta(e)}throw Error(i(438,String(e)))}function Io(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=V.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=No(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Lo(e,t){return typeof t==`function`?t(e):t}function Ro(e){return zo(Mo(),po,e)}function zo(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?(fo&f)===f:(U&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===fa&&(d=!0);else if((fo&p)===p){u=u.next,p===fa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,V.lanes|=p,Ql|=p;f=u.action,_o&&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,V.lanes|=f,Ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&(ac=!0,d&&(n=pa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Bo(e){var t=Mo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Sr(o,t.memoizedState)||(ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vo(e,t,n){var r=V,a=Mo(),o=Pi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((po||a).memoizedState,n);if(s&&(a.memoizedState=n,ac=!0),a=a.queue,fs(Wo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,a,n,t),null),Wl===null)throw Error(i(349));o||fo&127||Ho(r,t,n)}return n}function Ho(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=No(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function Wo(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Ko(e){var t=ni(e,2);t!==null&&Su(t,e,2)}function qo(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,zo(e,po,typeof r==`function`?r:Lo)}function Yo(e,t,n,r,a){if(Ls(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)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(Pi){var n=Wl.formState;if(n!==null){a:{var r=V;if(Pi){if(Ni){b:{for(var i=Ni,a=Ii;i.nodeType!==8;){if(!a){i=null;break b}if(i=_f(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ni=_f(i.nextSibling),r=i.data===`F!`;break a}}Ri(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=Ps.bind(null,V,r),r.dispatch=n,r=qo(!1),a=Is.bind(null,V,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,V,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return is(Mo(),po,e)}function is(e,t,n){if(t=zo(e,t,ts)[0],e=Ro(Lo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===B?Ca:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=Mo(),n=po;if(n!==null)return is(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=V.updateQueue,t===null&&(t=No(),V.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 cs(){return Mo().memoizedState}function ls(e,t,n,r){var i=jo();V.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;po!==null&&r!==null&&Co(r,po.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(V.flags|=e,i.memoizedState=ss(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){V.flags|=4;var t=V.updateQueue;if(t===null)t=No(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Mo().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(Ul&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function gs(e,t){return us(4,4,e,t)}function _s(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 vs(e,t,n){n=n==null?null:n.concat([e]),us(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||fo&1073741824&&!(U&261930)?e.memoizedState=t:(e.memoizedState=n,e=xu(),V.lanes|=e,Ql|=e,n)}function Cs(e,t,n,r){return Sr(n,t)?n:Za.current===null?!(fo&42)||fo&1073741824&&!(U&261930)?(ac=!0,e.memoizedState=n):(e=xu(),V.lanes|=e,Ql|=e,t):(e=Ss(e,n,r),Sr(e,t)||(ac=!0),e)}function ws(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Is(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Fs(e,t,ga(c,r),bu(e)):Fs(e,t,r,bu(e))}catch(n){Fs(e,t,{then:function(){},status:`rejected`,reason:n},bu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Ts(){}function Es(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ds(e).queue;ws(e,a,t,ne,n===null?Ts:function(){return Os(e),n(r)})}function Ds(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Os(e){var t=Ds(e);t.next===null&&(t=e.alternate.memoizedState),Fs(e,t.next.queue,{},bu())}function ks(){return ta(sp)}function As(){return Mo().memoizedState}function js(){return Mo().memoizedState}function Ms(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(Su(r,t,n),Wa(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function Ns(e,t,n){var r=bu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e)?Rs(t,n):(n=ti(e,t,n,r),n!==null&&(Su(n,e,r),zs(n,t,r)))}function Ps(e,t,n){Fs(e,t,n,bu())}function Fs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))Rs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o))return ei(e,t,i,0),Wl===null&&z(),!1}catch{}if(n=ti(e,t,i,r),n!==null)return Su(n,e,r),zs(n,t,r),!0}return!1}function Is(e,t,n,r){if(r={lane:2,revertLane:yd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(i(479))}else t=ti(e,n,r,2),t!==null&&Su(t,e,2)}function Ls(e){var t=e.alternate;return e===V||t!==null&&t===V}function Rs(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Bs={readContext:ta,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Bs.useEffectEvent=So;var Vs={readContext:ta,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(_o){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){Ie(!0);try{n(t)}finally{Ie(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ns.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=Ps.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(jo(),e,t)},useTransition:function(){var e=qo(!1);return e=ws.bind(null,V,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=jo();if(Pi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Wl===null)throw Error(i(349));U&127||Ho(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ds(Wo.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=Wl.identifierPrefix;if(Pi){var n=Ei,r=Ti;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ks,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Is.bind(null,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=Ms.bind(null,V)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(Ul&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Hs={readContext:ta,use:Fo,useCallback:bs,useContext:ta,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ro,useRef:cs,useState:function(){return Ro(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Mo(),po.memoizedState,e,t)},useTransition:function(){var e=Ro(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(Mo(),po,e,t)},useMemoCache:Io,useCacheRefresh:js};Hs.useEffectEvent=ms;var Us={readContext:ta,use:Fo,useCallback:bs,useContext:ta,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Mo();return po===null?Ss(n,e,t):Cs(n,po.memoizedState,e,t)},useTransition:function(){var e=Bo(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=Mo();return po===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,po,e,t)},useMemoCache:Io,useCacheRefresh:js};Us.useEffectEvent=ms;function Ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ha(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(Su(t,e,r),Wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ha(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(Su(t,e,r),Wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bu(),r=Ha(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(Su(t,e,n),Wa(t,e,n))}};function Ks(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Cr(n,r)||!Cr(i,a):!0}function qs(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&&Gs.enqueueReplaceState(t,t.state,null)}function Js(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=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ys(e){Xr(e)}function Xs(e){console.error(e)}function Zs(e){Xr(e)}function Qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function $s(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 ec(e,t,n){return n=Ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Qs(e,t)},n}function tc(e){return e=Ha(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(){$s(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){$s(t,n,r),typeof i!=`function`&&(uu===null?uu=new Set([this]):uu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function rc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Qi(t,n,a,!0),n=no.current,n!==null){switch(n.tag){case 31:case 13:return ro===null?Pu():n.alternate===null&&Zl===0&&(Zl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$u(e,r,a)),!1;case 22:return n.flags|=65536,r===wa?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)),$u(e,r,a)),!1}throw Error(i(435,n.tag))}return $u(e,r,a),Pu(),!1}if(Pi)return t=no.current,t===null?(r!==Li&&(t=Error(i(423),{cause:r}),Wi(_i(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=_i(r,n),a=ec(e.stateNode,r,a),Ga(e,a),Zl!==4&&(Zl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Li&&(e=Error(i(422),{cause:r}),Wi(_i(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=_i(o,n),ru===null?ru=[o]:ru.push(o),Zl!==4&&(Zl=2),t===null)return!0;r=_i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ec(n.stateNode,r,e),Ga(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(uu===null||!uu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=tc(a),nc(a,e,n,r),Ga(n,a),!1}n=n.return}while(n!==null);return!1}var ic=Error(i(461)),ac=!1;function oc(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function sc(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=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!ac?(ko(e,t,i),jc(e,t,i)):(Pi&&s&&ki(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=li(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(ac=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(ac=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function uc(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 fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?eo():$a(t,a),oo(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),eo(),so(t)):(ba(t,a.cachePool),$a(t,a),so(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),eo(),oo(t),e!==null&&Qi(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return La(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,co(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Pi){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(ao(t),(e=Ni)?(e=pf(e,Ii),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ao(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ac||Qi(e,t,n,!1),a=(n&e.childLanes)!==0,ac||a){if(r=Wl,r!==null&&(s=et(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ni(e,s),Su(r,e,s),ic;Pu(),t=mc(e,t,n)}else e=o.treeContext,Ni=_f(s.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=pc(t,r),t.flags|=4096;return t}return e=li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(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 _c(e,t,n,r,i){return ea(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!ac?(ko(e,t,i),jc(e,t,i)):(Pi&&r&&ki(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return ea(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!ac?(ko(e,t,a),jc(e,t,a)):(Pi&&r&&ki(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(ea(t),t.stateNode===null){var a=ai,o=n.contextType;typeof o==`object`&&o&&(a=ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Gs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ba(t),o=n.contextType,a.context=typeof o==`object`&&o?ta(o):ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ws(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&&Gs.enqueueReplaceState(a,a.state,null),Ja(t,r,a,i),qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Js(n,s);a.props=c;var l=a.context,u=n.contextType;o=ai,typeof u==`object`&&u&&(o=ta(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&qs(t,a,r,o),za=!1;var f=t.memoizedState;a.state=f,Ja(t,r,a,i),qa(),l=t.memoizedState,s||f!==l||za?(typeof d==`function`&&(Ws(t,n,d,r),l=t.memoizedState),(c=za||Ks(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Va(e,t),o=t.memoizedProps,u=Js(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ai,typeof l==`object`&&l&&(c=ta(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&qs(t,a,r,c),za=!1,f=t.memoizedState,a.state=f,Ja(t,r,a,i),qa();var p=t.memoizedState;o!==d||f!==p||za||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof s==`function`&&(Ws(t,n,s,r),p=t.memoizedState),(u=za||Ks(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,gc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=La(t,e.child,null,i),t.child=La(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Hi(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:xa()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=tu),e}function wc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(lo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Pi){if(a?io(t):so(t),(e=Ni)?(e=pf(e,Ii),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(so(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=fi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(io(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(io(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(so(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,La(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(so(t),t.child=e.child,t.flags|=128,t=null);else if(io(t),hf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Wi({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(ac||Qi(e,t,n,!1),s=(n&e.childLanes)!==0,ac||s){if(s=Wl,s!==null&&(r=et(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ni(e,r),Su(s,e,r),ic;mf(c)||Pu(),t=Dc(e,t,n)}else mf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ni=_f(c.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(so(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=li(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=li(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=xa():(l=sa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(io(t),n=e.child,e=n.sibling,n=li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=si(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return La(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xi(e.return,t,n)}function kc(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 Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=lo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(lo,o),oc(e,t,r,n),r=Pi?xi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&uo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Qi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&$i(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Ji(t,sa,e.memoizedState.cache),Hi();break;case 27:case 5:de(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(io(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(io(t),t.flags|=128,null);io(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(lo,lo.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:Ji(t,sa,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ac=!0;else{if(!Mc(e,n)&&!(t.flags&128))return ac=!1,Nc(e,t,n);ac=!!(e.flags&131072)}else ac=!1,Pi&&t.flags&1048576&&Oi(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Da(t.elementType),t.type=e,typeof e==`function`)ci(e)?(r=Js(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Js(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Va(e,t),Ja(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ji(t,sa,r),r!==o.cache&&Zi(t,[sa],n,!0),qa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=bc(e,t,r,n);break a}else if(r!==a){a=_i(Error(i(424)),t),Wi(a),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ni=_f(e.firstChild),Mi=t,Pi=!0,Fi=null,Ii=!0,n=Ra(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Hi(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=Rf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Pi||(n=t.type,e=t.pendingProps,r=Yd(se.current).createElement(n),r[ot]=t,r[st]=e,Ud(r,n,e),yt(r),t.stateNode=r):t.memoizedState=Rf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&Pi&&(r=t.stateNode=xf(t.type,t.pendingProps,se.current),Mi=t,Ii=!0,a=Ni,sf(t.type)?(vf=a,Ni=_f(r.firstChild)):Ni=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pi&&((a=r=Ni)&&(r=df(r,t.type,t.pendingProps,Ii),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=_f(r.firstChild),Ii=!1,a=!0)),a||Ri(t)),de(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Qd(a,o)?r=null:s!==null&&Qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),sp._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&Pi&&((e=n=Ni)&&(n=ff(n,t.pendingProps,Ii),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Ri(t)),null;case 13:return wc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ji(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ea(t),a=ta(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return ea(t),r=ta(sa),e===null?(a=ya(),a===null&&(a=Wl,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ba(t),Ji(t,sa,a)):((e.lanes&n)!==0&&(Va(e,t),Ja(t,null,null,n),qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ji(t,sa,r),r!==a.cache&&Zi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ji(t,sa,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(ju())e.flags|=8192;else throw Oa=wa,Sa}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t))if(ju())e.flags|=8192;else throw Oa=wa,Sa}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Je(),e.lanes|=t,nu|=t)}function zc(e,t){if(!Pi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Vc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bc(t),null;case 1:return Bc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Yi(sa),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ui())),Bc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(Bc(t),Ic(t,a,null,r,n)):(Bc(t),Lc(t,o))):o?o===e.memoizedState?(Bc(t),t.flags&=-16777217):(Fc(t),Bc(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),Bc(t),Ic(t,a,e,r,n)),null;case 27:if(fe(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}e=ae.current,Vi(t)?zi(t,e):(e=xf(a,r,n),t.stateNode=e,Fc(t))}return Bc(t),null;case 5:if(fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}if(o=ae.current,Vi(t))zi(t,o);else{var s=Yd(se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ot]=t,o[st]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ud(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&&Fc(t)}}return Bc(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,Vi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Ri(t,!0)}else e=Yd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return Bc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Vi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ot]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),e=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return Bc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Vi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ot]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),a=!1}else a=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(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),Rc(t,t.updateQueue),Bc(t),null);case 4:return ue(),e===null&&Ad(t.stateNode.containerInfo),Bc(t),null;case 10:return Yi(t.type),Bc(t),null;case 19:if(L(lo),r=t.memoizedState,r===null)return Bc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)zc(r,!1);else{if(Zl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ui(n,e),n=n.sibling;return R(lo,lo.current&1|2),Pi&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>cu&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Pi)return Bc(t),null}else 2*Te()-r.renderingStartTime>cu&&n!==536870912&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Bc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=lo.current,R(lo,a?n&1|2:n&1),Pi&&Di(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Bc(t),t.subtreeFlags&6&&(t.flags|=8192)):Bc(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&L(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),Bc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Hc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(lo),null;case 4:return ue(),null;case 10:return Yi(t.type),null;case 22:case 23:return co(t),to(),e!==null&&L(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function Uc(e,t){switch(Ai(t),t.tag){case 3:Yi(sa),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:L(lo);break;case 10:Yi(t.type);break;case 22:case 23:co(t),to(),e!==null&&L(va);break;case 24:Yi(sa)}}function Wc(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){Qu(t,t.return,e)}}function Gc(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){Qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Qu(t,t.return,e)}}function Kc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Qu(e,e.return,t)}}}function qc(e,t,n){n.props=Js(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Qu(e,t,n)}}function Jc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Qu(e,t,n)}}function Yc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Qu(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){Qu(e,t,n)}else n.current=null}function Xc(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){Qu(e,e.return,t)}}function Zc(e,t,n){try{var r=e.stateNode;Wd(r,e.type,n,t),r[st]=t}catch(t){Qu(e,e.return,t)}}function Qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function $c(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(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 el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$t));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ud(t,r,n),t[ot]=e,t[st]=n}catch(t){Qu(e,e.return,t)}}var rl=!1,il=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,sl=null;function cl(e,t){if(e=e.containerInfo,qd=gp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Jd={focusedElem:e,selectionRange:n},gp=!1,sl=t;sl!==null;)if(t=sl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,sl=e;else for(;sl!==null;){switch(t=sl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Js(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)uf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:uf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,sl=e;break}sl=t.return}}function ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&Wc(5,n);break;case 1:if(wl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Qu(n,n.return,e)}else{var i=Js(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Qu(n,n.return,e)}}r&64&&Kc(n),r&512&&Jc(n,n.return);break;case 3:if(wl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Xa(e,t)}catch(e){Qu(n,n.return,e)}}break;case 27:t===null&&r&4&&nl(n);case 26:case 5:wl(e,n),t===null&&r&4&&Xc(n),r&512&&Jc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&hl(e,n);break;case 13:wl(e,n),r&4&&gl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=nd.bind(null,n),gf(e,n))));break;case 22:if(r=n.memoizedState!==null||rl,!r){t=t!==null&&t.memoizedState!==null||il,i=rl;var a=il;rl=r,(il=t)&&!a?El(e,n,(n.subtreeFlags&8772)!=0):wl(e,n),rl=i,il=a}break;case 30:break;default:wl(e,n)}}function ul(e){var t=e.alternate;t!==null&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dl=null,fl=!1;function pl(e,t,n){for(n=n.child;n!==null;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount==`function`)try{Fe.onCommitFiberUnmount(Pe,n)}catch{}switch(n.tag){case 26:il||Yc(n,t),pl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:il||Yc(n,t);var r=dl,i=fl;sf(n.type)&&(dl=n.stateNode,fl=!1),pl(e,t,n),Sf(n.stateNode),dl=r,fl=i;break;case 5:il||Yc(n,t);case 6:if(r=dl,i=fl,dl=null,pl(e,t,n),dl=r,fl=i,dl!==null)if(fl)try{(dl.nodeType===9?dl.body:dl.nodeName===`HTML`?dl.ownerDocument.body:dl).removeChild(n.stateNode)}catch(e){Qu(n,t,e)}else try{dl.removeChild(n.stateNode)}catch(e){Qu(n,t,e)}break;case 18:dl!==null&&(fl?(e=dl,cf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):cf(dl,n.stateNode));break;case 4:r=dl,i=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=i;break;case 0:case 11:case 14:case 15:Gc(2,n,t),il||Gc(4,n,t),pl(e,t,n);break;case 1:il||(Yc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&qc(n,t,r)),pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:il=(r=il)||n.memoizedState!==null,pl(e,t,n),il=r;break;default:pl(e,t,n)}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){Qu(t,t.return,e)}}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){Qu(t,t.return,e)}}function _l(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(i(435,e.tag))}}function vl(e,t){var n=_l(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=rd.bind(null,e,t);t.then(r,r)}})}function yl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(sf(c.type)){dl=c.stateNode,fl=!1;break a}break;case 5:dl=c.stateNode,fl=!1;break a;case 3:case 4:dl=c.stateNode.containerInfo,fl=!0;break a}c=c.return}if(dl===null)throw Error(i(160));ml(o,s,a),dl=null,fl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xl(t,e),t=t.sibling}var bl=null;function xl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yl(t,e),Sl(e),r&4&&(Gc(3,e,e.return),Wc(3,e),Gc(5,e,e.return));break;case 1:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&64&&rl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=bl;if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[pt]||o[ot]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ud(o,r,n),o[ot]=e,yt(o),r=o;break a;case`link`:var s=Xf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Ud(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Xf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Ud(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ot]=e,yt(o),r=o}e.stateNode=r}else Zf(a,e.type,e.stateNode);else e.stateNode=Gf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Zc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Zf(a,e.type,e.stateNode):Gf(a,r,e.memoizedProps))}break;case 27:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),n!==null&&r&4&&Zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),e.flags&32){a=e.stateNode;try{Gt(a,``)}catch(t){Qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Zc(e,a,n===null?a:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(yl(t,e),Sl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Qu(e,e.return,t)}}break;case 3:if(Yf=null,a=bl,bl=Tf(t.containerInfo),yl(t,e),bl=a,Sl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){Qu(e,e.return,t)}al&&(al=!1,Cl(e));break;case 4:r=bl,bl=Tf(e.stateNode.containerInfo),yl(t,e),Sl(e),bl=r;break;case 12:yl(t,e),Sl(e);break;case 31:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 13:yl(t,e),Sl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ou=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=rl,d=il;if(rl=u||a,il=d||l,yl(t,e),il=d,rl=u,Sl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||rl||il||Tl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?lf(m,!0):lf(l.stateNode,!1)}catch(e){Qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,vl(e,n))));break;case 19:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 30:break;case 21:break;default:yl(t,e),Sl(e)}}function Sl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;tl(e,$c(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Gt(o,``),n.flags&=-33),tl(e,$c(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;el(e,$c(e),s);break;default:throw Error(i(161))}}catch(t){Qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ll(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gc(4,t,t.return),Tl(t);break;case 1:Yc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&qc(t,t.return,n),Tl(t);break;case 27:Sf(t.stateNode);case 26:case 5:Yc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:El(i,a,n),Wc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ya(c[i],s)}catch(e){Qu(r,r.return,e)}}n&&o&64&&Kc(a),Jc(a,a.return);break;case 27:nl(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&Xc(a),Jc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&hl(i,a);break;case 13:El(i,a,n),n&&o&4&&gl(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Jc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&la(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&Wc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e)));break;case 12:if(i&2048){kl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Qu(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:jl(a,o,s,c,i),Wc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(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:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&ep(n,bl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=bl;bl=Tf(e.stateNode.containerInfo),Pl(e,t,n),bl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(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 Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Gc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;sl!==null;){var n=sl;switch(n.tag){case 0:case 11:case 15:Gc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,sl=r;else a:for(n=e;sl!==null;){r=sl;var i=r.sibling,a=r.return;if(ul(r),r===n){sl=null;break a}if(i!==null){i.return=a,sl=i;break a}sl=a}}}var Vl={getCacheForType:function(e){var t=ta(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ta(sa).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,Ul=0,Wl=null,H=null,U=0,Gl=0,Kl=null,ql=!1,Jl=!1,Yl=!1,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=null,iu=null,au=!1,ou=0,su=0,cu=1/0,lu=null,uu=null,du=0,fu=null,pu=null,mu=0,hu=0,gu=null,_u=null,vu=0,yu=null;function bu(){return Ul&2&&U!==0?U&-U:P.T===null?rt():yd()}function xu(){if(tu===0)if(!(U&536870912)||Pi){var e=He;He<<=1,!(He&3932160)&&(He=262144),tu=e}else tu=536870912;return e=no.current,e!==null&&(e.flags|=32),tu}function Su(e,t,n){(e===Wl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(ku(e,0),Eu(e,U,tu,!1)),Xe(e,n),(!(Ul&2)||e!==Wl)&&(e===Wl&&(!(Ul&2)&&($l|=n),Zl===4&&Eu(e,U,tu,!1)),dd(e))}function Cu(e,t,n){if(Ul&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ke(e,t),a=r?Lu(e,t):Fu(e,t,!0),o=r;do{if(a===0){Jl&&!r&&Eu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Tu(n)){a=Fu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ru;var l=c.current.memoizedState.isDehydrated;if(l&&(ku(c,s).flags|=256),s=Fu(c,s,!1),s!==2){if(Yl&&!l){c.errorRecoveryDisabledLanes|=o,$l|=o,a=4;break a}o=iu,iu=a,o!==null&&(iu===null?iu=o:iu.push.apply(iu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ku(e,0),Eu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Eu(r,t,tu,!ql);break a;case 2:iu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ou+300-Te(),10<a)){if(Eu(r,t,tu,!ql),Ge(r,0,!0)!==0)break a;mu=t,r.timeoutHandle=tf(wu.bind(null,r,n,iu,lu,au,t,tu,$l,nu,ql,o,`Throttled`,-0,0),a);break a}wu(r,n,iu,lu,au,t,tu,$l,nu,ql,o,null,-0,0)}}break}while(1);dd(e)}function wu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},Fl(t,a,d);var m=(a&62914560)===a?ou-Te():(a&4194048)===a?su-Te():0;if(m=np(d,m),m!==null){mu=a,e.cancelPendingCommit=m(Wu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Eu(e,a,o,!l);return}}Wu(e,t,a,n,r,i,o,s,c)}function Tu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Eu(e,t,n,r){t&=~eu,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Qe(e,n,t)}function Du(){return Ul&6?!0:(fd(0,!1),!1)}function Ou(){if(H!==null){if(Gl===0)var e=H.return;else e=H,qi=Ki=null,Ao(e),ja=null,Ma=0,e=H;for(;e!==null;)Uc(e.alternate,e),e=e.return;H=null}}function ku(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,nf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),mu=0,Ou(),Wl=e,H=n=li(e.current,null),U=t,Gl=0,Kl=null,ql=!1,Jl=Ke(e,t),Yl=!1,nu=tu=eu=$l=Ql=Zl=0,iu=ru=null,au=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Le(r),a=1<<i;t|=e[i],r&=~a}return Xl=t,z(),n}function Au(e,t){V=null,P.H=Bs,t===B||t===Ca?(t=ka(),Gl=3):t===Sa?(t=ka(),Gl=4):Gl=t===ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,H===null&&(Zl=1,Qs(e,_i(t,e.current)))}function ju(){var e=no.current;return e===null?!0:(U&4194048)===U?ro===null:(U&62914560)===U||U&536870912?e===ro:!1}function Mu(){var e=P.H;return P.H=Bs,e===null?Bs:e}function Nu(){var e=P.A;return P.A=Vl,e}function Pu(){Zl=4,ql||(U&4194048)!==U&&no.current!==null||(Jl=!0),!(Ql&134217727)&&!($l&134217727)||Wl===null||Eu(Wl,U,tu,!1)}function Fu(e,t,n){var r=Ul;Ul|=2;var i=Mu(),a=Nu();(Wl!==e||U!==t)&&(lu=null,ku(e,t)),t=!1;var o=Zl;a:do try{if(Gl!==0&&H!==null){var s=H,c=Kl;switch(Gl){case 8:Ou(),o=6;break a;case 3:case 2:case 9:case 6:no.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Vu(e,s,c,l),n&&Jl){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Vu(e,s,c,l)}}Iu(),o=Zl;break}catch(t){Au(e,t)}while(1);return t&&e.shellSuspendCounter++,qi=Ki=null,Ul=r,P.H=i,P.A=a,H===null&&(Wl=null,U=0,z()),o}function Iu(){for(;H!==null;)zu(H)}function Lu(e,t){var n=Ul;Ul|=2;var r=Mu(),a=Nu();Wl!==e||U!==t?(lu=null,cu=Te()+500,ku(e,t)):Jl=Ke(e,t);a:do try{if(Gl!==0&&H!==null){t=H;var o=Kl;b:switch(Gl){case 1:Gl=0,Kl=null,Vu(e,t,o,1);break;case 2:case 9:if(Ta(o)){Gl=0,Kl=null,Bu(t);break}t=function(){Gl!==2&&Gl!==9||Wl!==e||(Gl=7),dd(e)},o.then(t,t);break a;case 3:Gl=7;break a;case 4:Gl=5;break a;case 7:Ta(o)?(Gl=0,Kl=null,Bu(t)):(Gl=0,Kl=null,Vu(e,t,o,7));break;case 5:var s=null;switch(H.tag){case 26:s=H.memoizedState;case 5:case 27:var c=H;if(s?$f(s):c.stateNode.complete){Gl=0,Kl=null;var l=c.sibling;if(l!==null)H=l;else{var u=c.return;u===null?H=null:(H=u,Hu(u))}break b}}Gl=0,Kl=null,Vu(e,t,o,5);break;case 6:Gl=0,Kl=null,Vu(e,t,o,6);break;case 8:Ou(),Zl=6;break a;default:throw Error(i(462))}}Ru();break}catch(t){Au(e,t)}while(1);return qi=Ki=null,P.H=r,P.A=a,Ul=n,H===null?(Wl=null,U=0,z(),Zl):0}function Ru(){for(;H!==null&&!Ce();)zu(H)}function zu(e){var t=Pc(e.alternate,e,Xl);e.memoizedProps=e.pendingProps,t===null?Hu(e):H=t}function Bu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,U);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,U);break;case 5:Ao(t);default:Uc(n,t),t=H=ui(t,Xl),t=Pc(n,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Hu(e):H=t}function Vu(e,t,n,r){qi=Ki=null,Ao(t),ja=null,Ma=0;var i=t.return;try{if(rc(e,i,t,n,U)){Zl=1,Qs(e,_i(n,e.current)),H=null;return}}catch(t){if(i!==null)throw H=i,t;Zl=1,Qs(e,_i(n,e.current)),H=null;return}t.flags&32768?(Pi||r===1?e=!0:Jl||U&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=no.current,r!==null&&r.tag===13&&(r.flags|=16384))),Uu(t,e)):Hu(t)}function Hu(e){var t=e;do{if(t.flags&32768){Uu(t,ql);return}e=t.return;var n=Vc(t.alternate,t,Xl);if(n!==null){H=n;return}if(t=t.sibling,t!==null){H=t;return}H=t=e}while(t!==null);Zl===0&&(Zl=5)}function Uu(e,t){do{var n=Hc(e.alternate,e);if(n!==null){n.flags&=32767,H=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){H=e;return}H=e=n}while(e!==null);Zl=6,H=null}function Wu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Yu();while(du!==0);if(Ul&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=$r,Ze(e,n,o,s,c,l),e===Wl&&(H=Wl=null,U=0),pu=t,fu=e,mu=n,hu=o,gu=a,_u=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,id(ke,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Ul,Ul|=4;try{cl(e,t,n)}finally{Ul=s,F.p=a,P.T=r}}du=1,Gu(),Ku(),qu()}}function Gu(){if(du===1){du=0;var e=fu,t=pu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Ul;Ul|=4;try{xl(t,e);var a=Jd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Tr(s,h),v=Tr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gp=!!qd,Jd=qd=null}finally{Ul=i,F.p=r,P.T=n}}e.current=t,du=2}}function Ku(){if(du===2){du=0;var e=fu,t=pu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Ul;Ul|=4;try{ll(e,t.alternate,t)}finally{Ul=i,F.p=r,P.T=n}}du=3}}function qu(){if(du===4||du===3){du=0,we();var e=fu,t=pu,n=mu,r=_u;t.subtreeFlags&10256||t.flags&10256?du=5:(du=0,pu=fu=null,Ju(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(uu=null),nt(n),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}mu&3&&Yu(),dd(e),i=e.pendingLanes,n&261930&&i&42?e===yu?vu++:(vu=0,yu=e):vu=0,fd(0,!1)}}function Ju(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Yu(){return Gu(),Ku(),qu(),Xu()}function Xu(){if(du!==5)return!1;var e=fu,t=hu;hu=0;var n=nt(mu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=gu,gu=null;var o=fu,s=mu;if(du=0,pu=fu=null,mu=0,Ul&6)throw Error(i(331));var c=Ul;if(Ul|=4,Rl(o.current),Al(o,o.current,s,n),Ul=c,fd(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{F.p=a,P.T=r,Ju(e,t)}}function Zu(e,t,n){t=_i(n,t),t=ec(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Xe(e,2),dd(e))}function Qu(e,t,n){if(e.tag===3)Zu(e,e,n);else for(;t!==null;){if(t.tag===3){Zu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(uu===null||!uu.has(r))){e=_i(n,e),n=tc(2),r=Ua(t,n,2),r!==null&&(nc(n,r,t,e),Xe(r,2),dd(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;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)||(Yl=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Wl===e&&(U&n)===n&&(Zl===4||Zl===3&&(U&62914560)===U&&300>Te()-ou?!(Ul&2)&&ku(e,0):eu|=n,nu===U&&(nu=0)),dd(e)}function td(e,t){t===0&&(t=Je()),e=ni(e,t),e!==null&&(Xe(e,t),dd(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(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),td(e,n)}function id(e,t){return xe(e,t)}var ad=null,od=null,sd=!1,cd=!1,ld=!1,ud=0;function dd(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,vd())}function fd(e,t){if(!ld&&cd){ld=!0;do for(var n=!1,r=ad;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,_d(r,a))}else a=U,a=Ge(r,r===Wl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,_d(r,a));r=r.next}while(n);ld=!1}}function pd(){md()}function md(){cd=sd=!1;var e=0;ud!==0&&ef()&&(e=ud);for(var t=Te(),n=null,r=ad;r!==null;){var i=r.next,a=hd(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}du!==0&&du!==5||fd(e,!1),ud!==0&&(ud=0)}function hd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Wl,n=U,n=Ge(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ke(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),nt(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=je;break;default:n=ke}return r=gd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function gd(e,t){if(du!==0&&du!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=U;return r=Ge(e,e===Wl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),hd(e,Te()),e.callbackNode!=null&&e.callbackNode===n?gd.bind(null,e):null)}function _d(e,t){if(Yu())return null;Cu(e,t,!0)}function vd(){af(function(){Ul&6?xe(De,pd):md()})}function yd(){if(ud===0){var e=fa;e===0&&(e=Ve,Ve<<=1,!(Ve&261888)&&(Ve=256)),ud=e}return ud}function bd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Qt(``+e)}function xd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Sd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=bd((i[st]||null).action),o=r.submitter;o&&(t=(t=o[st]||null)?bd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ud!==0){var e=o?xd(i,o):new FormData(i);Es(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?xd(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Cd=0;Cd<Jr.length;Cd++){var wd=Jr[Cd];Yr(wd.toLowerCase(),`on`+(wd[0].toUpperCase()+wd.slice(1)))}Yr(Br,`onAnimationEnd`),Yr(Vr,`onAnimationIteration`),Yr(Hr,`onAnimationStart`),Yr(`dblclick`,`onDoubleClick`),Yr(`focusin`,`onFocus`),Yr(`focusout`,`onBlur`),Yr(Ur,`onTransitionRun`),Yr(Wr,`onTransitionStart`),Yr(Gr,`onTransitionCancel`),Yr(Kr,`onTransitionEnd`),Ct(`onMouseEnter`,[`mouseout`,`mouseover`]),Ct(`onMouseLeave`,[`mouseout`,`mouseover`]),Ct(`onPointerEnter`,[`pointerout`,`pointerover`]),Ct(`onPointerLeave`,[`pointerout`,`pointerover`]),St(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),St(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),St(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),St(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Td=`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(` `),Ed=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Td));function Dd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Xr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Xr(e)}i.currentTarget=null,a=c}}}}function W(e,t){var n=t[lt];n===void 0&&(n=t[lt]=new Set);var r=e+`__bubble`;n.has(r)||(jd(t,e,2,!1),n.add(r))}function Od(e,t,n){var r=0;t&&(r|=4),jd(n,e,r,t)}var kd=`_reactListening`+Math.random().toString(36).slice(2);function Ad(e){if(!e[kd]){e[kd]=!0,bt.forEach(function(t){t!==`selectionchange`&&(Ed.has(t)||Od(t,!1,e),Od(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kd]||(t[kd]=!0,Od(`selectionchange`,!1,t))}}function jd(e,t,n,r){switch(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!un||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Md(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ht(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}sn(function(){var r=a,i=tn(n),s=[];a:{var c=qr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Br:case Vr:case Hr:l=jn;break;case Kr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=cn(m,p),g!=null&&d.push(Nd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==en&&(u=n.relatedTarget||n.fromElement)&&(ht(u)||u[ct]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ht(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:_t(l),h=u==null?c:_t(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ht(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Fd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Id(s,c,l,d,!1),u!==null&&f!==null&&Id(s,f,u,d,!0)}}a:{if(c=r?_t(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ur;else if(ir(c))if(dr)v=br;else{v=vr;var y=_r}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Yt(r.elementType)&&(v=ur):v=yr;if(v&&=v(e,r)){ar(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Vt(c,`number`,c.value)}switch(y=r?_t(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=Pd(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=Pd(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Sd(s,e,r,n,i)}Dd(s,t)})}function Nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=cn(e,n),i!=null&&r.unshift(Nd(e,i,a)),i=cn(e,t),i!=null&&r.push(Nd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Fd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Id(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=cn(n,a),l!=null&&o.unshift(Nd(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(Nd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ld=/\r\n?/g,Rd=/\u0000|\uFFFD/g;function zd(e){return(typeof e==`string`?e:``+e).replace(Ld,`
|
|
9
|
+
`).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Gt(e,``+r);break;case`className`:kt(e,`class`,r);break;case`tabIndex`:kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:kt(e,n,r);break;case`style`:Jt(e,r,o);break;case`data`:if(t!==`object`){kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`onScroll`:r!=null&&W(`scroll`,e);break;case`onScrollEnd`:r!=null&&W(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Qt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:W(`beforetoggle`,e),W(`toggle`,e),Ot(e,`popover`,r);break;case`xlinkActuate`:At(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:At(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:At(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:At(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ot(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Xt.get(n)||n,Ot(e,n,r))}}function Hd(e,t,n,r,a,o){switch(n){case`style`:Jt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Gt(e,``+r);break;case`onScroll`:r!=null&&W(`scroll`,e);break;case`onScrollEnd`:r!=null&&W(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!xt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[st]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ot(e,n,r)}}}function Ud(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:W(`error`,e),W(`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:Vd(e,t,o,s,n,null)}}a&&Vd(e,t,`srcSet`,n.srcSet,n,null),r&&Vd(e,t,`src`,n.src,n,null);return;case`input`:W(`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:Vd(e,t,r,d,n,null)}}Bt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in W(`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:Vd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ht(e,!!r,n,!0):Ht(e,!!r,t,!1);return;case`textarea`:for(s in W(`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:Vd(e,t,s,c,n,null)}Wt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Vd(e,t,l,r,n,null)}return;case`dialog`:W(`beforetoggle`,e),W(`toggle`,e),W(`cancel`,e),W(`close`,e);break;case`iframe`:case`object`:W(`load`,e);break;case`video`:case`audio`:for(r=0;r<Td.length;r++)W(Td[r],e);break;case`image`:W(`error`,e),W(`load`,e);break;case`details`:W(`toggle`,e);break;case`embed`:case`source`:case`link`:W(`error`,e),W(`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:Vd(e,t,u,r,n,null)}return;default:if(Yt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Hd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Vd(e,t,c,r,n,null))}function Wd(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)||Vd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Vd(e,t,p,m,r,f)}}zt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Vd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Vd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ht(e,!!n,n?[]:``,!1):Ht(e,!!n,t,!0)):Ht(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Vd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Vd(e,t,s,a,r,o)}Ut(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Vd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Vd(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)&&Vd(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:Vd(e,t,u,p,r,m)}return;default:if(Yt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Hd(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||Hd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Vd(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||Vd(e,t,f,p,r,m)}function Gd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Kd(){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&&Gd(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&&Gd(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 qd=null,Jd=null;function Yd(e){return e.nodeType===9?e:e.ownerDocument}function Xd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Zd(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 Qd(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 $d=null;function ef(){var e=window.event;return e&&e.type===`popstate`?e===$d?!1:($d=e,!0):($d=null,!1)}var tf=typeof setTimeout==`function`?setTimeout:void 0,nf=typeof clearTimeout==`function`?clearTimeout:void 0,rf=typeof Promise==`function`?Promise:void 0,af=typeof queueMicrotask==`function`?queueMicrotask:rf===void 0?tf:function(e){return rf.resolve(null).then(e).catch(of)};function of(e){setTimeout(function(){throw e})}function sf(e){return e===`head`}function cf(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),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[pt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sf(e.ownerDocument.body);n=i}while(n);Hp(t)}function lf(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 uf(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`:uf(n),mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function df(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[pt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=_f(e.nextSibling),e===null)break}return null}function ff(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_f(e.nextSibling),e===null))return null;return e}function pf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_f(e.nextSibling),e===null))return null;return e}function mf(e){return e.data===`$?`||e.data===`$~`}function hf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gf(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 _f(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 vf=null;function yf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _f(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bf(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 xf(e,t,n){switch(t=Yd(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 Sf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mt(e)}var Cf=new Map,wf=new Set;function Tf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ef=F.d;F.d={f:Df,r:Of,D:jf,C:Mf,L:Nf,m:Pf,X:If,S:Ff,M:Lf};function Df(){var e=Ef.f(),t=Du();return e||t}function Of(e){var t=gt(e);t!==null&&t.tag===5&&t.type===`form`?Os(t):Ef.r(e)}var kf=typeof document>`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Rt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),yt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Rt(r)+`"][href="`+Rt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),yt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=vt(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);yt(c),Ud(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,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=vt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=m({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),yt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=vt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),yt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=se.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=vt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=vt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Rt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),yt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Rt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,yt(a),a):(r=n,(a=Cf.get(o))&&(r=m({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),yt(a),Ud(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,Kf(r,n.precedence,e));return t.instance}function Kf(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 qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Yf=null;function Xf(e,t,n){if(Yf===null){var r=new Map,i=Yf=new Map;i.set(n,r)}else i=Yf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[pt]||a[ot]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Zf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qf(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 $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(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=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(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=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&tp===0&&(tp=62500*Kd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.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=rp.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 sp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function cp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=si(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ba(a),e}function up(e){return e?(e=ai,e):ai}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ha(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ua(e,r,t),n!==null&&(Su(n,e,t),Wa(n,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=ni(e,67108864);t!==null&&Su(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=bu();t=tt(t);var n=ni(e,t);n!==null&&Su(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,yp(e,t,n,r)}finally{F.p=a,P.T=i}}function vp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,yp(e,t,n,r)}finally{F.p=a,P.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Md(e,t,r,xp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=gt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}dd(a),!(Ul&6)&&(cu=Te()+500,fd(0,!1))}}break;case 31:case 13:s=ni(a,2),s!==null&&Su(s,a,2),Du(),pp(a,2)}if(a=bp(r),a===null&&Md(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Md(e,t,r,null,n)}}function bp(e){return e=tn(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=ht(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xp=e,null}function Cp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ee()){case De:return 2;case Oe:return 8;case ke:case Ae:return 32;case je:return 268435456;default:return 32}default:return 32}}var wp=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,Ap=[],jp=`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 Mp(e,t){switch(e){case`focusin`:case`focusout`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.delete(t.pointerId)}}function Np(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=gt(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Tp=Np(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Np(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Np(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Np(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=ht(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,it(e.priority,function(){hp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,it(e.priority,function(){hp(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 Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);en=r,n.target.dispatchEvent(r),en=null}else return t=gt(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){wp=!1,Tp!==null&&Ip(Tp)&&(Tp=null),Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op.forEach(Lp),kp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=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(Sp(r||n)===null)continue;break}var a=gt(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Tp!==null&&zp(Tp,e),Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<Ap.length;n++){var r=Ap[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ap.length&&(n=Ap[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&Ap.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[st]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[st]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){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 Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dp(n,bu(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),Du(),t[ct]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=rt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ap.length&&t!==0&&t<Ap[n].priority;n++);Ap.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.5`)throw Error(i(527,Kp,`19.2.5`));F.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 qp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{Pe=Jp.inject(qp),Fe=Jp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ys,s=Xs,c=Zs;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=lp(e,1,!1,null,null,n,r,null,o,s,c,Up),e[ct]=t.current,Ad(e),new Wp(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=`modulepreload`,y=function(e,t){return new URL(e,t).href},b={},x=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=y(t,n),t in b)return;b[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:v,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},S=l(d(),1),C=`popstate`;function w(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function T(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return A(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:j(t)}return N(t,n,null,e)}function E(e,t){if(e===!1||e==null)throw Error(t)}function D(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function O(){return Math.random().toString(36).substring(2,10)}function k(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function A(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?M(t):t,state:n,key:t&&t.key||r||O(),unstable_mask:i}}function j({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function M(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function N(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u()+1;let d=k(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u();let i=k(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ee(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(C,d),c=e,()=>{i.removeEventListener(C,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ee(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),E(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:j(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function te(e,t,n=`/`){return P(e,t,n,!1)}function P(e,t,n,r){let i=he((typeof t==`string`?M(t):t).pathname||`/`,n);if(i==null)return null;let a=ne(e);ie(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=me(i);o=de(a[e],t,r)}return o}function F(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ne(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;E(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=we([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(E(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ne(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:le(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of re(e.path))a(e,t,!0,n)}),t}function re(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=re(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ie(e){e.sort((e,t)=>e.score===t.score?ue(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var I=/^:[\w-]+$/,L=3,R=2,ae=1,oe=10,se=-2,ce=e=>e===`*`;function le(e,t){let n=e.split(`/`),r=n.length;return n.some(ce)&&(r+=se),t&&(r+=R),n.filter(e=>!ce(e)).reduce((e,t)=>e+(I.test(t)?L:t===``?ae:oe),r)}function ue(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function de(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:we([a,u.pathname]),pathnameBase:Ee(we([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=we([a,u.pathnameBase]))}return o}function fe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pe(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function pe(e,t=!1,n=!0){D(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function me(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function he(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var ge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function _e(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?M(e):e,a;return n?(n=Ce(n),a=n.startsWith(`/`)?ve(n.substring(1),`/`):ve(n,t)):a=t,{pathname:a,search:De(r),hash:Oe(i)}}function ve(e,t){let n=Te(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ye(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function be(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function xe(e){let t=be(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Se(e,t,n,r=!1){let i;typeof e==`string`?i=M(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),ye(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),ye(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),ye(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=_e(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ce=e=>e.replace(/\/\/+/g,`/`),we=e=>Ce(e.join(`/`)),Te=e=>e.replace(/\/+$/,``),Ee=e=>Te(e).replace(/^\/*/,`/`),De=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Oe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ke=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ae(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function je(e){return we(e.map(e=>e.route.path).filter(Boolean))||`/`}var Me=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ne(e,t){let n=e;if(typeof n!=`string`||!ge.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Me)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=he(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{D(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Pe=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Pe);var Fe=[`GET`,...Pe];new Set(Fe);var Ie=S.createContext(null);Ie.displayName=`DataRouter`;var Le=S.createContext(null);Le.displayName=`DataRouterState`;var Re=S.createContext(!1);function ze(){return S.useContext(Re)}var Be=S.createContext({isTransitioning:!1});Be.displayName=`ViewTransition`;var Ve=S.createContext(new Map);Ve.displayName=`Fetchers`;var He=S.createContext(null);He.displayName=`Await`;var Ue=S.createContext(null);Ue.displayName=`Navigation`;var We=S.createContext(null);We.displayName=`Location`;var Ge=S.createContext({outlet:null,matches:[],isDataRoute:!1});Ge.displayName=`Route`;var Ke=S.createContext(null);Ke.displayName=`RouteError`;var qe=`REACT_ROUTER_ERROR`,Je=`REDIRECT`,Ye=`ROUTE_ERROR_RESPONSE`;function Xe(e){if(e.startsWith(`${qe}:${Je}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ze(e){if(e.startsWith(`${qe}:${Ye}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ke(t.status,t.statusText,t.data)}catch{}}function Qe(e,{relative:t}={}){E($e(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=S.useContext(Ue),{hash:i,pathname:a,search:o}=ct(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:we([n,a])),r.createHref({pathname:s,search:o,hash:i})}function $e(){return S.useContext(We)!=null}function et(){return E($e(),`useLocation() may be used only in the context of a <Router> component.`),S.useContext(We).location}var tt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function nt(e){S.useContext(Ue).static||S.useLayoutEffect(e)}function rt(){let{isDataRoute:e}=S.useContext(Ge);return e?Dt():it()}function it(){E($e(),`useNavigate() may be used only in the context of a <Router> component.`);let e=S.useContext(Ie),{basename:t,navigator:n}=S.useContext(Ue),{matches:r}=S.useContext(Ge),{pathname:i}=et(),a=JSON.stringify(xe(r)),o=S.useRef(!1);return nt(()=>{o.current=!0}),S.useCallback((r,s={})=>{if(D(o.current,tt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Se(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:we([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var at=S.createContext(null);function ot(e){let t=S.useContext(Ge).outlet;return S.useMemo(()=>t&&S.createElement(at.Provider,{value:e},t),[t,e])}function st(){let{matches:e}=S.useContext(Ge),t=e[e.length-1];return t?t.params:{}}function ct(e,{relative:t}={}){let{matches:n}=S.useContext(Ge),{pathname:r}=et(),i=JSON.stringify(xe(n));return S.useMemo(()=>Se(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function lt(e,t){return ut(e,t)}function ut(e,t,n){E($e(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=S.useContext(Ue),{matches:i}=S.useContext(Ge),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;kt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=et(),d;if(t){let e=typeof t==`string`?M(t):t;E(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=te(e,{pathname:p});D(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),D(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=_t(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:we([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:we([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?S.createElement(We.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function dt(){let e=Et(),t=Ae(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=S.createElement(S.Fragment,null,S.createElement(`p`,null,`💿 Hey developer 👋`),S.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,S.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,S.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),S.createElement(S.Fragment,null,S.createElement(`h2`,null,`Unexpected Application Error!`),S.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?S.createElement(`pre`,{style:i},n):null,o)}var ft=S.createElement(dt,null),pt=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ze(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:S.createElement(Ge.Provider,{value:this.props.routeContext},S.createElement(Ke.Provider,{value:e,children:this.props.component}));return this.context?S.createElement(ht,{error:e},t):t}};pt.contextType=Re;var mt=new WeakMap;function ht({children:e,error:t}){let{basename:n}=S.useContext(Ue);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Xe(t.digest);if(e){let r=mt.get(t);if(r)throw r;let i=Ne(e.location,n);if(Me&&!mt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw mt.set(t,n),n}return S.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function gt({routeContext:e,match:t,children:n}){let r=S.useContext(Ie);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Ge.Provider,{value:e},n)}function _t(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);E(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:je(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ft,o&&(s<0&&c===0?(kt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?S.createElement(n.route.Component,null):n.route.element?n.route.element:e,S.createElement(gt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?S.createElement(pt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yt(e){let t=S.useContext(Ie);return E(t,vt(e)),t}function bt(e){let t=S.useContext(Le);return E(t,vt(e)),t}function xt(e){let t=S.useContext(Ge);return E(t,vt(e)),t}function St(e){let t=xt(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ct(){return St(`useRouteId`)}function wt(){return bt(`useNavigation`).navigation}function Tt(){let{matches:e,loaderData:t}=bt(`useMatches`);return S.useMemo(()=>e.map(e=>F(e,t)),[e,t])}function Et(){let e=S.useContext(Ke),t=bt(`useRouteError`),n=St(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Dt(){let{router:e}=yt(`useNavigate`),t=St(`useNavigate`),n=S.useRef(!1);return nt(()=>{n.current=!0}),S.useCallback(async(r,i={})=>{D(n.current,tt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ot={};function kt(e,t,n){!t&&!Ot[e]&&(Ot[e]=!0,D(!1,n))}S.useOptimistic,S.memo(At);function At({routes:e,future:t,state:n,isStatic:r,onError:i}){return ut(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function jt({to:e,replace:t,state:n,relative:r}){E($e(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=S.useContext(Ue);D(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=S.useContext(Ge),{pathname:o}=et(),s=rt(),c=Se(e,xe(a),o,r===`path`),l=JSON.stringify(c);return S.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Mt(e){return ot(e.context)}function Nt(e){E(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Pt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){E(!$e(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=S.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=M(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=S.useMemo(()=>{let e=he(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return D(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:S.createElement(Ue.Provider,{value:c},S.createElement(We.Provider,{children:t,value:h}))}function Ft({children:e,location:t}){return lt(It(e),t)}S.Component;function It(e,t=[]){let n=[];return S.Children.forEach(e,(e,r)=>{if(!S.isValidElement(e))return;let i=[...t,r];if(e.type===S.Fragment){n.push.apply(n,It(e.props.children,i));return}E(e.type===Nt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=It(e.props.children,i)),n.push(a)}),n}var Lt=`get`,Rt=`application/x-www-form-urlencoded`;function zt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Bt(e){return zt(e)&&e.tagName.toLowerCase()===`button`}function Vt(e){return zt(e)&&e.tagName.toLowerCase()===`form`}function Ht(e){return zt(e)&&e.tagName.toLowerCase()===`input`}function Ut(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wt(e,t){return e.button===0&&(!t||t===`_self`)&&!Ut(e)}var Gt=null;function Kt(){if(Gt===null)try{new FormData(document.createElement(`form`),0),Gt=!1}catch{Gt=!0}return Gt}var qt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Jt(e){return e!=null&&!qt.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rt}"`),null):e}function Yt(e,t){let n,r,i,a,o;if(Vt(e)){let o=e.getAttribute(`action`);r=o?he(o,t):null,n=e.getAttribute(`method`)||Lt,i=Jt(e.getAttribute(`enctype`))||Rt,a=new FormData(e)}else if(Bt(e)||Ht(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?he(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Lt,i=Jt(e.getAttribute(`formenctype`))||Jt(o.getAttribute(`enctype`))||Rt,a=new FormData(o,e),!Kt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(zt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Lt,r=null,i=Rt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Xt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Zt=/[&><\u2028\u2029]/g;function Qt(e){return e.replace(Zt,e=>Xt[e])}function $t(e,t){if(e===!1||e==null)throw Error(t)}function en(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&he(i.pathname,t)===`/`?i.pathname=`${Te(t)}/_root.${r}`:i.pathname=`${Te(i.pathname)}.${r}`,i}async function tn(e,t){if(e.id in t)return t[e.id];try{let n=await x(()=>import(e.module),[],import.meta.url);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function nn(e){return e!=null&&typeof e.page==`string`}function rn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function an(e,t,n){return un((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await tn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(rn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function on(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function sn(e,t,{includeHydrateFallback:n}={}){return cn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function cn(e){return[...new Set(e)]}function ln(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function un(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!nn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ln(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function dn(){let e=S.useContext(Ie);return $t(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function fn(){let e=S.useContext(Le);return $t(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var pn=S.createContext(void 0);pn.displayName=`FrameworkContext`;function mn(){let e=S.useContext(pn);return $t(e,`You must render this element inside a <HydratedRouter> element`),e}function hn(e,t){let n=S.useContext(pn),[r,i]=S.useState(!1),[a,o]=S.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=S.useRef(null);S.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),S.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:gn(s,p),onBlur:gn(c,m),onMouseEnter:gn(l,p),onMouseLeave:gn(u,m),onTouchStart:gn(d,p)}]:[a,f,{}]:[!1,f,{}]}function gn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function _n({page:e,...t}){let n=ze(),{router:r}=dn(),i=S.useMemo(()=>te(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?S.createElement(yn,{page:e,matches:i,...t}):S.createElement(bn,{page:e,matches:i,...t}):null}function vn(e){let{manifest:t,routeModules:n}=mn(),[r,i]=S.useState([]);return S.useEffect(()=>{let r=!1;return an(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function yn({page:e,matches:t,...n}){let r=et(),{future:i}=mn(),{basename:a}=dn(),o=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=en(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return S.createElement(S.Fragment,null,o.map(e=>S.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function bn({page:e,matches:t,...n}){let r=et(),{future:i,manifest:a,routeModules:o}=mn(),{basename:s}=dn(),{loaderData:c,matches:l}=fn(),u=S.useMemo(()=>on(e,t,l,a,r,`data`),[e,t,l,a,r]),d=S.useMemo(()=>on(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=en(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=S.useMemo(()=>sn(d,a),[d,a]),m=vn(d);return S.createElement(S.Fragment,null,f.map(e=>S.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>S.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>S.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function xn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}S.Component;var Sn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Sn&&(window.__reactRouterVersion=`7.14.1`)}catch{}function Cn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=S.useRef();i.current??=T({window:r,v5Compat:!0});let a=i.current,[o,s]=S.useState({action:a.action,location:a.location}),c=S.useCallback(e=>{n===!1?s(e):S.startTransition(()=>s(e))},[n]);return S.useLayoutEffect(()=>a.listen(c),[a,c]),S.createElement(Pt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function wn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=S.useState({action:n.action,location:n.location}),o=S.useCallback(e=>{r===!1?a(e):S.startTransition(()=>a(e))},[r]);return S.useLayoutEffect(()=>n.listen(o),[n,o]),S.createElement(Pt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}wn.displayName=`unstable_HistoryRouter`;var Tn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,En=S.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:_}=S.useContext(Ue),v=typeof l==`string`&&Tn.test(l),y=Ne(l,h);l=y.to;let b=Qe(l,{relative:r}),x=et(),C=null;if(o){let e=Se(o,[],x.unstable_mask?x.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:we([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=hn(n,p),D=Nn(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(y.isExternal||i),A=S.createElement(`a`,{...p,...E,href:(k?C:void 0)||y.absoluteURL||b,onClick:k?O:e,ref:xn(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return w&&!v?S.createElement(S.Fragment,null,A,S.createElement(_n,{page:b})):A});En.displayName=`Link`;var Dn=S.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=ct(a,{relative:c.relative}),d=et(),f=S.useContext(Le),{navigator:p,basename:m}=S.useContext(Ue),h=f!=null&&Un(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=he(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:b,isPending:x,isTransitioning:h},w=b?e:void 0,T;T=typeof n==`function`?n(C):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return S.createElement(En,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Dn.displayName=`NavLink`;var On=S.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Lt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=S.useContext(Ue),g=In(),_=Ln(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Tn.test(s);return S.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?S.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});On.displayName=`Form`;function kn({getKey:e,storageKey:t,...n}){let r=S.useContext(pn),{basename:i}=S.useContext(Ue),a=et(),o=Tt();Vn({getKey:e,storageKey:t});let s=S.useMemo(()=>{if(!r||!e)return null;let t=Bn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return S.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Qt(JSON.stringify(t||Rn))}, ${Qt(JSON.stringify(s))})`}})}kn.displayName=`ScrollRestoration`;function An(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jn(e){let t=S.useContext(Ie);return E(t,An(e)),t}function Mn(e){let t=S.useContext(Le);return E(t,An(e)),t}function Nn(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=rt(),d=et(),f=ct(e,{relative:o});return S.useCallback(p=>{if(Wt(p,t)){p.preventDefault();let t=n===void 0?j(d)===j(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?S.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Pn=0,Fn=()=>`__${String(++Pn)}__`;function In(){let{router:e}=jn(`useSubmit`),{basename:t}=S.useContext(Ue),n=Ct(),r=e.fetch,i=e.navigate;return S.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Yt(e,t);a.navigate===!1?await r(a.fetcherKey||Fn(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Ln(e,{relative:t}={}){let{basename:n}=S.useContext(Ue),r=S.useContext(Ge);E(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ct(e||`.`,{relative:t})},o=et();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:we([n,a.pathname])),j(a)}var Rn=`react-router-scroll-positions`,zn={};function Bn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:he(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Vn({getKey:e,storageKey:t}={}){let{router:n}=jn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Mn(`useScrollRestoration`),{basename:a}=S.useContext(Ue),o=et(),s=Tt(),c=wt();S.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Hn(S.useCallback(()=>{if(c.state===`idle`){let t=Bn(o,s,a,e);zn[t]=window.scrollY}try{sessionStorage.setItem(t||Rn,JSON.stringify(zn))}catch(e){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(S.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Rn);e&&(zn=JSON.parse(e))}catch{}},[t]),S.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(zn,()=>window.scrollY,e?(t,n)=>Bn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),S.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{D(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Hn(e,t){let{capture:n}=t||{};S.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Un(e,{relative:t}={}){let n=S.useContext(Be);E(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=jn(`useViewTransitionState`),i=ct(e,{relative:t});if(!n.isTransitioning)return!1;let a=he(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=he(n.nextLocation.pathname,r)||n.nextLocation.pathname;return fe(i.pathname,o)!=null||fe(i.pathname,a)!=null}var Wn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Gn=new class extends Wn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Kn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},qn=new class{#e=Kn;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Jn(e){setTimeout(e,0)}var Yn=typeof window>`u`||`Deno`in globalThis;function Xn(){}function Zn(e,t){return typeof e==`function`?e(t):e}function Qn(e){return typeof e==`number`&&e>=0&&e!==1/0}function $n(e,t){return Math.max(e+(t||0)-Date.now(),0)}function er(e,t){return typeof e==`function`?e(t):e}function tr(e,t){return typeof e==`function`?e(t):e}function nr(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ir(o,t.options))return!1}else if(!or(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function rr(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ar(t.options.mutationKey)!==ar(a))return!1}else if(!or(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ir(e,t){return(t?.queryKeyHashFn||ar)(e)}function ar(e){return JSON.stringify(e,(e,t)=>dr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function or(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>or(e[n],t[n])):!1}var sr=Object.prototype.hasOwnProperty;function cr(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ur(e)&&ur(t);if(!r&&!(dr(e)&&dr(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:sr.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=cr(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function lr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ur(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function dr(e){if(!fr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!fr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function fr(e){return Object.prototype.toString.call(e)===`[object Object]`}function pr(e){return new Promise(t=>{qn.setTimeout(t,e)})}function mr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:cr(e,t)}function hr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function gr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var _r=Symbol();function vr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===_r?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function yr(e,t){return typeof e==`function`?e(...t):!!e}function br(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var xr=(()=>{let e=()=>Yn;return{isServer(){return e()},setIsServer(t){e=t}}})();function Sr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Cr=Jn;function wr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Cr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Tr=wr(),Er=new class extends Wn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Dr(e){return Math.min(1e3*2**e,3e4)}function Or(e){return(e??`online`)===`online`?Er.isOnline():!0}var kr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ar(e){let t=!1,n=0,r,i=Sr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new kr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Gn.isFocused()&&(e.networkMode===`always`||Er.isOnline())&&e.canRun(),u=()=>Or(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(xr.isServer()?0:3),o=e.retryDelay??Dr,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),pr(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var jr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qn(this.gcTime)&&(this.#e=qn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xr.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(qn.clearTimeout(this.#e),this.#e=void 0)}},Mr=class extends jr{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Fr(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Fr(this.options);e.data!==void 0&&(this.setState(Pr(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=mr(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>tr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_r||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>er(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!$n(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=vr(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Ar({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof kr&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof kr){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Nr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Pr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Tr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Nr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Or(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Pr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Fr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ir=class extends Wn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Sr(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Rr(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof tr(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!lr(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Br(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||tr(this.options.enabled,this.#t)!==tr(t.enabled,this.#t)||er(this.options.staleTime,this.#t)!==er(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||tr(this.options.enabled,this.#t)!==tr(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Hr(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Xn)),t}#g(){this.#b();let e=er(this.options.staleTime,this.#t);if(xr.isServer()||this.#r.isStale||!Qn(e))return;let t=$n(this.#r.dataUpdatedAt,e)+1;this.#d=qn.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(xr.isServer()||tr(this.options.enabled,this.#t)===!1||!Qn(this.#p)||this.#p===0)&&(this.#f=qn.setInterval(()=>{(this.options.refetchIntervalInBackground||Gn.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(qn.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(qn.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Rr(e,t),o=i&&Br(e,n,t,r);(a||o)&&(l={...l,...Nr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=mr(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=mr(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Vr(e,t),refetch:this.refetch,promise:this.#o,isEnabled:tr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=Sr())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!lr(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Tr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Lr(e,t){return tr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Rr(e,t){return Lr(e,t)||e.state.data!==void 0&&zr(e,t,t.refetchOnMount)}function zr(e,t,n){if(tr(t.enabled,e)!==!1&&er(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Vr(e,t)}return!1}function Br(e,t,n,r){return(e!==t||tr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Vr(e,n)}function Vr(e,t){return tr(t.enabled,e)!==!1&&e.isStaleByTime(er(t.staleTime,e))}function Hr(e,t){return!lr(e.getCurrentResult(),t)}function Ur(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{br(e,()=>t.signal,()=>n=!0)},u=vr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?gr:hr;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Gr:Wr,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Wr(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Wr(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Gr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Kr=class extends jr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||qr(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Ar({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Tr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function qr(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Jr=class extends Wn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Kr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Yr(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Yr(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Yr(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Yr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Tr.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>rr(t,e))}findAll(e={}){return this.getAll().filter(t=>rr(e,t))}notify(e){Tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Tr.batch(()=>Promise.all(e.map(e=>e.continue().catch(Xn))))}};function Yr(e){return e.options.scope?.id}var Xr=class extends Wn{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),lr(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&ar(t.mutationKey)!==ar(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??qr();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Tr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Zr=class extends Wn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??ir(r,t),a=this.get(i);return a||(a=new Mr({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Tr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>nr(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>nr(e,t)):t}notify(e){Tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Tr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Tr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Qr=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Zr,this.#t=e.mutationCache||new Jr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Gn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Er.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(er(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Zn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Tr.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Tr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Tr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Tr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Xn).catch(Xn)}invalidateQueries(e,t={}){return Tr.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Tr.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Xn)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Xn)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(er(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=Ur(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=Ur(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Er.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(ar(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{or(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(ar(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{or(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ir(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===_r&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},$r=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=o(((e,t)=>{t.exports=$r()}))(),ei=S.createContext(void 0),ti=e=>{let t=S.useContext(ei);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ni=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,z.jsx)(ei.Provider,{value:e,children:t})),ri=S.createContext(!1),ii=()=>S.useContext(ri);ri.Provider;function ai(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var oi=S.createContext(ai()),si=()=>S.useContext(oi),ci=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?yr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},li=e=>{S.useEffect(()=>{e.clearReset()},[e])},ui=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||yr(n,[e.error,r])),di=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},fi=(e,t)=>e.isLoading&&e.isFetching&&!t,pi=(e,t)=>e?.suspense&&t.isPending,mi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function hi(e,t,n){let r=ii(),i=si(),a=ti(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,di(o),ci(o,i,s),li(i);let c=!a.getQueryCache().get(o.queryHash),[l]=S.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(e=>{let t=d?l.subscribe(Tr.batchCalls(e)):Xn;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),S.useEffect(()=>{l.setOptions(o)},[o,l]),pi(o,u))throw mi(o,l,i);if(ui({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!xr.isServer()&&fi(u,r)&&(c?mi(o,l,i):s?.promise)?.catch(Xn).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function gi(e,t){return hi(e,Ir,t)}function _i(e,t){let n=ti(t),[r]=S.useState(()=>new Xr(n,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);let i=S.useSyncExternalStore(S.useCallback(e=>r.subscribe(Tr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=S.useCallback((e,t)=>{r.mutate(e,t).catch(Xn)},[r]);if(i.error&&yr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var vi=_(),yi=new Qr({defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function bi(){return typeof window>`u`?``:window.location.pathname.match(/^\/t\/[^/]+/)?.[0]??``}function xi(e){if(/^https?:\/\//.test(e))return e;let t=e.startsWith(`/`)?e:`/${e}`;return`${bi()}${t}`}var Si=(e,t,n,r,i,a,o,s)=>{let c=document.documentElement,l=[`light`,`dark`];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n=e===`class`,r=n&&a?i.map(e=>a[e]||e):i;n?(c.classList.remove(...r),c.classList.add(a&&a[t]?a[t]:t)):c.setAttribute(e,t)}),d(t)}function d(e){s&&l.includes(e)&&(c.style.colorScheme=e)}function f(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(o&&e===`system`?f():e)}catch{}},Ci=[`light`,`dark`],wi=`(prefers-color-scheme: dark)`,Ti=typeof window>`u`,Ei=S.createContext(void 0),Di={setTheme:e=>{},themes:[]},Oi=()=>S.useContext(Ei)??Di,ki=e=>S.useContext(Ei)?S.createElement(S.Fragment,null,e.children):S.createElement(ji,{...e}),Ai=[`light`,`dark`],ji=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i=`theme`,themes:a=Ai,defaultTheme:o=n?`system`:`light`,attribute:s=`data-theme`,value:c,children:l,nonce:u,scriptProps:d})=>{let[f,p]=S.useState(()=>Ni(i,o)),[m,h]=S.useState(()=>f===`system`?Fi():f),g=c?Object.values(c):a,_=S.useCallback(e=>{let i=e;if(!i)return;e===`system`&&n&&(i=Fi());let a=c?c[i]:i,l=t?Pi(u):null,d=document.documentElement,f=e=>{e===`class`?(d.classList.remove(...g),a&&d.classList.add(a)):e.startsWith(`data-`)&&(a?d.setAttribute(e,a):d.removeAttribute(e))};if(Array.isArray(s)?s.forEach(f):f(s),r){let e=Ci.includes(o)?o:null,t=Ci.includes(i)?i:e;d.style.colorScheme=t}l?.()},[u]),v=S.useCallback(e=>{let t=typeof e==`function`?e(f):e;p(t);try{localStorage.setItem(i,t)}catch{}},[f]),y=S.useCallback(t=>{h(Fi(t)),f===`system`&&n&&!e&&_(`system`)},[f,e]);S.useEffect(()=>{let e=window.matchMedia(wi);return e.addListener(y),y(e),()=>e.removeListener(y)},[y]),S.useEffect(()=>{let e=e=>{e.key===i&&(e.newValue?p(e.newValue):v(o))};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[v]),S.useEffect(()=>{_(e??f)},[e,f]);let b=S.useMemo(()=>({theme:f,setTheme:v,forcedTheme:e,resolvedTheme:f===`system`?m:f,themes:n?[...a,`system`]:a,systemTheme:n?m:void 0}),[f,v,e,m,n,a]);return S.createElement(Ei.Provider,{value:b},S.createElement(Mi,{forcedTheme:e,storageKey:i,attribute:s,enableSystem:n,enableColorScheme:r,defaultTheme:o,value:c,themes:a,nonce:u,scriptProps:d}),l)},Mi=S.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:c,scriptProps:l})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return S.createElement(`script`,{...l,suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(${Si.toString()})(${u})`}})}),Ni=(e,t)=>{if(Ti)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},Pi=e=>{let t=document.createElement(`style`);return e&&t.setAttribute(`nonce`,e),t.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Fi=e=>(e||=window.matchMedia(wi),e.matches?`dark`:`light`);function Ii({children:e}){return(0,z.jsx)(ki,{attribute:`class`,defaultTheme:`light`,enableSystem:!1,disableTransitionOnChange:!0,children:e})}var Li=l(h(),1);function Ri(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var zi=e=>{switch(e){case`success`:return Hi;case`info`:return Wi;case`warning`:return Ui;case`error`:return Gi;default:return null}},Bi=Array(12).fill(0),Vi=({visible:e,className:t})=>S.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},S.createElement(`div`,{className:`sonner-spinner`},Bi.map((e,t)=>S.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Hi=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},S.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Ui=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},S.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Wi=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},S.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Gi=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},S.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Ki=S.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},S.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),S.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),qi=()=>{let[e,t]=S.useState(document.hidden);return S.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},Ji=1,Yi=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:Ji++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],S.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Zi(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!S.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!S.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!S.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!S.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||Ji++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Xi=(e,t)=>{let n=t?.id||Ji++;return Yi.addToast({title:e,...t,id:n}),n},Zi=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`;Object.assign(Xi,{success:Yi.success,info:Yi.info,warning:Yi.warning,error:Yi.error,custom:Yi.custom,message:Yi.message,promise:Yi.promise,dismiss:Yi.dismiss,loading:Yi.loading},{getHistory:()=>Yi.toasts,getToasts:()=>Yi.getActiveToasts()}),Ri(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Qi(e){return e.label!==void 0}var $i=3,ea=`24px`,ta=`16px`,na=4e3,ra=356,ia=14,aa=45,oa=200;function sa(...e){return e.filter(Boolean).join(` `)}function ca(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var la=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=S.useState(null),[k,A]=S.useState(null),[j,M]=S.useState(!1),[N,ee]=S.useState(!1),[te,P]=S.useState(!1),[F,ne]=S.useState(!1),[re,ie]=S.useState(!1),[I,L]=S.useState(0),[R,ae]=S.useState(0),oe=S.useRef(n.duration||y||na),se=S.useRef(null),ce=S.useRef(null),le=c===0,ue=c+1<=o,de=n.type,fe=n.dismissible!==!1,pe=n.className||``,me=n.descriptionClassName||``,he=S.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ge=S.useMemo(()=>n.closeButton??p,[n.closeButton,p]),_e=S.useMemo(()=>n.duration||y||na,[n.duration,y]),ve=S.useRef(0),ye=S.useRef(0),be=S.useRef(0),xe=S.useRef(null),[Se,Ce]=b.split(`-`),we=S.useMemo(()=>s.reduce((e,t,n)=>n>=he?e:e+t.height,0),[s,he]),Te=qi(),Ee=n.invert||t,De=de===`loading`;ye.current=S.useMemo(()=>he*x+we,[he,we]),S.useEffect(()=>{oe.current=_e},[_e]),S.useEffect(()=>{M(!0)},[]),S.useEffect(()=>{let e=ce.current;if(e){let t=e.getBoundingClientRect().height;return ae(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),S.useLayoutEffect(()=>{if(!j)return;let e=ce.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ae(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Oe=S.useCallback(()=>{ee(!0),L(ye.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},oa)},[n,d,a,ye]);S.useEffect(()=>{if(n.promise&&de===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Te?(()=>{if(be.current<ve.current){let e=new Date().getTime()-ve.current;oe.current-=e}be.current=new Date().getTime()})():oe.current!==1/0&&(ve.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Oe()},oe.current)),()=>clearTimeout(e)},[u,i,n,de,Te,Oe]),S.useEffect(()=>{n.delete&&(Oe(),n.onDismiss==null||n.onDismiss.call(n,n))},[Oe,n.delete]);function ke(){return T?.loading?S.createElement(`div`,{className:sa(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":de===`loading`},T.loading):S.createElement(Vi,{className:sa(w?.loader,n?.classNames?.loader),visible:de===`loading`})}let Ae=n.icon||T?.[de]||zi(de);return S.createElement(`li`,{tabIndex:0,ref:ce,className:sa(_,pe,w?.toast,n?.classNames?.toast,w?.default,w?.[de],n?.classNames?.[de]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":re,"data-removed":N,"data-visible":ue,"data-y-position":Se,"data-x-position":Ce,"data-index":c,"data-front":le,"data-swiping":te,"data-dismissible":fe,"data-type":de,"data-invert":Ee,"data-swipe-out":F,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${N?I:ye.current}px`,"--initial-height":C?`auto`:`${R}px`,...m,...n.style},onDragEnd:()=>{P(!1),O(null),xe.current=null},onPointerDown:e=>{e.button!==2&&(De||!fe||(se.current=new Date,L(ye.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(P(!0),xe.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(F||!fe)return;xe.current=null;let e=Number(ce.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(ce.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-se.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=aa||a>.11){L(ye.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Oe(),ne(!0);return}else{var o,s;(o=ce.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=ce.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}ie(!1),P(!1),O(null)},onPointerMove:t=>{var n,r;if(!xe.current||!fe||window.getSelection()?.toString().length>0)return;let i=t.clientY-xe.current.y,a=t.clientX-xe.current.x,o=e.swipeDirections??ca(b);!D&&(Math.abs(a)>1||Math.abs(i)>1)&&O(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(D===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&ie(!0),(n=ce.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=ce.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},ge&&!n.jsx&&de!==`loading`?S.createElement(`button`,{"aria-label":E,"data-disabled":De,"data-close-button":!0,onClick:De||!fe?()=>{}:()=>{Oe(),n.onDismiss==null||n.onDismiss.call(n,n)},className:sa(w?.closeButton,n?.classNames?.closeButton)},T?.close??Ki):null,(de||n.icon||n.promise)&&n.icon!==null&&(T?.[de]!==null||n.icon)?S.createElement(`div`,{"data-icon":``,className:sa(w?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||ke():null,n.type===`loading`?null:Ae):null,S.createElement(`div`,{"data-content":``,className:sa(w?.content,n?.classNames?.content)},S.createElement(`div`,{"data-title":``,className:sa(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?S.createElement(`div`,{"data-description":``,className:sa(v,me,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),S.isValidElement(n.cancel)?n.cancel:n.cancel&&Qi(n.cancel)?S.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{Qi(n.cancel)&&fe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Oe())},className:sa(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,S.isValidElement(n.action)?n.action:n.action&&Qi(n.action)?S.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{Qi(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Oe())},className:sa(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function ua(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function da(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ta:ea;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var fa=S.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=$i,toastOptions:g,dir:_=ua(),gap:v=ia,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,C]=S.useState([]),w=S.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),T=S.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=S.useState([]),[O,k]=S.useState(!1),[A,j]=S.useState(!1),[M,N]=S.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ee=S.useRef(null),te=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),P=S.useRef(null),F=S.useRef(!1),ne=S.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||Yi.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return S.useEffect(()=>Yi.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{Li.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),S.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),S.useEffect(()=>{x.length<=1&&k(!1)},[x]),S.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=ee.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ee.current||ee.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),S.useEffect(()=>{if(ee.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,F.current=!1)}},[ee.current]),S.createElement(`section`,{ref:t,"aria-label":`${b} ${te}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?S.createElement(`ol`,{key:t,dir:_===`auto`?ua():_,tabIndex:-1,ref:ee,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${ra}px`,"--gap":`${v}px`,...m,...da(l,u)},onBlur:e=>{F.current&&!e.currentTarget.contains(e.relatedTarget)&&(F.current=!1,P.current&&=(P.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||F.current||(F.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>S.createElement(la,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ne,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),pa=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ma=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ha=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ga=e=>{let t=ha(e);return t.charAt(0).toUpperCase()+t.slice(1)},_a={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},va=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ya=(0,S.createContext)({}),ba=()=>(0,S.useContext)(ya),xa=(0,S.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ba()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,S.createElement)(`svg`,{ref:c,..._a,width:t??l??_a.width,height:t??l??_a.height,stroke:e??f,strokeWidth:m,className:pa(`lucide`,p,i),...!a&&!va(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,S.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),B=(e,t)=>{let n=(0,S.forwardRef)(({className:n,...r},i)=>(0,S.createElement)(xa,{ref:i,iconNode:t,className:pa(`lucide-${ma(ga(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ga(e),n},Sa=B(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Ca=B(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),wa=B(`bot`,[[`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`}]]),Ta=B(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Ea=B(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Da=B(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Oa=B(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ka=B(`circle-alert`,[[`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`}]]),Aa=B(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ja=B(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),Ma=B(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Na=B(`corner-down-right`,[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]),Pa=B(`eye`,[[`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`}]]),Fa=B(`file-text`,[[`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`}]]),Ia=B(`folder-open`,[[`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`}]]),La=B(`git-branch`,[[`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`}]]),Ra=B(`globe`,[[`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`}]]),za=B(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Ba=B(`inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),Va=B(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ha=B(`kanban`,[[`path`,{d:`M5 3v14`,key:`9nsxs2`}],[`path`,{d:`M12 3v8`,key:`1h2ygw`}],[`path`,{d:`M19 3v18`,key:`1sk56x`}]]),Ua=B(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Wa=B(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Ga=B(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),Ka=B(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),qa=B(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),Ja=B(`lock`,[[`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`}]]),Ya=B(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Xa=B(`message-circle-reply`,[[`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:`m10 15-3-3 3-3`,key:`1pgupc`}],[`path`,{d:`M7 12h8a2 2 0 0 1 2 2v1`,key:`89sh1g`}]]),Za=B(`message-square-quote`,[[`path`,{d:`M14 14a2 2 0 0 0 2-2V8h-2`,key:`1r06pg`}],[`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`}],[`path`,{d:`M8 14a2 2 0 0 0 2-2V8H8`,key:`1jzu5j`}]]),Qa=B(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),$a=B(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),eo=B(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 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-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),to=B(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),no=B(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),ro=B(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`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`}]]),io=B(`play`,[[`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`}]]),ao=B(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),oo=B(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),so=B(`refresh-cw`,[[`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`}]]),co=B(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),lo=B(`save`,[[`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`}]]),uo=B(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),fo=B(`send`,[[`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`}]]),V=B(`server`,[[`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`}]]),po=B(`settings`,[[`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`}]]),mo=B(`shield`,[[`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`}]]),ho=B(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),go=B(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),_o=B(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),vo=B(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),yo=B(`trash-2`,[[`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`}]]),bo=B(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),xo=B(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),So=B(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),Co=B(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),wo=B(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),To=B(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Eo=B(`wrench`,[[`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`}]]),Do=B(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Oo=({...e})=>{let{theme:t=`system`}=Oi();return(0,z.jsx)(fa,{theme:t,className:`toaster group`,icons:{success:(0,z.jsx)(Aa,{className:`size-4`}),info:(0,z.jsx)(Va,{className:`size-4`}),warning:(0,z.jsx)(xo,{className:`size-4`}),error:(0,z.jsx)(eo,{className:`size-4`}),loading:(0,z.jsx)(Ka,{className:`size-4 animate-spin`})},style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},toastOptions:{classNames:{toast:`cn-toast`}},...e})};function ko(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ao(...e){return t=>{let n=!1,r=e.map(e=>{let r=ko(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():ko(e[t],null)}}}}function jo(...e){return S.useCallback(Ao(...e),e)}function Mo(e){let t=Po(e),n=S.forwardRef((e,n)=>{let{children:r,...i}=e,a=S.Children.toArray(r),o=a.find(Lo);if(o){let e=o.props.children,r=a.map(t=>t===o?S.Children.count(e)>1?S.Children.only(null):S.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:S.isValidElement(e)?S.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var No=Mo(`Slot`);function Po(e){let t=S.forwardRef((e,t)=>{let{children:n,...r}=e;if(S.isValidElement(n)){let e=zo(n),i=Ro(r,n.props);return n.type!==S.Fragment&&(i.ref=t?Ao(t,e):e),S.cloneElement(n,i)}return S.Children.count(n)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fo=Symbol(`radix.slottable`);function Io(e){let t=({children:e})=>(0,z.jsx)(z.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Fo,t}function Lo(e){return S.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Fo}function Ro(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function zo(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bo=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Mo(`Primitive.${t}`),r=S.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,z.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vo(e,t){e&&Li.flushSync(()=>e.dispatchEvent(t))}var Ho=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Uo=`VisuallyHidden`,Wo=S.forwardRef((e,t)=>(0,z.jsx)(Bo.span,{...e,ref:t,style:{...Ho,...e.style}}));Wo.displayName=Uo;var Go=Wo;function Ko(e,t){let n=S.createContext(t),r=e=>{let{children:t,...r}=e,i=S.useMemo(()=>r,Object.values(r));return(0,z.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=S.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function qo(e,t=[]){let n=[];function r(t,r){let i=S.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=S.useMemo(()=>o,Object.values(o));return(0,z.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=S.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>S.createContext(e));return function(n){let r=n?.[e]||t;return S.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Jo(i,...t)]}function Jo(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function Yo(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Xo=globalThis?.document?S.useLayoutEffect:()=>{},Zo=S.useInsertionEffect||Xo;function Qo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=$o({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=S.useRef(e!==void 0);S.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,S.useCallback(t=>{if(s){let n=es(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function $o({defaultProp:e,onChange:t}){let[n,r]=S.useState(e),i=S.useRef(n),a=S.useRef(t);return Zo(()=>{a.current=t},[t]),S.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function es(e){return typeof e==`function`}function ts(e,t){return S.useReducer((e,n)=>t[e][n]??e,e)}var ns=e=>{let{present:t,children:n}=e,r=rs(t),i=typeof n==`function`?n({present:r.isPresent}):S.Children.only(n),a=jo(r.ref,as(i));return typeof n==`function`||r.isPresent?S.cloneElement(i,{ref:a}):null};ns.displayName=`Presence`;function rs(e){let[t,n]=S.useState(),r=S.useRef(null),i=S.useRef(e),a=S.useRef(`none`),[o,s]=ts(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return S.useEffect(()=>{let e=is(r.current);a.current=o===`mounted`?e:`none`},[o]),Xo(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=is(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Xo(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=is(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=is(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:S.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function is(e){return e?.animationName||`none`}function as(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var os=S.useId||(()=>void 0),ss=0;function cs(e){let[t,n]=S.useState(os());return Xo(()=>{e||n(e=>e??String(ss++))},[e]),e||(t?`radix-${t}`:``)}var ls=`Collapsible`,[us,ds]=qo(ls),[fs,ps]=us(ls),ms=S.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Qo({prop:r,defaultProp:i??!1,onChange:o,caller:ls});return(0,z.jsx)(fs,{scope:n,disabled:a,contentId:cs(),open:c,onOpenToggle:S.useCallback(()=>l(e=>!e),[l]),children:(0,z.jsx)(Bo.div,{"data-state":bs(c),"data-disabled":a?``:void 0,...s,ref:t})})});ms.displayName=ls;var hs=`CollapsibleTrigger`,gs=S.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=ps(hs,n);return(0,z.jsx)(Bo.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":bs(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:Yo(e.onClick,i.onOpenToggle)})});gs.displayName=hs;var _s=`CollapsibleContent`,vs=S.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=ps(_s,e.__scopeCollapsible);return(0,z.jsx)(ns,{present:n||i.open,children:({present:e})=>(0,z.jsx)(ys,{...r,ref:t,present:e})})});vs.displayName=_s;var ys=S.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=ps(_s,n),[s,c]=S.useState(r),l=S.useRef(null),u=jo(t,l),d=S.useRef(0),f=d.current,p=S.useRef(0),m=p.current,h=o.open||s,g=S.useRef(h),_=S.useRef(void 0);return S.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Xo(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,z.jsx)(Bo.div,{"data-state":bs(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function bs(e){return e?`open`:`closed`}var xs=ms,Ss=S.createContext(void 0);function Cs(e){let t=S.useContext(Ss);return e||t||`ltr`}function ws(e){let t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ts(e,t=globalThis?.document){let n=ws(e);S.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Es=`DismissableLayer`,Ds=`dismissableLayer.update`,Os=`dismissableLayer.pointerDownOutside`,ks=`dismissableLayer.focusOutside`,As,js=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ms=S.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=S.useContext(js),[u,d]=S.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=S.useState({}),m=jo(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=Fs(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=Is(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ts(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),S.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(As=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ls(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=As)}},[u,f,n,l]),S.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ls())},[u,l]),S.useEffect(()=>{let e=()=>p({});return document.addEventListener(Ds,e),()=>document.removeEventListener(Ds,e)},[]),(0,z.jsx)(Bo.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:Yo(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Yo(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Yo(e.onPointerDownCapture,x.onPointerDownCapture)})});Ms.displayName=Es;var Ns=`DismissableLayerBranch`,Ps=S.forwardRef((e,t)=>{let n=S.useContext(js),r=S.useRef(null),i=jo(t,r);return S.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,z.jsx)(Bo.div,{...e,ref:i})});Ps.displayName=Ns;function Fs(e,t=globalThis?.document){let n=ws(e),r=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Rs(Os,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Is(e,t=globalThis?.document){let n=ws(e),r=S.useRef(!1);return S.useEffect(()=>{let e=e=>{e.target&&!r.current&&Rs(ks,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ls(){let e=new CustomEvent(Ds);document.dispatchEvent(e)}function Rs(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Vo(i,a):i.dispatchEvent(a)}var zs=`focusScope.autoFocusOnMount`,Bs=`focusScope.autoFocusOnUnmount`,Vs={bubbles:!1,cancelable:!0},Hs=`FocusScope`,Us=S.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=S.useState(null),l=ws(i),u=ws(a),d=S.useRef(null),f=jo(t,e=>c(e)),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Xs(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Xs(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Xs(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),S.useEffect(()=>{if(s){Zs.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(zs,Vs);s.addEventListener(zs,l),s.dispatchEvent(t),t.defaultPrevented||(Ws(ec(Ks(s)),{select:!0}),document.activeElement===e&&Xs(s))}return()=>{s.removeEventListener(zs,l),setTimeout(()=>{let t=new CustomEvent(Bs,Vs);s.addEventListener(Bs,u),s.dispatchEvent(t),t.defaultPrevented||Xs(e??document.body,{select:!0}),s.removeEventListener(Bs,u),Zs.remove(p)},0)}}},[s,l,u,p]);let m=S.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Gs(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Xs(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Xs(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,z.jsx)(Bo.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Us.displayName=Hs;function Ws(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Xs(r,{select:t}),document.activeElement!==n)return}function Gs(e){let t=Ks(e);return[qs(t,e),qs(t.reverse(),e)]}function Ks(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qs(e,t){for(let n of e)if(!Js(n,{upTo:t}))return n}function Js(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Ys(e){return e instanceof HTMLInputElement&&`select`in e}function Xs(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ys(e)&&t&&e.select()}}var Zs=Qs();function Qs(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=$s(e,t),e.unshift(t)},remove(t){e=$s(e,t),e[0]?.resume()}}}function $s(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ec(e){return e.filter(e=>e.tagName!==`A`)}var tc=`Portal`,nc=S.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=S.useState(!1);Xo(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Li.createPortal((0,z.jsx)(Bo.div,{...r,ref:t}),o):null});nc.displayName=tc;var rc=0;function ic(){S.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??ac()),document.body.insertAdjacentElement(`beforeend`,e[1]??ac()),rc++,()=>{rc===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),rc--}},[])}function ac(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var oc=function(){return oc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oc.apply(this,arguments)};function sc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function cc(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var lc=`right-scroll-bar-position`,uc=`width-before-scroll-bar`,dc=`with-scroll-bars-hidden`,fc=`--removed-body-scroll-bar-size`;function pc(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function mc(e,t){var n=(0,S.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var hc=typeof window<`u`?S.useLayoutEffect:S.useEffect,gc=new WeakMap;function _c(e,t){var n=mc(t||null,function(t){return e.forEach(function(e){return pc(e,t)})});return hc(function(){var t=gc.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||pc(e,null)}),i.forEach(function(e){r.has(e)||pc(e,a)})}gc.set(n,e)},[e]),n}function vc(e){return e}function yc(e,t){t===void 0&&(t=vc);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function bc(e){e===void 0&&(e={});var t=yc(null);return t.options=oc({async:!0,ssr:!1},e),t}var xc=function(e){var t=e.sideCar,n=sc(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return S.createElement(r,oc({},n))};xc.isSideCarExport=!0;function Sc(e,t){return e.useMedium(t),xc}var Cc=bc(),wc=function(){},Tc=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:wc,onWheelCapture:wc,onTouchMoveCapture:wc}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=sc(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,C=_c([n,t]),w=oc(oc({},b),i);return S.createElement(S.Fragment,null,u&&S.createElement(x,{sideCar:Cc,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?S.cloneElement(S.Children.only(s),oc(oc({},w),{ref:C})):S.createElement(v,oc({},w,{className:c,ref:C}),s))});Tc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tc.classNames={fullWidth:uc,zeroRight:lc};var Ec,Dc=function(){if(Ec)return Ec;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Oc(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Dc();return t&&e.setAttribute(`nonce`,t),e}function kc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ac(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var jc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Oc())&&(kc(t,n),Ac(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mc=function(){var e=jc();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Nc=function(){var e=Mc();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Pc={left:0,top:0,right:0,gap:0},Fc=function(e){return parseInt(e||``,10)||0},Ic=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Fc(n),Fc(r),Fc(i)]},Lc=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Pc;var t=Ic(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Rc=Nc(),zc=`data-scroll-locked`,Bc=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
12
|
+
.${dc} {
|
|
13
|
+
overflow: hidden ${r};
|
|
14
|
+
padding-right: ${s}px ${r};
|
|
15
|
+
}
|
|
16
|
+
body[${zc}] {
|
|
17
|
+
overflow: hidden ${r};
|
|
18
|
+
overscroll-behavior: contain;
|
|
19
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
20
|
+
padding-left: ${i}px;
|
|
21
|
+
padding-top: ${a}px;
|
|
22
|
+
padding-right: ${o}px;
|
|
23
|
+
margin-left:0;
|
|
24
|
+
margin-top:0;
|
|
25
|
+
margin-right: ${s}px ${r};
|
|
26
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.${lc} {
|
|
30
|
+
right: ${s}px ${r};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.${uc} {
|
|
34
|
+
margin-right: ${s}px ${r};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.${lc} .${lc} {
|
|
38
|
+
right: 0 ${r};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.${uc} .${uc} {
|
|
42
|
+
margin-right: 0 ${r};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body[${zc}] {
|
|
46
|
+
${fc}: ${s}px;
|
|
47
|
+
}
|
|
48
|
+
`},Vc=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Hc=function(){S.useEffect(function(){return document.body.setAttribute(zc,(Vc()+1).toString()),function(){var e=Vc()-1;e<=0?document.body.removeAttribute(zc):document.body.setAttribute(zc,e.toString())}},[])},Uc=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Hc();var a=S.useMemo(function(){return Lc(i)},[i]);return S.createElement(Rc,{styles:Bc(a,!t,i,n?``:`!important`)})},Wc=!1;if(typeof window<`u`)try{var Gc=Object.defineProperty({},`passive`,{get:function(){return Wc=!0,!0}});window.addEventListener(`test`,Gc,Gc),window.removeEventListener(`test`,Gc,Gc)}catch{Wc=!1}var Kc=Wc?{passive:!1}:!1,qc=function(e){return e.tagName===`TEXTAREA`},Jc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!qc(e)&&n[t]===`visible`)},Yc=function(e){return Jc(e,`overflowY`)},Xc=function(e){return Jc(e,`overflowX`)},Zc=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),el(e,r)){var i=tl(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qc=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},$c=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},el=function(e,t){return e===`v`?Yc(t):Xc(t)},tl=function(e,t){return e===`v`?Qc(t):$c(t)},nl=function(e,t){return e===`h`&&t===`rtl`?-1:1},rl=function(e,t,n,r,i){var a=nl(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=tl(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&el(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},il=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},al=function(e){return[e.deltaX,e.deltaY]},ol=function(e){return e&&`current`in e?e.current:e},sl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cl=function(e){return`
|
|
49
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
50
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
51
|
+
`},ll=0,ul=[];function dl(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),i=S.useState(ll++)[0],a=S.useState(Nc)[0],o=S.useRef(e);S.useEffect(function(){o.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=cc([e.lockRef.current],(e.shards||[]).map(ol),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=S.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=il(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Zc(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Zc(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return rl(h,t,e,h===`h`?s:c,!0)},[]),c=S.useCallback(function(e){var n=e;if(!(!ul.length||ul[ul.length-1]!==a)){var r=`deltaY`in n?al(n):il(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&sl(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ol).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=S.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:fl(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=S.useCallback(function(e){n.current=il(e),r.current=void 0},[]),d=S.useCallback(function(t){l(t.type,al(t),t.target,s(t,e.lockRef.current))},[]),f=S.useCallback(function(t){l(t.type,il(t),t.target,s(t,e.lockRef.current))},[]);S.useEffect(function(){return ul.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Kc),document.addEventListener(`touchmove`,c,Kc),document.addEventListener(`touchstart`,u,Kc),function(){ul=ul.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Kc),document.removeEventListener(`touchmove`,c,Kc),document.removeEventListener(`touchstart`,u,Kc)}},[]);var p=e.removeScrollBar,m=e.inert;return S.createElement(S.Fragment,null,m?S.createElement(a,{styles:cl(i)}):null,p?S.createElement(Uc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function fl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var pl=Sc(Cc,dl),ml=S.forwardRef(function(e,t){return S.createElement(Tc,oc({},e,{ref:t,sideCar:pl}))});ml.classNames=Tc.classNames;var hl=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},gl=new WeakMap,_l=new WeakMap,vl={},yl=0,bl=function(e){return e&&(e.host||bl(e.parentNode))},xl=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=bl(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Sl=function(e,t,n,r){var i=xl(t,Array.isArray(e)?e:[e]);vl[n]||(vl[n]=new WeakMap);var a=vl[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(gl.get(e)||0)+1,l=(a.get(e)||0)+1;gl.set(e,c),a.set(e,l),o.push(e),c===1&&i&&_l.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),yl++,function(){o.forEach(function(e){var t=gl.get(e)-1,i=a.get(e)-1;gl.set(e,t),a.set(e,i),t||(_l.has(e)||e.removeAttribute(r),_l.delete(e)),i||e.removeAttribute(n)}),yl--,yl||(gl=new WeakMap,gl=new WeakMap,_l=new WeakMap,vl={})}},Cl=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||hl(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Sl(r,i,n,`aria-hidden`)):function(){return null}},wl=`Dialog`,[Tl,El]=qo(wl),[Dl,Ol]=Tl(wl),kl=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=S.useRef(null),c=S.useRef(null),[l,u]=Qo({prop:r,defaultProp:i??!1,onChange:a,caller:wl});return(0,z.jsx)(Dl,{scope:t,triggerRef:s,contentRef:c,contentId:cs(),titleId:cs(),descriptionId:cs(),open:l,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};kl.displayName=wl;var Al=`DialogTrigger`,jl=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ol(Al,n),a=jo(t,i.triggerRef);return(0,z.jsx)(Bo.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Yl(i.open),...r,ref:a,onClick:Yo(e.onClick,i.onOpenToggle)})});jl.displayName=Al;var Ml=`DialogPortal`,[Nl,Pl]=Tl(Ml,{forceMount:void 0}),Fl=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Ol(Ml,t);return(0,z.jsx)(Nl,{scope:t,forceMount:n,children:S.Children.map(r,e=>(0,z.jsx)(ns,{present:n||a.open,children:(0,z.jsx)(nc,{asChild:!0,container:i,children:e})}))})};Fl.displayName=Ml;var Il=`DialogOverlay`,Ll=S.forwardRef((e,t)=>{let n=Pl(Il,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ol(Il,e.__scopeDialog);return a.modal?(0,z.jsx)(ns,{present:r||a.open,children:(0,z.jsx)(zl,{...i,ref:t})}):null});Ll.displayName=Il;var Rl=Mo(`DialogOverlay.RemoveScroll`),zl=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ol(Il,n);return(0,z.jsx)(ml,{as:Rl,allowPinchZoom:!0,shards:[i.contentRef],children:(0,z.jsx)(Bo.div,{"data-state":Yl(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Bl=`DialogContent`,Vl=S.forwardRef((e,t)=>{let n=Pl(Bl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ol(Bl,e.__scopeDialog);return(0,z.jsx)(ns,{present:r||a.open,children:a.modal?(0,z.jsx)(Hl,{...i,ref:t}):(0,z.jsx)(Ul,{...i,ref:t})})});Vl.displayName=Bl;var Hl=S.forwardRef((e,t)=>{let n=Ol(Bl,e.__scopeDialog),r=S.useRef(null),i=jo(t,n.contentRef,r);return S.useEffect(()=>{let e=r.current;if(e)return Cl(e)},[]),(0,z.jsx)(Wl,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Yo(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Yo(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Yo(e.onFocusOutside,e=>e.preventDefault())})}),Ul=S.forwardRef((e,t)=>{let n=Ol(Bl,e.__scopeDialog),r=S.useRef(!1),i=S.useRef(!1);return(0,z.jsx)(Wl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Wl=S.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Ol(Bl,n),c=S.useRef(null),l=jo(t,c);return ic(),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Us,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,z.jsx)(Ms,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Yl(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)($l,{titleId:s.titleId}),(0,z.jsx)(tu,{contentRef:c,descriptionId:s.descriptionId})]})]})}),H=`DialogTitle`,U=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ol(H,n);return(0,z.jsx)(Bo.h2,{id:i.titleId,...r,ref:t})});U.displayName=H;var Gl=`DialogDescription`,Kl=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ol(Gl,n);return(0,z.jsx)(Bo.p,{id:i.descriptionId,...r,ref:t})});Kl.displayName=Gl;var ql=`DialogClose`,Jl=S.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ol(ql,n);return(0,z.jsx)(Bo.button,{type:`button`,...r,ref:t,onClick:Yo(e.onClick,()=>i.onOpenChange(!1))})});Jl.displayName=ql;function Yl(e){return e?`open`:`closed`}var Xl=`DialogTitleWarning`,[Zl,Ql]=Ko(Xl,{contentName:Bl,titleName:H,docsSlug:`dialog`}),$l=({titleId:e})=>{let t=Ql(Xl),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
52
|
+
|
|
53
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
54
|
+
|
|
55
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},eu=`DialogDescriptionWarning`,tu=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ql(eu).contentName}}.`;return S.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},nu=kl,ru=Fl,iu=Ll,au=Vl,ou=U,su=Kl,cu=Jl;function lu(e){let t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function uu(e){let[t,n]=S.useState(void 0);return Xo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var du=[`top`,`right`,`bottom`,`left`],fu=Math.min,pu=Math.max,mu=Math.round,hu=Math.floor,gu=e=>({x:e,y:e}),_u={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function vu(e,t,n){return pu(e,fu(t,n))}function yu(e,t){return typeof e==`function`?e(t):e}function bu(e){return e.split(`-`)[0]}function xu(e){return e.split(`-`)[1]}function Su(e){return e===`x`?`y`:`x`}function Cu(e){return e===`y`?`height`:`width`}function wu(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Tu(e){return Su(wu(e))}function Eu(e,t,n){n===void 0&&(n=!1);let r=xu(e),i=Tu(e),a=Cu(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Fu(o)),[o,Fu(o)]}function Du(e){let t=Fu(e);return[Ou(e),t,Ou(t)]}function Ou(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ku=[`left`,`right`],Au=[`right`,`left`],ju=[`top`,`bottom`],Mu=[`bottom`,`top`];function Nu(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Au:ku:t?ku:Au;case`left`:case`right`:return t?ju:Mu;default:return[]}}function Pu(e,t,n,r){let i=xu(e),a=Nu(bu(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ou)))),a}function Fu(e){let t=bu(e);return _u[t]+e.slice(t.length)}function Iu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lu(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Iu(e)}function Ru(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function zu(e,t,n){let{reference:r,floating:i}=e,a=wu(t),o=Tu(t),s=Cu(o),c=bu(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(xu(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Bu(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=yu(t,e),p=Lu(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ru(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ru(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Vu=50,Hu=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Bu},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=zu(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Vu&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=zu(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Uu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=yu(e,t)||{};if(l==null)return{};let d=Lu(u),f={x:n,y:r},p=Tu(i),m=Cu(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=fu(d[_],T),D=fu(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=vu(O,A,k),M=!c.arrow&&xu(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Wu=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=yu(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=bu(r),_=wu(o),v=bu(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Fu(o)]:Du(o)),x=p!==`none`;!d&&x&&b.push(...Pu(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Eu(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==wu(t))||T.every(e=>wu(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=wu(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Gu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ku(e){return du.some(t=>e[t]>=0)}var qu=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=yu(e,t);switch(i){case`referenceHidden`:{let e=Gu(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ku(e)}}}case`escaped`:{let e=Gu(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ku(e)}}}default:return{}}}}},Ju=new Set([`left`,`top`]);async function Yu(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=bu(n),s=xu(n),c=wu(n)===`y`,l=Ju.has(o)?-1:1,u=a&&c?-1:1,d=yu(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Xu=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Yu(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Zu=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=yu(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=wu(bu(i)),p=Su(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=vu(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=vu(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Qu=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=yu(e,t),u={x:n,y:r},d=wu(i),f=Su(d),p=u[f],m=u[d],h=yu(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ju.has(bu(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},$u=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=yu(e,t),u=await o.detectOverflow(t,l),d=bu(i),f=xu(i),p=wu(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=fu(h-u[g],v),x=fu(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=pu(u.left,0),t=pu(u.right,0),n=pu(u.top,0),r=pu(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:pu(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:pu(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ed(){return typeof window<`u`}function td(e){return id(e)?(e.nodeName||``).toLowerCase():`#document`}function nd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rd(e){return((id(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function id(e){return ed()?e instanceof Node||e instanceof nd(e).Node:!1}function ad(e){return ed()?e instanceof Element||e instanceof nd(e).Element:!1}function od(e){return ed()?e instanceof HTMLElement||e instanceof nd(e).HTMLElement:!1}function sd(e){return!ed()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof nd(e).ShadowRoot}function cd(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=yd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ld(e){return/^(table|td|th)$/.test(td(e))}function ud(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var dd=/transform|translate|scale|rotate|perspective|filter/,fd=/paint|layout|strict|content/,pd=e=>!!e&&e!==`none`,md;function hd(e){let t=ad(e)?yd(e):e;return pd(t.transform)||pd(t.translate)||pd(t.scale)||pd(t.rotate)||pd(t.perspective)||!_d()&&(pd(t.backdropFilter)||pd(t.filter))||dd.test(t.willChange||``)||fd.test(t.contain||``)}function gd(e){let t=xd(e);for(;od(t)&&!vd(t);){if(hd(t))return t;if(ud(t))return null;t=xd(t)}return null}function _d(){return md??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),md}function vd(e){return/^(html|body|#document)$/.test(td(e))}function yd(e){return nd(e).getComputedStyle(e)}function bd(e){return ad(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xd(e){if(td(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||sd(e)&&e.host||rd(e);return sd(t)?t.host:t}function Sd(e){let t=xd(e);return vd(t)?e.ownerDocument?e.ownerDocument.body:e.body:od(t)&&cd(t)?t:Sd(t)}function Cd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Sd(e),i=r===e.ownerDocument?.body,a=nd(r);if(i){let e=wd(a);return t.concat(a,a.visualViewport||[],cd(r)?r:[],e&&n?Cd(e):[])}else return t.concat(r,Cd(r,[],n))}function wd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Td(e){let t=yd(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=od(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=mu(n)!==a||mu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ed(e){return ad(e)?e:e.contextElement}function Dd(e){let t=Ed(e);if(!od(t))return gu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Td(t),o=(a?mu(n.width):n.width)/r,s=(a?mu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var W=gu(0);function Od(e){let t=nd(e);return!_d()||!t.visualViewport?W:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nd(e)?!1:t}function Ad(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ed(e),o=gu(1);t&&(r?ad(r)&&(o=Dd(r)):o=Dd(e));let s=kd(a,n,r)?Od(a):gu(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=nd(a),t=r&&ad(r)?nd(r):r,n=e,i=wd(n);for(;i&&r&&t!==n;){let e=Dd(i),t=i.getBoundingClientRect(),r=yd(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=nd(i),i=wd(n)}}return Ru({width:u,height:d,x:c,y:l})}function jd(e,t){let n=bd(e).scrollLeft;return t?t.left+n:Ad(rd(e)).left+n}function Md(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-jd(e,n),y:n.top+t.scrollTop}}function Nd(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=rd(r),s=t?ud(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=gu(1),u=gu(0),d=od(r);if((d||!d&&!a)&&((td(r)!==`body`||cd(o))&&(c=bd(r)),d)){let e=Ad(r);l=Dd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Md(o,c):gu(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Pd(e){return Array.from(e.getClientRects())}function Fd(e){let t=rd(e),n=bd(e),r=e.ownerDocument.body,i=pu(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=pu(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+jd(e),s=-n.scrollTop;return yd(r).direction===`rtl`&&(o+=pu(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Id=25;function Ld(e,t){let n=nd(e),r=rd(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=_d();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=jd(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Id&&(a-=o)}else l<=Id&&(a+=l);return{width:a,height:o,x:s,y:c}}function Rd(e,t){let n=Ad(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=od(e)?Dd(e):gu(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function zd(e,t,n){let r;if(t===`viewport`)r=Ld(e,n);else if(t===`document`)r=Fd(rd(e));else if(ad(t))r=Rd(t,n);else{let n=Od(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ru(r)}function Bd(e,t){let n=xd(e);return n===t||!ad(n)||vd(n)?!1:yd(n).position===`fixed`||Bd(n,t)}function Vd(e,t){let n=t.get(e);if(n)return n;let r=Cd(e,[],!1).filter(e=>ad(e)&&td(e)!==`body`),i=null,a=yd(e).position===`fixed`,o=a?xd(e):e;for(;ad(o)&&!vd(o);){let t=yd(o),n=hd(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||cd(o)&&!n&&Bd(e,o))?r=r.filter(e=>e!==o):i=t,o=xd(o)}return t.set(e,r),r}function Hd(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ud(t)?[]:Vd(t,this._c):[].concat(n),r],o=zd(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=zd(t,a[e],i);s=pu(n.top,s),c=fu(n.right,c),l=fu(n.bottom,l),u=pu(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ud(e){let{width:t,height:n}=Td(e);return{width:t,height:n}}function Wd(e,t,n){let r=od(t),i=rd(t),a=n===`fixed`,o=Ad(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=gu(0);function l(){c.x=jd(i)}if(r||!r&&!a)if((td(t)!==`body`||cd(i))&&(s=bd(t)),r){let e=Ad(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Md(i,s):gu(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Gd(e){return yd(e).position===`static`}function Kd(e,t){if(!od(e)||yd(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return rd(e)===n&&(n=n.ownerDocument.body),n}function qd(e,t){let n=nd(e);if(ud(e))return n;if(!od(e)){let t=xd(e);for(;t&&!vd(t);){if(ad(t)&&!Gd(t))return t;t=xd(t)}return n}let r=Kd(e,t);for(;r&&ld(r)&&Gd(r);)r=Kd(r,t);return r&&vd(r)&&Gd(r)&&!hd(r)?n:r||gd(e)||n}var Jd=async function(e){let t=this.getOffsetParent||qd,n=this.getDimensions,r=await n(e.floating);return{reference:Wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Yd(e){return yd(e).direction===`rtl`}var Xd={convertOffsetParentRelativeRectToViewportRelativeRect:Nd,getDocumentElement:rd,getClippingRect:Hd,getOffsetParent:qd,getElementRects:Jd,getClientRects:Pd,getDimensions:Ud,getScale:Dd,isElement:ad,isRTL:Yd};function Zd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Qd(e,t){let n=null,r,i=rd(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=hu(d),h=hu(i.clientWidth-(u+f)),g=hu(i.clientHeight-(d+p)),_=hu(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:pu(0,fu(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Zd(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function $d(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ed(e),u=i||a?[...l?Cd(l):[],...t?Cd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Qd(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Ad(e):null;c&&g();function g(){let t=Ad(e);h&&!Zd(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ef=Xu,tf=Zu,nf=Wu,rf=$u,af=qu,of=Uu,sf=Qu,cf=(e,t,n)=>{let r=new Map,i={platform:Xd,...n},a={...i.platform,_c:r};return Hu(e,t,{...i,platform:a})},lf=typeof document<`u`?S.useLayoutEffect:function(){};function uf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!uf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!uf(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function df(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ff(e,t){let n=df(e);return Math.round(t*n)/n}function pf(e){let t=S.useRef(e);return lf(()=>{t.current=e}),t}function mf(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=S.useState(r);uf(f,r)||p(r);let[m,h]=S.useState(null),[g,_]=S.useState(null),v=S.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=S.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,C=S.useRef(null),w=S.useRef(null),T=S.useRef(u),E=c!=null,D=pf(c),O=pf(i),k=pf(l),A=S.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),cf(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!uf(T.current,t)&&(T.current=t,Li.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);lf(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=S.useRef(!1);lf(()=>(j.current=!0,()=>{j.current=!1}),[]),lf(()=>{if(b&&(C.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=S.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=S.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=S.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ff(N.floating,u.x),r=ff(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...df(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var hf=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:of({element:r.current,padding:i}).fn(n):r?of({element:r,padding:i}).fn(n):{}}}},gf=(e,t)=>{let n=ef(e);return{name:n.name,fn:n.fn,options:[e,t]}},_f=(e,t)=>{let n=tf(e);return{name:n.name,fn:n.fn,options:[e,t]}},vf=(e,t)=>({fn:sf(e).fn,options:[e,t]}),yf=(e,t)=>{let n=nf(e);return{name:n.name,fn:n.fn,options:[e,t]}},bf=(e,t)=>{let n=rf(e);return{name:n.name,fn:n.fn,options:[e,t]}},xf=(e,t)=>{let n=af(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sf=(e,t)=>{let n=hf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cf=`Arrow`,wf=S.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,z.jsx)(Bo.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,z.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});wf.displayName=Cf;var Tf=wf,Ef=`Popper`,[Df,Of]=qo(Ef),[kf,Af]=Df(Ef),jf=e=>{let{__scopePopper:t,children:n}=e,[r,i]=S.useState(null);return(0,z.jsx)(kf,{scope:t,anchor:r,onAnchorChange:i,children:n})};jf.displayName=Ef;var Mf=`PopperAnchor`,Nf=S.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Af(Mf,n),o=S.useRef(null),s=jo(t,o),c=S.useRef(null);return S.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,z.jsx)(Bo.div,{...i,ref:s})});Nf.displayName=Mf;var Pf=`PopperContent`,[Ff,If]=Df(Pf),Lf=S.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Af(Pf,n),[_,v]=S.useState(null),y=jo(t,e=>v(e)),[b,x]=S.useState(null),C=uu(b),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(Vf),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:ee,middlewareData:te}=mf({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>$d(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[gf({mainAxis:i+T,alignmentAxis:o}),c&&_f({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?vf():void 0,...A}),c&&yf({...A}),bf({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Sf({element:b,padding:s}),Hf({arrowWidth:w,arrowHeight:T}),f&&xf({strategy:`referenceHidden`,...A})]}),[P,F]=Uf(N),ne=ws(m);Xo(()=>{ee&&ne?.()},[ee,ne]);let re=te.arrow?.x,ie=te.arrow?.y,I=te.arrow?.centerOffset!==0,[L,R]=S.useState();return Xo(()=>{_&&R(window.getComputedStyle(_).zIndex)},[_]),(0,z.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ee?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:L,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(` `),...te.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,z.jsx)(Ff,{scope:n,placedSide:P,onArrowChange:x,arrowX:re,arrowY:ie,shouldHideArrow:I,children:(0,z.jsx)(Bo.div,{"data-side":P,"data-align":F,...h,ref:y,style:{...h.style,animation:ee?void 0:`none`}})})})});Lf.displayName=Pf;var Rf=`PopperArrow`,zf={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Bf=S.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=If(Rf,n),a=zf[i.placedSide];return(0,z.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,z.jsx)(Tf,{...r,ref:t,style:{...r.style,display:`block`}})})});Bf.displayName=Rf;function Vf(e){return e!==null}var Hf=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Uf(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Uf(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Wf=jf,Gf=Nf,Kf=Lf,qf=Bf;function Jf(e,[t,n]){return Math.min(n,Math.max(t,e))}var Yf=`Popover`,[Xf,Zf]=qo(Yf,[Of]),Qf=Of(),[$f,ep]=Xf(Yf),tp=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Qf(t),c=S.useRef(null),[l,u]=S.useState(!1),[d,f]=Qo({prop:r,defaultProp:i??!1,onChange:a,caller:Yf});return(0,z.jsx)(Wf,{...s,children:(0,z.jsx)($f,{scope:t,contentId:cs(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:S.useCallback(()=>u(!0),[]),onCustomAnchorRemove:S.useCallback(()=>u(!1),[]),modal:o,children:n})})};tp.displayName=Yf;var np=`PopoverAnchor`,rp=S.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=ep(np,n),a=Qf(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return S.useEffect(()=>(o(),()=>s()),[o,s]),(0,z.jsx)(Gf,{...a,...r,ref:t})});rp.displayName=np;var ip=`PopoverTrigger`,ap=S.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=ep(ip,n),a=Qf(n),o=jo(t,i.triggerRef),s=(0,z.jsx)(Bo.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":bp(i.open),...r,ref:o,onClick:Yo(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,z.jsx)(Gf,{asChild:!0,...a,children:s})});ap.displayName=ip;var op=`PopoverPortal`,[sp,cp]=Xf(op,{forceMount:void 0}),lp=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=ep(op,t);return(0,z.jsx)(sp,{scope:t,forceMount:n,children:(0,z.jsx)(ns,{present:n||a.open,children:(0,z.jsx)(nc,{asChild:!0,container:i,children:r})})})};lp.displayName=op;var up=`PopoverContent`,dp=S.forwardRef((e,t)=>{let n=cp(up,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=ep(up,e.__scopePopover);return(0,z.jsx)(ns,{present:r||a.open,children:a.modal?(0,z.jsx)(pp,{...i,ref:t}):(0,z.jsx)(mp,{...i,ref:t})})});dp.displayName=up;var fp=Mo(`PopoverContent.RemoveScroll`),pp=S.forwardRef((e,t)=>{let n=ep(up,e.__scopePopover),r=S.useRef(null),i=jo(t,r),a=S.useRef(!1);return S.useEffect(()=>{let e=r.current;if(e)return Cl(e)},[]),(0,z.jsx)(ml,{as:fp,allowPinchZoom:!0,children:(0,z.jsx)(hp,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Yo(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Yo(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:Yo(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),mp=S.forwardRef((e,t)=>{let n=ep(up,e.__scopePopover),r=S.useRef(!1),i=S.useRef(!1);return(0,z.jsx)(hp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),hp=S.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=ep(up,n),p=Qf(n);return ic(),(0,z.jsx)(Us,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,z.jsx)(Ms,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,z.jsx)(Kf,{"data-state":bp(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),gp=`PopoverClose`,_p=S.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=ep(gp,n);return(0,z.jsx)(Bo.button,{type:`button`,...r,ref:t,onClick:Yo(e.onClick,()=>i.onOpenChange(!1))})});_p.displayName=gp;var vp=`PopoverArrow`,yp=S.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Qf(n);return(0,z.jsx)(qf,{...i,...r,ref:t})});yp.displayName=vp;function bp(e){return e?`open`:`closed`}var xp=tp,Sp=ap,Cp=lp,wp=dp;function Tp(e,t){return S.useReducer((e,n)=>t[e][n]??e,e)}var Ep=`ScrollArea`,[Dp,Op]=qo(Ep),[kp,Ap]=Dp(Ep),jp=S.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=S.useState(null),[l,u]=S.useState(null),[d,f]=S.useState(null),[p,m]=S.useState(null),[h,g]=S.useState(null),[_,v]=S.useState(0),[y,b]=S.useState(0),[x,C]=S.useState(!1),[w,T]=S.useState(!1),E=jo(t,e=>c(e)),D=Cs(i);return(0,z.jsx)(kp,{scope:n,type:r,dir:D,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:b,children:(0,z.jsx)(Bo.div,{dir:D,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":y+`px`,...e.style}})})});jp.displayName=Ep;var Mp=`ScrollAreaViewport`,Np=S.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=Ap(Mp,n),s=jo(t,S.useRef(null),o.onViewportChange);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,z.jsx)(Bo.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,z.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});Np.displayName=Mp;var Pp=`ScrollAreaScrollbar`,Fp=S.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Ap(Pp,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return S.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,z.jsx)(Ip,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,z.jsx)(Lp,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,z.jsx)(Rp,{...r,ref:t,forceMount:n}):i.type===`always`?(0,z.jsx)(zp,{...r,ref:t}):null});Fp.displayName=Pp;var Ip=S.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Ap(Pp,e.__scopeScrollArea),[a,o]=S.useState(!1);return S.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,z.jsx)(ns,{present:n||a,children:(0,z.jsx)(Rp,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),Lp=S.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Ap(Pp,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=am(()=>c(`SCROLL_END`),100),[s,c]=Tp(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return S.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),S.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,z.jsx)(ns,{present:n||s!==`hidden`,children:(0,z.jsx)(zp,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:Yo(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:Yo(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),Rp=S.forwardRef((e,t)=>{let n=Ap(Pp,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=S.useState(!1),s=e.orientation===`horizontal`,c=am(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return om(n.viewport,c),om(n.content,c),(0,z.jsx)(ns,{present:r||a,children:(0,z.jsx)(zp,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),zp=S.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=Ap(Pp,e.__scopeScrollArea),a=S.useRef(null),o=S.useRef(0),[s,c]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Qp(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return em(e,o.current,s,t)}return n===`horizontal`?(0,z.jsx)(Bp,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=tm(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,z.jsx)(Vp,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=tm(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),Bp=S.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=Ap(Pp,e.__scopeScrollArea),[o,s]=S.useState(),c=S.useRef(null),l=jo(t,c,a.onScrollbarXChange);return S.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,z.jsx)(Wp,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":$p(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),rm(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Zp(o.paddingLeft),paddingEnd:Zp(o.paddingRight)}})}})}),Vp=S.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=Ap(Pp,e.__scopeScrollArea),[o,s]=S.useState(),c=S.useRef(null),l=jo(t,c,a.onScrollbarYChange);return S.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,z.jsx)(Wp,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":$p(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),rm(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Zp(o.paddingTop),paddingEnd:Zp(o.paddingBottom)}})}})}),[Hp,Up]=Dp(Pp),Wp=S.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=Ap(Pp,n),[m,h]=S.useState(null),g=jo(t,e=>h(e)),_=S.useRef(null),v=S.useRef(``),y=p.viewport,b=r.content-r.viewport,x=ws(u),C=ws(c),w=am(d,10);function T(e){_.current&&l({x:e.clientX-_.current.left,y:e.clientY-_.current.top})}return S.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&x(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b,x]),S.useEffect(C,[r,C]),om(m,w),om(p.content,w),(0,z.jsx)(Hp,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:ws(a),onThumbPointerUp:ws(o),onThumbPositionChange:C,onThumbPointerDown:ws(s),children:(0,z.jsx)(Bo.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:Yo(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:Yo(e.onPointerMove,T),onPointerUp:Yo(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})}),Gp=`ScrollAreaThumb`,Kp=S.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Up(Gp,e.__scopeScrollArea);return(0,z.jsx)(ns,{present:n||i.hasThumb,children:(0,z.jsx)(qp,{ref:t,...r})})}),qp=S.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=Ap(Gp,n),o=Up(Gp,n),{onThumbPositionChange:s}=o,c=jo(t,e=>o.onThumbChange(e)),l=S.useRef(void 0),u=am(()=>{l.current&&=(l.current(),void 0)},100);return S.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=im(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,z.jsx)(Bo.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:Yo(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:Yo(e.onPointerUp,o.onThumbPointerUp)})});Kp.displayName=Gp;var Jp=`ScrollAreaCorner`,Yp=S.forwardRef((e,t)=>{let n=Ap(Jp,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,z.jsx)(Xp,{...e,ref:t}):null});Yp.displayName=Jp;var Xp=S.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=Ap(Jp,n),[a,o]=S.useState(0),[s,c]=S.useState(0),l=!!(a&&s);return om(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),om(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,z.jsx)(Bo.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function Zp(e){return e?parseInt(e,10):0}function Qp(e,t){let n=e/t;return isNaN(n)?0:n}function $p(e){let t=Qp(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function em(e,t,n,r=`ltr`){let i=$p(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return nm([c,l],d)(e)}function tm(e,t,n=`ltr`){let r=$p(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Jf(e,n===`ltr`?[0,o]:[o*-1,0]);return nm([0,o],[0,s])(c)}function nm(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function rm(e,t){return e>0&&e<t}var im=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function am(e,t){let n=ws(e),r=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),S.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function om(e,t){let n=ws(t);Xo(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var sm=jp,cm=Np,lm=Yp,um=`Separator`,dm=`horizontal`,fm=[`horizontal`,`vertical`],pm=S.forwardRef((e,t)=>{let{decorative:n,orientation:r=dm,...i}=e,a=mm(r)?r:dm,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,z.jsx)(Bo.div,{"data-orientation":a,...o,...i,ref:t})});pm.displayName=um;function mm(e){return fm.includes(e)}var hm=pm,gm=`Switch`,[_m,vm]=qo(gm),[ym,bm]=_m(gm),xm=S.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=S.useState(null),m=jo(t,e=>p(e)),h=S.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=Qo({prop:i,defaultProp:a??!1,onChange:l,caller:gm});return(0,z.jsxs)(ym,{scope:n,checked:_,disabled:s,children:[(0,z.jsx)(Bo.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":Em(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:Yo(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,z.jsx)(Tm,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});xm.displayName=gm;var Sm=`SwitchThumb`,Cm=S.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=bm(Sm,n);return(0,z.jsx)(Bo.span,{"data-state":Em(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});Cm.displayName=Sm;var wm=`SwitchBubbleInput`,Tm=S.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=S.useRef(null),s=jo(o,a),c=lu(n),l=uu(t);return S.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,z.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});Tm.displayName=wm;function Em(e){return e?`checked`:`unchecked`}var Dm=xm,Om=Cm,[km,Am]=qo(`Tooltip`,[Of]),jm=Of(),Mm=`TooltipProvider`,Nm=700,Pm=`tooltip.open`,[Fm,Im]=km(Mm),Lm=e=>{let{__scopeTooltip:t,delayDuration:n=Nm,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=S.useRef(!0),s=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,z.jsx)(Fm,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:S.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Lm.displayName=Mm;var Rm=`Tooltip`,[zm,Bm]=km(Rm),Vm=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Im(Rm,e.__scopeTooltip),l=jm(t),[u,d]=S.useState(null),f=cs(),p=S.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=S.useRef(!1),[_,v]=Qo({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Pm))):c.onClose(),a?.(e)},caller:Rm}),y=S.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=S.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=S.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),C=S.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return S.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,z.jsx)(Wf,{...l,children:(0,z.jsx)(zm,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?C():b()},[c.isOpenDelayedRef,C,b]),onTriggerLeave:S.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};Vm.displayName=Rm;var Hm=`TooltipTrigger`,Um=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Bm(Hm,n),a=Im(Hm,n),o=jm(n),s=jo(t,S.useRef(null),i.onTriggerChange),c=S.useRef(!1),l=S.useRef(!1),u=S.useCallback(()=>c.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,z.jsx)(Gf,{asChild:!0,...o,children:(0,z.jsx)(Bo.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Yo(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:Yo(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:Yo(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:Yo(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Yo(e.onBlur,i.onClose),onClick:Yo(e.onClick,i.onClose)})})});Um.displayName=Hm;var Wm=`TooltipPortal`,[Gm,Km]=km(Wm,{forceMount:void 0}),qm=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Bm(Wm,t);return(0,z.jsx)(Gm,{scope:t,forceMount:n,children:(0,z.jsx)(ns,{present:n||a.open,children:(0,z.jsx)(nc,{asChild:!0,container:i,children:r})})})};qm.displayName=Wm;var Jm=`TooltipContent`,Ym=S.forwardRef((e,t)=>{let n=Km(Jm,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Bm(Jm,e.__scopeTooltip);return(0,z.jsx)(ns,{present:r||o.open,children:o.disableHoverableContent?(0,z.jsx)(eh,{side:i,...a,ref:t}):(0,z.jsx)(Xm,{side:i,...a,ref:t})})}),Xm=S.forwardRef((e,t)=>{let n=Bm(Jm,e.__scopeTooltip),r=Im(Jm,e.__scopeTooltip),i=S.useRef(null),a=jo(t,i),[o,s]=S.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=S.useCallback(()=>{s(null),d(!1)},[d]),p=S.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=ih(r,rh(r,n.getBoundingClientRect())),a=ah(t.getBoundingClientRect());s(sh([...i,...a])),d(!0)},[d]);return S.useEffect(()=>()=>f(),[f]),S.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),S.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!oh(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,z.jsx)(eh,{...e,ref:a})}),[Zm,Qm]=km(Rm,{isInside:!1}),$m=Io(`TooltipContent`),eh=S.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Bm(Jm,n),l=jm(n),{onClose:u}=c;return S.useEffect(()=>(document.addEventListener(Pm,u),()=>document.removeEventListener(Pm,u)),[u]),S.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,z.jsx)(Ms,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,z.jsxs)(Kf,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,z.jsx)($m,{children:r}),(0,z.jsx)(Zm,{scope:n,isInside:!0,children:(0,z.jsx)(Go,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Ym.displayName=Jm;var th=`TooltipArrow`,nh=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=jm(n);return Qm(th,n).isInside?null:(0,z.jsx)(qf,{...i,...r,ref:t})});nh.displayName=th;function rh(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function ih(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ah(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function oh(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function sh(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),ch(t)}function ch(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var lh=Lm;function uh(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=uh(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function dh(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=uh(e))&&(r&&(r+=` `),r+=t);return r}var fh=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ph=(e,t)=>({classGroupId:e,validator:t}),mh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hh=`-`,gh=[],_h=`arbitrary..`,vh=e=>{let t=xh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bh(e);let n=e.split(hh);return yh(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fh(i,t):t:i||gh}return n[e]||gh}}},yh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yh(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hh):e.slice(t).join(hh),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bh=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_h+r:void 0})(),xh=e=>{let{theme:t,classGroups:n}=e;return Sh(n,t)},Sh=(e,t)=>{let n=mh();for(let r in e){let i=e[r];Ch(i,n,r,t)}return n},Ch=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wh(i,t,n,r)}},wh=(e,t,n,r)=>{if(typeof e==`string`){Th(e,t,n);return}if(typeof e==`function`){Eh(e,t,n,r);return}Dh(e,t,n,r)},Th=(e,t,n)=>{let r=e===``?t:Oh(t,e);r.classGroupId=n},Eh=(e,t,n,r)=>{if(kh(e)){Ch(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ph(n,e))},Dh=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ch(o,Oh(t,a),n,r)}},Oh=(e,t)=>{let n=e,r=t.split(hh),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=mh(),n.nextPart.set(t,i)),n=i}return n},kh=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ah=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jh=`!`,Mh=`:`,Nh=[],Ph=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fh=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Mh){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jh)?(c=s.slice(0,-1),l=!0):s.startsWith(jh)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Ph(t,l,c,u)};if(t){let e=t+Mh,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ph(Nh,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ih=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Lh=e=>({cache:Ah(e.cacheSize),parseClassName:Fh(e),sortModifiers:Ih(e),...vh(e)}),Rh=/\s+/,zh=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Rh),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+jh:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Bh=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Vh(n))&&(i&&(i+=` `),i+=r);return i},Vh=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Vh(e[r]))&&(n&&(n+=` `),n+=t);return n},Hh=(e,...t)=>{let n,r,i,a,o=o=>(n=Lh(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=zh(e,n);return i(e,a),a};return a=o,(...e)=>a(Bh(...e))},Uh=[],Wh=e=>{let t=t=>t[e]||Uh;return t.isThemeGetter=!0,t},Gh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Kh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Jh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Yh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Xh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Zh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$h=e=>qh.test(e),G=e=>!!e&&!Number.isNaN(Number(e)),eg=e=>!!e&&Number.isInteger(Number(e)),tg=e=>e.endsWith(`%`)&&G(e.slice(0,-1)),ng=e=>Jh.test(e),rg=()=>!0,ig=e=>Yh.test(e)&&!Xh.test(e),ag=()=>!1,og=e=>Zh.test(e),sg=e=>Qh.test(e),cg=e=>!K(e)&&!q(e),lg=e=>wg(e,Og,ag),K=e=>Gh.test(e),ug=e=>wg(e,kg,ig),dg=e=>wg(e,Ag,G),fg=e=>wg(e,Mg,rg),pg=e=>wg(e,jg,ag),mg=e=>wg(e,Eg,ag),hg=e=>wg(e,Dg,sg),gg=e=>wg(e,Ng,og),q=e=>Kh.test(e),_g=e=>Tg(e,kg),vg=e=>Tg(e,jg),yg=e=>Tg(e,Eg),bg=e=>Tg(e,Og),xg=e=>Tg(e,Dg),Sg=e=>Tg(e,Ng,!0),Cg=e=>Tg(e,Mg,!0),wg=(e,t,n)=>{let r=Gh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Tg=(e,t,n=!1)=>{let r=Kh.exec(e);return r?r[1]?t(r[1]):n:!1},Eg=e=>e===`position`||e===`percentage`,Dg=e=>e===`image`||e===`url`,Og=e=>e===`length`||e===`size`||e===`bg-size`,kg=e=>e===`length`,Ag=e=>e===`number`,jg=e=>e===`family-name`,Mg=e=>e===`number`||e===`weight`,Ng=e=>e===`shadow`,Pg=Hh(()=>{let e=Wh(`color`),t=Wh(`font`),n=Wh(`text`),r=Wh(`font-weight`),i=Wh(`tracking`),a=Wh(`leading`),o=Wh(`breakpoint`),s=Wh(`container`),c=Wh(`spacing`),l=Wh(`radius`),u=Wh(`shadow`),d=Wh(`inset-shadow`),f=Wh(`text-shadow`),p=Wh(`drop-shadow`),m=Wh(`blur`),h=Wh(`perspective`),g=Wh(`aspect`),_=Wh(`ease`),v=Wh(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),q,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[q,K,c],T=()=>[$h,`full`,`auto`,...w()],E=()=>[eg,`none`,`subgrid`,q,K],D=()=>[`auto`,{span:[`full`,eg,q,K]},eg,q,K],O=()=>[eg,`auto`,q,K],k=()=>[`auto`,`min`,`max`,`fr`,q,K],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[$h,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[$h,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[$h,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,q,K],F=()=>[...b(),yg,mg,{position:[q,K]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,bg,lg,{size:[q,K]}],ie=()=>[tg,_g,ug],I=()=>[``,`none`,`full`,l,q,K],L=()=>[``,G,_g,ug],R=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],oe=()=>[G,tg,yg,mg],se=()=>[``,`none`,m,q,K],ce=()=>[`none`,G,q,K],le=()=>[`none`,G,q,K],ue=()=>[G,q,K],de=()=>[$h,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ng],breakpoint:[ng],color:[rg],container:[ng],"drop-shadow":[ng],ease:[`in`,`out`,`in-out`],font:[cg],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ng],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ng],shadow:[ng],spacing:[`px`,G],text:[ng],"text-shadow":[ng],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,$h,K,q,g]}],container:[`container`],columns:[{columns:[G,K,q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[eg,`auto`,q,K]}],basis:[{basis:[$h,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[G,$h,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,G,q,K]}],shrink:[{shrink:[``,G,q,K]}],order:[{order:[eg,`first`,`last`,`none`,q,K]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,_g,ug]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Cg,fg]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,tg,K]}],"font-family":[{font:[vg,pg,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,q,K]}],"line-clamp":[{"line-clamp":[G,`none`,q,dg]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,q,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,q,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...R(),`wavy`]}],"text-decoration-thickness":[{decoration:[G,`from-font`,`auto`,q,ug]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[G,`auto`,q,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,q,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,q,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},eg,q,K],radial:[``,q,K],conic:[eg,q,K]},xg,hg]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...R(),`hidden`,`none`]}],"divide-style":[{divide:[...R(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...R(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[G,q,K]}],"outline-w":[{outline:[``,G,_g,ug]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,Sg,gg]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,Sg,gg]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[G,ug]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,Sg,gg]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[G,q,K]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[G]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[q,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[G]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,q,K]}],filter:[{filter:[``,`none`,q,K]}],blur:[{blur:se()}],brightness:[{brightness:[G,q,K]}],contrast:[{contrast:[G,q,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Sg,gg]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,G,q,K]}],"hue-rotate":[{"hue-rotate":[G,q,K]}],invert:[{invert:[``,G,q,K]}],saturate:[{saturate:[G,q,K]}],sepia:[{sepia:[``,G,q,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,q,K]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[G,q,K]}],"backdrop-contrast":[{"backdrop-contrast":[G,q,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,G,q,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G,q,K]}],"backdrop-invert":[{"backdrop-invert":[``,G,q,K]}],"backdrop-opacity":[{"backdrop-opacity":[G,q,K]}],"backdrop-saturate":[{"backdrop-saturate":[G,q,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,G,q,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,q,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[G,`initial`,q,K]}],ease:[{ease:[`linear`,`initial`,_,q,K]}],delay:[{delay:[G,q,K]}],animate:[{animate:[`none`,v,q,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,q,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[q,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,q,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,q,K]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[G,_g,ug,dg]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function J(...e){return Pg(dh(e))}function Fg({className:e,children:t,...n}){return(0,z.jsxs)(sm,{"data-slot":`scroll-area`,className:J(`relative`,e),...n,children:[(0,z.jsx)(cm,{"data-slot":`scroll-area-viewport`,className:`size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`,children:t}),(0,z.jsx)(Ig,{}),(0,z.jsx)(lm,{})]})}function Ig({className:e,orientation:t=`vertical`,...n}){return(0,z.jsx)(Fp,{"data-slot":`scroll-area-scrollbar`,"data-orientation":t,orientation:t,className:J(`flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent`,e),...n,children:(0,z.jsx)(Kp,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`})})}function Lg({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,z.jsx)(hm,{"data-slot":`separator`,decorative:n,orientation:t,className:J(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...r})}var Rg=[{path:`/dashboard`,label:`仪表盘`,icon:Ua},{path:`/kanban`,label:`看板`,icon:Ha},{path:`/teams`,label:`团队`,icon:wo},{path:`/memory`,label:`记忆`,icon:Ta},{path:`/cron`,label:`定时任务`,icon:Ma},{path:`/tools`,label:`工具`,icon:Eo},{path:`/skills`,label:`技能`,icon:ho},{path:`/settings`,label:`设置`,icon:po}];function zg(){return(0,z.jsxs)(`aside`,{className:`flex w-60 flex-col border-r border-border bg-card`,children:[(0,z.jsx)(Fg,{className:`flex-1 px-3 py-4`,children:(0,z.jsx)(`nav`,{className:`flex flex-col gap-1`,children:Rg.map(e=>{let t=e.icon;return(0,z.jsxs)(Dn,{to:e.path,end:e.path===`/kanban`,className:({isActive:e})=>J(`flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors`,e?`bg-accent text-accent-foreground`:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,z.jsx)(t,{className:`h-4 w-4`}),e.label]},e.path)})})}),(0,z.jsx)(Lg,{}),(0,z.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`DuClaw Agent Manager`})]})}var Bg=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Vg=dh,Hg=(e,t)=>n=>{if(t?.variants==null)return Vg(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Bg(t)||Bg(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Vg(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Ug=Hg(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function Y({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,z.jsx)(r?No:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:J(Ug({variant:t,size:n,className:e})),...i})}function Wg({className:e}){let{resolvedTheme:t,setTheme:n}=Oi(),[r,i]=(0,S.useState)(!1);if((0,S.useEffect)(()=>{i(!0)},[]),!r)return(0,z.jsx)(Y,{variant:`outline`,size:`sm`,className:J(`min-w-18 opacity-0`,e),"aria-hidden":!0,tabIndex:-1,children:`占位`});let a=t===`dark`?`light`:`dark`,o=a===`light`?`日间`:`夜间`;return(0,z.jsxs)(Y,{type:`button`,variant:`outline`,size:`sm`,className:J(`min-w-18`,e),onClick:()=>n(a),"aria-label":`切换到${o}模式`,title:`切换到${o}模式`,children:[a===`light`?(0,z.jsx)(go,{className:`size-3.5`}):(0,z.jsx)(Qa,{className:`size-3.5`}),o]})}function Gg(){return(0,z.jsxs)(`header`,{className:`flex h-14 items-center gap-3 border-b border-border bg-card px-6`,children:[(0,z.jsx)(Ua,{className:`h-5 w-5 text-primary`}),(0,z.jsx)(`h1`,{className:`text-base font-semibold text-foreground`,children:`DuClaw Agent Manager`}),(0,z.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[(0,z.jsx)(Wg,{}),(0,z.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`v1.0`})]})]})}function Kg(){return(0,z.jsxs)(`div`,{className:`flex h-screen flex-col bg-background text-foreground`,children:[(0,z.jsx)(Gg,{}),(0,z.jsxs)(`div`,{className:`flex flex-1 overflow-hidden`,children:[(0,z.jsx)(zg,{}),(0,z.jsx)(`main`,{className:`flex-1 overflow-auto bg-background`,children:(0,z.jsx)(Mt,{})})]})]})}var qg=class extends Error{status;constructor(e,t){super(t),this.name=`ApiClientError`,this.status=e}};async function Jg(e){if(!e.ok){let t=`Request failed: ${e.status} ${e.statusText}`;try{let n=await e.json();n?.error?t=n.error:n?.message&&(t=n.message)}catch{try{let n=await e.text();n&&(t=n)}catch{}}throw new qg(e.status,t)}if(e.headers.get(`content-type`)?.includes(`application/json`))return e.json()}async function Yg(e,t){let n=xi(e);if(t){let e=new URLSearchParams;for(let[n,r]of Object.entries(t))r!==void 0&&r!==``&&e.set(n,String(r));let r=e.toString();r&&(n+=`?${r}`)}return Jg(await fetch(n))}async function Xg(e,t){return Jg(await fetch(xi(e),{method:`POST`,headers:{"Content-Type":`application/json`},body:t?JSON.stringify(t):void 0}))}async function Zg(e,t){return Jg(await fetch(xi(e),{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}))}async function Qg(e,t){return Jg(await fetch(xi(e),{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}))}async function $g(e){return Jg(await fetch(xi(e),{method:`DELETE`}))}var e_=()=>Yg(`/api/goals`),t_=e=>Xg(`/api/goals`,e),n_=(e,t)=>Zg(`/api/goals/${e}`,t),r_=e=>$g(`/api/goals/${e}`),i_=e=>Yg(`/api/goals/${e}/context`),a_=(e,t)=>Xg(`/api/goals/${e}/chat`,{message:t}),o_=e=>Yg(`/api/goals/${e}/chat/logs`),s_=5e3;function c_(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),i=(0,S.useCallback)(async e=>{let n=e?.silent??!1;n||r(!0);try{t(await e_())}catch(e){console.error(`Failed to fetch goals:`,e)}finally{n||r(!1)}},[]);return(0,S.useEffect)(()=>{i()},[i]),(0,S.useEffect)(()=>{let e=()=>{typeof document<`u`&&document.visibilityState!==`visible`||i({silent:!0})},t=window.setInterval(e,s_);return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.clearInterval(t),window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[i]),{goals:e,loading:n,reload:i,add:async e=>{let n=await t_(e);return t(e=>[...e,n]),n},update:async(e,n)=>{let r=await n_(e,n);return t(t=>t.map(t=>t.id===e?r:t)),r},remove:async e=>{await r_(e),t(t=>t.filter(t=>t.id!==e))}}}var l_=()=>Yg(`/api/teams`),u_=e=>Yg(`/api/teams/${e}`),d_=e=>Xg(`/api/teams`,e),f_=e=>$g(`/api/teams/${e}`),p_=(e,t)=>Xg(`/api/teams/${e}/members`,t),m_=(e,t)=>$g(`/api/teams/${e}/members/${t}`),h_=e=>Yg(`/api/teams/${e}/activity`),g_=(e,t)=>Yg(`/api/teams/${e}/members/${t}/context`),__={all:[`teams`],detail:e=>[`teams`,e],activity:e=>[`teams`,e,`activity`],memberContext:(e,t)=>[`teams`,e,`members`,t,`context`]};function v_(){return gi({queryKey:__.all,queryFn:l_})}function y_(e){return gi({queryKey:__.detail(e),queryFn:()=>u_(e),enabled:!!e})}function b_(){let e=ti();return _i({mutationFn:d_,onSuccess:()=>e.invalidateQueries({queryKey:__.all})})}function x_(){let e=ti();return _i({mutationFn:f_,onSuccess:()=>e.invalidateQueries({queryKey:__.all})})}function S_(e){let t=ti();return _i({mutationFn:t=>p_(e,t),onSuccess:()=>t.invalidateQueries({queryKey:__.detail(e)})})}function C_(e){let t=ti();return _i({mutationFn:t=>m_(e,t),onSuccess:()=>t.invalidateQueries({queryKey:__.detail(e)})})}function w_(e){return gi({queryKey:__.activity(e),queryFn:()=>h_(e),enabled:!!e,refetchInterval:5e3})}function T_(e,t){return gi({queryKey:__.memberContext(e,t??``),queryFn:()=>g_(e,t),enabled:!!e&&!!t})}var E_=()=>Yg(`/api/cron-jobs`),D_=e=>Xg(`/api/cron-jobs`,e),O_=(e,t)=>Zg(`/api/cron-jobs/${e}`,t),k_=e=>$g(`/api/cron-jobs/${e}`),A_=(e,t)=>Zg(`/api/cron-jobs/${e}/toggle`,{enabled:t}),j_=e=>Xg(`/api/cron-jobs/${e}/trigger`),M_=e=>Yg(`/api/cron-jobs/${e}/history`),N_={all:[`cronJobs`],detail:e=>[`cronJobs`,e],history:e=>[`cronJobs`,e,`history`]};function P_(){return gi({queryKey:N_.all,queryFn:E_})}function F_(e){return gi({queryKey:N_.history(e),queryFn:()=>M_(e),enabled:!!e})}function I_(){let e=ti();return _i({mutationFn:D_,onSuccess:()=>e.invalidateQueries({queryKey:N_.all})})}function L_(){let e=ti();return _i({mutationFn:k_,onSuccess:()=>e.invalidateQueries({queryKey:N_.all})})}function R_({children:e,className:t}){return(0,z.jsx)(`div`,{className:J(`p-6`,t),children:e})}function z_({className:e,size:t=`default`,...n}){return(0,z.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:J(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function B_({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`card-header`,className:J(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function V_({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`card-title`,className:J(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function H_({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`card-description`,className:J(`text-sm text-muted-foreground`,e),...t})}function U_({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`card-content`,className:J(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function W_({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`skeleton`,className:J(`animate-pulse rounded-md bg-muted`,e),...t})}function G_({title:e,value:t,icon:n,description:r,loading:i}){return(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-sm font-medium text-muted-foreground`,children:[(0,z.jsx)(n,{className:`h-4 w-4`}),e]})}),(0,z.jsxs)(U_,{children:[i?(0,z.jsx)(W_,{className:`h-8 w-20`}):(0,z.jsx)(`div`,{className:`flex items-baseline gap-2`,children:(0,z.jsx)(`span`,{className:`text-3xl font-bold`,children:t??0})}),(0,z.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:r})]})]})}function K_(){let{goals:e,loading:t}=c_(),{data:n,isLoading:r}=v_(),{data:i,isLoading:a}=P_(),o=e.length,s=e.reduce((e,t)=>e+t.tasks.filter(e=>e.status===`in_progress`||e.status===`pending`).length,0),c=n?.length??0,l=i?.filter(e=>e.enabled).length??0,u=i?.length??0;return(0,z.jsxs)(R_,{children:[(0,z.jsxs)(`div`,{className:`mb-6`,children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Dashboard`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`系统概览与统计数据`})]}),(0,z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,z.jsx)(G_,{title:`Goals`,value:o,icon:_o,description:`总需求数量`,loading:t}),(0,z.jsx)(G_,{title:`进行中 Tasks`,value:s,icon:Wa,description:`待处理 + 进行中`,loading:t}),(0,z.jsx)(G_,{title:`Teams`,value:c,icon:wo,description:`团队总数`,loading:r}),(0,z.jsx)(G_,{title:`Cron Jobs`,value:u,icon:Ma,description:`已启用 ${l}`,loading:a})]}),(0,z.jsx)(`div`,{className:`mt-8`,children:(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2`,children:[(0,z.jsx)(bo,{className:`h-4 w-4`}),`快速状态`]})}),(0,z.jsx)(U_,{children:(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`目标状态分布`}),(0,z.jsx)(`div`,{className:`flex gap-3`,children:e.length>0?(0,z.jsxs)(`span`,{className:`text-foreground`,children:[e.filter(e=>e.status===`pending`).length,` 待处理 /`,` `,e.filter(e=>e.status===`in_progress`).length,` 进行中 /`,` `,e.filter(e=>e.status===`completed`).length,` 已完成`]}):(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`暂无目标`})})]}),(0,z.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`团队`}),(0,z.jsx)(`span`,{className:`text-foreground`,children:r?`加载中...`:c>0?`${c} 个团队`:`暂无团队`})]}),(0,z.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`定时任务`}),(0,z.jsx)(`span`,{className:`text-foreground`,children:a?`加载中...`:`${l} / ${u} 已启用`})]})]})})]})})]})}var q_=e=>Yg(`/api/goals/${e}/tasks`),J_=(e,t,n)=>Xg(`/api/goals/${e}/tasks`,{subject:t,description:n}),Y_=(e,t,n)=>Zg(`/api/goals/${e}/tasks/${t}`,n),X_=(e,t)=>$g(`/api/goals/${e}/tasks/${t}`),Z_=5e3;function Q_(e){let[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),a=(0,S.useCallback)(async t=>{if(!e){n([]);return}let r=t?.silent??!1;r||i(!0);try{n(await q_(e))}catch(e){console.error(`Failed to fetch tasks:`,e)}finally{r||i(!1)}},[e]);return(0,S.useEffect)(()=>{a()},[a]),(0,S.useEffect)(()=>{if(!e)return;let t=()=>{typeof document<`u`&&document.visibilityState!==`visible`||a({silent:!0})},n=window.setInterval(t,Z_);return window.addEventListener(`focus`,t),document.addEventListener(`visibilitychange`,t),()=>{window.clearInterval(n),window.removeEventListener(`focus`,t),document.removeEventListener(`visibilitychange`,t)}},[e,a]),{tasks:t,loading:r,reload:a,add:async(t,r)=>{if(!e)return;let i=await J_(e,t,r);return n(e=>[...e,i]),i},updateStatus:async(t,r)=>{if(!e)return;let i=await Y_(e,t,{status:r});n(e=>e.map(e=>e.id===t?i:e))},update:async(t,r)=>{if(!e)return;let i=await Y_(e,t,r);n(e=>e.map(e=>e.id===t?i:e))},remove:async t=>{e&&(await X_(e,t),n(e=>e.filter(e=>e.id!==t)))}}}var $_=e=>e.summary||e.currentFocus||e.nextAction||e.description||`暂无摘要`,ev=e=>e.status===`failed`?`danger`:e.status===`completed`?`success`:e.tasks.length===0?`warning`:e.tasks.some(e=>e.status===`failed`)?`danger`:e.tasks.every(e=>e.status===`completed`)?`success`:`warning`,tv=e=>{switch(e){case`success`:return`已完成`;case`danger`:return`有异常`;default:return`进行中`}},nv=e=>{if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleString(`sv-SE`,{timeZone:`Asia/Shanghai`}).replace(` `,` `)};function rv({goals:e,loading:t,selectedId:n,onSelect:r,onAdd:i,onEdit:a,onDelete:o}){return(0,z.jsxs)(`aside`,{className:`sidebar`,children:[(0,z.jsxs)(`div`,{className:`sidebar-header`,children:[(0,z.jsx)(`h2`,{children:`需求`}),(0,z.jsx)(`button`,{className:`btn-icon btn-add`,onClick:i,title:`新增需求`,children:(0,z.jsx)(ao,{size:18})})]}),(0,z.jsxs)(`div`,{className:`sidebar-list`,children:[t&&(0,z.jsx)(`div`,{className:`sidebar-loading`,children:`加载中...`}),e.map(e=>{let t=ev(e);return(0,z.jsxs)(`div`,{className:`sidebar-item ${n===e.id?`active`:``}`,onClick:()=>r(e.id),children:[(0,z.jsxs)(`div`,{className:`sidebar-item-content`,children:[(0,z.jsx)(`span`,{className:`sidebar-item-status sidebar-item-status-${t}`,title:tv(t)}),(0,z.jsxs)(`div`,{className:`sidebar-item-text`,children:[(0,z.jsx)(`span`,{className:`sidebar-item-title`,children:e.subject}),(0,z.jsx)(`span`,{className:`sidebar-item-summary`,children:$_(e)}),(e.conversation?.syncReplyToOrigin||e.conversation?.lastDiscussedAt)&&(0,z.jsxs)(`span`,{className:`sidebar-item-meta`,children:[e.conversation?.syncReplyToOrigin&&e.conversation?.originPlatform===`feishu`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Xa,{size:11}),(0,z.jsx)(`span`,{children:`同步飞书`})]}),e.conversation?.lastDiscussedAt&&(0,z.jsx)(`span`,{children:nv(e.conversation.lastDiscussedAt)})]})]}),(0,z.jsx)(`span`,{className:`sidebar-item-count sidebar-item-count-${t}`,children:e.tasks.length})]}),(0,z.jsx)(`button`,{className:`btn-icon`,onClick:t=>{t.stopPropagation(),a(e)},title:`编辑需求`,children:(0,z.jsx)(ro,{size:14})}),(0,z.jsx)(`button`,{className:`btn-icon btn-delete`,onClick:t=>{t.stopPropagation(),o(e.id)},title:`删除`,children:(0,z.jsx)(yo,{size:14})})]},e.id)}),!t&&e.length===0&&(0,z.jsx)(`div`,{className:`sidebar-empty`,children:`暂无需求,点击 + 创建`})]})]})}var iv=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function av(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function ov(e){return`nodeType`in e}function sv(e){return e?av(e)?e:ov(e)?e.ownerDocument?.defaultView??window:window:window}function cv(e){let{Document:t}=sv(e);return e instanceof t}function lv(e){return av(e)?!1:e instanceof sv(e).HTMLElement}function uv(e){return e instanceof sv(e).SVGElement}function dv(e){return e?av(e)?e.document:ov(e)?cv(e)?e:lv(e)||uv(e)?e.ownerDocument:document:document:document}var fv=iv?S.useLayoutEffect:S.useEffect;function pv(e){let t=(0,S.useRef)(e);return fv(()=>{t.current=e}),(0,S.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function mv(){let e=(0,S.useRef)(null);return[(0,S.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,S.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function hv(e,t){t===void 0&&(t=[e]);let n=(0,S.useRef)(e);return fv(()=>{n.current!==e&&(n.current=e)},t),n}function gv(e,t){let n=(0,S.useRef)();return(0,S.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function _v(e){let t=pv(e),n=(0,S.useRef)(null);return[n,(0,S.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function vv(e){let t=(0,S.useRef)();return(0,S.useEffect)(()=>{t.current=e},[e]),t.current}var yv={};function bv(e,t){return(0,S.useMemo)(()=>{if(t)return t;let n=yv[e]==null?0:yv[e]+1;return yv[e]=n,e+`-`+n},[e,t])}function xv(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Sv=xv(1),Cv=xv(-1);function wv(e){return`clientX`in e&&`clientY`in e}function Tv(e){if(!e)return!1;let{KeyboardEvent:t}=sv(e.target);return t&&e instanceof t}function Ev(e){if(!e)return!1;let{TouchEvent:t}=sv(e.target);return t&&e instanceof t}function Dv(e){if(Ev(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return wv(e)?{x:e.clientX,y:e.clientY}:null}var Ov=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[Ov.Translate.toString(e),Ov.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),kv=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Av(e){return e.matches(kv)?e:e.querySelector(kv)}var jv={display:`none`};function Mv(e){let{id:t,value:n}=e;return S.createElement(`div`,{id:t,style:jv},n)}function Nv(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return S.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Pv(){let[e,t]=(0,S.useState)(``);return{announce:(0,S.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Fv=(0,S.createContext)(null);function Iv(e){let t=(0,S.useContext)(Fv);(0,S.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Lv(){let[e]=(0,S.useState)(()=>new Set),t=(0,S.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,S.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Rv={draggable:`
|
|
56
|
+
To pick up a draggable item, press the space bar.
|
|
57
|
+
While dragging, use the arrow keys to move the item.
|
|
58
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
59
|
+
`},zv={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Bv(e){let{announcements:t=zv,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Rv}=e,{announce:a,announcement:o}=Pv(),s=bv(`DndLiveRegion`),[c,l]=(0,S.useState)(!1);if((0,S.useEffect)(()=>{l(!0)},[]),Iv((0,S.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=S.createElement(S.Fragment,null,S.createElement(Mv,{id:r,value:i.draggable}),S.createElement(Nv,{id:s,announcement:o}));return n?(0,Li.createPortal)(u,n):u}var Vv;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Vv||={});function Hv(){}var Uv=Object.freeze({x:0,y:0});function Wv(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Gv(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Kv(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function qv(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Jv(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}var Yv=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=qv(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=qv(r),o=i.reduce((e,t,r)=>e+Wv(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(Gv)};function Xv(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Zv=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=Xv(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Kv)};function Qv(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function $v(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Uv}function ey(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var ty=ey(1);function ny(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ry(e,t,n){let r=ny(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var iy={ignoreTransform:!1};function ay(e,t){t===void 0&&(t=iy);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=sv(e).getComputedStyle(e);t&&(n=ry(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function oy(e){return ay(e,{ignoreTransform:!0})}function sy(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function cy(e,t){return t===void 0&&(t=sv(e).getComputedStyle(e)),t.position===`fixed`}function ly(e,t){t===void 0&&(t=sv(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function uy(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(cv(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!lv(i)||uv(i)||n.includes(i))return n;let a=sv(e).getComputedStyle(i);return i!==e&&ly(i,a)&&n.push(i),cy(i,a)?n:r(i.parentNode)}return e?r(e):n}function dy(e){let[t]=uy(e,1);return t??null}function fy(e){return!iv||!e?null:av(e)?e:ov(e)?cv(e)||e===dv(e).scrollingElement?window:lv(e)?e:null:null}function py(e){return av(e)?e.scrollX:e.scrollLeft}function my(e){return av(e)?e.scrollY:e.scrollTop}function hy(e){return{x:py(e),y:my(e)}}var gy;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(gy||={});function _y(e){return!iv||!e?!1:e===document.scrollingElement}function vy(e){let t={x:0,y:0},n=_y(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var yy={x:.2,y:.2};function by(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=yy);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=vy(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=gy.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=gy.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=gy.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=gy.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function xy(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Sy(e){return e.reduce((e,t)=>Sv(e,hy(t)),Uv)}function Cy(e){return e.reduce((e,t)=>e+py(t),0)}function wy(e){return e.reduce((e,t)=>e+my(t),0)}function Ty(e,t){if(t===void 0&&(t=ay),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);dy(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Ey=[[`x`,[`left`,`right`],Cy],[`y`,[`top`,`bottom`],wy]],Dy=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=uy(t),r=Sy(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Ey)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},Oy=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function ky(e){let{EventTarget:t}=sv(e);return e instanceof t?e:dv(e)}function Ay(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var jy;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(jy||={});function My(e){e.preventDefault()}function Ny(e){e.stopPropagation()}var Py;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Py||={});var Fy={start:[Py.Space,Py.Enter],cancel:[Py.Esc],end:[Py.Space,Py.Enter,Py.Tab]},Iy=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Py.Right:return{...n,x:n.x+25};case Py.Left:return{...n,x:n.x-25};case Py.Down:return{...n,y:n.y+25};case Py.Up:return{...n,y:n.y-25}}},Ly=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Oy(dv(t)),this.windowListeners=new Oy(sv(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(jy.Resize,this.handleCancel),this.windowListeners.add(jy.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(jy.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Ty(n),t(Uv)}handleKeyDown(e){if(Tv(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Fy,coordinateGetter:a=Iy,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:Uv;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=Cv(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=vy(n),p=xy(n),m={x:Math.min(i===Py.Right?p.right-p.width/2:p.right,Math.max(i===Py.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Py.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Py.Down?p.top:p.top+p.height/2,u.y))},h=i===Py.Right&&!s||i===Py.Left&&!c,g=i===Py.Down&&!l||i===Py.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Py.Right&&e<=d.x||i===Py.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Py.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Py.Down&&e<=d.y||i===Py.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Py.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,Sv(Cv(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Ly.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=Fy,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Ry(e){return!!(e&&`distance`in e)}function zy(e){return!!(e&&`delay`in e)}var By=class{constructor(e,t,n){n===void 0&&(n=ky(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=dv(i),this.documentListeners=new Oy(this.document),this.listeners=new Oy(n),this.windowListeners=new Oy(sv(i)),this.initialCoordinates=Dv(r)??Uv,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(jy.Resize,this.handleCancel),this.windowListeners.add(jy.DragStart,My),this.windowListeners.add(jy.VisibilityChange,this.handleCancel),this.windowListeners.add(jy.ContextMenu,My),this.documentListeners.add(jy.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(zy(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Ry(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(jy.Click,Ny,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(jy.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=Dv(e)??Uv,s=Cv(n,o);if(!t&&a){if(Ry(a)){if(a.tolerance!=null&&Ay(s,a.tolerance))return this.handleCancel();if(Ay(s,a.distance))return this.handleStart()}if(zy(a)&&Ay(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Py.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Vy={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},Hy=class extends By{constructor(e){let{event:t}=e,n=dv(t.target);super(e,Vy,n)}};Hy.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Uy={move:{name:`mousemove`},end:{name:`mouseup`}},Wy;(function(e){e[e.RightClick=2]=`RightClick`})(Wy||={});var Gy=class extends By{constructor(e){super(e,Uy,dv(e.event.target))}};Gy.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Wy.RightClick?!1:(r?.({event:n}),!0)}}];var Ky={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},qy=class extends By{constructor(e){super(e,Ky)}static setup(){return window.addEventListener(Ky.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ky.move.name,e)};function e(){}}};qy.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Jy;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Jy||={});var Yy;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Yy||={});function Xy(e){let{acceleration:t,activator:n=Jy.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Yy.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Qy({delta:d,disabled:!a}),[m,h]=mv(),g=(0,S.useRef)({x:0,y:0}),_=(0,S.useRef)({x:0,y:0}),v=(0,S.useMemo)(()=>{switch(n){case Jy.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Jy.DraggableRect:return i}},[n,i,c]),y=(0,S.useRef)(null),b=(0,S.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,S.useMemo)(()=>s===Yy.TreeOrder?[...l].reverse():l,[s,l]);(0,S.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=by(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var Zy={x:{[gy.Backward]:!1,[gy.Forward]:!1},y:{[gy.Backward]:!1,[gy.Forward]:!1}};function Qy(e){let{delta:t,disabled:n}=e,r=vv(t);return gv(e=>{if(n||!r||!e)return Zy;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[gy.Backward]:e.x[gy.Backward]||i.x===-1,[gy.Forward]:e.x[gy.Forward]||i.x===1},y:{[gy.Backward]:e.y[gy.Backward]||i.y===-1,[gy.Forward]:e.y[gy.Forward]||i.y===1}}},[n,t,r])}function $y(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return gv(e=>t==null?null:r??e??null,[r,t])}function eb(e,t){return(0,S.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var tb;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(tb||={});var nb;(function(e){e.Optimized=`optimized`})(nb||={});var rb=new Map;function ib(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,S.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,S.useRef)(e),d=g(),f=hv(d),p=(0,S.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,S.useRef)(null),h=gv(t=>{if(d&&!n)return rb;if(!t||t===rb||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Dy(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,S.useEffect)(()=>{u.current=e},[e]),(0,S.useEffect)(()=>{d||p()},[n,d]),(0,S.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,S.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case tb.Always:return!1;case tb.BeforeDragging:return n;default:return!n}}}function ab(e,t){return gv(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function ob(e,t){return ab(e,t)}function sb(e){let{callback:t,disabled:n}=e,r=pv(t),i=(0,S.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,S.useEffect)(()=>()=>i?.disconnect(),[i]),i}function cb(e){let{callback:t,disabled:n}=e,r=pv(t),i=(0,S.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,S.useEffect)(()=>()=>i?.disconnect(),[i]),i}function lb(e){return new Dy(ay(e),e)}function ub(e,t,n){t===void 0&&(t=lb);let[r,i]=(0,S.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=sb({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=cb({callback:a});return fv(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function db(e){return $v(e,ab(e))}var fb=[];function pb(e){let t=(0,S.useRef)(e),n=gv(n=>e?n&&n!==fb&&e&&t.current&&e.parentNode===t.current.parentNode?n:uy(e):fb,[e]);return(0,S.useEffect)(()=>{t.current=e},[e]),n}function mb(e){let[t,n]=(0,S.useState)(null),r=(0,S.useRef)(e),i=(0,S.useCallback)(e=>{let t=fy(e.target);t&&n(e=>e?(e.set(t,hy(t)),new Map(e)):null)},[]);return(0,S.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=fy(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,hy(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{fy(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,S.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Sv(e,t),Uv):Sy(e):Uv,[e,t])}function hb(e,t){t===void 0&&(t=[]);let n=(0,S.useRef)(null);return(0,S.useEffect)(()=>{n.current=null},t),(0,S.useEffect)(()=>{let t=e!==Uv;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Cv(e,n.current):Uv}function gb(e){(0,S.useEffect)(()=>{if(!iv)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function _b(e,t){return(0,S.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function vb(e){return(0,S.useMemo)(()=>e?sy(e):null,[e])}var yb=[];function bb(e,t){t===void 0&&(t=ay);let[n]=e,r=vb(n?sv(n):null),[i,a]=(0,S.useState)(yb);function o(){a(()=>e.length?e.map(e=>_y(e)?r:new Dy(t(e),e)):yb)}let s=cb({callback:o});return fv(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function xb(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return lv(t)?t:e}function Sb(e){let{measure:t}=e,[n,r]=(0,S.useState)(null),i=cb({callback:(0,S.useCallback)(e=>{for(let{target:n}of e)if(lv(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=_v((0,S.useCallback)(e=>{let n=xb(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,S.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var Cb=[{sensor:Hy,options:{}},{sensor:Ly,options:{}}],wb={current:{}},Tb={draggable:{measure:oy},droppable:{measure:oy,strategy:tb.WhileDragging,frequency:nb.Optimized},dragOverlay:{measure:ay}},Eb=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},Db={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Eb,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Hv},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Tb,measureDroppableContainers:Hv,windowRect:null,measuringScheduled:!1},Ob={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:Hv,draggableNodes:new Map,over:null,measureDroppableContainers:Hv},kb=(0,S.createContext)(Ob),Ab=(0,S.createContext)(Db);function jb(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Eb}}}function Mb(e,t){switch(t.type){case Vv.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Vv.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Vv.DragEnd:case Vv.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Vv.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new Eb(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Vv.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new Eb(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Vv.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new Eb(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Nb(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,S.useContext)(kb),a=vv(r),o=vv(n?.id);return(0,S.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!Tv(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=Av(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function Pb(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Fb(e){return(0,S.useMemo)(()=>({draggable:{...Tb.draggable,...e?.draggable},droppable:{...Tb.droppable,...e?.droppable},dragOverlay:{...Tb.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Ib(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,S.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;fv(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=$v(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=dy(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var Lb=(0,S.createContext)({...Uv,scaleX:1,scaleY:1}),Rb;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Rb||={});var zb=(0,S.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=Cb,collisionDetection:o=Zv,measuring:s,modifiers:c,...l}=e,[u,d]=(0,S.useReducer)(Mb,void 0,jb),[f,p]=Lv(),[m,h]=(0,S.useState)(Rb.Uninitialized),g=m===Rb.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),C=(0,S.useRef)({initial:null,translated:null}),w=(0,S.useMemo)(()=>_==null?null:{id:_,data:x?.data??wb,rect:C},[_,x]),T=(0,S.useRef)(null),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(null),A=hv(l,Object.values(l)),j=bv(`DndDescribedBy`,t),M=(0,S.useMemo)(()=>b.getEnabled(),[b]),N=Fb(s),{droppableRects:ee,measureDroppableContainers:te,measuringScheduled:P}=ib(M,{dragging:g,dependencies:[y.x,y.y],config:N.droppable}),F=$y(v,_),ne=(0,S.useMemo)(()=>O?Dv(O):null,[O]),re=je(),ie=ob(F,N.draggable.measure);Ib({activeNode:_==null?null:v.get(_),config:re.layoutShiftCompensation,initialRect:ie,measure:N.draggable.measure});let I=ub(F,N.draggable.measure,ie),L=ub(F?F.parentElement:null),R=(0,S.useRef)({activatorEvent:null,active:null,activeNode:F,collisionRect:null,collisions:null,droppableRects:ee,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ae=b.getNodeFor(R.current.over?.id),oe=Sb({measure:N.dragOverlay.measure}),se=oe.nodeRef.current??F,ce=g?oe.rect??I:null,le=!!(oe.nodeRef.current&&oe.rect),ue=db(le?null:I),de=vb(se?sv(se):null),fe=pb(g?ae??F:null),pe=bb(fe),me=Pb(c,{transform:{x:y.x-ue.x,y:y.y-ue.y,scaleX:1,scaleY:1},activatorEvent:O,active:w,activeNodeRect:I,containerNodeRect:L,draggingNodeRect:ce,over:R.current.over,overlayNodeRect:oe.rect,scrollableAncestors:fe,scrollableAncestorRects:pe,windowRect:de}),he=ne?Sv(ne,y):null,ge=mb(fe),_e=hb(ge),ve=hb(ge,[I]),ye=Sv(me,_e),be=ce?ty(ce,me):null,xe=w&&be?o({active:w,collisionRect:be,droppableRects:ee,droppableContainers:M,pointerCoordinates:he}):null,Se=Jv(xe,`id`),[Ce,we]=(0,S.useState)(null),Te=Qv(le?me:Sv(me,ve),Ce?.rect??null,I),Ee=(0,S.useRef)(null),De=(0,S.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(T.current==null)return;let i=v.get(T.current);if(!i)return;let a=e.nativeEvent;Ee.current=new n({active:T.current,activeNode:i,event:a,options:r,context:R,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=A.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=A.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=T.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=A.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:C}};(0,Li.unstable_batchedUpdates)(()=>{r?.(i),h(Rb.Initializing),d({type:Vv.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),D(Ee.current),k(a)})},onMove(e){d({type:Vv.DragMove,coordinates:e})},onEnd:o(Vv.DragEnd),onCancel:o(Vv.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=R.current,o=null;if(t&&i){let{cancelDrop:s}=A.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Vv.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Vv.DragCancel)}T.current=null,(0,Li.unstable_batchedUpdates)(()=>{d({type:e}),h(Rb.Uninitialized),we(null),D(null),k(null),Ee.current=null;let t=e===Vv.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=A.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Oe=eb(a,(0,S.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(T.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},T.current=r,De(n,t))},[v,De]));gb(a),fv(()=>{I&&m===Rb.Initializing&&h(Rb.Initialized)},[I,m]),(0,S.useEffect)(()=>{let{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:i}=R.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:ye.x,y:ye.y},over:i};(0,Li.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[ye.x,ye.y]),(0,S.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=R.current;if(!e||T.current==null||!t||!i)return;let{onDragOver:a}=A.current,o=r.get(Se),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,Li.unstable_batchedUpdates)(()=>{we(s),a?.(c),f({type:`onDragOver`,event:c})})},[Se]),fv(()=>{R.current={activatorEvent:O,active:w,activeNode:F,collisionRect:be,collisions:xe,droppableRects:ee,draggableNodes:v,draggingNode:se,draggingNodeRect:ce,droppableContainers:b,over:Ce,scrollableAncestors:fe,scrollAdjustedTranslate:ye},C.current={initial:ce,translated:be}},[w,F,xe,be,v,se,ce,ee,b,Ce,fe,ye]),Xy({...re,delta:y,draggingRect:be,pointerCoordinates:he,scrollableAncestors:fe,scrollableAncestorRects:pe});let ke=(0,S.useMemo)(()=>({active:w,activeNode:F,activeNodeRect:I,activatorEvent:O,collisions:xe,containerNodeRect:L,dragOverlay:oe,draggableNodes:v,droppableContainers:b,droppableRects:ee,over:Ce,measureDroppableContainers:te,scrollableAncestors:fe,scrollableAncestorRects:pe,measuringConfiguration:N,measuringScheduled:P,windowRect:de}),[w,F,I,O,xe,L,oe,v,b,ee,Ce,te,fe,pe,N,P,de]),Ae=(0,S.useMemo)(()=>({activatorEvent:O,activators:Oe,active:w,activeNodeRect:I,ariaDescribedById:{draggable:j},dispatch:d,draggableNodes:v,over:Ce,measureDroppableContainers:te}),[O,Oe,w,I,d,j,v,Ce,te]);return S.createElement(Fv.Provider,{value:p},S.createElement(kb.Provider,{value:Ae},S.createElement(Ab.Provider,{value:ke},S.createElement(Lb.Provider,{value:Te},i)),S.createElement(Nb,{disabled:n?.restoreFocus===!1})),S.createElement(Bv,{...n,hiddenTextDescribedById:j}));function je(){let e=E?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),Bb=(0,S.createContext)(null),Vb=`button`,Hb=`Draggable`;function Ub(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=bv(Hb),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,S.useContext)(kb),{role:p=Vb,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,S.useContext)(g?Lb:Bb),[v,y]=_v(),[b,x]=_v(),C=_b(o,t),w=hv(n);return fv(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,S.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===Vb?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:C,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}var Wb=`Droppable`,Gb={timeout:25};function Kb(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=bv(Wb),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,S.useContext)(kb),u=(0,S.useRef)({disabled:n}),d=(0,S.useRef)(!1),f=(0,S.useRef)(null),p=(0,S.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...Gb,...i},_=hv(h??r),v=cb({callback:(0,S.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=_v((0,S.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=hv(t);return(0,S.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,S.useEffect)(()=>(s({type:Vv.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:Vv.UnregisterDroppable,key:a,id:r})),[r]),(0,S.useEffect)(()=>{n!==u.current.disabled&&(s({type:Vv.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function qb({task:e,onEdit:t,onDelete:n}){let{attributes:r,listeners:i,setNodeRef:a,transform:o}=Ub({id:e.id});return(0,z.jsxs)(`div`,{ref:a,style:o?{transform:Ov.Translate.toString(o)}:void 0,className:`task-card`,children:[(0,z.jsxs)(`div`,{className:`task-card-header`,children:[(0,z.jsx)(`span`,{...i,...r,className:`drag-handle`,children:(0,z.jsx)(za,{size:14})}),(0,z.jsx)(`span`,{className:`task-card-title`,children:e.subject}),(0,z.jsxs)(`div`,{className:`task-card-actions`,children:[(0,z.jsx)(`button`,{className:`btn-icon`,onClick:t,title:`编辑`,children:(0,z.jsx)(ro,{size:12})}),(0,z.jsx)(`button`,{className:`btn-icon btn-delete`,onClick:n,title:`删除`,children:(0,z.jsx)(yo,{size:12})})]})]}),e.description&&(0,z.jsx)(`p`,{className:`task-card-desc`,children:e.description}),e.blockedBy.length>0&&(0,z.jsx)(`div`,{className:`task-card-footer`,children:(0,z.jsxs)(`span`,{className:`task-blocked-badge`,children:[(0,z.jsx)(Ja,{size:10}),` 被阻塞`]})})]})}function Jb({status:e,label:t,color:n,tasks:r,onTaskEdit:i,onTaskDelete:a}){let{setNodeRef:o,isOver:s}=Kb({id:e});return(0,z.jsxs)(`div`,{ref:o,className:`kanban-column ${s?`column-over`:``}`,children:[(0,z.jsxs)(`div`,{className:`column-header`,children:[(0,z.jsx)(`span`,{className:`column-dot`,style:{backgroundColor:n}}),(0,z.jsx)(`span`,{className:`column-label`,children:t}),(0,z.jsx)(`span`,{className:`column-count`,children:r.length})]}),(0,z.jsx)(`div`,{className:`column-body`,children:r.map(e=>(0,z.jsx)(qb,{task:e,onEdit:()=>i(e),onDelete:()=>a(e.id)},e.id))})]})}var Yb={pending:{label:`未开始`,color:`#94a3b8`},in_progress:{label:`进行中`,color:`#3b82f6`},completed:{label:`已完成`,color:`#22c55e`},failed:{label:`失败`,color:`#ef4444`}},Xb={in_progress:0,pending:1,failed:2,completed:3},Zb={top:34,left:40,laneWidth:340,laneGap:24,laneInset:18,laneHeaderHeight:86,nodeWidth:300,nodeHeight:184,nodeGapY:28,bottom:44};function Qb({tasks:e,onTaskEdit:t,onTaskDelete:n}){let r=(0,S.useId)().replace(/:/g,``),i=(0,S.useMemo)(()=>$b(e,r),[e,r]);return e.length===0?(0,z.jsx)(`div`,{className:`task-dag task-dag-empty`,children:(0,z.jsxs)(`div`,{className:`dag-empty-card`,children:[(0,z.jsx)(To,{size:18}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:`还没有任务节点`}),(0,z.jsx)(`p`,{children:`创建任务后,这里会自动显示前后依赖、推进顺序和当前进展。`})]})]})}):(0,z.jsxs)(`div`,{className:`task-dag`,children:[(0,z.jsxs)(`div`,{className:`dag-summary`,children:[(0,z.jsxs)(`div`,{className:`dag-summary-copy`,children:[(0,z.jsxs)(`div`,{className:`dag-summary-title`,children:[(0,z.jsx)(To,{size:16}),(0,z.jsx)(`span`,{children:`DAG 画板`})]}),(0,z.jsx)(`p`,{children:`所有任务和依赖都放在同一块画布里,箭头从前序节点指向后续节点,方便看清路径和阻塞点。`})]}),(0,z.jsxs)(`div`,{className:`dag-metrics`,children:[(0,z.jsxs)(`span`,{className:`dag-metric`,children:[`总任务 `,e.length]}),(0,z.jsxs)(`span`,{className:`dag-metric`,children:[`依赖线 `,i.edges.length]}),(0,z.jsxs)(`span`,{className:`dag-metric dag-metric-ready`,children:[`可执行 `,i.readyCount]}),(0,z.jsxs)(`span`,{className:`dag-metric dag-metric-blocked`,children:[`阻塞中 `,i.blockedCount]}),(0,z.jsxs)(`span`,{className:`dag-metric dag-metric-done`,children:[`已完成 `,i.completedCount]}),i.failedCount>0&&(0,z.jsxs)(`span`,{className:`dag-metric dag-metric-failed`,children:[`失败 `,i.failedCount]})]})]}),(0,z.jsx)(`div`,{className:`dag-shell`,children:(0,z.jsxs)(`div`,{className:`dag-canvas`,style:{width:i.canvasWidth,height:i.canvasHeight},children:[(0,z.jsxs)(`svg`,{className:`dag-canvas-svg`,width:i.canvasWidth,height:i.canvasHeight,viewBox:`0 0 ${i.canvasWidth} ${i.canvasHeight}`,"aria-hidden":`true`,children:[(0,z.jsx)(`defs`,{children:Object.entries(Yb).map(([e,t])=>{let n=nx(r,e);return(0,z.jsx)(`marker`,{id:n,markerWidth:`10`,markerHeight:`10`,refX:`8.5`,refY:`5`,orient:`auto`,markerUnits:`userSpaceOnUse`,children:(0,z.jsx)(`path`,{d:`M 0 0 L 10 5 L 0 10 z`,fill:t.color})},n)})}),i.edges.map(e=>(0,z.jsx)(`path`,{d:e.d,fill:`none`,stroke:e.color,strokeOpacity:.72,strokeWidth:`2.5`,strokeLinecap:`round`,markerEnd:`url(#${e.markerId})`},e.id))]}),i.lanes.map(e=>(0,z.jsx)(`section`,{className:`dag-lane`,style:{left:e.x,width:e.width,height:i.canvasHeight-Zb.top*2},children:(0,z.jsxs)(`div`,{className:`dag-lane-header`,children:[(0,z.jsx)(`span`,{className:`dag-lane-index`,children:e.level===0?`起点层`:`第 ${e.level+1} 层`}),(0,z.jsx)(`h3`,{children:e.title}),(0,z.jsx)(`p`,{children:e.subtitle})]})},e.level)),i.positionedTasks.map(e=>{let r=tx(e.task);return(0,z.jsxs)(`article`,{className:`dag-node dag-node-${e.task.status}`,style:{left:e.x,top:e.y,width:e.width,minHeight:e.height},children:[(0,z.jsxs)(`div`,{className:`dag-node-toolbar`,children:[(0,z.jsxs)(`div`,{className:`dag-node-badges`,children:[(0,z.jsx)(`span`,{className:`dag-node-status dag-node-status-${e.task.status}`,style:{color:Yb[e.task.status].color},children:Yb[e.task.status].label}),(0,z.jsx)(`span`,{className:`dag-node-progress dag-node-progress-${r.tone}`,children:r.label})]}),(0,z.jsxs)(`div`,{className:`dag-node-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn-icon`,onClick:()=>t(e.task),title:`编辑任务`,children:(0,z.jsx)(ro,{size:12})}),(0,z.jsx)(`button`,{type:`button`,className:`btn-icon btn-delete`,onClick:()=>n(e.task.id),title:`删除任务`,children:(0,z.jsx)(yo,{size:12})})]})]}),(0,z.jsxs)(`button`,{type:`button`,className:`dag-node-main`,onClick:()=>t(e.task),title:`查看或编辑任务`,children:[(0,z.jsx)(`span`,{className:`dag-node-title`,children:e.task.subject}),e.task.description&&(0,z.jsx)(`span`,{className:`dag-node-desc`,children:e.task.description})]}),(0,z.jsxs)(`div`,{className:`dag-node-meta`,children:[(0,z.jsxs)(`span`,{className:`dag-node-chip`,children:[e.task.blockedBy.length>0?(0,z.jsx)(Ja,{size:11}):null,`前序 `,e.task.blockedBy.length]}),(0,z.jsxs)(`span`,{className:`dag-node-chip`,children:[`后续 `,e.task.blocks.length]})]})]},e.task.id)})]})})]})}function $b(e,t){let n=new Map(e.map(e=>[e.id,e])),r=new Map,i=new Set,a=e.filter(e=>e.status===`pending`&&e.blockedBy.length===0).length,o=e.filter(e=>e.status===`pending`&&e.blockedBy.length>0).length,s=e.filter(e=>e.status===`completed`).length,c=e.filter(e=>e.status===`failed`).length,l=e=>{let t=r.get(e);if(t!==void 0)return t;if(i.has(e))return 0;i.add(e);let a=n.get(e);if(!a)return i.delete(e),0;let o=a.blockedBy.filter(e=>n.has(e)),s=o.length===0?0:Math.max(...o.map(e=>l(e)))+1;return i.delete(e),r.set(e,s),s},u=[...e].sort((e,t)=>{let n=new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime();return n===0?e.subject.localeCompare(t.subject,`zh-CN`):n}),d=new Map(u.map((e,t)=>[e.id,t])),f=new Map,p=0;for(let e of u){let t=l(e.id);p=Math.max(p,t);let n=f.get(t)??[];n.push(e),f.set(t,n)}let m=new Map,h=[];for(let e=0;e<=p;e+=1){let t=[...f.get(e)??[]];t.sort((e,t)=>{let n=ex(e,m,d),r=ex(t,m,d);if(n!==r)return n-r;let i=Xb[e.status]-Xb[t.status];if(i!==0)return i;let a=t.blocks.length-e.blocks.length;return a===0?(d.get(e.id)??0)-(d.get(t.id)??0):a}),t.forEach((t,n)=>{m.set(t.id,e*100+n)}),h.push({level:e,tasks:t})}let g=h.map(e=>({level:e.level,x:Zb.left+e.level*(Zb.laneWidth+Zb.laneGap),width:Zb.laneWidth,title:e.level===0?`可以立即启动`:`依赖第 ${e.level} 步输出`,subtitle:e.level===0?`没有前置依赖,优先在这里开工。`:`只有当前序节点完成后,这一层的任务才会解锁。`})),_=[],v=new Map;for(let e of h){let t=Zb.left+e.level*(Zb.laneWidth+Zb.laneGap)+Zb.laneInset;e.tasks.forEach((e,n)=>{let r={task:e,x:t,y:Zb.top+Zb.laneHeaderHeight+n*(Zb.nodeHeight+Zb.nodeGapY),width:Zb.nodeWidth,height:Zb.nodeHeight};_.push(r),v.set(e.id,r)})}let y=Math.max(...h.map(e=>e.tasks.length),1),b=Zb.left*2+h.length*Zb.laneWidth+Math.max(h.length-1,0)*Zb.laneGap,x=Math.max(520,Zb.top+Zb.laneHeaderHeight+y*Zb.nodeHeight+Math.max(y-1,0)*Zb.nodeGapY+Zb.bottom);return{lanes:g,positionedTasks:_,edges:e.flatMap(e=>e.blockedBy.filter(e=>v.has(e)).map(n=>{let r=v.get(n),i=v.get(e.id),a=r.x+r.width,o=r.y+r.height/2,s=i.x,c=i.y+i.height/2,l=Math.max(Math.min((s-a)*.5,160),72),u=`M ${a} ${o} C ${a+l} ${o}, ${s-l} ${c}, ${s} ${c}`;return{id:`${n}->${e.id}`,from:n,to:e.id,color:Yb[e.status].color,markerId:nx(t,e.status),d:u}})),canvasWidth:b,canvasHeight:x,readyCount:a,blockedCount:o,completedCount:s,failedCount:c}}function ex(e,t,n){if(e.blockedBy.length===0)return n.get(e.id)??0;let r=e.blockedBy.map(e=>t.get(e)).filter(e=>e!==void 0);return r.length===0?n.get(e.id)??0:r.reduce((e,t)=>e+t,0)/r.length}function tx(e){return e.status===`completed`?{label:`已闭环`,tone:`done`}:e.status===`failed`?{label:`需处理`,tone:`failed`}:e.status===`in_progress`?{label:`推进中`,tone:`active`}:e.blockedBy.length>0?{label:`等待前序`,tone:`blocked`}:{label:`可执行`,tone:`ready`}}function nx(e,t){return`dag-arrow-${e}-${t}`}function rx({goal:e,tasks:t,loading:n,onStatusChange:r,onTaskEdit:i,onTaskAdd:a,onTaskDelete:o,onReload:s}){let[c,l]=(0,S.useState)(`board`);return(0,z.jsxs)(`div`,{className:`kanban`,children:[(0,z.jsxs)(`div`,{className:`kanban-header`,children:[(0,z.jsxs)(`div`,{className:`kanban-header-content`,children:[(0,z.jsx)(`h2`,{className:`kanban-title`,children:e.subject}),(0,z.jsx)(`p`,{className:`kanban-subtitle`,children:e.description||`暂无需求描述`})]}),(0,z.jsxs)(`div`,{className:`kanban-actions`,children:[(0,z.jsxs)(`div`,{className:`kanban-view-switch`,"aria-label":`任务视图切换`,children:[(0,z.jsx)(`button`,{type:`button`,className:`kanban-view-button ${c===`board`?`is-active`:``}`,onClick:()=>l(`board`),"aria-pressed":c===`board`,children:`看板`}),(0,z.jsx)(`button`,{type:`button`,className:`kanban-view-button ${c===`dag`?`is-active`:``}`,onClick:()=>l(`dag`),"aria-pressed":c===`dag`,children:`DAG`})]}),(0,z.jsx)(`button`,{className:`btn btn-sm`,onClick:s,title:`刷新`,children:(0,z.jsx)(so,{size:14})}),(0,z.jsxs)(`button`,{className:`btn btn-primary btn-sm`,onClick:a,children:[(0,z.jsx)(ao,{size:14}),` 新建任务`]})]})]}),n?(0,z.jsx)(`div`,{className:`kanban-loading`,children:`加载中...`}):c===`dag`?(0,z.jsx)(Qb,{tasks:t,onTaskEdit:i,onTaskDelete:o}):(0,z.jsx)(zb,{collisionDetection:Yv,onDragEnd:e=>{let{active:n,over:i}=e;if(!i)return;let a=n.id,o=i.id,s=t.find(e=>e.id===a);s&&s.status!==o&&r(a,o)},children:(0,z.jsx)(`div`,{className:`kanban-columns`,children:Object.entries(Yb).map(([e,n])=>(0,z.jsx)(Jb,{status:e,label:n.label,color:n.color,tasks:t.filter(t=>t.status===e),onTaskEdit:i,onTaskDelete:o},e))})})]})}var ix=5e3;function ax({goal:e,onGoalUpdated:t,variant:n=`inline`}){let[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!0),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(!1),p=(0,S.useRef)(null),m=(0,S.useRef)(null),h=(0,S.useRef)(!1),{data:g}=gi({queryKey:[`goals`,e.id,`context`],queryFn:()=>i_(e.id),retry:!1}),_=async()=>{try{let t=await o_(e.id);return i(t.logs),o(t.running),t.running}catch{return!1}finally{c(!1)}};(0,S.useEffect)(()=>(c(!0),i([]),_().then(e=>{p.current&&clearInterval(p.current),e&&(p.current=setInterval(_,2e3))}),()=>{p.current&&clearInterval(p.current)}),[e.id]),(0,S.useEffect)(()=>{let e=()=>{a||typeof document<`u`&&document.visibilityState!==`visible`||_()},t=window.setInterval(e,ix);return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.clearInterval(t),window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[e.id,a]),(0,S.useEffect)(()=>{m.current?.scrollIntoView({behavior:`smooth`})},[r.length]),(0,S.useEffect)(()=>{h.current&&!a&&t?.(),h.current=a},[a,t]);let v=async()=>{let t=l.trim();if(!(!t||d||a)){f(!0);try{await a_(e.id,t),u(``),o(!0),p.current&&clearInterval(p.current),p.current=setInterval(_,2e3),_()}catch(e){alert(e.message||`发送失败`)}finally{f(!1)}}};return(0,z.jsxs)(`section`,{className:`goal-chat-panel ${n===`aside`?`goal-chat-panel-aside`:``}`,children:[(0,z.jsx)(`div`,{className:`goal-chat-header`,children:(0,z.jsxs)(`div`,{className:`goal-chat-title`,children:[(0,z.jsx)(`div`,{className:`goal-chat-title-icon`,children:(0,z.jsx)(ho,{size:18})}),(0,z.jsxs)(`div`,{className:`goal-chat-title-copy`,children:[(0,z.jsx)(`h3`,{children:`需求对话`}),(0,z.jsx)(`p`,{children:`围绕当前需求继续和主智能体对话,避免在多个需求之间丢上下文。`}),g?.originPlatform===`feishu`&&(0,z.jsxs)(`div`,{className:`goal-chat-sync-badge`,children:[(0,z.jsx)(Xa,{size:12}),(0,z.jsx)(`span`,{children:`默认同步飞书`})]})]})]})}),(0,z.jsxs)(`div`,{className:`goal-chat-timeline`,children:[s&&(0,z.jsxs)(`div`,{className:`goal-chat-empty`,children:[(0,z.jsx)(qa,{size:16,className:`spin`}),` 加载中...`]}),!s&&r.length===0&&(0,z.jsx)(`div`,{className:`goal-chat-empty`,children:(0,z.jsxs)(`div`,{className:`goal-chat-empty-card`,children:[(0,z.jsx)(`div`,{className:`goal-chat-empty-icon`,children:(0,z.jsx)(wa,{size:18})}),(0,z.jsx)(`div`,{className:`goal-chat-empty-title`,children:`还没有需求级对话`}),(0,z.jsx)(`div`,{className:`goal-chat-empty-copy`,children:`你可以在这里追问“这个需求现在做到哪里了?”`})]})}),r.map(t=>(0,z.jsx)(ox,{entry:t},`${e.id}-${t.index}`)),(0,z.jsx)(`div`,{ref:m})]}),(0,z.jsxs)(`div`,{className:`goal-chat-input`,children:[(0,z.jsx)(`textarea`,{value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),v())},placeholder:a?`主智能体正在处理当前需求,请稍候...`:g?.originPlatform===`feishu`?`输入消息,主智能体会围绕当前需求继续对话,并默认同步回飞书...`:`输入消息,与主智能体围绕当前需求继续对话...`,disabled:a||d,rows:2}),(0,z.jsx)(`button`,{className:`btn-icon btn-send`,onClick:v,disabled:!l.trim()||a||d,title:`发送`,children:d?(0,z.jsx)(qa,{size:16,className:`spin`}):(0,z.jsx)(fo,{size:16})})]})]})}function ox({entry:e}){let t=e.blocks.filter(e=>e.type===`text`&&e.text).map(e=>e.text).join(`
|
|
60
|
+
`).trim(),n=e.blocks.filter(e=>e.type===`tool_use`&&e.name).map(e=>e.name);return(0,z.jsxs)(`div`,{className:`goal-chat-entry goal-chat-entry-${e.role}`,children:[(0,z.jsxs)(`div`,{className:`goal-chat-entry-header`,children:[e.role===`user`?(0,z.jsx)(Co,{size:14}):e.role===`assistant`?(0,z.jsx)(wa,{size:14}):(0,z.jsx)(ho,{size:14}),(0,z.jsx)(`span`,{children:e.role===`user`?`你`:e.role===`assistant`?`主智能体`:`系统`})]}),t&&(0,z.jsx)(`div`,{className:`goal-chat-entry-text`,children:t}),n.length>0&&(0,z.jsx)(`div`,{className:`goal-chat-tools`,children:n.map((e,t)=>(0,z.jsx)(`span`,{className:`goal-chat-tool-chip`,children:e},`${e}-${t}`))})]})}var sx=e=>(e??[]).join(`
|
|
61
|
+
`);function cx({goal:e,onClose:t,onSubmit:n}){let[r,i]=(0,S.useState)(e?.subject??``),[a,o]=(0,S.useState)(e?.description??``),[s,c]=(0,S.useState)(e?.summary??``),[l,u]=(0,S.useState)(e?.currentFocus??``),[d,f]=(0,S.useState)(e?.nextAction??``),[p,m]=(0,S.useState)(sx(e?.blockers));return typeof document>`u`?null:(0,Li.createPortal)((0,z.jsx)(`div`,{className:`modal-overlay`,onClick:t,children:(0,z.jsxs)(`div`,{className:`modal`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-header`,children:[(0,z.jsx)(`h3`,{children:e?`编辑需求`:`新建需求`}),(0,z.jsx)(`button`,{className:`btn-icon`,onClick:t,children:(0,z.jsx)(Do,{size:18})})]}),(0,z.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),r.trim()&&n({subject:r.trim(),description:a.trim()||void 0,summary:s.trim()||void 0,currentFocus:l.trim()||void 0,nextAction:d.trim()||void 0,blockers:p.split(`
|
|
62
|
+
`).map(e=>e.trim()).filter(Boolean)})},className:`modal-body`,children:[(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`标题`}),(0,z.jsx)(`input`,{autoFocus:!0,value:r,onChange:e=>i(e.target.value),placeholder:`需求标题`})]}),(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`描述`}),(0,z.jsx)(`textarea`,{value:a,onChange:e=>o(e.target.value),placeholder:`详细描述(可选)`,rows:3})]}),(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`当前摘要`}),(0,z.jsx)(`textarea`,{value:s,onChange:e=>c(e.target.value),placeholder:`一句话说明这个需求目前做到哪里了`,rows:3})]}),(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`当前重点`}),(0,z.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`现在正在推进的重点`})]}),(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`下一步`}),(0,z.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`接下来最明确的一步`})]}),(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`阻塞项`}),(0,z.jsx)(`textarea`,{value:p,onChange:e=>m(e.target.value),placeholder:`每行一个阻塞项(可选)`,rows:3})]}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn`,onClick:t,children:`取消`}),(0,z.jsx)(`button`,{type:`submit`,className:`btn btn-primary`,disabled:!r.trim(),children:e?`保存`:`创建`})]})]})]})}),document.body)}var lx=[{value:`pending`,label:`未开始`},{value:`in_progress`,label:`进行中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}];function ux({task:e,tasks:t,onClose:n,onSubmit:r}){let[i,a]=(0,S.useState)(e?.subject??``),[o,s]=(0,S.useState)(e?.description??``),[c,l]=(0,S.useState)(e?.status??`pending`),u=!!e;return typeof document>`u`?null:(0,Li.createPortal)((0,z.jsx)(`div`,{className:`modal-overlay`,onClick:n,children:(0,z.jsxs)(`div`,{className:`modal`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-header`,children:[(0,z.jsx)(`h3`,{children:u?`编辑任务`:`新建任务`}),(0,z.jsx)(`button`,{className:`btn-icon`,onClick:n,children:(0,z.jsx)(Do,{size:18})})]}),(0,z.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i.trim()&&r({subject:i.trim(),description:o.trim(),...u?{status:c}:{}})},className:`modal-body`,children:[(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`标题`}),(0,z.jsx)(`input`,{autoFocus:!0,value:i,onChange:e=>a(e.target.value),placeholder:`任务标题`})]}),(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`描述`}),(0,z.jsx)(`textarea`,{value:o,onChange:e=>s(e.target.value),placeholder:`详细描述(可选)`,rows:3})]}),u&&(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`状态`}),(0,z.jsx)(`select`,{value:c,onChange:e=>l(e.target.value),children:lx.map(e=>(0,z.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),u&&e&&e.blockedBy.length>0&&(0,z.jsxs)(`div`,{className:`form-group`,children:[(0,z.jsx)(`label`,{children:`依赖任务`}),(0,z.jsx)(`div`,{className:`dep-list`,children:e.blockedBy.map(e=>(0,z.jsx)(`span`,{className:`dep-badge`,children:t.find(t=>t.id===e)?.subject??e},e))})]}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn`,onClick:n,children:`取消`}),(0,z.jsx)(`button`,{type:`submit`,className:`btn btn-primary`,disabled:!i.trim(),children:u?`保存`:`创建`})]})]})]})}),document.body)}function dx(){let{goals:e,loading:t,reload:n,add:r,update:i,remove:a}=c_(),[o,s]=(0,S.useState)(null),{tasks:c,loading:l,add:u,updateStatus:d,update:f,remove:p,reload:m}=Q_(o),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(!0),E=e.find(e=>e.id===o);return(0,z.jsx)(R_,{className:`p-0`,children:(0,z.jsxs)(`div`,{className:`app`,children:[(0,z.jsxs)(`div`,{className:`app-body`,children:[(0,z.jsx)(rv,{goals:e,loading:t,selectedId:o,onSelect:s,onAdd:()=>{v(null),g(!0)},onEdit:e=>{v(e),g(!0)},onDelete:async e=>{await a(e),o===e&&s(null)}}),(0,z.jsx)(`main`,{className:`main-content ${E&&w?`with-detail`:``}`,children:E?(0,z.jsx)(rx,{goal:E,tasks:c,loading:l,onStatusChange:d,onTaskEdit:e=>{C(e),b(!0)},onTaskAdd:()=>{C(null),b(!0)},onTaskDelete:p,onReload:m}):(0,z.jsx)(`div`,{className:`empty-state`,children:(0,z.jsx)(`p`,{children:`选择左侧的需求目标以查看任务看板`})})}),E&&(0,z.jsxs)(`aside`,{className:`goal-chat-shell ${w?``:`is-collapsed`}`,children:[(0,z.jsx)(`button`,{className:`goal-chat-shell-toggle`,onClick:()=>T(e=>!e),title:w?`收起需求对话`:`展开需求对话`,children:w?(0,z.jsx)(to,{size:16}):(0,z.jsx)(no,{size:16})}),w&&(0,z.jsx)(ax,{goal:E,onGoalUpdated:n,variant:`aside`})]})]}),h&&(0,z.jsx)(cx,{goal:_,onClose:()=>g(!1),onSubmit:async e=>{_?await i(_.id,e):await r(e),g(!1),v(null)}}),y&&o&&(0,z.jsx)(ux,{task:x,tasks:c,onClose:()=>{b(!1),C(null)},onSubmit:async e=>{x?await f(x.id,e):await u(e.subject,e.description),b(!1),C(null),m()}})]})})}var fx=Hg(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function X({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,z.jsx)(n?No:`span`,{"data-slot":`badge`,"data-variant":t,className:J(fx({variant:t}),e),...r})}function px({className:e,type:t,...n}){return(0,z.jsx)(`input`,{type:t,"data-slot":`input`,className:J(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function mx({...e}){return(0,z.jsx)(nu,{"data-slot":`dialog`,...e})}function hx({...e}){return(0,z.jsx)(ru,{"data-slot":`dialog-portal`,...e})}function gx({className:e,...t}){return(0,z.jsx)(iu,{"data-slot":`dialog-overlay`,className:J(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function _x({className:e,children:t,showCloseButton:n=!0,...r}){return(0,z.jsxs)(hx,{children:[(0,z.jsx)(gx,{}),(0,z.jsxs)(au,{"data-slot":`dialog-content`,className:J(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,z.jsx)(cu,{"data-slot":`dialog-close`,asChild:!0,children:(0,z.jsxs)(Y,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[(0,z.jsx)(Do,{}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function vx({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`dialog-header`,className:J(`flex flex-col gap-2`,e),...t})}function yx({className:e,showCloseButton:t=!1,children:n,...r}){return(0,z.jsxs)(`div`,{"data-slot":`dialog-footer`,className:J(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,z.jsx)(cu,{asChild:!0,children:(0,z.jsx)(Y,{variant:`outline`,children:`Close`})})]})}function bx({className:e,...t}){return(0,z.jsx)(ou,{"data-slot":`dialog-title`,className:J(`font-heading text-base leading-none font-medium`,e),...t})}function xx({className:e,...t}){return(0,z.jsx)(su,{"data-slot":`dialog-description`,className:J(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function Sx(){let e=rt(),{data:t,isLoading:n,refetch:r}=v_(),i=b_(),a=x_(),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)({name:``,goalId:``,workpath:``});return(0,z.jsx)(R_,{children:(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Teams`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`管理团队及其成员,成员的信箱投递过程也统一收进团队详情里查看`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Y,{variant:`outline`,size:`sm`,onClick:()=>r(),children:(0,z.jsx)(so,{className:`h-4 w-4`})}),(0,z.jsxs)(Y,{size:`sm`,onClick:()=>s(!0),children:[(0,z.jsx)(ao,{className:`h-4 w-4 mr-1`}),`新建团队`]})]})]}),n?(0,z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:[1,2,3].map(e=>(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{className:`pb-2`,children:(0,z.jsx)(W_,{className:`h-5 w-32`})}),(0,z.jsxs)(U_,{className:`space-y-2`,children:[(0,z.jsx)(W_,{className:`h-4 w-40`}),(0,z.jsx)(W_,{className:`h-4 w-24`})]})]},e))}):!t||t.length===0?(0,z.jsx)(z_,{children:(0,z.jsx)(U_,{className:`py-12`,children:(0,z.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,z.jsx)(wo,{className:`h-10 w-10 text-muted-foreground mb-3`}),(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`暂无团队`}),(0,z.jsxs)(Y,{variant:`outline`,className:`mt-3`,size:`sm`,onClick:()=>s(!0),children:[(0,z.jsx)(ao,{className:`h-4 w-4 mr-1`}),`创建第一个团队`]})]})})}):(0,z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:t.map(t=>(0,z.jsxs)(z_,{className:`cursor-pointer hover:shadow-md transition-shadow`,onClick:()=>e(`/teams/${t.name}`),children:[(0,z.jsx)(B_,{className:`pb-2`,children:(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(V_,{className:`text-lg`,children:t.name}),(0,z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,onClick:e=>{e.stopPropagation(),l(t.name)},children:(0,z.jsx)(yo,{className:`h-4 w-4 text-muted-foreground`})})]})}),(0,z.jsx)(U_,{children:(0,z.jsxs)(`div`,{className:`space-y-2 text-sm text-muted-foreground`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(_o,{className:`h-3.5 w-3.5`}),(0,z.jsxs)(`span`,{children:[`Goal: `,t.goalId.slice(0,8),`...`]})]}),t.workpath&&(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Ia,{className:`h-3.5 w-3.5`}),(0,z.jsx)(`span`,{className:`truncate`,children:t.workpath})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(wo,{className:`h-3.5 w-3.5`}),(0,z.jsxs)(X,{variant:`secondary`,children:[t.teamMembers.length,` 成员`]})]})]})})]},t.id))}),(0,z.jsx)(mx,{open:o,onOpenChange:s,children:(0,z.jsxs)(_x,{className:`sm:max-w-md`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsx)(bx,{children:`新建团队`}),(0,z.jsx)(xx,{children:`创建一个新的工作团队`})]}),(0,z.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`团队名称`}),(0,z.jsx)(px,{value:u.name,onChange:e=>d(t=>({...t,name:e.target.value})),placeholder:`例如: frontend-team`})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`关联 Goal ID`}),(0,z.jsx)(px,{value:u.goalId,onChange:e=>d(t=>({...t,goalId:e.target.value})),placeholder:`Goal ID`})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`工作目录(可选)`}),(0,z.jsx)(px,{value:u.workpath,onChange:e=>d(t=>({...t,workpath:e.target.value})),placeholder:`/path/to/workspace`})]})]}),(0,z.jsxs)(yx,{children:[(0,z.jsx)(Y,{variant:`outline`,onClick:()=>s(!1),children:`取消`}),(0,z.jsxs)(Y,{onClick:async()=>{!u.name.trim()||!u.goalId.trim()||(await i.mutateAsync({name:u.name,goalId:u.goalId,workpath:u.workpath||void 0,teamMembers:[]}),s(!1),d({name:``,goalId:``,workpath:``}))},disabled:i.isPending||!u.name.trim()||!u.goalId.trim(),children:[i.isPending&&(0,z.jsx)(Ka,{className:`h-4 w-4 mr-1 animate-spin`}),`创建`]})]})]})}),(0,z.jsx)(mx,{open:!!c,onOpenChange:()=>l(null),children:(0,z.jsxs)(_x,{className:`sm:max-w-sm`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsx)(bx,{children:`确认删除`}),(0,z.jsxs)(xx,{children:[`删除团队 `,c,` 及其所有成员,此操作不可恢复。`]})]}),(0,z.jsxs)(yx,{children:[(0,z.jsx)(Y,{variant:`outline`,onClick:()=>l(null),children:`取消`}),(0,z.jsxs)(Y,{variant:`destructive`,onClick:async()=>{c&&(await a.mutateAsync(c),l(null))},disabled:a.isPending,children:[a.isPending&&(0,z.jsx)(Ka,{className:`h-4 w-4 mr-1 animate-spin`}),`删除`]})]})]})})]})})}function Cx(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var wx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ex={};function Dx(e,t){return((t||Ex).jsx?Tx:wx).test(e)}var Ox=/[ \t\n\f\r]/g;function kx(e){return typeof e==`object`?e.type===`text`?Ax(e.value):!1:Ax(e)}function Ax(e){return e.replace(Ox,``)===``}var jx=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};jx.prototype.normal={},jx.prototype.property={},jx.prototype.space=void 0;function Mx(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new jx(n,r,t)}function Nx(e){return e.toLowerCase()}var Px=class{constructor(e,t){this.attribute=t,this.property=e}};Px.prototype.attribute=``,Px.prototype.booleanish=!1,Px.prototype.boolean=!1,Px.prototype.commaOrSpaceSeparated=!1,Px.prototype.commaSeparated=!1,Px.prototype.defined=!1,Px.prototype.mustUseProperty=!1,Px.prototype.number=!1,Px.prototype.overloadedBoolean=!1,Px.prototype.property=``,Px.prototype.spaceSeparated=!1,Px.prototype.space=void 0;var Fx=s({boolean:()=>Z,booleanish:()=>Lx,commaOrSpaceSeparated:()=>Vx,commaSeparated:()=>Bx,number:()=>Q,overloadedBoolean:()=>Rx,spaceSeparated:()=>zx}),Ix=0,Z=Hx(),Lx=Hx(),Rx=Hx(),Q=Hx(),zx=Hx(),Bx=Hx(),Vx=Hx();function Hx(){return 2**++Ix}var Ux=Object.keys(Fx),Wx=class extends Px{constructor(e,t,n,r){let i=-1;if(super(e,t),Gx(this,`space`,r),typeof n==`number`)for(;++i<Ux.length;){let e=Ux[i];Gx(this,Ux[i],(n&Fx[e])===Fx[e])}}};Wx.prototype.defined=!0;function Gx(e,t,n){n&&(e[t]=n)}function Kx(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Wx(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Nx(r)]=r,n[Nx(a.attribute)]=r}return new jx(t,n,e.space)}var qx=Kx({properties:{ariaActiveDescendant:null,ariaAtomic:Lx,ariaAutoComplete:null,ariaBusy:Lx,ariaChecked:Lx,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:zx,ariaCurrent:null,ariaDescribedBy:zx,ariaDetails:null,ariaDisabled:Lx,ariaDropEffect:zx,ariaErrorMessage:null,ariaExpanded:Lx,ariaFlowTo:zx,ariaGrabbed:Lx,ariaHasPopup:null,ariaHidden:Lx,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:zx,ariaLevel:Q,ariaLive:null,ariaModal:Lx,ariaMultiLine:Lx,ariaMultiSelectable:Lx,ariaOrientation:null,ariaOwns:zx,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Lx,ariaReadOnly:Lx,ariaRelevant:null,ariaRequired:Lx,ariaRoleDescription:zx,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Lx,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Jx(e,t){return t in e?e[t]:t}function Yx(e,t){return Jx(e,t.toLowerCase())}var Xx=Kx({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Bx,acceptCharset:zx,accessKey:zx,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:zx,autoFocus:Z,autoPlay:Z,blocking:zx,capture:null,charSet:null,checked:Z,cite:null,className:zx,cols:Q,colSpan:null,content:null,contentEditable:Lx,controls:Z,controlsList:zx,coords:Q|Bx,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Rx,draggable:Lx,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:zx,height:Q,hidden:Rx,high:Q,href:null,hrefLang:null,htmlFor:zx,httpEquiv:zx,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:zx,itemRef:zx,itemScope:Z,itemType:zx,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,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:Z,optimum:Q,pattern:null,ping:zx,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:zx,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:zx,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Lx,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:Lx,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:zx,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Lx,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:Yx}),Zx=Kx({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`,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:Vx,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:zx,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:Bx,g2:Bx,glyphName:Bx,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Vx,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:zx,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vx,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vx,rev:Vx,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vx,requiredFeatures:Vx,requiredFonts:Vx,requiredFormats:Vx,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Vx,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vx,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vx,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Jx}),Qx=Kx({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()}}),$x=Kx({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Yx}),eS=Kx({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),tS={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`},nS=/[A-Z]/g,rS=/-[a-z]/g,iS=/^data[-\w.:]+$/i;function aS(e,t){let n=Nx(t),r=t,i=Px;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&iS.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(rS,sS);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!rS.test(e)){let n=e.replace(nS,oS);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Wx}return new i(r,t)}function oS(e){return`-`+e.toLowerCase()}function sS(e){return e.charAt(1).toUpperCase()}var cS=Mx([qx,Xx,Qx,$x,eS],`html`),lS=Mx([qx,Zx,Qx,$x,eS],`svg`);function uS(e){return e.join(` `).trim()}var dS=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,u=`
|
|
63
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),fS=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(dS());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),pS=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))}})),mS=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(fS()),r=pS();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),hS=_S(`end`),gS=_S(`start`);function _S(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 vS(e){let t=gS(e),n=hS(e);if(t&&n)return{start:t,end:n}}function yS(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?xS(e.position):`start`in e||`end`in e?xS(e):`line`in e||`column`in e?bS(e):``}function bS(e){return SS(e&&e.line)+`:`+SS(e&&e.column)}function xS(e){return bS(e&&e.start)+`-`+bS(e&&e.end)}function SS(e){return e&&typeof e==`number`?e:1}var CS=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=yS(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}};CS.prototype.file=``,CS.prototype.name=``,CS.prototype.reason=``,CS.prototype.message=``,CS.prototype.stack=``,CS.prototype.column=void 0,CS.prototype.line=void 0,CS.prototype.ancestors=void 0,CS.prototype.cause=void 0,CS.prototype.fatal=void 0,CS.prototype.place=void 0,CS.prototype.ruleId=void 0,CS.prototype.source=void 0;var wS=l(mS(),1),TS={}.hasOwnProperty,ES=new Map,DS=/[A-Z]/g,OS=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),kS=new Set([`td`,`th`]),AS=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function jS(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=HS(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=VS(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`?lS:cS,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=MS(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function MS(e,t,n){if(t.type===`element`)return NS(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return PS(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return IS(e,t,n);if(t.type===`mdxjsEsm`)return FS(e,t);if(t.type===`root`)return LS(e,t,n);if(t.type===`text`)return RS(e,t)}function NS(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=lS,e.schema=i),e.ancestors.push(t);let a=JS(e,t.tagName,!1),o=US(e,t),s=GS(e,t);return OS.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!kx(e):!0})),zS(e,o,a,t),BS(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function PS(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)}YS(e,t.position)}function FS(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);YS(e,t.position)}function IS(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=lS,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:JS(e,t.name,!0),o=WS(e,t),s=GS(e,t);return zS(e,o,a,t),BS(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function LS(e,t,n){let r={};return BS(r,GS(e,t)),e.create(t,e.Fragment,r,n)}function RS(e,t){return t.value}function zS(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function BS(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function VS(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 HS(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=gS(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 US(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&TS.call(t.properties,i)){let a=KS(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&kS.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 WS(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 YS(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 YS(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function GS(e,t){let n=[],r=-1,i=e.passKeys?new Map:ES;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=MS(e,a,o);s!==void 0&&n.push(s)}return n}function KS(e,t,n){let r=aS(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Cx(n):uS(n)),r.property===`style`){let t=typeof n==`object`?n:qS(e,String(n));return e.stylePropertyNameCase===`css`&&(t=XS(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?tS[r.property]||r.property:r.attribute,n]}}function qS(e,t){try{return(0,wS.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new CS("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=AS+`#cannot-parse-style-attribute`,r}}function JS(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=Dx(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=Dx(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return TS.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);YS(e)}function YS(e,t){let n=new CS("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=AS+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function XS(e){let t={},n;for(n in e)TS.call(e,n)&&(t[ZS(n)]=e[n]);return t}function ZS(e){let t=e.replace(DS,QS);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function QS(e){return`-`+e.toLowerCase()}var $S={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`]},eC={};function tC(e,t){let n=t||eC;return nC(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function nC(e,t,n){if(iC(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 rC(e.children,t,n)}return Array.isArray(e)?rC(e,t,n):``}function rC(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=nC(e[i],t,n);return r.join(``)}function iC(e){return!!(e&&typeof e==`object`)}var aC=document.createElement(`i`);function oC(e){let t=`&`+e+`;`;aC.innerHTML=t;let n=aC.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function sC(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 cC(e,t){return e.length>0?(sC(e,e.length,0,t),e):t}var lC={}.hasOwnProperty;function uC(e){let t={},n=-1;for(;++n<e.length;)dC(t,e[n]);return t}function dC(e,t){let n;for(n in t){let r=(lC.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){lC.call(r,a)||(r[a]=[]);let e=i[a];fC(r[a],Array.isArray(e)?e:e?[e]:[])}}}function fC(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);sC(e,0,0,r)}function pC(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 mC(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var hC=EC(/[A-Za-z]/),gC=EC(/[\dA-Za-z]/),_C=EC(/[#-'*+\--9=?A-Z^-~]/);function vC(e){return e!==null&&(e<32||e===127)}var yC=EC(/\d/),bC=EC(/[\dA-Fa-f]/),xC=EC(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function SC(e){return e!==null&&(e<0||e===32)}function CC(e){return e===-2||e===-1||e===32}var wC=EC(/\p{P}|\p{S}/u),TC=EC(/\s/);function EC(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function DC(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&gC(e.charCodeAt(n+1))&&gC(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 OC(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return CC(r)?(e.enter(n),s(r)):t(r)}function s(r){return CC(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var kC={tokenize:AC};function AC(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),OC(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);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var jC={tokenize:NC},MC={tokenize:PC};function NC(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++;return sC(t.events,a+1,0,t.events.slice(n)),t.events.length=s,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(MC,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(MC,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);return}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);return}return $(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++;sC(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}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 PC(e,t,n){return OC(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function FC(e){if(e===null||SC(e)||TC(e))return 1;if(wC(e))return 2}function IC(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 LC={name:`attention`,resolveAll:RC,tokenize:zC};function RC(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};BC(d,-c),BC(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=cC(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=cC(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=cC(l,IC(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=cC(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=cC(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,sC(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function zC(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=FC(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=FC(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function BC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var VC={name:`autolink`,tokenize:HC};function HC(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 hC(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||gC(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||gC(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||vC(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):_C(t)?(e.consume(t),l):n(t)}function u(e){return gC(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||gC(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var UC={partial:!0,tokenize:WC};function WC(e,t,n){return r;function r(t){return CC(t)?OC(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var GC={continuation:{tokenize:qC},exit:JC,name:`blockQuote`,tokenize:KC};function KC(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 CC(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function qC(e,t,n){let r=this;return i;function i(t){return CC(t)?OC(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(GC,t,n)(r)}}function JC(e){e.exit(`blockQuote`)}var YC={name:`characterEscape`,tokenize:XC};function XC(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 xC(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var ZC={name:`characterReference`,tokenize:QC};function QC(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=gC,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=bC,u):(e.enter(`characterReferenceValue`),a=7,o=yC,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===gC&&!oC(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 $C={partial:!0,tokenize:nw},ew={concrete:!0,name:`codeFenced`,tokenize:tw};function tw(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`),CC(t)?OC(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check($C,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):CC(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),OC(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(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&&CC(t)?OC(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check($C,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(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`),CC(t)?OC(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`),CC(t)?OC(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function nw(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 rw={name:`codeIndented`,tokenize:aw},iw={partial:!0,tokenize:ow};function aw(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),OC(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(iw,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ow(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):OC(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var sw={name:`codeText`,previous:lw,resolve:cw,tokenize:uw};function cw(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 lw(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function uw(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)):$(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||$(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 dw=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&&fw(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),fw(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),fw(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);fw(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);fw(this.left,t.reverse())}}};function fw(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 pw(e){let t={},n=-1,r,i,a,o,s,c,l,u=new dw(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,mw(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 sC(e,0,1/0,u.slice(0)),!l}function mw(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 hw={resolve:_w,tokenize:vw},gw={partial:!0,tokenize:yw};function _w(e){return pw(e),e}function vw(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):$(t)?e.check(gw,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 yw(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),OC(e,a,`linePrefix`)}function a(i){if(i===null||$(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 bw(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||vC(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||$(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||SC(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||vC(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 xw(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):$(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||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!CC(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Sw(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):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),OC(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(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 Cw(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):CC(i)?OC(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ww={name:`definition`,tokenize:Ew},Tw={partial:!0,tokenize:Dw};function Ew(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return xw.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=mC(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 SC(t)?Cw(e,l)(t):l(t)}function l(t){return bw(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Tw,d,d)(t)}function d(t){return CC(t)?OC(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Dw(e,t,n){return r;function r(t){return SC(t)?Cw(e,i)(t):n(t)}function i(t){return Sw(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return CC(t)?OC(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var Ow={name:`hardBreakEscape`,tokenize:kw};function kw(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Aw={name:`headingAtx`,resolve:jw,tokenize:Mw};function jw(e,t){let n=e.length-2,r=3,i,a;return 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&&(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`},sC(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Mw(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||SC(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):CC(n)?OC(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||SC(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Nw=`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(`.`),Pw=[`pre`,`script`,`style`,`textarea`],Fw={concrete:!0,name:`htmlFlow`,resolveTo:Rw,tokenize:zw},Iw={partial:!0,tokenize:Vw},Lw={partial:!0,tokenize:Bw};function Rw(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 zw(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:P):hC(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):hC(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):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 hC(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||SC(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Pw.includes(l)?(i=1,r.interrupt?t(s):O(s)):Nw.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||gC(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 CC(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||hC(t)?(e.consume(t),b):CC(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||gC(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):CC(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):CC(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(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||SC(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||CC(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):CC(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Iw,ne,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Lw,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),P):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return Pw.includes(n)?(e.consume(t),F):O(t)}return hC(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||$(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function Bw(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Vw(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(UC,t,n)}}var Hw={name:`htmlText`,tokenize:Uw};function Uw(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):hC(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):hC(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):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(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):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return hC(t)?(e.consume(t),S):n(t)}function S(t){return t===45||gC(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):CC(t)?(e.consume(t),C):M(t)}function w(t){return t===45||gC(t)?(e.consume(t),w):t===47||t===62||SC(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||hC(t)?(e.consume(t),E):$(t)?(o=T,N(t)):CC(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||gC(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):CC(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,k):$(t)?(o=O,N(t)):CC(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||SC(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||SC(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return CC(t)?OC(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var Ww={name:`labelEnd`,resolveAll:Jw,resolveTo:Yw,tokenize:Xw},Gw={tokenize:Zw},Kw={tokenize:Qw},qw={tokenize:$w};function Jw(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&&sC(e,0,e.length,n),e}function Yw(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=cC(s,e.slice(a+1,a+r+3)),s=cC(s,[[`enter`,u,t]]),s=cC(s,IC(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=cC(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=cC(s,e.slice(o+1)),s=cC(s,[[`exit`,c,t]]),sC(e,a,e.length,s),e}function Xw(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(mC(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(Gw,u,o?u:d)(t):t===91?e.attempt(Kw,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(qw,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Zw(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 SC(t)?Cw(e,a)(t):a(t)}function a(t){return t===41?u(t):bw(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return SC(t)?Cw(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Sw(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return SC(t)?Cw(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 Qw(e,t,n){let r=this;return i;function i(t){return xw.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(mC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function $w(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 eT={name:`labelStartImage`,resolveAll:Ww.resolveAll,tokenize:tT};function tT(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var nT={name:`labelStartLink`,resolveAll:Ww.resolveAll,tokenize:rT};function rT(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var iT={name:`lineEnding`,tokenize:aT};function aT(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),OC(e,t,`linePrefix`)}}var oT={name:`thematicBreak`,tokenize:sT};function sT(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||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),CC(t)?OC(e,s,`whitespace`)(t):s(t))}}var cT={continuation:{tokenize:fT},exit:mT,name:`list`,tokenize:dT},lT={partial:!0,tokenize:hT},uT={partial:!0,tokenize:pT};function dT(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:yC(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(oT,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 yC(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(UC,r.interrupt?n:u,e.attempt(lT,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return CC(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 fT(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(UC,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,OC(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!CC(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(uT,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,OC(e,e.attempt(cT,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function pT(e,t,n){let r=this;return OC(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 mT(e){e.exit(this.containerState.type)}function hT(e,t,n){let r=this;return OC(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!CC(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var gT={name:`setextUnderline`,resolveTo:_T,tokenize:vT};function _T(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function vT(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`),CC(t)?OC(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var yT={tokenize:bT};function bT(e){let t=this,n=e.attempt(UC,r,e.attempt(this.parser.constructs.flowInitial,i,OC(e,e.attempt(this.parser.constructs.flow,i,e.attempt(hw,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var xT={resolveAll:TT()},ST=wT(`string`),CT=wT(`text`);function wT(e){return{resolveAll:TT(e===`text`?ET: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);return}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 TT(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 ET(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var DT=s({attentionMarkers:()=>FT,contentInitial:()=>kT,disable:()=>IT,document:()=>OT,flow:()=>jT,flowInitial:()=>AT,insideSpan:()=>PT,string:()=>MT,text:()=>NT}),OT={42:cT,43:cT,45:cT,48:cT,49:cT,50:cT,51:cT,52:cT,53:cT,54:cT,55:cT,56:cT,57:cT,62:GC},kT={91:ww},AT={[-2]:rw,[-1]:rw,32:rw},jT={35:Aw,42:oT,45:[gT,oT],60:Fw,61:gT,95:oT,96:ew,126:ew},MT={38:ZC,92:YC},NT={[-5]:iT,[-4]:iT,[-3]:iT,33:eT,38:ZC,42:LC,60:[VC,Hw],91:nT,92:[Ow,YC],93:Ww,95:LC,96:sw},PT={null:[LC,xT]},FT={null:[42,95]},IT={null:[]};function LT(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=cC(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=IC(a,l.events,l),l.events):[]}function f(e,t){return zT(p(e),t)}function p(e){return RT(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(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(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&&sC(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 RT(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 zT(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=`
|
|
64
|
+
`;break;case-3:o=`\r
|
|
65
|
+
`;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 BT(e){let t={constructs:uC([DT,...(e||{}).extensions||[]]),content:n(kC),defined:[],document:n(jC),flow:n(yT),lazy:{},string:n(ST),text:n(CT)};return t;function n(e){return n;function n(n){return LT(t,e,n)}}}function VT(e){for(;!pw(e););return e}var HT=/[\0\t\n\r]/g;function UT(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(HT.lastIndex=u,c=HT.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var WT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function GT(e){return e.replace(WT,KT)}function KT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return pC(n.slice(t?2:1),t?16:10)}return oC(n)||e}var qT={}.hasOwnProperty;function JT(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),YT(n)(VT(BT(n).document().write(UT()(e,t,!0))))}function YT(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ge),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(fe),blockQuote:a(se),characterEscape:T,characterReference:T,codeFenced:a(ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ce,o),codeText:a(le,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:T,htmlText:a(me,o),htmlTextData:T,image:a(he),label:o,link:a(ge),listItem:a(ve),listItemValue:f,listOrdered:a(_e,d),listUnordered:a(_e),paragraph:a(ye),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(be),thematicBreak:a(Se)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:I,characterReferenceMarkerNumeric:I,characterReferenceValue:L,characterReference:R,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:te,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:P,resourceTitleString:F,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};ZT(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];qT.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||$T).call(a,void 0,e[0])}for(r.position={start:XT(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:XT(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;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 i=r;for(s=void 0;i--;){let t=e[i];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=i}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),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(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:XT(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||$T).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+yS({start:e.start,end:e.end})+`): it’s not open`);n.position.end=XT(e.end)}function u(){return tC(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(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 p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){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 _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=mC(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:XT(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=XT(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=XT(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){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 N(){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 ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=GT(t),n.identifier=mC(t).toLowerCase()}function te(){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 P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=mC(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function I(e){this.data.characterReferenceType=e.type}function L(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=pC(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=oC(t);let i=this.stack[this.stack.length-1];i.value+=r}function R(e){let t=this.stack.pop();t.position.end=XT(e.end)}function ae(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function le(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ye(){return{type:`paragraph`,children:[]}}function be(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function XT(e){return{line:e.line,column:e.column,offset:e.offset}}function ZT(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ZT(e,r):QT(e,r)}}function QT(e,t){let n;for(n in t)if(qT.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`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function $T(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+yS({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yS({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+yS({start:t.start,end:t.end})+`) is still open`)}function eE(e){let t=this;t.parser=n;function n(n){return JT(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function tE(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 nE(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
66
|
+
`}]}function rE(e,t){let n=t.value?t.value+`
|
|
67
|
+
`:``,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 iE(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aE(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oE(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=DC(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 sE(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 cE(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function lE(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 uE(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lE(e,t);let i={src:DC(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 dE(e,t){let n={src:DC(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 fE(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 pE(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lE(e,t);let i={href:DC(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 mE(e,t){let n={href:DC(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 hE(e,t,n){let r=e.all(t),i=n?gE(n):_E(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:`
|
|
68
|
+
`}),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:`
|
|
69
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function gE(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=_E(n[r])}return t}function _E(e){return e.spread??e.children.length>1}function vE(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 yE(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bE(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function xE(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SE(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=gS(t.children[1]),o=hS(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 CE(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 wE(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var TE=9,EE=32;function DE(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(OE(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(OE(t.slice(i),i>0,!1)),a.join(``)}function OE(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===TE||t===EE;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===TE||t===EE;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function kE(e,t){let n={type:`text`,value:DE(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function AE(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var jE={blockquote:tE,break:nE,code:rE,delete:iE,emphasis:aE,footnoteReference:oE,heading:sE,html:cE,imageReference:uE,image:dE,inlineCode:fE,linkReference:pE,link:mE,listItem:hE,list:vE,paragraph:yE,root:bE,strong:xE,table:SE,tableCell:wE,tableRow:CE,text:kE,thematicBreak:AE,toml:ME,yaml:ME,definition:ME,footnoteDefinition:ME};function ME(){}var NE=typeof self==`object`?self:globalThis,PE=(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)e[r(t)]=r(n);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(new NE[e](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)}}return n(new NE[a](o),i)};return r},FE=e=>PE(new Map,e)(0),IE=``,{toString:LE}={},{keys:RE}=Object,zE=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=LE.call(e).slice(8,-1);switch(n){case`Array`:return[1,IE];case`Object`:return[2,IE];case`Date`:return[3,IE];case`RegExp`:return[4,IE];case`Map`:return[5,IE];case`Set`:return[6,IE];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},BE=([e,t])=>e===0&&(t===`function`||t===`symbol`),VE=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=zE(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of RE(r))(e||!BE(zE(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(BE(zE(n))||BE(zE(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!BE(zE(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},HE=(e,{json:t,lossy:n}={})=>{let r=[];return VE(!(t||n),!!t,new Map,r)(e),r},UE=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?FE(HE(e,t)):structuredClone(e):(e,t)=>FE(HE(e,t));function WE(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 GE(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function KE(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||WE,r=e.options.footnoteBackLabel||GE,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=DC(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:{...UE(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
70
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
71
|
+
`}]}}var qE=(function(e){if(e==null)return QE;if(typeof e==`function`)return ZE(e);if(typeof e==`object`)return Array.isArray(e)?JE(e):YE(e);if(typeof e==`string`)return XE(e);throw Error(`Expected function, string, or object as test`)});function JE(e){let t=[],n=-1;for(;++n<e.length;)t[n]=qE(e[n]);return ZE(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function YE(e){let t=e;return ZE(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function XE(e){return ZE(t);function t(t){return t&&t.type===e}}function ZE(e){return t;function t(t,n,r){return!!($E(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function QE(){return!0}function $E(e){return typeof e==`object`&&!!e&&`type`in e}function eD(e){return e}var tD=[];function nD(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=qE(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 (`+eD(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=tD,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=rD(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 rD(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?tD:[e]}function iD(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),nD(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 aD={}.hasOwnProperty,oD={};function sD(e,t){let n=t||oD,r=new Map,i=new Map,a={all:s,applyData:lD,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...jE,...n.handlers},one:o,options:n,patch:cD,wrap:dD};return iD(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(aD.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=UE(n);return r.children=a.all(e),r}return UE(e)}return(a.options.unknownHandler||uD)(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=fD(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=fD(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function cD(e,t){e.position&&(t.position=vS(e))}function lD(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,UE(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function uD(e,t){let n=t.data||{},r=`value`in t&&!(aD.call(n,`hProperties`)||aD.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 dD(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
72
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
73
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
74
|
+
`}),n}function fD(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function pD(e,t){let n=sD(e,t),r=n.one(e,void 0),i=KE(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
75
|
+
`},i)),a}function mD(e,t){return e&&`run`in e?async function(n,r){let i=pD(n,{file:r,...t});await e.run(i,r)}:function(n,r){return pD(n,{file:r,...e||t})}}function hD(e){if(e)throw e}var gD=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 _D(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 vD(){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);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?yD(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 yD(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 bD={basename:xD,dirname:SD,extname:CD,join:wD,sep:`/`};function xD(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);DD(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 SD(e){if(DD(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 CD(e){DD(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}continue}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 wD(...e){let t=-1,n;for(;++t<e.length;)DD(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:TD(n)}function TD(e){DD(e);let t=e.codePointAt(0)===47,n=ED(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ED(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 DD(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var OD={cwd:kD};function kD(){return`/`}function AD(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function jD(e){if(typeof e==`string`)e=new URL(e);else if(!AD(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 MD(e)}function MD(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 ND=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],PD=class{constructor(e){let t;t=e?AD(e)?{path:e}:typeof e==`string`||RD(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:OD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<ND.length;){let e=ND[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)ND.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?bD.basename(this.path):void 0}set basename(e){ID(e,`basename`),FD(e,`basename`),this.path=bD.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?bD.dirname(this.path):void 0}set dirname(e){LD(this.basename,`dirname`),this.path=bD.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?bD.extname(this.path):void 0}set extname(e){if(FD(e,`extname`),LD(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=bD.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){AD(e)&&(e=jD(e)),ID(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?bD.basename(this.path,this.extname):void 0}set stem(e){ID(e,`stem`),FD(e,`stem`),this.path=bD.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 CS(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 FD(e,t){if(e&&e.includes(bD.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+bD.sep+"`")}function ID(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function LD(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function RD(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var zD=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),BD=l(gD(),1),VD={}.hasOwnProperty,HD=new class e extends zD{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=vD()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,BD.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(GD(`data`,this.frozen),this.namespace[e]=t,this):VD.call(this.namespace,e)&&this.namespace[e]||void 0:e?(GD(`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=JD(e),n=this.parser||this.Parser;return UD(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),UD(`process`,this.parser||this.Parser),WD(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=JD(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);XD(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(),UD(`processSync`,this.parser||this.Parser),WD(`processSync`,this.compiler||this.Compiler),this.process(e,r),qD(`processSync`,`process`,t),n;function r(e,r){t=!0,hD(e),n=r}}run(e,t,n){KD(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=JD(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),qD(`runSync`,`run`,n),r;function i(e,t){hD(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=JD(t),r=this.compiler||this.Compiler;return WD(`stringify`,r),KD(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(GD(`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,BD.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];_D(o)&&_D(r)&&(r=(0,BD.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function UD(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function WD(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function GD(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 KD(e){if(!_D(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function qD(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function JD(e){return YD(e)?e:new PD(e)}function YD(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function XD(e){return typeof e==`string`||ZD(e)}function ZD(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var QD=[],$D={allowDangerousHtml:!0},eO=/^(https?|ircs?|mailto|xmpp)$/i,tO=[{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 nO(e){let t=rO(e),n=iO(e);return aO(t.runSync(t.parse(n),n),e)}function rO(e){let t=e.rehypePlugins||QD,n=e.remarkPlugins||QD,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$D}:$D;return HD().use(eE).use(n).use(mD,r).use(t)}function iO(e){let t=e.children||``,n=new PD;return typeof t==`string`?n.value=t:``+t,n}function aO(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||oO;for(let e of tO)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return iD(e,l),jS(e,{Fragment:z.Fragment,components:i,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.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 $S)if(Object.hasOwn($S,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=$S[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 oO(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||eO.test(e.slice(0,t))?e:``}function sO(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 cO(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function lO(e,t,n){let r=qE((n||{}).ignore||[]),i=uO(t),a=-1;for(;++a<i.length;)nD(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:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function uO(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([dO(e[0]),fO(e[1])])}return t}function dO(e){return typeof e==`string`?new RegExp(cO(e),`g`):e}function fO(e){return typeof e==`function`?e:function(){return e}}var pO=`phrasing`,mO=[`autolink`,`link`,`image`,`label`];function hO(){return{transforms:[CO],enter:{literalAutolink:_O,literalAutolinkEmail:vO,literalAutolinkHttp:vO,literalAutolinkWww:vO},exit:{literalAutolink:SO,literalAutolinkEmail:xO,literalAutolinkHttp:yO,literalAutolinkWww:bO}}}function gO(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:pO,notInConstruct:mO},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:pO,notInConstruct:mO},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:pO,notInConstruct:mO}]}}function _O(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function vO(e){this.config.enter.autolinkProtocol.call(this,e)}function yO(e){this.config.exit.autolinkProtocol.call(this,e)}function bO(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 xO(e){this.config.exit.autolinkEmail.call(this,e)}function SO(e){this.exit(e)}function CO(e){lO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,wO],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,TO]],{ignore:[`link`,`linkReference`]})}function wO(e,t,n,r,i){let a=``;if(!OO(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!EO(n)))return!1;let o=DO(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 TO(e,t,n,r){return!OO(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function EO(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 DO(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=sO(e,`(`),a=sO(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 OO(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||TC(n)||wC(n))&&(!t||n!==47)}RO.peek=LO;function kO(){this.buffer()}function AO(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function jO(){this.buffer()}function MO(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function NO(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function PO(e){this.exit(e)}function FO(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function IO(e){this.exit(e)}function LO(){return`[`}function RO(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 zO(){return{enter:{gfmFootnoteCallString:kO,gfmFootnoteCall:AO,gfmFootnoteDefinitionLabelString:jO,gfmFootnoteDefinition:MO},exit:{gfmFootnoteCallString:NO,gfmFootnoteCall:PO,gfmFootnoteDefinitionLabelString:FO,gfmFootnoteDefinition:IO}}}function BO(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:RO},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?`
|
|
76
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?HO:VO))),s(),o}}function VO(e,t,n){return t===0?e:HO(e,t,n)}function HO(e,t,n){return(n?``:` `)+e}var UO=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];JO.peek=YO;function WO(){return{canContainEols:[`delete`],enter:{strikethrough:KO},exit:{strikethrough:qO}}}function GO(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:UO}],handlers:{delete:JO}}}function KO(e){this.enter({type:`delete`,children:[]},e)}function qO(e){this.exit(e)}function JO(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function YO(){return`~`}function XO(e){return e.length}function ZO(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||XO,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=QO(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]=$O(r[d]);else{let e=$O(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(`
|
|
77
|
+
`)}function QO(e){return e==null?``:String(e)}function $O(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}function ek(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()),tk);return i(),o}function tk(e,t,n){return`>`+(n?``:` `)+e}function nk(e,t){return rk(e,t.inConstruct,!0)&&!rk(e,t.notInConstruct,!1)}function rk(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 ik(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
78
|
+
`&&nk(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
79
|
+
`}function ak(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 ok(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function sk(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ck(e,t,n,r){let i=sk(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(ok(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,lk);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(ak(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
80
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
81
|
+
`),a&&(u+=s.move(a+`
|
|
82
|
+
`)),u+=s.move(c),l(),u}function lk(e,t,n){return(n?``:` `)+e}function uk(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function dk(e,t,n,r){let i=uk(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?` `:`
|
|
83
|
+
`,...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 fk(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function pk(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function mk(e,t,n){let r=FC(e),i=FC(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}hk.peek=gk;function hk(e,t,n,r){let i=fk(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=mk(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=pk(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=mk(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+pk(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function gk(e,t,n){return n.options.emphasis||`*`}function _k(e,t){let n=!1;return iD(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)&&tC(e)&&(t.options.setext||n))}function vk(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(_k(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
84
|
+
`,after:`
|
|
85
|
+
`});return r(),t(),o+`
|
|
86
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
87
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
88
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=pk(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}yk.peek=bk;function yk(e){return e.value||``}function bk(){return`<`}xk.peek=Sk;function xk(e,t,n,r){let i=uk(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 Sk(){return`!`}Ck.peek=wk;function Ck(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=[],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 wk(){return`!`}Tk.peek=Ek;function Tk(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)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 Ek(){return"`"}function Dk(e,t){let n=tC(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))}Ok.peek=kk;function Ok(e,t,n,r){let i=uk(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Dk(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let 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 kk(e,t,n){return Dk(e,n)?`<`:`[`}Ak.peek=jk;function Ak(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=[],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 jk(){return`[`}function Mk(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 Nk(e){let t=Mk(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 Pk(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Fk(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 Ik(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Pk(n):Mk(n),s=e.ordered?o===`.`?`)`:`.`:Nk(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),Fk(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 Lk(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 Rk(e,t,n,r){let i=Lk(n),a=n.bulletCurrent||Mk(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 zk(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Bk=qE([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Vk(e,t,n,r){return(e.children.some(function(e){return Bk(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Hk(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Uk.peek=Wk;function Uk(e,t,n,r){let i=Hk(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=mk(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=pk(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=mk(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+pk(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Wk(e,t,n){return n.options.strong||`*`}function Gk(e,t,n,r){return n.safe(e.value,r)}function Kk(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 qk(e,t,n){let r=(Fk(n)+(n.options.ruleSpaces?` `:``)).repeat(Kk(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Jk={blockquote:ek,break:ik,code:ck,definition:dk,emphasis:hk,hardBreak:ik,heading:vk,html:yk,image:xk,imageReference:Ck,inlineCode:Tk,link:Ok,linkReference:Ak,list:Ik,listItem:Rk,paragraph:zk,root:Vk,strong:Uk,text:Gk,thematicBreak:qk};function Yk(){return{enter:{table:Xk,tableData:eA,tableHeader:eA,tableRow:Qk},exit:{codeText:tA,table:Zk,tableData:$k,tableHeader:$k,tableRow:$k}}}function Xk(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 Zk(e){this.exit(e),this.data.inTable=void 0}function Qk(e){this.enter({type:`tableRow`,children:[]},e)}function $k(e){this.exit(e)}function eA(e){this.enter({type:`tableCell`,children:[]},e)}function tA(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,nA));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function nA(e,t){return t===`|`?t:e}function rA(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
89
|
+
`,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(`
|
|
90
|
+
`))}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 ZO(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=Jk.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function iA(){return{exit:{taskListCheckValueChecked:oA,taskListCheckValueUnchecked:oA,paragraph:sA}}}function aA(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:cA}}}function oA(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function sA(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 cA(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=Jk.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 lA(){return[hO(),zO(),WO(),Yk(),iA()]}function uA(e){return{extensions:[gO(),BO(e),GO(),rA(e),aA()]}}var dA={tokenize:TA,partial:!0},fA={tokenize:EA,partial:!0},pA={tokenize:DA,partial:!0},mA={tokenize:OA,partial:!0},hA={tokenize:kA,partial:!0},gA={name:`wwwAutolink`,tokenize:CA,previous:AA},_A={name:`protocolAutolink`,tokenize:wA,previous:jA},vA={name:`emailAutolink`,tokenize:SA,previous:MA},yA={};function bA(){return{text:yA}}for(var xA=48;xA<123;)yA[xA]=vA,xA++,xA===58?xA=65:xA===91&&(xA=97);yA[43]=vA,yA[45]=vA,yA[46]=vA,yA[95]=vA,yA[72]=[vA,_A],yA[104]=[vA,_A],yA[87]=[vA,gA],yA[119]=[vA,gA];function SA(e,t,n){let r=this,i,a;return o;function o(t){return!NA(t)||!MA.call(r,r.previous)||PA(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return NA(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(hA,u,l)(t):t===45||t===95||gC(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&&hC(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function CA(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!AA.call(r,r.previous)||PA(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(dA,e.attempt(fA,e.attempt(pA,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function wA(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&jA.call(r,r.previous)&&!PA(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(hC(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||vC(t)||SC(t)||TC(t)||wC(t)?n(t):e.attempt(fA,e.attempt(pA,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function TA(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 EA(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(mA,c,s)(t):t===null||SC(t)||TC(t)||t!==45&&wC(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 DA(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(mA,t,a)(o):o===null||SC(o)||TC(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function OA(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||SC(o)||TC(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||SC(e)||TC(e)?t(e):r(e)}function a(e){return hC(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):hC(t)?(e.consume(t),o):n(t)}}function kA(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return gC(e)?n(e):t(e)}}function AA(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||SC(e)}function jA(e){return!hC(e)}function MA(e){return!(e===47||NA(e))}function NA(e){return e===43||e===45||e===46||e===95||gC(e)}function PA(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 FA={tokenize:UA,partial:!0};function IA(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:BA,continuation:{tokenize:VA},exit:HA}},text:{91:{name:`gfmFootnoteCall`,tokenize:zA},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:LA,resolveTo:RA}}}}function LA(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=mC(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 RA(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 zA(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||SC(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(mC(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return SC(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 BA(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||SC(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=mC(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return SC(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),OC(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function VA(e,t,n){return e.check(UC,t,e.attempt(FA,t,n))}function HA(e){e.exit(`gfmFootnoteDefinition`)}function UA(e,t,n){let r=this;return OC(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 WA(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&&sC(o,o.length,0,IC(s,e.slice(r+1,n),t)),sC(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),sC(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=FC(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=FC(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var GA=class{constructor(){this.map=[]}add(e,t,n){KA(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}};function KA(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function qA(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 JA(){return{flow:{null:{name:`table`,tokenize:YA,resolveAll:XA}}}}function YA(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 e=r.events[t][1].type;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?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):CC(t)?OC(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||SC(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,CC(t)?OC(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 CC(t)?OC(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||$(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 CC(t)?OC(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(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||$(n)?(e.exit(`tableRow`),t(n)):CC(n)?OC(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||SC(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 XA(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 GA;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(QA(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=ZA(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=ZA(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=ZA(f,t,o,i,n,d)):(o[0]=o[1],d=ZA(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&QA(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=qA(t.events,n))}return e}function ZA(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},$A(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=$A(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=$A(t.events,n[2]),a=$A(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({},$A(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function QA(e,t,n,r,i){let a=[],o=$A(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 $A(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var ej={name:`tasklistCheck`,tokenize:nj};function tj(){return{text:{91:ej}}}function nj(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 SC(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 $(r)?t(r):CC(r)?e.check({tokenize:rj},t,n)(r):n(r)}}function rj(e,t,n){return OC(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function ij(e){return uC([bA(),IA(),WA(e),JA(),tj()])}var aj={};function oj(e){let t=this,n=e||aj,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(ij(n)),a.push(lA()),o.push(uA(n))}var sj={h1:({className:e,...t})=>(0,z.jsx)(`h1`,{className:J(`text-lg font-semibold tracking-tight`,e),...t}),h2:({className:e,...t})=>(0,z.jsx)(`h2`,{className:J(`text-base font-semibold tracking-tight`,e),...t}),h3:({className:e,...t})=>(0,z.jsx)(`h3`,{className:J(`text-sm font-semibold tracking-tight`,e),...t}),p:({className:e,...t})=>(0,z.jsx)(`p`,{className:J(`my-0`,e),...t}),ul:({className:e,...t})=>(0,z.jsx)(`ul`,{className:J(`my-0 ml-5 list-disc space-y-1.5`,e),...t}),ol:({className:e,...t})=>(0,z.jsx)(`ol`,{className:J(`my-0 ml-5 list-decimal space-y-1.5`,e),...t}),li:({className:e,...t})=>(0,z.jsx)(`li`,{className:J(`pl-1`,e),...t}),blockquote:({className:e,...t})=>(0,z.jsx)(`blockquote`,{className:J(`my-0 border-l-2 border-border/80 pl-4 text-muted-foreground italic dark:border-white/10`,e),...t}),a:({className:e,...t})=>(0,z.jsx)(`a`,{className:J(`font-medium text-primary underline underline-offset-4`,e),target:`_blank`,rel:`noreferrer`,...t}),code:({className:e,...t})=>(0,z.jsx)(`code`,{className:J(`rounded-md bg-black/5 px-1.5 py-0.5 font-mono text-[0.85em] dark:bg-white/10`,e),...t}),pre:({className:e,...t})=>(0,z.jsx)(`pre`,{className:J(`my-0 overflow-x-auto rounded-2xl border border-border/70 bg-black/5 p-3 text-[0.85em] leading-6 dark:border-white/10 dark:bg-white/6`,e),...t}),hr:({className:e,...t})=>(0,z.jsx)(`hr`,{className:J(`border-border/70 dark:border-white/10`,e),...t}),table:({className:e,...t})=>(0,z.jsx)(`div`,{className:`overflow-x-auto`,children:(0,z.jsx)(`table`,{className:J(`w-full border-collapse text-left text-sm`,e),...t})}),th:({className:e,...t})=>(0,z.jsx)(`th`,{className:J(`border-b border-border/70 px-3 py-2 font-semibold dark:border-white/10`,e),...t}),td:({className:e,...t})=>(0,z.jsx)(`td`,{className:J(`border-b border-border/50 px-3 py-2 align-top dark:border-white/5`,e),...t})};function cj({content:e,className:t,compact:n=!1}){return(0,z.jsx)(`div`,{className:J(`space-y-4 break-words text-sm leading-7 [&>*+*]:mt-4`,n&&`text-[0.95rem] leading-6 [&>*+*]:mt-3`,t),children:(0,z.jsx)(nO,{remarkPlugins:[oj],components:sj,children:e})})}var lj=e=>e?.mailboxId?Yg(`/api/mailbox/${encodeURIComponent(e.mailboxId)}/messages`,{status:e.status}):Promise.resolve([]),uj=e=>e?.mailboxId?Yg(`/api/mailbox/${encodeURIComponent(e.mailboxId)}/events`,{limit:e.limit}):Promise.resolve([]),dj={all:[`mailbox`],summaries:[`mailbox`,`summaries`],messages:e=>[`mailbox`,`messages`,e],events:e=>[`mailbox`,`events`,e]};function fj(e){return gi({queryKey:dj.messages(e),queryFn:()=>lj(e),enabled:!!e?.mailboxId})}function pj(e){return gi({queryKey:dj.events(e),queryFn:()=>uj(e),enabled:!!e?.mailboxId})}var mj={pending:{label:`待处理`,variant:`outline`,chipClass:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/15 dark:text-amber-200`},processing:{label:`执行中`,variant:`default`,chipClass:`border-sky-200 bg-sky-50 text-sky-700 dark:border-sky-500/30 dark:bg-sky-500/15 dark:text-sky-200`},done:{label:`已完成`,variant:`secondary`,chipClass:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/15 dark:text-emerald-200`},failed:{label:`失败`,variant:`destructive`,chipClass:`border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-500/30 dark:bg-rose-500/15 dark:text-rose-200`},cancelled:{label:`已取消`,variant:`secondary`,chipClass:`border-slate-200 bg-slate-100 text-slate-600 dark:border-slate-500/30 dark:bg-slate-500/15 dark:text-slate-200`},read:{label:`已读`,variant:`secondary`,chipClass:`border-slate-200 bg-slate-100 text-slate-600 dark:border-slate-500/30 dark:bg-slate-500/15 dark:text-slate-200`}},hj={standby:{label:`待命`,badge:`border-slate-200 bg-slate-100 text-slate-700 dark:border-slate-500/30 dark:bg-slate-500/15 dark:text-slate-200`,card:`border-slate-200/80 bg-gradient-to-br from-white via-slate-50 to-slate-100/70 dark:border-slate-700/70 dark:from-slate-900 dark:via-slate-900/95 dark:to-slate-800/75`,halo:`bg-slate-500/10 text-slate-600 dark:bg-slate-400/15 dark:text-slate-200`,bar:`bg-slate-500`},queued:{label:`待响应`,badge:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/15 dark:text-amber-200`,card:`border-amber-200/80 bg-gradient-to-br from-amber-50 via-white to-orange-50 dark:border-amber-500/25 dark:from-amber-950/45 dark:via-slate-900 dark:to-orange-950/35`,halo:`bg-amber-500/10 text-amber-700 dark:bg-amber-400/15 dark:text-amber-200`,bar:`bg-amber-500`},running:{label:`执行中`,badge:`border-sky-200 bg-sky-50 text-sky-700 dark:border-sky-500/30 dark:bg-sky-500/15 dark:text-sky-200`,card:`border-sky-200/80 bg-gradient-to-br from-sky-50 via-white to-blue-50 dark:border-sky-500/25 dark:from-sky-950/45 dark:via-slate-900 dark:to-blue-950/35`,halo:`bg-sky-500/10 text-sky-700 dark:bg-sky-400/15 dark:text-sky-200`,bar:`bg-sky-500`},active:{label:`协作中`,badge:`border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/15 dark:text-violet-200`,card:`border-violet-200/80 bg-gradient-to-br from-violet-50 via-white to-indigo-50 dark:border-violet-500/25 dark:from-violet-950/45 dark:via-slate-900 dark:to-indigo-950/35`,halo:`bg-violet-500/10 text-violet-700 dark:bg-violet-400/15 dark:text-violet-200`,bar:`bg-violet-500`},completed:{label:`回合完成`,badge:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/15 dark:text-emerald-200`,card:`border-emerald-200/80 bg-gradient-to-br from-emerald-50 via-white to-teal-50 dark:border-emerald-500/25 dark:from-emerald-950/45 dark:via-slate-900 dark:to-teal-950/35`,halo:`bg-emerald-500/10 text-emerald-700 dark:bg-emerald-400/15 dark:text-emerald-200`,bar:`bg-emerald-500`},support:{label:`需要支援`,badge:`border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-500/30 dark:bg-rose-500/15 dark:text-rose-200`,card:`border-rose-200/80 bg-gradient-to-br from-rose-50 via-white to-orange-50 dark:border-rose-500/25 dark:from-rose-950/45 dark:via-slate-900 dark:to-orange-950/35`,halo:`bg-rose-500/10 text-rose-700 dark:bg-rose-400/15 dark:text-rose-200`,bar:`bg-rose-500`}},gj={message_sent:{label:`已投递`,chipClass:`border-indigo-200 bg-indigo-50 text-indigo-700 dark:border-indigo-500/30 dark:bg-indigo-500/15 dark:text-indigo-200`,icon:fo},message_status_changed:{label:`状态变更`,chipClass:`border-sky-200 bg-sky-50 text-sky-700 dark:border-sky-500/30 dark:bg-sky-500/15 dark:text-sky-200`,icon:Ka},mailbox_listed:{label:`查看邮箱`,chipClass:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/15 dark:text-amber-200`,icon:Pa},message_opened:{label:`选中邮件`,chipClass:`border-fuchsia-200 bg-fuchsia-50 text-fuchsia-700 dark:border-fuchsia-500/30 dark:bg-fuchsia-500/15 dark:text-fuchsia-200`,icon:$a},message_replied:{label:`提交回信`,chipClass:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/15 dark:text-emerald-200`,icon:co},message_followed_up:{label:`线程跟进`,chipClass:`border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/15 dark:text-violet-200`,icon:Na}},_j=`border-border/70 bg-card/90 shadow-sm backdrop-blur-sm dark:border-border/80 dark:bg-card/80`,vj=`bg-muted/60 text-foreground dark:bg-muted/35`,yj=`rounded-2xl border border-border/60 bg-muted/55 dark:border-border/70 dark:bg-muted/30`,bj=`rounded-2xl border border-dashed border-border/60 bg-muted/35 dark:border-border/70 dark:bg-muted/20`,xj=`rounded-2xl border border-border/60 bg-background/75 dark:border-white/10 dark:bg-slate-950/35`,Sj=`relative overflow-hidden border border-sky-100/80 bg-gradient-to-br from-[#f7fbff] via-white to-[#eef6ff] text-slate-950 shadow-[0_24px_60px_-40px_rgba(59,130,246,0.35)] dark:border-white/8 dark:from-slate-950 dark:via-slate-900 dark:to-slate-950 dark:text-slate-50 dark:shadow-[0_30px_80px_-40px_rgba(15,23,42,0.9)]`,Cj=`border-border/50 bg-background/80 text-foreground hover:bg-background dark:border-white/10 dark:bg-white/5 dark:text-white dark:hover:bg-white/10`,wj=`bg-slate-950 text-white hover:bg-slate-800 dark:bg-white dark:text-slate-900 dark:hover:bg-slate-100`,Tj=`inline-flex items-center gap-2 rounded-full border border-border/50 bg-background/72 px-3 py-1.5 text-foreground/85 dark:border-white/10 dark:bg-white/5 dark:text-slate-200/85`,Ej=`rounded-2xl border border-border/60 bg-background/78 p-4 backdrop-blur-sm dark:border-white/10 dark:bg-white/5`;function Dj(){let{teamName:e}=st();return e?(0,z.jsx)(Oj,{teamName:e}):(0,z.jsx)(R_,{children:(0,z.jsx)(`p`,{children:`Invalid team name`})})}function Oj({teamName:e}){let t=rt(),{data:n,isLoading:r,refetch:i}=y_(e),{data:a,refetch:o}=w_(e),s=S_(e),c=C_(e),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(null),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)({name:``,focusOn:``}),y=async()=>{let e=_.name.trim();e&&(await s.mutateAsync({name:e,focusOn:_.focusOn||void 0}),m(e),u(!1),v({name:``,focusOn:``}))},b=async()=>{d&&(await c.mutateAsync(d),p===d&&m(null),h===d&&g(null),f(null))},x=async()=>{await Promise.all([i(),o()])},C=[...a?.messages??[]].sort((e,t)=>t.sendTime-e.sendTime),w=new Map;if(n?.teamMembers)for(let e of n.teamMembers)w.set(e.mailBoxId,e.name);let T=n?n.teamMembers.map(e=>Zj(e,C)):[],E=T.reduce((e,t)=>Math.max(e,t.totalMessages),1),D=T.map(e=>({...e,activityPercent:e.totalMessages===0?12:Math.max(22,Math.round(e.totalMessages/E*100))})),O=D.find(e=>e.member.name===p)??D[0]??null,k=Qj(n,D,C);return(0,z.jsx)(R_,{children:(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsx)(kj,{team:n,teamName:e,summary:k,onBack:()=>t(`/teams`),onRefresh:x,onAddMember:()=>u(!0)}),r?(0,z.jsx)(Uj,{}):n?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[minmax(320px,0.92fr)_minmax(0,1.08fr)]`,children:[(0,z.jsx)(jj,{memberStats:D,selectedMemberName:O?.member.name??null,onSelectMember:m,onDeleteMember:f,onAddMember:()=>u(!0)}),(0,z.jsx)(Pj,{teamName:e,stats:O,memberNameMap:w,onOpenContext:e=>g(e)})]}),(0,z.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[minmax(0,1.15fr)_minmax(300px,0.85fr)]`,children:[(0,z.jsx)(Bj,{messages:C,memberNameMap:w}),(0,z.jsx)(Vj,{team:n,summary:k,onAddMember:()=>u(!0)})]})]}):(0,z.jsx)(z_,{children:(0,z.jsxs)(U_,{className:`py-16 text-center text-muted-foreground`,children:[`团队 `,e,` 不存在`]})}),(0,z.jsx)(mx,{open:l,onOpenChange:u,children:(0,z.jsxs)(_x,{className:`sm:max-w-sm`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsx)(bx,{children:`添加成员`}),(0,z.jsxs)(xx,{children:[`向团队 `,e,` 添加新成员`]})]}),(0,z.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`成员名称`}),(0,z.jsx)(px,{value:_.name,onChange:e=>v(t=>({...t,name:e.target.value})),placeholder:`例如:TechEval`})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`职责描述`}),(0,z.jsx)(px,{value:_.focusOn,onChange:e=>v(t=>({...t,focusOn:e.target.value})),placeholder:`例如:技术评估 / 产品拆解 / 前端推进`})]})]}),(0,z.jsxs)(yx,{children:[(0,z.jsx)(Y,{variant:`outline`,onClick:()=>u(!1),children:`取消`}),(0,z.jsxs)(Y,{onClick:y,disabled:s.isPending||!_.name.trim(),children:[s.isPending&&(0,z.jsx)(Ka,{className:`mr-1 h-4 w-4 animate-spin`}),`添加`]})]})]})}),(0,z.jsx)(mx,{open:!!d,onOpenChange:()=>f(null),children:(0,z.jsxs)(_x,{className:`sm:max-w-sm`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsx)(bx,{children:`确认移除`}),(0,z.jsxs)(xx,{children:[`确定要移除成员 `,d,` 吗?`]})]}),(0,z.jsxs)(yx,{children:[(0,z.jsx)(Y,{variant:`outline`,onClick:()=>f(null),children:`取消`}),(0,z.jsxs)(Y,{variant:`destructive`,onClick:b,disabled:c.isPending,children:[c.isPending&&(0,z.jsx)(Ka,{className:`mr-1 h-4 w-4 animate-spin`}),`移除`]})]})]})}),(0,z.jsx)(Wj,{teamName:e,memberName:h,onClose:()=>g(null)})]})})}function kj({team:e,teamName:t,summary:n,onBack:r,onRefresh:i,onAddMember:a}){return(0,z.jsxs)(z_,{className:Sj,children:[(0,z.jsx)(`div`,{className:`absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(59,130,246,0.18),transparent_36%)] dark:bg-[radial-gradient(circle_at_top_left,rgba(59,130,246,0.35),transparent_36%)]`}),(0,z.jsx)(`div`,{className:`absolute inset-0 bg-[radial-gradient(circle_at_bottom_right,rgba(16,185,129,0.14),transparent_32%)] dark:bg-[radial-gradient(circle_at_bottom_right,rgba(16,185,129,0.22),transparent_32%)]`}),(0,z.jsx)(U_,{className:`relative px-6 py-6 sm:px-8 sm:py-8`,children:(0,z.jsxs)(`div`,{className:`flex flex-col gap-8 xl:flex-row xl:items-start xl:justify-between`,children:[(0,z.jsxs)(`div`,{className:`max-w-3xl space-y-5`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,onClick:r,className:Cj,children:(0,z.jsx)(Ca,{className:`h-4 w-4`})}),(0,z.jsx)(X,{variant:`outline`,className:J(Cj,n.stageTone),children:n.stageLabel}),n.lastPulseAt&&(0,z.jsxs)(`span`,{className:`text-xs text-muted-foreground dark:text-slate-300/80`,children:[`最近动作 `,fM(n.lastPulseAt)]})]}),(0,z.jsx)(`div`,{className:`space-y-2`,children:(0,z.jsx)(`h1`,{className:`text-3xl font-semibold tracking-tight sm:text-4xl`,children:e?.name??t})}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2 text-xs`,children:[(0,z.jsxs)(`div`,{className:Tj,children:[(0,z.jsx)(_o,{className:`h-3.5 w-3.5`}),(0,z.jsx)(`span`,{className:`font-medium`,children:`目标`}),(0,z.jsx)(`span`,{className:`text-muted-foreground dark:text-slate-300`,children:e?.goalId??`-`})]}),(0,z.jsxs)(`div`,{className:Tj,children:[(0,z.jsx)(wo,{className:`h-3.5 w-3.5`}),(0,z.jsx)(`span`,{className:`font-medium`,children:`团队人数`}),(0,z.jsx)(`span`,{className:`text-muted-foreground dark:text-slate-300`,children:n.totalMembers})]}),e?.workpath&&(0,z.jsxs)(`div`,{className:J(Tj,`max-w-full`),children:[(0,z.jsx)(Ia,{className:`h-3.5 w-3.5 shrink-0`}),(0,z.jsx)(`span`,{className:`font-medium shrink-0`,children:`工作目录`}),(0,z.jsx)(`span`,{className:`truncate text-muted-foreground dark:text-slate-300`,children:e.workpath})]})]}),(0,z.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[{index:`01`,title:`先点成员卡`,description:`左侧卡牌决定你当前聚焦的角色。`},{index:`02`,title:`再看任务流`,description:`右侧只保留这名成员最近一轮的关键往返。`},{index:`03`,title:`最后追上下文`,description:`需要深挖时,再打开完整执行记录。`}].map(e=>(0,z.jsxs)(`div`,{className:Ej,children:[(0,z.jsx)(`div`,{className:`text-[11px] font-semibold tracking-[0.18em] text-slate-500 dark:text-slate-400`,children:e.index}),(0,z.jsx)(`div`,{className:`mt-2 text-sm font-semibold text-foreground dark:text-white`,children:e.title}),(0,z.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-muted-foreground dark:text-slate-300`,children:e.description})]},e.index))})]}),(0,z.jsxs)(`div`,{className:`w-full xl:max-w-[390px]`,children:[(0,z.jsxs)(`div`,{className:`mb-3 flex flex-wrap justify-end gap-2`,children:[(0,z.jsxs)(Y,{variant:`ghost`,size:`sm`,onClick:i,className:Cj,children:[(0,z.jsx)(so,{className:`h-4 w-4`}),`刷新`]}),(0,z.jsxs)(Y,{size:`sm`,onClick:a,className:wj,children:[(0,z.jsx)(ao,{className:`h-4 w-4`}),`添加成员`]})]}),(0,z.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,z.jsx)(Aj,{icon:wo,label:`团队人数`,value:n.totalMembers,description:`当前已招募角色`}),(0,z.jsx)(Aj,{icon:ho,label:`有动作成员`,value:n.activeMembers,description:`这一轮参与协作`}),(0,z.jsx)(Aj,{icon:Sa,label:`处理中消息`,value:n.inFlightCount,description:`仍在推进的回合`}),(0,z.jsx)(Aj,{icon:Aa,label:`已完成回合`,value:n.completedCount,description:`${n.totalMessages} 条战报`})]}),n.riskCount>0&&(0,z.jsxs)(`div`,{className:`mt-3 rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-400/20 dark:bg-rose-400/10 dark:text-rose-50`,children:[`有 `,n.riskCount,` 条失败消息,建议优先处理标红的成员卡。`]})]})]})})]})}function Aj({icon:e,label:t,value:n,description:r}){return(0,z.jsxs)(`div`,{className:`rounded-2xl border border-border/60 bg-background/80 p-4 backdrop-blur-sm dark:border-white/10 dark:bg-white/5`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground dark:text-slate-300`,children:[(0,z.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-xl bg-primary/10 text-primary dark:bg-white/10 dark:text-white`,children:(0,z.jsx)(e,{className:`h-4 w-4`})}),(0,z.jsx)(`span`,{children:t})]}),(0,z.jsx)(`div`,{className:`mt-4 text-3xl font-semibold text-foreground dark:text-white`,children:n}),(0,z.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground dark:text-slate-400`,children:r})]})}function jj({memberStats:e,selectedMemberName:t,onSelectMember:n,onDeleteMember:r,onAddMember:i}){return(0,z.jsxs)(z_,{className:_j,children:[(0,z.jsxs)(B_,{className:`space-y-3`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-lg`,children:[(0,z.jsx)(mo,{className:`h-5 w-5 text-primary`}),`角色卡牌`]}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`先选中一个成员,再从右侧查看这名成员的最近任务流。`})]}),(0,z.jsxs)(X,{variant:`outline`,className:vj,children:[e.length,` 位成员`]})]}),(0,z.jsx)(`div`,{className:J(yj,`border-dashed text-sm leading-6 text-muted-foreground`),children:`这块不再堆日志,而是把成员做成“角色卡”。颜色表示状态,卡片里的动作数和建议动作告诉你下一步该点谁。`})]}),(0,z.jsx)(U_,{children:e.length===0?(0,z.jsxs)(`div`,{className:J(bj,`rounded-3xl px-6 py-12 text-center`),children:[(0,z.jsx)(wo,{className:`mx-auto h-10 w-10 text-muted-foreground/45`}),(0,z.jsx)(`div`,{className:`mt-4 text-base font-medium text-foreground`,children:`战队还没有成员`}),(0,z.jsx)(`div`,{className:`mt-2 text-sm text-muted-foreground`,children:`先添加 1 到 3 个职责明确的角色,再开始分派任务。`}),(0,z.jsxs)(Y,{className:`mt-4`,onClick:i,children:[(0,z.jsx)(ao,{className:`h-4 w-4`}),`添加第一个成员`]})]}):(0,z.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-1 2xl:grid-cols-2`,children:e.map(e=>(0,z.jsx)(Mj,{stats:e,selected:t===e.member.name,onSelect:()=>n(e.member.name),onDelete:()=>r(e.member.name)},e.member.id))})})]})}function Mj({stats:e,selected:t,onSelect:n,onDelete:r}){let i=hj[e.state];return(0,z.jsxs)(`div`,{role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:J(`group relative flex w-full flex-col gap-4 overflow-hidden rounded-3xl border p-4 text-left transition-all duration-200 hover:-translate-y-0.5 hover:shadow-xl`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25`,i.card,t&&`ring-2 ring-primary/25 shadow-xl`),children:[(0,z.jsx)(`div`,{className:`absolute -right-5 -top-5 h-20 w-20 rounded-full bg-white/70 blur-2xl dark:bg-white/10`}),(0,z.jsxs)(`div`,{className:`relative flex items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,z.jsx)(`div`,{className:J(`flex h-12 w-12 shrink-0 items-center justify-center rounded-2xl`,i.halo),children:(0,z.jsx)(Co,{className:`h-5 w-5`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`div`,{className:`truncate text-base font-semibold text-foreground dark:text-slate-50`,children:e.member.name}),(0,z.jsx)(`div`,{className:`truncate text-sm text-muted-foreground dark:text-slate-300`,children:e.member.focusOn||`尚未设置职责`})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:i.badge,children:i.label}),(0,z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,className:`opacity-0 transition-opacity group-hover:opacity-100`,onClick:e=>{e.stopPropagation(),r()},title:`移除成员`,children:(0,z.jsx)(yo,{className:`h-4 w-4 text-muted-foreground`})})]})]}),(0,z.jsxs)(`div`,{className:`relative space-y-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground dark:text-slate-300`,children:[(0,z.jsx)(`span`,{children:`活跃度`}),(0,z.jsxs)(`span`,{children:[e.totalMessages,` 条动作`]})]}),(0,z.jsx)(`div`,{className:`h-2 rounded-full bg-background/80 dark:bg-slate-950/35`,children:(0,z.jsx)(`div`,{className:J(`h-2 rounded-full transition-all`,i.bar),style:{width:`${e.activityPercent}%`}})})]}),(0,z.jsxs)(`div`,{className:`relative grid grid-cols-3 gap-2`,children:[(0,z.jsx)(Nj,{label:`收到`,value:e.receivedMessages.length,accent:`text-sky-600`}),(0,z.jsx)(Nj,{label:`发出`,value:e.sentMessages.length,accent:`text-emerald-600`}),(0,z.jsx)(Nj,{label:e.failedCount>0?`风险`:`完成`,value:e.failedCount>0?e.failedCount:e.doneCount,accent:e.failedCount>0?`text-rose-600`:`text-violet-600`})]}),(0,z.jsxs)(`div`,{className:J(xj,`relative p-3 text-sm leading-6 text-muted-foreground dark:text-slate-300`),children:[(0,z.jsx)(`span`,{className:`font-medium text-foreground dark:text-slate-50`,children:`下一步:`}),sM(e.nextAction,62)]}),(0,z.jsxs)(`div`,{className:`relative flex items-center justify-between text-xs text-muted-foreground dark:text-slate-300`,children:[(0,z.jsx)(`span`,{children:e.lastActiveAt?`最近动作 ${fM(e.lastActiveAt)}`:`尚未进入任务循环`}),(0,z.jsx)(`span`,{className:`font-medium text-foreground/85 dark:text-slate-200`,children:t?`当前聚焦`:`点击查看`})]})]})}function Nj({label:e,value:t,accent:n}){return(0,z.jsxs)(`div`,{className:J(xj,`px-3 py-2`),children:[(0,z.jsx)(`div`,{className:`text-[11px] text-muted-foreground dark:text-slate-300`,children:e}),(0,z.jsx)(`div`,{className:J(`mt-1 text-lg font-semibold`,n),children:t})]})}function Pj({teamName:e,stats:t,memberNameMap:n,onOpenContext:r}){if(!t)return(0,z.jsx)(z_,{className:J(_j,`border-dashed`),children:(0,z.jsxs)(U_,{className:`flex min-h-[420px] flex-col items-center justify-center px-6 py-16 text-center`,children:[(0,z.jsx)(Co,{className:`h-12 w-12 text-muted-foreground/45`}),(0,z.jsx)(`div`,{className:`mt-4 text-lg font-medium text-foreground`,children:`先选一个成员`}),(0,z.jsx)(`div`,{className:`mt-2 max-w-md text-sm leading-6 text-muted-foreground`,children:`右侧会固定展示这名成员的任务流、原始收件箱和执行上下文,不再需要来回切 tab。`})]})});let i=hj[t.state];return(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsxs)(z_,{className:Sj,children:[(0,z.jsx)(`div`,{className:`absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(99,102,241,0.16),transparent_34%)] dark:bg-[radial-gradient(circle_at_top_left,rgba(99,102,241,0.32),transparent_34%)]`}),(0,z.jsx)(`div`,{className:`absolute inset-0 bg-[radial-gradient(circle_at_bottom_right,rgba(16,185,129,0.12),transparent_28%)] dark:bg-[radial-gradient(circle_at_bottom_right,rgba(16,185,129,0.22),transparent_28%)]`}),(0,z.jsx)(U_,{className:`relative px-6 py-6 sm:px-7`,children:(0,z.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,z.jsx)(`div`,{className:J(`flex h-14 w-14 shrink-0 items-center justify-center rounded-3xl border border-border/50 dark:border-white/10`,i.halo),children:(0,z.jsx)(Co,{className:`h-6 w-6`})}),(0,z.jsx)(`div`,{className:`min-w-0`,children:(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(`h2`,{className:`truncate text-2xl font-semibold`,children:t.member.name}),(0,z.jsx)(X,{variant:`outline`,className:i.badge,children:i.label})]})})]}),(0,z.jsxs)(Y,{variant:`ghost`,size:`sm`,onClick:()=>r(t.member.name),className:Cj,children:[(0,z.jsx)(vo,{className:`h-4 w-4`}),`查看完整上下文`]})]}),(0,z.jsxs)(`div`,{className:`rounded-3xl border border-border/60 bg-background/80 p-4 dark:border-white/10 dark:bg-white/6`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-foreground dark:text-white`,children:[(0,z.jsx)(Co,{className:`h-4 w-4 text-primary`}),`角色设定`]}),t.member.focusOn?.trim()?(0,z.jsx)(`div`,{className:`mt-3 text-slate-700 dark:text-slate-200`,children:(0,z.jsx)(cj,{content:t.member.focusOn,compact:!0,className:`[&_h1]:text-base [&_h2]:text-sm [&_h3]:text-sm [&_pre]:text-xs [&_pre]:leading-5`})}):(0,z.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-muted-foreground`,children:`暂未设置职责,建议补充角色定位。`})]}),(0,z.jsxs)(`div`,{className:`rounded-3xl border border-border/60 bg-background/80 p-4 dark:border-white/10 dark:bg-white/6`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-foreground dark:text-white`,children:[(0,z.jsx)(ho,{className:`h-4 w-4 text-amber-500 dark:text-amber-300`}),`当前建议动作`]}),(0,z.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-slate-700 dark:text-slate-300`,children:t.nextAction})]}),(0,z.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,z.jsx)(Fj,{icon:Ba,label:`收到消息`,value:t.receivedMessages.length,note:t.pendingCount>0?`${t.pendingCount} 条待响应`:`收件箱稳定`}),(0,z.jsx)(Fj,{icon:fo,label:`发出消息`,value:t.sentMessages.length,note:t.doneCount>0?`${t.doneCount} 条已完成`:`还没有回报`}),(0,z.jsx)(Fj,{icon:ja,label:`最近动作`,value:t.lastActiveAt?dM(t.lastActiveAt):`--`,note:t.lastActiveAt?fM(t.lastActiveAt):`尚未开始`})]})]})})]}),(0,z.jsx)(Ij,{stats:t,memberNameMap:n}),(0,z.jsxs)(`div`,{className:`grid gap-6 2xl:grid-cols-2`,children:[(0,z.jsx)(Rj,{stats:t,memberNameMap:n}),(0,z.jsx)(zj,{teamName:e,memberName:t.member.name,onOpenContext:()=>r(t.member.name)})]})]})}function Fj({icon:e,label:t,value:n,note:r}){return(0,z.jsxs)(`div`,{className:`rounded-2xl border border-border/60 bg-background/80 p-4 dark:border-white/10 dark:bg-white/6`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground dark:text-slate-300`,children:[(0,z.jsx)(e,{className:`h-3.5 w-3.5`}),(0,z.jsx)(`span`,{children:t})]}),(0,z.jsx)(`div`,{className:`mt-3 text-2xl font-semibold text-foreground dark:text-white`,children:n}),(0,z.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground dark:text-slate-400`,children:r})]})}function Ij({stats:e,memberNameMap:t}){return(0,z.jsxs)(z_,{className:_j,children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-lg`,children:[(0,z.jsx)(Sa,{className:`h-5 w-5 text-primary`}),`任务流`]}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`只保留当前成员最近一轮最关键的往返消息,按时间倒序展示。`})]}),(0,z.jsxs)(X,{variant:`outline`,className:vj,children:[e.combinedMessages.length,` 条动作`]})]})}),(0,z.jsx)(U_,{children:e.combinedMessages.length===0?(0,z.jsx)(`div`,{className:J(bj,`px-5 py-10 text-center text-sm text-muted-foreground`),children:`这名成员还没有进入协作回合,先给他一个明确任务会更直观。`}):(0,z.jsx)(`div`,{className:`space-y-3`,children:e.combinedMessages.slice(0,6).map(n=>(0,z.jsx)(Lj,{message:n,direction:n.fromMailboxId===e.member.mailBoxId?`sent`:`received`,counterpartName:n.fromMailboxId===e.member.mailBoxId?t.get(n.toMailboxId):t.get(n.fromMailboxId)},n.id))})})]})}function Lj({message:e,direction:t,counterpartName:n}){let[r,i]=(0,S.useState)(!1),a=e.content.length>180,o=mj[e.status]??mj.pending,s=e.threadId??e.id,c=t===`received`?{container:`border-sky-100 bg-sky-50/70 dark:border-sky-500/20 dark:bg-sky-500/10`,chip:`border-sky-200 bg-sky-100 text-sky-700 dark:border-sky-500/30 dark:bg-sky-500/15 dark:text-sky-200`,label:`收到任务`,icon:Ba}:{container:`border-emerald-100 bg-emerald-50/70 dark:border-emerald-500/20 dark:bg-emerald-500/10`,chip:`border-emerald-200 bg-emerald-100 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/15 dark:text-emerald-200`,label:`发出回报`,icon:fo},l=e.parentMessageId?t===`received`?`线程追问`:`线程续报`:c.label,u=c.icon;return(0,z.jsxs)(`div`,{className:J(`rounded-2xl border p-4 transition-colors`,c.container,a&&`cursor-pointer hover:border-primary/25`),onClick:()=>{a&&i(e=>!e)},children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsxs)(X,{variant:`outline`,className:c.chip,children:[(0,z.jsx)(u,{className:`h-3 w-3`}),l]}),(0,z.jsx)(X,{variant:`outline`,className:o.chipClass,children:o.label}),(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-background/80 px-2 py-1 font-mono text-[11px] text-muted-foreground dark:bg-white/5 dark:text-slate-300`,children:[(0,z.jsx)(La,{className:`h-3 w-3`}),oM(s)]}),e.parentMessageId&&(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-background/80 px-2 py-1 font-mono text-[11px] text-muted-foreground dark:bg-white/5 dark:text-slate-300`,children:[(0,z.jsx)(Na,{className:`h-3 w-3`}),oM(e.parentMessageId)]}),(0,z.jsxs)(`span`,{className:`text-xs text-muted-foreground dark:text-slate-300`,children:[t===`received`?`来自`:`发给`,` `,n??`系统`]}),(0,z.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground dark:text-slate-300`,children:uM(e.sendTime)})]}),(0,z.jsx)(`div`,{className:`mt-3 text-sm leading-6 text-foreground dark:text-slate-100`,children:r||!a?(0,z.jsx)(cj,{content:e.content,compact:!0}):(0,z.jsx)(`p`,{className:`whitespace-pre-wrap`,children:lM(e.content,180)})}),a&&(0,z.jsxs)(`div`,{className:`mt-2 inline-flex items-center gap-1 text-xs text-muted-foreground dark:text-slate-300`,children:[r?(0,z.jsx)(Da,{className:`h-3 w-3`}):(0,z.jsx)(Oa,{className:`h-3 w-3`}),r?`收起全文`:`展开全文`]})]})}function Rj({stats:e,memberNameMap:t}){let{data:n}=fj({mailboxId:e.member.mailBoxId}),{data:r,isLoading:i}=pj({mailboxId:e.member.mailBoxId,limit:40}),a=[...r??[]].sort((e,t)=>t.createdAt-e.createdAt).slice(0,8);return(0,z.jsxs)(z_,{className:_j,children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-base`,children:[(0,z.jsx)(Ya,{className:`h-4 w-4 text-primary`}),`信箱投递过程`]}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`这里记录的是 mailbox 本身的动作轨迹:谁投递、谁查看、看完选中了哪封、何时回信。`})]}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsxs)(X,{variant:`outline`,className:vj,children:[n?.length??0,` 封消息`]}),(0,z.jsxs)(X,{variant:`outline`,className:vj,children:[r?.length??0,` 条轨迹`]})]})]})}),(0,z.jsx)(U_,{children:i?(0,z.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(e=>(0,z.jsx)(W_,{className:`h-24 w-full`},e))}):a.length===0?(0,z.jsx)(`div`,{className:J(bj,`px-4 py-10 text-center text-sm text-muted-foreground`),children:`暂无 mailbox 过程事件。新版本开始处理后,这里会持续记录浏览和决策轨迹。`}):(0,z.jsx)(Fg,{className:`h-[360px] pr-4`,children:(0,z.jsx)(`div`,{className:`space-y-3`,children:a.map(e=>{let n=gj[e.eventType],r=e.eventType===`message_status_changed`?String(e.detail?.nextStatus??``):e.message?.status,i=r?mj[r]??null:null,a=n.icon;return(0,z.jsxs)(`div`,{className:J(yj,`p-4`),children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsxs)(X,{variant:`outline`,className:n.chipClass,children:[(0,z.jsx)(a,{className:`h-3 w-3`}),n.label]}),i&&(0,z.jsx)(X,{variant:`outline`,className:i.chipClass,children:i.label}),(0,z.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground dark:text-slate-300`,children:uM(e.createdAt)})]}),(0,z.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-foreground dark:text-slate-100`,children:rM(e,t)}),e.message&&(0,z.jsxs)(`div`,{className:J(xj,`mt-3 p-3`),children:[(0,z.jsxs)(`div`,{className:`text-xs text-muted-foreground dark:text-slate-300`,children:[t.get(e.message.fromMailboxId)??aM(e.message.fromMailboxId),` -> `,t.get(e.message.toMailboxId)??aM(e.message.toMailboxId)]}),(0,z.jsx)(`p`,{className:`mt-2 whitespace-pre-wrap text-sm leading-6 text-foreground dark:text-slate-100`,children:lM(e.message.content,180)})]})]},e.id)})})})})]})}function zj({teamName:e,memberName:t,onOpenContext:n}){let{data:r,isLoading:i}=T_(e,t),a=r?[...r.agentLogs].slice(-3).reverse():[];return(0,z.jsxs)(z_,{className:_j,children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-base`,children:[(0,z.jsx)(vo,{className:`h-4 w-4 text-primary`}),`脑内上下文`]}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`不再直接堆完整日志,只先给你最近几段关键上下文。`})]}),(0,z.jsxs)(X,{variant:`outline`,className:vj,children:[r?.agentLogs.length??0,` 条记录`]})]})}),(0,z.jsxs)(U_,{className:`space-y-4`,children:[i?(0,z.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(e=>(0,z.jsx)(W_,{className:`h-20 w-full`},e))}):a.length===0?(0,z.jsx)(`div`,{className:J(bj,`px-4 py-10 text-center text-sm text-muted-foreground`),children:`该成员还没有执行记录。`}):(0,z.jsx)(`div`,{className:`space-y-3`,children:a.map(e=>(0,z.jsxs)(`div`,{className:J(yj,`p-4`),children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground dark:text-slate-300`,children:[(0,z.jsxs)(`span`,{className:`font-mono`,children:[`#`,e.index]}),(0,z.jsx)(X,{variant:e.role===`user`?`default`:`secondary`,children:e.role===`user`?`User`:`Assistant`})]}),(0,z.jsx)(`div`,{className:`mt-3 text-sm leading-6 text-foreground dark:text-slate-100`,children:(0,z.jsx)(tM,{log:e})})]},e.index))}),(0,z.jsxs)(Y,{variant:`outline`,className:`w-full`,onClick:n,children:[(0,z.jsx)(vo,{className:`h-4 w-4`}),`查看完整执行上下文`]})]})]})}function Bj({messages:e,memberNameMap:t}){let[n,r]=(0,S.useState)(null);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(z_,{className:_j,children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-lg`,children:[(0,z.jsx)(Sa,{className:`h-5 w-5 text-primary`}),`团队主线战报`]}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`从全队视角看最近的协作主线,方便你快速判断当前整体推进节奏。`})]}),(0,z.jsxs)(X,{variant:`outline`,className:vj,children:[e.length,` 条`]})]})}),(0,z.jsx)(U_,{children:e.length===0?(0,z.jsx)(`div`,{className:J(bj,`px-5 py-12 text-center text-sm text-muted-foreground`),children:`全队还没有产生协作消息。`}):(0,z.jsx)(Fg,{className:`max-h-[520px] pr-4`,children:(0,z.jsx)(`div`,{className:`space-y-3`,children:e.slice(0,12).map(e=>{let n=mj[e.status]??mj.pending,i=t.get(e.fromMailboxId)??aM(e.fromMailboxId),a=t.get(e.toMailboxId)??aM(e.toMailboxId),o=cM(e.content),s=o.length>260;return(0,z.jsxs)(`div`,{role:`button`,tabIndex:0,className:J(yj,`cursor-pointer p-4 transition-colors hover:border-primary/30`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25`),onClick:()=>r(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r(e))},children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:n.chipClass,children:n.label}),(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-background/80 px-2 py-1 font-mono text-[11px] text-muted-foreground dark:bg-white/5 dark:text-slate-300`,children:[(0,z.jsx)(La,{className:`h-3 w-3`}),oM(e.threadId??e.id)]}),e.parentMessageId&&(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-background/80 px-2 py-1 font-mono text-[11px] text-muted-foreground dark:bg-white/5 dark:text-slate-300`,children:[(0,z.jsx)(Na,{className:`h-3 w-3`}),oM(e.parentMessageId)]}),(0,z.jsx)(`span`,{className:`text-sm font-medium text-foreground dark:text-slate-50`,children:i}),(0,z.jsx)(fo,{className:`h-3.5 w-3.5 text-muted-foreground dark:text-slate-400`}),(0,z.jsx)(`span`,{className:`text-sm font-medium text-foreground dark:text-slate-50`,children:a}),(0,z.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground dark:text-slate-300`,children:uM(e.sendTime)})]}),s?(0,z.jsx)(`div`,{className:`mt-3`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:(0,z.jsx)(`div`,{className:`max-h-40 overflow-y-auto rounded-2xl border border-border/60 bg-background/80 p-4 pr-5 dark:border-white/10 dark:bg-white/5`,children:(0,z.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-6 text-foreground dark:text-slate-100`,children:o})})}):(0,z.jsx)(`p`,{className:`mt-3 whitespace-pre-wrap text-sm leading-6 text-foreground dark:text-slate-100`,children:o}),s&&(0,z.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-3`,children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground dark:text-slate-300`,children:`预览区域支持上下滚动`}),(0,z.jsxs)(Y,{variant:`ghost`,size:`sm`,onClick:t=>{t.stopPropagation(),r(e)},children:[(0,z.jsx)(Fa,{className:`h-4 w-4`}),`查看全文`]})]})]},e.id)})})})})]}),(0,z.jsx)(mx,{open:!!n,onOpenChange:e=>!e&&r(null),children:(0,z.jsx)(_x,{className:`sm:max-w-4xl max-h-[85vh] overflow-hidden grid-rows-[auto_minmax(0,1fr)]`,children:n?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(vx,{children:[(0,z.jsxs)(bx,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(Sa,{className:`h-4 w-4`}),`团队主线战报详情`]}),(0,z.jsxs)(xx,{children:[t.get(n.fromMailboxId)??aM(n.fromMailboxId),` -> `,t.get(n.toMailboxId)??aM(n.toMailboxId),` · `,uM(n.sendTime)]})]}),(0,z.jsxs)(`div`,{className:`flex min-h-0 flex-col space-y-4 overflow-hidden`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:(mj[n.status]??mj.pending).chipClass,children:(mj[n.status]??mj.pending).label}),(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-muted px-2 py-1 font-mono text-xs text-muted-foreground`,children:[(0,z.jsx)(La,{className:`h-3 w-3`}),oM(n.threadId??n.id)]}),n.parentMessageId&&(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-muted px-2 py-1 font-mono text-xs text-muted-foreground`,children:[(0,z.jsx)(Na,{className:`h-3 w-3`}),oM(n.parentMessageId)]}),(0,z.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:"点击外部区域或按 `Esc` 可关闭"})]}),(0,z.jsx)(Fg,{className:`min-h-0 flex-1 pr-4`,children:(0,z.jsx)(`div`,{className:J(yj,`p-5 text-foreground dark:text-slate-100`),children:(0,z.jsx)(cj,{content:n.content,className:`[&_h1]:text-xl [&_h2]:text-lg [&_h3]:text-base [&_pre]:text-xs [&_pre]:leading-6`})})})]})]}):null})})]})}function Vj({team:e,summary:t,onAddMember:n}){return(0,z.jsxs)(z_,{className:_j,children:[(0,z.jsxs)(B_,{children:[(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-lg`,children:[(0,z.jsx)(mo,{className:`h-5 w-5 text-primary`}),`操作说明`]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`把复杂交互压缩成固定顺序,避免用户在“成员 / 邮箱 / 日志”之间来回找入口。`})]}),(0,z.jsxs)(U_,{className:`space-y-5`,children:[(0,z.jsx)(`div`,{className:`space-y-3`,children:[`先在左侧选一个成员卡,页面会自动把注意力收敛到这名成员。`,`右侧优先读“当前建议动作”和“任务流”,这两块已经足够做大多数判断。`,`只有当消息不够解释行为时,再点开完整上下文去看内部推理和工具调用。`].map((e,t)=>(0,z.jsxs)(`div`,{className:J(yj,`flex items-start gap-3 px-4 py-3`),children:[(0,z.jsx)(`div`,{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-sm font-semibold text-primary`,children:t+1}),(0,z.jsx)(`p`,{className:`text-sm leading-6 text-foreground dark:text-slate-100`,children:e})]},e))}),(0,z.jsxs)(`div`,{className:J(yj,`rounded-3xl p-4`),children:[(0,z.jsx)(`div`,{className:`text-xs font-semibold tracking-[0.18em] text-muted-foreground dark:text-slate-300`,children:`团队参数`}),(0,z.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,z.jsx)(Hj,{icon:_o,label:`目标 ID`,value:e.goalId,mono:!0}),(0,z.jsx)(Hj,{icon:wo,label:`团队人数`,value:`${t.totalMembers} 人`}),(0,z.jsx)(Hj,{icon:Ia,label:`工作目录`,value:e.workpath??`未设置`,mono:!!e.workpath}),(0,z.jsx)(Hj,{icon:so,label:`刷新策略`,value:`自动 5 秒同步 + 手动刷新`})]})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`状态图例`}),(0,z.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:Object.values(hj).map(e=>(0,z.jsx)(X,{variant:`outline`,className:e.badge,children:e.label},e.label))})]}),(0,z.jsxs)(Y,{className:`w-full`,onClick:n,children:[(0,z.jsx)(ao,{className:`h-4 w-4`}),`添加新成员`]})]})]})}function Hj({icon:e,label:t,value:n,mono:r=!1}){return(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsx)(`div`,{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-xl bg-background text-muted-foreground ring-1 ring-border dark:bg-slate-950/35 dark:text-slate-200 dark:ring-white/10`,children:(0,z.jsx)(e,{className:`h-4 w-4`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`div`,{className:`text-xs text-muted-foreground dark:text-slate-300`,children:t}),(0,z.jsx)(`div`,{className:J(`mt-1 break-all text-sm text-foreground dark:text-slate-100`,r&&`font-mono text-xs`),children:n})]})]})}function Uj(){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[minmax(320px,0.92fr)_minmax(0,1.08fr)]`,children:[(0,z.jsxs)(z_,{children:[(0,z.jsxs)(B_,{children:[(0,z.jsx)(W_,{className:`h-7 w-32`}),(0,z.jsx)(W_,{className:`h-4 w-64`})]}),(0,z.jsx)(U_,{className:`space-y-3`,children:[1,2,3].map(e=>(0,z.jsx)(W_,{className:`h-40 w-full`},e))})]}),(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsx)(W_,{className:`h-52 w-full rounded-3xl`}),(0,z.jsx)(W_,{className:`h-72 w-full rounded-3xl`}),(0,z.jsxs)(`div`,{className:`grid gap-6 2xl:grid-cols-2`,children:[(0,z.jsx)(W_,{className:`h-80 w-full rounded-3xl`}),(0,z.jsx)(W_,{className:`h-80 w-full rounded-3xl`})]})]})]}),(0,z.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[minmax(0,1.15fr)_minmax(300px,0.85fr)]`,children:[(0,z.jsx)(W_,{className:`h-[420px] w-full rounded-3xl`}),(0,z.jsx)(W_,{className:`h-[420px] w-full rounded-3xl`})]})]})}function Wj({teamName:e,memberName:t,onClose:n}){let{data:r,isLoading:i}=T_(e,t);return(0,z.jsx)(mx,{open:!!t,onOpenChange:e=>!e&&n(),children:(0,z.jsxs)(_x,{className:`sm:max-w-4xl max-h-[85vh]`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsxs)(bx,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Co,{className:`h-4 w-4`}),t??`成员`,` 的完整上下文`]}),(0,z.jsx)(xx,{children:r?r.mailBoxId:`加载中...`})]}),i?(0,z.jsxs)(`div`,{className:`space-y-4 py-4`,children:[(0,z.jsx)(W_,{className:`h-5 w-32`}),[1,2,3,4].map(e=>(0,z.jsx)(W_,{className:`h-16 w-full`},e))]}):r?(0,z.jsx)(`div`,{className:`max-h-[65vh] overflow-y-auto rounded-md border p-3`,children:(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,z.jsx)(vo,{className:`h-4 w-4 text-emerald-500`}),(0,z.jsx)(`h3`,{className:`text-sm font-semibold`,children:`对话上下文`}),(0,z.jsxs)(X,{variant:`outline`,className:`text-xs`,children:[r.agentLogs.length,` 条`]})]}),r.agentLogs.length===0?(0,z.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground/60`,children:`该成员暂无执行记录`}):(0,z.jsx)(`div`,{className:`space-y-4 pl-1`,children:r.agentLogs.map(e=>(0,z.jsx)(Gj,{log:e},e.index))})]})}):(0,z.jsx)(`div`,{className:`py-12 text-center text-muted-foreground`,children:`无法加载成员上下文`})]})})}function Gj({log:e}){let t=e.role===`user`;return(0,z.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,z.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-xs text-muted-foreground/60`,children:[(0,z.jsxs)(`span`,{className:`font-mono`,children:[`#`,e.index]}),(0,z.jsx)(X,{variant:t?`default`:`secondary`,className:`text-[10px] px-1.5 py-0 h-4`,children:t?`User`:`Assistant`})]}),(0,z.jsx)(`div`,{className:`space-y-2 pl-2`,children:e.blocks.map((e,n)=>e.type===`text`?(0,z.jsx)(Kj,{text:String(e.text??``),isUser:t},n):e.type===`tool_use`?(0,z.jsx)(qj,{name:String(e.name??`unknown`),input:e.input},n):e.type===`tool_result`?(0,z.jsx)(Jj,{toolUseId:String(e.toolUseId??``),content:e.content},n):(0,z.jsxs)(`div`,{className:`rounded-md bg-muted px-3 py-2 text-sm text-muted-foreground`,children:[`[unknown block: `,e.type,`]`]},n))})]})}function Kj({text:e,isUser:t}){let[n,r]=(0,S.useState)(!1),i=e.length>300;return(0,z.jsxs)(`div`,{className:J(`cursor-pointer rounded-md border px-3 py-2 text-sm whitespace-pre-wrap break-words`,t?`border-emerald-500/10 bg-emerald-500/5 text-foreground`:`border-sky-500/10 bg-sky-500/5 text-foreground`),onClick:()=>{i&&r(e=>!e)},children:[n||!i?(0,z.jsx)(cj,{content:e,compact:!0,className:J(`[&_a]:text-primary [&_blockquote]:text-inherit [&_code]:bg-black/6 dark:[&_code]:bg-white/10 [&_h1]:text-base [&_h2]:text-sm [&_h3]:text-sm [&_pre]:text-xs [&_pre]:leading-5`,t?`[&_blockquote]:border-emerald-500/20`:`[&_blockquote]:border-sky-500/20`)}):lM(e,300),i&&(0,z.jsxs)(`span`,{className:`ml-1 inline-flex text-muted-foreground/40`,children:[n?(0,z.jsx)(Da,{className:`inline h-3 w-3`}):(0,z.jsx)(Oa,{className:`inline h-3 w-3`}),(0,z.jsx)(`span`,{className:`ml-0.5 text-xs`,children:n?`收起`:`展开`})]})]})}function qj({name:e,input:t}){let[n,r]=(0,S.useState)(!1),i=JSON.stringify(t,null,2);return(0,z.jsxs)(`div`,{className:`rounded-md border border-primary/20 bg-primary/5 px-3 py-2`,children:[(0,z.jsxs)(`div`,{className:`flex cursor-pointer items-center gap-2`,onClick:()=>r(e=>!e),children:[(0,z.jsx)(Eo,{className:`h-3.5 w-3.5 shrink-0 text-primary`}),(0,z.jsx)(`span`,{className:`text-sm font-semibold text-primary`,children:e}),(0,z.jsx)(`span`,{className:`ml-auto text-muted-foreground/40`,children:n?(0,z.jsx)(Da,{className:`h-3 w-3`}):(0,z.jsx)(Oa,{className:`h-3 w-3`})})]}),n&&(0,z.jsx)(`pre`,{className:`mt-2 overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/60 p-2 text-xs text-muted-foreground`,children:i})]})}function Jj({toolUseId:e,content:t}){let[n,r]=(0,S.useState)(!1),i=typeof t==`string`?t:JSON.stringify(t,null,2);return(0,z.jsxs)(`div`,{className:`rounded-md border border-border bg-muted/40 px-3 py-2`,children:[e&&(0,z.jsxs)(`div`,{className:`mb-1 truncate font-mono text-[10px] text-muted-foreground/50`,children:[`toolUseId: `,e]}),(0,z.jsxs)(`div`,{className:`mb-1 flex cursor-pointer items-center gap-2`,onClick:()=>r(e=>!e),children:[(0,z.jsx)(Fa,{className:`h-3 w-3 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`执行结果`}),(0,z.jsx)(`span`,{className:`ml-auto text-muted-foreground/40`,children:n?(0,z.jsx)(Da,{className:`h-3 w-3`}):(0,z.jsx)(Oa,{className:`h-3 w-3`})})]}),n&&(0,z.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/60 p-2 text-xs text-muted-foreground`,children:i})]})}var Yj=`manager`;function Xj(e,t){return e.fromMailboxId===t&&e.toMailboxId===Yj}function Zj(e,t){let n=t.filter(t=>t.toMailboxId===e.mailBoxId),r=t.filter(t=>t.fromMailboxId===e.mailBoxId),i=[...n,...r].sort((e,t)=>t.sendTime-e.sendTime),a=i.filter(t=>!Xj(t,e.mailBoxId)),o=a.filter(e=>e.status===`pending`).length,s=a.filter(e=>e.status===`processing`).length,c=n.filter(e=>e.status===`done`).length,l=a.filter(e=>e.status===`failed`).length,u=r.some(t=>Xj(t,e.mailBoxId)),d=`standby`;return d=l>0?`support`:s>0?`running`:o>0?`queued`:i.length===0?`standby`:c>0||u?`completed`:`active`,{member:e,receivedMessages:n,sentMessages:r,combinedMessages:i,totalMessages:i.length,pendingCount:o,processingCount:s,doneCount:c,failedCount:l,lastActiveAt:i[0]?.sendTime??null,state:d,nextAction:$j({state:d,totalMessages:i.length,pendingCount:o,processingCount:s,failedCount:l,focusOn:e.focusOn}),activityPercent:0}}function Qj(e,t,n){let r=e?.teamMembers.length??0,i=t.filter(e=>e.totalMessages>0).length,a=n.filter(e=>e.status===`pending`||e.status===`processing`).length,o=n.filter(e=>e.status===`done`).length,s=n.filter(e=>e.status===`failed`).length,c=n[0]?.sendTime??null;return r===0?{totalMembers:r,activeMembers:i,inFlightCount:a,completedCount:o,riskCount:s,totalMessages:n.length,lastPulseAt:c,stageLabel:`等待招募`,stageHint:`这支战队还没有成员。先招募角色,再开始派发任务。`,stageTone:`border-slate-300 bg-slate-100 text-slate-700 dark:border-slate-300/20 dark:bg-slate-300/10 dark:text-slate-100`}:s>0?{totalMembers:r,activeMembers:i,inFlightCount:a,completedCount:o,riskCount:s,totalMessages:n.length,lastPulseAt:c,stageLabel:`需要人工支援`,stageHint:`有成员产生了失败结果,建议从红色成员卡开始排查本轮阻塞。`,stageTone:`border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-300/20 dark:bg-rose-400/10 dark:text-rose-100`}:a>0?{totalMembers:r,activeMembers:i,inFlightCount:a,completedCount:o,riskCount:s,totalMessages:n.length,lastPulseAt:c,stageLabel:`任务推进中`,stageHint:`当前有消息正在流转。先点一个角色卡,看他最近一轮的任务流。`,stageTone:`border-sky-200 bg-sky-50 text-sky-700 dark:border-sky-300/20 dark:bg-sky-400/10 dark:text-sky-100`}:o>0?{totalMembers:r,activeMembers:i,inFlightCount:a,completedCount:o,riskCount:s,totalMessages:n.length,lastPulseAt:c,stageLabel:`本轮已收官`,stageHint:`最近一轮基本已经闭环,可以继续派发下一步任务。`,stageTone:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-300/20 dark:bg-emerald-400/10 dark:text-emerald-100`}:i>0?{totalMembers:r,activeMembers:i,inFlightCount:a,completedCount:o,riskCount:s,totalMessages:n.length,lastPulseAt:c,stageLabel:`协作已启动`,stageHint:`成员之间已经开始协作,但还没有形成完整回合,可以先看谁最活跃。`,stageTone:`border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-300/20 dark:bg-violet-400/10 dark:text-violet-100`}:{totalMembers:r,activeMembers:i,inFlightCount:a,completedCount:o,riskCount:s,totalMessages:n.length,lastPulseAt:c,stageLabel:`等待首个任务`,stageHint:`团队已经存在,但还没有消息流转。先给每个角色一个明确分工。`,stageTone:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-300/20 dark:bg-amber-400/10 dark:text-amber-100`}}function $j({state:e,totalMessages:t,pendingCount:n,processingCount:r,failedCount:i,focusOn:a}){return e===`support`?`该成员有 ${i} 条失败结果,建议先人工查看原因,再决定是否继续推进。`:e===`running`?`该成员正在执行中,先观察结果回报;如果长时间无响应,再补充 ${a||`任务`} 上下文。`:e===`queued`?`收件箱里还有 ${n} 条待处理消息,优先确认这轮任务是否足够明确。`:e===`completed`?`上一轮已经交付,可以继续给他下发下一步,或者切到其他角色看看是否需要衔接。`:e===`active`?`这名成员已经进入协作流,建议查看最近往返消息,判断是否需要追问或补充边界。`:t===0?`这名成员还没有开始行动,先给他一个清晰的小目标${a?`,最好贴合 ${a}`:``}。`:r>0?`任务仍在推进,先观察这一轮结果。`:`可以继续观察最近战报,确认是否需要新的输入。`}function eM(e){for(let t of e.blocks){if(t.type===`text`&&typeof t.text==`string`&&t.text.trim())return sM(t.text.trim(),180);if(t.type===`tool_use`)return`调用工具 ${String(t.name??`unknown`)},参数已写入执行上下文。`;if(t.type===`tool_result`)return typeof t.content==`string`&&t.content.trim()?sM(t.content.trim(),180):`收到一次工具执行结果。`}return`该记录没有可预览的文本内容。`}function tM({log:e}){let t=nM(e);return t?t.type===`markdown`?(0,z.jsx)(`div`,{className:`max-h-44 overflow-hidden`,children:(0,z.jsx)(cj,{content:t.content,compact:!0,className:`[&_h1]:text-base [&_h2]:text-sm [&_h3]:text-sm [&_pre]:text-xs [&_pre]:leading-5`})}):(0,z.jsx)(`p`,{className:`whitespace-pre-wrap`,children:t.content}):(0,z.jsx)(`p`,{className:`whitespace-pre-wrap`,children:eM(e)})}function nM(e){for(let t of e.blocks){if(t.type===`text`&&typeof t.text==`string`&&t.text.trim())return{type:`markdown`,content:t.text.trim()};if(t.type===`tool_result`&&typeof t.content==`string`&&t.content.trim())return{type:`markdown`,content:t.content.trim()};if(t.type===`tool_use`)return{type:`text`,content:`调用工具 ${String(t.name??`unknown`)},参数已写入执行上下文。`}}return null}function rM(e,t){let n=iM(e.actorMailboxId,t),r=iM(e.mailboxId,t),i=iM(e.counterpartMailboxId??e.message?.fromMailboxId,t),a=typeof e.detail?.visibleCount==`number`?e.detail.visibleCount:null,o=typeof e.detail?.previousStatus==`string`?e.detail.previousStatus:null,s=typeof e.detail?.nextStatus==`string`?e.detail.nextStatus:null;if(e.eventType===`message_sent`)return`${iM(e.message?.fromMailboxId,t)??n} 向 ${iM(e.message?.toMailboxId,t)??r} 投递了一封邮件。`;if(e.eventType===`mailbox_listed`)return`${n??r??`成员`} 查看了邮箱,当前看到了 ${a??0} 封候选邮件。`;if(e.eventType===`message_opened`)return`${n??r??`成员`} 已选中一封邮件开始阅读,来源是 ${i??`上游成员`}。`;if(e.eventType===`message_replied`)return`${n??r??`成员`} 已完成处理,并把结果回给了 ${i??`上游成员`}。`;if(e.eventType===`message_followed_up`){let t=typeof e.detail?.kind==`string`?e.detail.kind:`progress`,a=t===`question`?`追问`:t===`partial_result`?`部分结果`:t===`nudge`?`催办`:`进展`,o=e.message?.threadId||(typeof e.detail?.threadId==`string`?e.detail.threadId:void 0)||e.messageId;return`${n??r??`成员`} 在线程 ${oM(o??`unknown`)} 中追加了一条${a},发送给 ${i??`上游成员`}。`}return e.eventType===`message_status_changed`?`${r??`该邮箱`} 中的一封邮件状态从 ${o??`unknown`} 变成了 ${s??`unknown`}。`:`发生了一条 mailbox 过程事件。`}function iM(e,t){return e?t.get(e)??aM(e):null}function aM(e){return e.length<=12?e:`${e.slice(0,8)}...`}function oM(e){return e.length<=10?e:`${e.slice(0,8)}...`}function sM(e,t){return e.length<=t?e:`${e.slice(0,t)}...`}function cM(e){return e.replace(/\r\n?/g,`
|
|
91
|
+
`).replace(/```[\s\S]*?```/g,e=>e.replace(/```[\w-]*\n?/g,``).trim()).replace(/^#{1,6}\s+/gm,``).replace(/^\s*>\s?/gm,``).replace(/^\s*[-*+]\s+/gm,``).replace(/^\s*\d+\.\s+/gm,``).replace(/\[([^\]]+)\]\(([^)]+)\)/g,`$1`).replace(/[*_~`]/g,``).replace(/\n{3,}/g,`
|
|
92
|
+
|
|
93
|
+
`).trim()}function lM(e,t){return sM(cM(e),t)}function uM(e){try{return new Date(e).toLocaleString(`zh-CN`)}catch{return String(e)}}function dM(e){try{return new Date(e).toLocaleTimeString(`zh-CN`,{hour:`2-digit`,minute:`2-digit`})}catch{return String(e)}}function fM(e){try{let t=Date.now()-e;return t<6e4?`刚刚`:t<36e5?`${Math.max(1,Math.floor(t/6e4))} 分钟前`:t<864e5?`${Math.max(1,Math.floor(t/36e5))} 小时前`:new Date(e).toLocaleString(`zh-CN`,{month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return String(e)}}function pM({className:e,size:t=`default`,...n}){return(0,z.jsx)(Dm,{"data-slot":`switch`,"data-size":t,className:J(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,z.jsx)(Om,{"data-slot":`switch-thumb`,className:`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground`})})}function mM({className:e,...t}){return(0,z.jsx)(`textarea`,{"data-slot":`textarea`,className:J(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}var hM={title:``,description:``,syntax:`0 * * * *`,channel:`default`,to:``};function gM(){let{data:e,isLoading:t,refetch:n}=P_(),r=I_(),i=L_(),a=ti(),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(hM),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(null),[g,_]=(0,S.useState)(!1),v=()=>{d(hM),s(!0)},y=e=>{d({title:e.title,description:e.description,syntax:e.schedule.syntax,channel:e.delivery.channel,to:e.delivery.to}),l(e)},b=async()=>{!u.title.trim()||!u.syntax.trim()||(await r.mutateAsync({title:u.title,description:u.description,schedule:{syntax:u.syntax},delivery:{channel:u.channel,to:u.to}}),s(!1),d(hM))},x=async()=>{if(!(!c||!u.title.trim()||!u.syntax.trim())){_(!0);try{await O_(c.id,{title:u.title,description:u.description,schedule:{syntax:u.syntax,createTime:c.schedule.createTime,lastRunTime:c.schedule.lastRunTime},delivery:{channel:u.channel,to:u.to}}),await a.invalidateQueries({queryKey:N_.all}),l(null),d(hM)}finally{_(!1)}}},C=async e=>{await A_(e.id,!e.enabled),await a.invalidateQueries({queryKey:N_.all})},w=async e=>{await j_(e.id),await a.invalidateQueries({queryKey:N_.all})},T=async()=>{f&&(await i.mutateAsync(f),p(null))},E=e=>{if(!e)return`—`;try{return new Date(e).toLocaleString(`zh-CN`)}catch{return e}};return(0,z.jsx)(R_,{children:(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Cron Jobs`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`管理定时任务调度`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Y,{variant:`outline`,size:`sm`,onClick:()=>n(),children:(0,z.jsx)(so,{className:`h-4 w-4`})}),(0,z.jsxs)(Y,{size:`sm`,onClick:v,children:[(0,z.jsx)(ao,{className:`h-4 w-4 mr-1`}),`新建任务`]})]})]}),t?(0,z.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(e=>(0,z.jsx)(z_,{children:(0,z.jsx)(U_,{className:`p-4`,children:(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(W_,{className:`h-5 w-48`}),(0,z.jsx)(W_,{className:`h-4 w-32`})]}),(0,z.jsx)(W_,{className:`h-6 w-12`})]})})},e))}):!e||e.length===0?(0,z.jsx)(z_,{children:(0,z.jsx)(U_,{className:`py-12`,children:(0,z.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,z.jsx)(Ma,{className:`h-10 w-10 text-muted-foreground mb-3`}),(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`暂无定时任务`}),(0,z.jsxs)(Y,{variant:`outline`,className:`mt-3`,size:`sm`,onClick:v,children:[(0,z.jsx)(ao,{className:`h-4 w-4 mr-1`}),`创建第一个任务`]})]})})}):(0,z.jsx)(`div`,{className:`space-y-3`,children:e.map(e=>(0,z.jsx)(z_,{children:(0,z.jsx)(U_,{className:`p-4`,children:(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,z.jsx)(`h3`,{className:`font-medium truncate`,children:e.title}),(0,z.jsx)(X,{variant:e.enabled?`default`:`secondary`,children:e.enabled?`启用`:`禁用`})]}),e.description&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground line-clamp-1 mb-2`,children:e.description}),(0,z.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-muted-foreground`,children:[(0,z.jsx)(`span`,{className:`font-mono bg-muted px-1.5 py-0.5 rounded`,children:e.schedule.syntax}),(0,z.jsxs)(`span`,{children:[(0,z.jsx)(Ma,{className:`h-3 w-3 inline mr-1`}),E(e.schedule.lastRunTime)]}),(0,z.jsxs)(`span`,{children:[e.delivery.channel,` → `,e.delivery.to]})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,z.jsx)(pM,{checked:e.enabled,onCheckedChange:()=>C(e)}),(0,z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,onClick:()=>w(e),disabled:!e.enabled,title:`手动触发`,children:(0,z.jsx)(io,{className:`h-4 w-4`})}),(0,z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(e.id),title:`执行历史`,children:(0,z.jsx)(Ma,{className:`h-4 w-4`})}),(0,z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,onClick:()=>y(e),title:`编辑`,children:(0,z.jsx)(ka,{className:`h-4 w-4`})}),(0,z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,onClick:()=>p(e.id),title:`删除`,children:(0,z.jsx)(yo,{className:`h-4 w-4`})})]})]})})},e.id))}),(0,z.jsx)(mx,{open:o,onOpenChange:s,children:(0,z.jsxs)(_x,{className:`sm:max-w-md`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsx)(bx,{children:`新建定时任务`}),(0,z.jsx)(xx,{children:`配置 cron 表达式和投递方式`})]}),(0,z.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`标题`}),(0,z.jsx)(px,{value:u.title,onChange:e=>d(t=>({...t,title:e.target.value})),placeholder:`任务标题`})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`描述`}),(0,z.jsx)(mM,{value:u.description,onChange:e=>d(t=>({...t,description:e.target.value})),placeholder:`任务描述(可选)`,rows:2})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`Cron 表达式`}),(0,z.jsx)(px,{value:u.syntax,onChange:e=>d(t=>({...t,syntax:e.target.value})),placeholder:`0 * * * *`,className:`font-mono`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`格式: 分 时 日 月 周(如 0 */2 * * * 表示每2小时)`})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`投递通道`}),(0,z.jsx)(px,{value:u.channel,onChange:e=>d(t=>({...t,channel:e.target.value})),placeholder:`channel`})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`投递目标`}),(0,z.jsx)(px,{value:u.to,onChange:e=>d(t=>({...t,to:e.target.value})),placeholder:`to`})]})]})]}),(0,z.jsxs)(yx,{children:[(0,z.jsx)(Y,{variant:`outline`,onClick:()=>s(!1),children:`取消`}),(0,z.jsxs)(Y,{onClick:b,disabled:r.isPending||!u.title.trim(),children:[r.isPending&&(0,z.jsx)(Ka,{className:`h-4 w-4 mr-1 animate-spin`}),`创建`]})]})]})}),(0,z.jsx)(mx,{open:!!c,onOpenChange:()=>l(null),children:(0,z.jsxs)(_x,{className:`sm:max-w-md`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsx)(bx,{children:`编辑定时任务`}),(0,z.jsx)(xx,{children:`修改任务配置`})]}),(0,z.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`标题`}),(0,z.jsx)(px,{value:u.title,onChange:e=>d(t=>({...t,title:e.target.value})),placeholder:`任务标题`})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`描述`}),(0,z.jsx)(mM,{value:u.description,onChange:e=>d(t=>({...t,description:e.target.value})),placeholder:`任务描述(可选)`,rows:2})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`Cron 表达式`}),(0,z.jsx)(px,{value:u.syntax,onChange:e=>d(t=>({...t,syntax:e.target.value})),placeholder:`0 * * * *`,className:`font-mono`})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`投递通道`}),(0,z.jsx)(px,{value:u.channel,onChange:e=>d(t=>({...t,channel:e.target.value})),placeholder:`channel`})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`投递目标`}),(0,z.jsx)(px,{value:u.to,onChange:e=>d(t=>({...t,to:e.target.value})),placeholder:`to`})]})]})]}),(0,z.jsxs)(yx,{children:[(0,z.jsx)(Y,{variant:`outline`,onClick:()=>l(null),children:`取消`}),(0,z.jsxs)(Y,{onClick:x,disabled:g||!u.title.trim(),children:[g&&(0,z.jsx)(Ka,{className:`h-4 w-4 mr-1 animate-spin`}),`保存`]})]})]})}),(0,z.jsx)(mx,{open:!!f,onOpenChange:()=>p(null),children:(0,z.jsxs)(_x,{className:`sm:max-w-sm`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsx)(bx,{children:`确认删除`}),(0,z.jsx)(xx,{children:`删除后不可恢复,确定要删除此定时任务吗?`})]}),(0,z.jsxs)(yx,{children:[(0,z.jsx)(Y,{variant:`outline`,onClick:()=>p(null),children:`取消`}),(0,z.jsxs)(Y,{variant:`destructive`,onClick:T,disabled:i.isPending,children:[i.isPending&&(0,z.jsx)(Ka,{className:`h-4 w-4 mr-1 animate-spin`}),`删除`]})]})]})}),(0,z.jsx)(_M,{jobId:m,onClose:()=>h(null)})]})})}function _M({jobId:e,onClose:t}){let{data:n,isLoading:r}=F_(e??``);return(0,z.jsx)(mx,{open:!!e,onOpenChange:()=>t(),children:(0,z.jsxs)(_x,{className:`sm:max-w-lg`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsx)(bx,{children:`执行历史`}),(0,z.jsx)(xx,{children:`查看该定时任务的执行记录`})]}),(0,z.jsx)(Fg,{className:`max-h-[400px]`,children:r?(0,z.jsx)(`div`,{className:`space-y-2 py-4`,children:[1,2,3].map(e=>(0,z.jsx)(W_,{className:`h-12 w-full`},e))}):!n||n.length===0?(0,z.jsx)(`div`,{className:`py-8 text-center text-muted-foreground text-sm`,children:`暂无执行记录`}):(0,z.jsx)(`div`,{className:`space-y-2`,children:n.map((e,t)=>(0,z.jsxs)(`div`,{className:`flex items-center justify-between p-3 rounded-lg border text-sm`,children:[(0,z.jsx)(`div`,{children:(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:vM(e.timestamp)})}),(0,z.jsx)(X,{variant:e.result===`success`?`default`:`destructive`,children:e.result})]},t))})})]})})}function vM(e){try{return new Date(e).toLocaleString(`zh-CN`)}catch{return e}}var yM=()=>Yg(`/api/tools`),bM=()=>Yg(`/api/skills`),xM=e=>$g(`/api/skills/${encodeURIComponent(e)}`),SM={all:[`tools`]},CM={all:[`skills`],detail:e=>[`skills`,e]};function wM(){return gi({queryKey:SM.all,queryFn:yM})}function TM(){return gi({queryKey:CM.all,queryFn:bM})}function EM(){let e=ti();return _i({mutationFn:e=>xM(e),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:CM.all}),e.invalidateQueries({queryKey:CM.detail(n)})}})}function DM({...e}){return(0,z.jsx)(xs,{"data-slot":`collapsible`,...e})}function OM({...e}){return(0,z.jsx)(gs,{"data-slot":`collapsible-trigger`,...e})}function kM({...e}){return(0,z.jsx)(vs,{"data-slot":`collapsible-content`,...e})}var AM={file:{label:`文件操作`,icon:Fa},web:{label:`网络`,icon:Ra},system:{label:`系统`,icon:V},task:{label:`任务管理`,icon:Ga},team:{label:`团队管理`,icon:wo},cron:{label:`定时任务`,icon:Ma}},jM={label:`其他`,icon:oo};function MM(e){let t=e.toLowerCase();return t.includes(`file`)||t.includes(`read`)||t.includes(`write`)||t.includes(`edit`)||t.includes(`glob`)||t.includes(`grep`)||t.includes(`bash`)||t.includes(`mkdir`)?`file`:t.includes(`web`)||t.includes(`search`)||t.includes(`fetch`)||t.includes(`http`)||t.includes(`url`)?`web`:t.includes(`system`)||t.includes(`process`)||t.includes(`env`)||t.includes(`config`)||t.includes(`memory`)?`system`:t.includes(`task`)||t.includes(`goal`)?`task`:t.includes(`team`)||t.includes(`member`)||t.includes(`communicat`)?`team`:t.includes(`cron`)||t.includes(`schedule`)||t.includes(`timer`)?`cron`:`other`}function NM({schema:e}){return e?.properties?(0,z.jsx)(`div`,{className:`space-y-2`,children:Object.entries(e.properties).map(([t,n])=>(0,z.jsxs)(`div`,{className:`rounded-md border bg-muted/30 px-3 py-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`code`,{className:`text-sm font-medium`,children:t}),(0,z.jsx)(X,{variant:`outline`,className:`text-xs`,children:n.type}),e.required?.includes(t)&&(0,z.jsx)(X,{variant:`destructive`,className:`text-xs`,children:`必填`})]}),n.description&&(0,z.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:n.description}),n.enum&&(0,z.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:n.enum.map(e=>(0,z.jsx)(X,{variant:`secondary`,className:`text-xs`,children:String(e)},String(e)))})]},t))}):null}function PM(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(new Set),{data:i,isLoading:a}=wM(),o=(0,S.useMemo)(()=>{let t={};return(i??[]).filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||t.description.toLowerCase().includes(e.toLowerCase())).forEach(e=>{let n=MM(e.name);t[n]||(t[n]=[]),t[n].push(e)}),t},[i,e]),s=i?.length??0,c=e=>{r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,z.jsxs)(R_,{children:[(0,z.jsxs)(`div`,{className:`mb-6 flex items-center justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Tools`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`查看所有已注册的工具及其参数`})]}),(0,z.jsxs)(X,{variant:`secondary`,className:`gap-1`,children:[(0,z.jsx)(Eo,{className:`h-3 w-3`}),a?`...`:`${s} 个工具`]})]}),(0,z.jsxs)(`div`,{className:`relative mb-6`,children:[(0,z.jsx)(uo,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,z.jsx)(px,{placeholder:`搜索工具...`,className:`pl-9`,value:e,onChange:e=>t(e.target.value)})]}),a?(0,z.jsx)(`div`,{className:`space-y-6`,children:Array.from({length:3}).map((e,t)=>(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsx)(W_,{className:`h-6 w-32`}),(0,z.jsx)(W_,{className:`h-24 w-full`})]},t))}):Object.keys(o).length===0?(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-muted-foreground`,children:[(0,z.jsx)(Eo,{className:`mb-3 h-10 w-10`}),(0,z.jsx)(`p`,{className:`text-sm`,children:e?`未找到匹配的工具`:`暂无工具`})]}):(0,z.jsx)(`div`,{className:`space-y-8`,children:Object.entries(o).map(([e,t])=>{let r=AM[e]??jM,i=r.icon;return(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,z.jsx)(i,{className:`h-4 w-4 text-muted-foreground`}),(0,z.jsx)(`h2`,{className:`text-sm font-semibold text-muted-foreground`,children:r.label}),(0,z.jsx)(X,{variant:`outline`,className:`text-xs`,children:t.length})]}),(0,z.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>{let t=n.has(e.name);return(0,z.jsx)(z_,{size:`sm`,children:(0,z.jsxs)(DM,{open:t,onOpenChange:()=>c(e.name),children:[(0,z.jsx)(OM,{className:`w-full`,children:(0,z.jsx)(B_,{className:`cursor-pointer`,children:(0,z.jsxs)(V_,{className:`flex items-center justify-between`,children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Eo,{className:`h-3.5 w-3.5 text-primary`}),(0,z.jsx)(`code`,{className:`text-sm`,children:e.name})]}),(0,z.jsx)(Da,{className:`h-4 w-4 text-muted-foreground transition-transform ${t?`rotate-180`:``}`})]})})}),(0,z.jsx)(kM,{children:(0,z.jsxs)(U_,{className:`space-y-4`,children:[(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h4`,{className:`mb-2 text-xs font-medium text-muted-foreground uppercase tracking-wider`,children:`参数 Schema`}),(0,z.jsx)(NM,{schema:e.inputSchema})]})]})})]})},e.name)})})]},e)})})]})}function FM(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(null),{data:i,isLoading:a}=TM(),o=EM(),{data:s,isLoading:c}=gi({queryKey:CM.detail(n),queryFn:async()=>{let e=await fetch(xi(`/api/skills/${encodeURIComponent(n)}`));if(!e.ok)throw Error(`Failed to fetch skill detail`);return e.json()},enabled:!!n}),l=(i??[]).filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||t.description.toLowerCase().includes(e.toLowerCase()));return(0,z.jsxs)(R_,{children:[(0,z.jsxs)(`div`,{className:`mb-6 flex items-center justify-between`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Skills`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`查看所有已注册的技能`})]}),(0,z.jsxs)(X,{variant:`secondary`,className:`gap-1`,children:[(0,z.jsx)(ho,{className:`h-3 w-3`}),a?`...`:`${i?.length??0} 个技能`]})]}),(0,z.jsxs)(`div`,{className:`relative mb-6`,children:[(0,z.jsx)(uo,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,z.jsx)(px,{placeholder:`搜索技能...`,className:`pl-9`,value:e,onChange:e=>t(e.target.value)})]}),a?(0,z.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,z.jsxs)(z_,{children:[(0,z.jsxs)(B_,{children:[(0,z.jsx)(W_,{className:`h-5 w-32`}),(0,z.jsx)(W_,{className:`h-4 w-48`})]}),(0,z.jsx)(U_,{children:(0,z.jsx)(W_,{className:`h-4 w-full`})})]},t))}):l.length===0?(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-muted-foreground`,children:[(0,z.jsx)(ho,{className:`mb-3 h-10 w-10`}),(0,z.jsx)(`p`,{className:`text-sm`,children:e?`未找到匹配的技能`:`暂无技能`})]}):(0,z.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:l.map(e=>(0,z.jsx)(z_,{className:`relative cursor-pointer transition-shadow hover:shadow-md`,onClick:()=>r(e.name),children:(0,z.jsxs)(B_,{className:e.deletable?`pr-12`:void 0,children:[(0,z.jsxs)(V_,{className:`flex items-center gap-2`,children:[(0,z.jsx)(ho,{className:`h-4 w-4 text-primary`}),e.name]}),e.deletable&&(0,z.jsx)(`div`,{className:`absolute top-3 right-3`,children:(0,z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,disabled:o.isPending,onClick:t=>{t.stopPropagation(),confirm(`确认删除技能 "${e.name}"?`)&&(o.mutate(e.name),n===e.name&&r(null))},title:`删除技能`,children:(0,z.jsx)(yo,{className:`h-4 w-4 text-destructive`})})}),(0,z.jsx)(H_,{children:e.description})]})},e.name))}),(0,z.jsx)(mx,{open:!!n,onOpenChange:e=>!e&&r(null),children:(0,z.jsxs)(_x,{className:`sm:max-w-lg`,children:[(0,z.jsxs)(vx,{children:[(0,z.jsxs)(bx,{className:`flex items-center gap-2`,children:[(0,z.jsx)(ho,{className:`h-4 w-4 text-primary`}),n]}),(0,z.jsx)(xx,{children:s?.description??`加载中...`})]}),(0,z.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto`,children:c?(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(W_,{className:`h-4 w-full`}),(0,z.jsx)(W_,{className:`h-4 w-full`}),(0,z.jsx)(W_,{className:`h-4 w-3/4`})]}):s?.detail?(0,z.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,z.jsx)(`pre`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-foreground`,children:s.detail})}):(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`无详细内容`})})]})})]})}var IM=1,LM=.9,RM=.8,zM=.17,BM=.1,VM=.999,HM=.9999,UM=.99,WM=/[\\\/_+.#"@\[\(\{&]/,GM=/[\\\/_+.#"@\[\(\{&]/g,KM=/[\s-]/,qM=/[\s-]/g;function JM(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?IM:UM;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=JM(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=IM:WM.test(e.charAt(l-1))?(d*=RM,p=e.slice(i,l-1).match(GM),p&&i>0&&(d*=VM**+p.length)):KM.test(e.charAt(l-1))?(d*=LM,m=e.slice(i,l-1).match(qM),m&&i>0&&(d*=VM**+m.length)):(d*=zM,i>0&&(d*=VM**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=HM)),(d<BM&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=JM(e,t,n,r,l+1,a+2,o),f*BM>d&&(d=f*BM)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function YM(e){return e.toLowerCase().replace(qM,` `)}function XM(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,JM(e,t,YM(e),YM(t),0,0,{})}var ZM=Symbol.for(`react.lazy`),QM=S.use;function $M(e){return typeof e==`object`&&!!e&&`then`in e}function eN(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ZM&&`_payload`in e&&$M(e._payload)}function tN(e){let t=nN(e),n=S.forwardRef((e,n)=>{let{children:r,...i}=e;eN(r)&&typeof QM==`function`&&(r=QM(r._payload));let a=S.Children.toArray(r),o=a.find(iN);if(o){let e=o.props.children,r=a.map(t=>t===o?S.Children.count(e)>1?S.Children.only(null):S.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:S.isValidElement(e)?S.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function nN(e){let t=S.forwardRef((e,t)=>{let{children:n,...r}=e;if(eN(n)&&typeof QM==`function`&&(n=QM(n._payload)),S.isValidElement(n)){let e=oN(n),i=aN(r,n.props);return n.type!==S.Fragment&&(i.ref=t?Ao(t,e):e),S.cloneElement(n,i)}return S.Children.count(n)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rN=Symbol(`radix.slottable`);function iN(e){return S.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===rN}function aN(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function oN(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sN=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=tN(`Primitive.${t}`),r=S.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,z.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),cN=`[cmdk-group=""]`,lN=`[cmdk-group-items=""]`,uN=`[cmdk-group-heading=""]`,dN=`[cmdk-item=""]`,fN=`${dN}:not([aria-disabled="true"])`,pN=`cmdk-item-select`,mN=`data-value`,hN=(e,t,n)=>XM(e,t,n),gN=S.createContext(void 0),_N=()=>S.useContext(gN),vN=S.createContext(void 0),yN=()=>S.useContext(vN),bN=S.createContext(void 0),xN=S.forwardRef((e,t)=>{let n=FN(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=FN(()=>new Set),i=FN(()=>new Map),a=FN(()=>new Map),o=FN(()=>new Set),s=NN(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=cs(),y=cs(),b=cs(),x=S.useRef(null),C=RN();PN(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),PN(()=>{C(6,A)},[]);let w=S.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=S.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function E(e,t){let r=s.current?.filter??hN;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(lN);t?t.appendChild(e.parentElement===t?e:e.closest(`${lN} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${lN} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${cN}[${mN}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(mN);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(cN)?.querySelector(uN))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return x.current?.querySelector(`${dN}[aria-selected="true"]`)}function M(){return Array.from(x.current?.querySelectorAll(fN)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(mN))}function ee(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(mN))}function te(e){let t=j()?.closest(cN),n;for(;t&&!n;)t=e>0?jN(t,cN):MN(t,cN),n=t?.querySelector(fN);n?w.setState(`value`,n.getAttribute(mN)):ee(e)}let P=()=>N(M().length-1),F=e=>{e.preventDefault(),e.metaKey?P():e.altKey?te(1):ee(1)},ne=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?te(-1):ee(-1)};return S.createElement(sN.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&F(e);break;case`ArrowDown`:F(e);break;case`p`:case`k`:g&&e.ctrlKey&&ne(e);break;case`ArrowUp`:ne(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),P();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(pN);t.dispatchEvent(e)}}}}},S.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:VN},c),BN(e,e=>S.createElement(vN.Provider,{value:w},S.createElement(gN.Provider,{value:T},e))))}),SN=S.forwardRef((e,t)=>{let n=cs(),r=S.useRef(null),i=S.useContext(bN),a=_N(),o=NN(e),s=o.current?.forceMount??i?.forceMount;PN(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=LN(n,r,[e.value,e.children,r],e.keywords),l=yN(),u=IN(e=>e.value&&e.value===c.current),d=IN(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);S.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(pN,f),()=>t.removeEventListener(pN,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return S.createElement(sN.div,{ref:Ao(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),CN=S.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=cs(),s=S.useRef(null),c=S.useRef(null),l=cs(),u=_N(),d=IN(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);PN(()=>u.group(o),[]),LN(o,s,[e.value,e.heading,c]);let f=S.useMemo(()=>({id:o,forceMount:i}),[i]);return S.createElement(sN.div,{ref:Ao(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&S.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),BN(e,e=>S.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},S.createElement(bN.Provider,{value:f},e))))}),wN=S.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=S.useRef(null),a=IN(e=>!e.search);return!n&&!a?null:S.createElement(sN.div,{ref:Ao(i,t),...r,"cmdk-separator":``,role:`separator`})}),TN=S.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=yN(),o=IN(e=>e.search),s=IN(e=>e.selectedItemId),c=_N();return S.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),S.createElement(sN.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),EN=S.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=S.useRef(null),o=S.useRef(null),s=IN(e=>e.selectedItemId),c=_N();return S.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),S.createElement(sN.div,{ref:Ao(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},BN(e,e=>S.createElement(`div`,{ref:Ao(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),DN=S.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return S.createElement(nu,{open:n,onOpenChange:r},S.createElement(ru,{container:o},S.createElement(iu,{"cmdk-overlay":``,className:i}),S.createElement(au,{"aria-label":e.label,"cmdk-dialog":``,className:a},S.createElement(xN,{ref:t,...s}))))}),ON=S.forwardRef((e,t)=>IN(e=>e.filtered.count===0)?S.createElement(sN.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),kN=S.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return S.createElement(sN.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},BN(e,e=>S.createElement(`div`,{"aria-hidden":!0},e)))}),AN=Object.assign(xN,{List:EN,Item:SN,Input:TN,Group:CN,Separator:wN,Dialog:DN,Empty:ON,Loading:kN});function jN(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function MN(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function NN(e){let t=S.useRef(e);return PN(()=>{t.current=e}),t}var PN=typeof window>`u`?S.useEffect:S.useLayoutEffect;function FN(e){let t=S.useRef();return t.current===void 0&&(t.current=e()),t}function IN(e){let t=yN(),n=()=>e(t.snapshot());return S.useSyncExternalStore(t.subscribe,n,n)}function LN(e,t,n,r=[]){let i=S.useRef(),a=_N();return PN(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(mN,s),i.current=s}),i}var RN=()=>{let[e,t]=S.useState(),n=FN(()=>new Map);return PN(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function zN(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function BN({asChild:e,children:t},n){return e&&S.isValidElement(t)?S.cloneElement(zN(t),{ref:t.ref},n(t.props.children)):n(t)}var VN={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function HN({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:J(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var UN=Hg(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function WN({className:e,align:t=`inline-start`,...n}){return(0,z.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:J(UN({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function GN({className:e,...t}){return(0,z.jsx)(AN,{"data-slot":`command`,className:J(`flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground`,e),...t})}function KN({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,z.jsxs)(HN,{className:`h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[(0,z.jsx)(AN.Input,{"data-slot":`command-input`,className:J(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t}),(0,z.jsx)(WN,{children:(0,z.jsx)(uo,{className:`size-4 shrink-0 opacity-50`})})]})})}function qN({className:e,...t}){return(0,z.jsx)(AN.List,{"data-slot":`command-list`,className:J(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,e),...t})}function JN({className:e,...t}){return(0,z.jsx)(AN.Empty,{"data-slot":`command-empty`,className:J(`py-6 text-center text-sm`,e),...t})}function YN({className:e,...t}){return(0,z.jsx)(AN.Group,{"data-slot":`command-group`,className:J(`overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function XN({className:e,children:t,...n}){return(0,z.jsxs)(AN.Item,{"data-slot":`command-item`,className:J(`group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground`,e),...n,children:[t,(0,z.jsx)(Ea,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}function ZN({...e}){return(0,z.jsx)(xp,{"data-slot":`popover`,...e})}function QN({...e}){return(0,z.jsx)(Sp,{"data-slot":`popover-trigger`,...e})}function $N({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,z.jsx)(Cp,{children:(0,z.jsx)(wp,{"data-slot":`popover-content`,align:t,sideOffset:n,className:J(`z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r})})}var eP=()=>Yg(`/api/memory/users`),tP=e=>Yg(`/api/memory`,{userId:e}),nP=e=>Xg(`/api/memory`,e),rP=(e,t)=>Qg(`/api/memory/${encodeURIComponent(e)}`,t),iP=(e,t)=>$g(`/api/memory/${encodeURIComponent(e)}?userId=${encodeURIComponent(t)}`),aP=e=>Yg(`/api/memory/dream`,{userId:e}),oP=e=>Yg(`/api/memory/context`,{userId:e}),sP={all:[`memory`],users:[`memory`,`users`],list:e=>[`memory`,`list`,e],dream:e=>[`memory`,`dream`,e],context:e=>[`memory`,`context`,e]};function cP(){return gi({queryKey:sP.users,queryFn:eP})}function lP(e){return gi({queryKey:sP.list(e??``),queryFn:()=>tP(e),enabled:!!e})}function uP(e){return gi({queryKey:sP.dream(e??``),queryFn:()=>aP(e),enabled:!!e})}function dP(e){return gi({queryKey:sP.context(e??``),queryFn:()=>oP(e),enabled:!!e})}function fP(){let e=ti();return _i({mutationFn:nP,onSuccess:t=>{e.invalidateQueries({queryKey:sP.users}),e.invalidateQueries({queryKey:sP.list(t.userId)}),e.invalidateQueries({queryKey:sP.context(t.userId)})}})}function pP(){let e=ti();return _i({mutationFn:({id:e,data:t})=>rP(e,t),onSuccess:t=>{e.invalidateQueries({queryKey:sP.users}),e.invalidateQueries({queryKey:sP.list(t.userId)}),e.invalidateQueries({queryKey:sP.context(t.userId)})}})}function mP(){let e=ti();return _i({mutationFn:({id:e,userId:t})=>iP(e,t),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:sP.users}),e.invalidateQueries({queryKey:sP.list(n.userId)}),e.invalidateQueries({queryKey:sP.context(n.userId)})}})}function hP(){let{data:e,isLoading:t,refetch:n}=cP(),r=fP(),i=pP(),a=mP(),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(``);(0,S.useEffect)(()=>{!c&&e?.[0]?.userId&&(l(e[0].userId),d(e[0].userId))},[c,e]);let v=c?.trim()||null,y=vP(e??[]),{data:b,isLoading:x}=lP(v),{data:C,isLoading:w}=uP(v),{data:T,isLoading:E}=dP(v),D=b?.find(e=>e.id===f)??null,O=b?.[0]?.updatedAt??null;(0,S.useEffect)(()=>{if(!v)return;if(!b||b.length===0){p(null);return}let e=b.some(e=>e.id===f);(!f||!e)&&p(b[0].id)},[v,b,f]),(0,S.useEffect)(()=>{if(D){h(D.title),_(D.content);return}h(``),_(``)},[D]);let k=()=>{let e=u.trim();e&&(l(e),p(null))},A=e=>{l(e),d(e),p(null),s(!1)};return(0,z.jsx)(R_,{children:(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Memory`}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`这里管理的是用户级长期记忆,不是团队过程日志。梦境摘要会单独展示为系统生成的跨天压缩记忆。`})]}),(0,z.jsxs)(Y,{variant:`outline`,size:`sm`,onClick:()=>n(),children:[(0,z.jsx)(so,{className:`h-4 w-4`}),`刷新`]})]}),(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-base`,children:[(0,z.jsx)(So,{className:`h-4 w-4 text-primary`}),`选择用户`]})}),(0,z.jsxs)(U_,{className:`space-y-4`,children:[(0,z.jsx)(`div`,{className:`rounded-2xl border border-border/60 bg-muted/30 p-4`,children:(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`当前用户`}),v?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:xP(v)}),(0,z.jsx)(X,{variant:`outline`,children:bP(v)})]}),SP(v)&&(0,z.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground line-clamp-2 break-all`,children:v})]}):(0,z.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`尚未选择`})]}),v&&(0,z.jsxs)(X,{variant:`outline`,className:`gap-1`,children:[(0,z.jsx)(Aa,{className:`h-3 w-3`}),`已选中`]})]})}),(0,z.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,1fr)_320px]`,children:[(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`从已发现用户中选择`}),t?(0,z.jsx)(W_,{className:`h-14 w-full`}):(0,z.jsxs)(ZN,{open:o,onOpenChange:s,children:[(0,z.jsx)(QN,{asChild:!0,children:(0,z.jsxs)(Y,{variant:`outline`,className:`h-auto w-full justify-between px-4 py-3 text-left whitespace-normal`,children:[(0,z.jsx)(`div`,{className:`min-w-0 flex-1`,children:v?(0,z.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`truncate text-sm font-semibold text-foreground`,children:xP(v)}),(0,z.jsx)(X,{variant:`outline`,className:`shrink-0`,children:bP(v)})]}),(0,z.jsx)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,children:v})]}):(0,z.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`选择一个用户以查看长期记忆`})}),(0,z.jsx)(Da,{className:`ml-3 h-4 w-4 shrink-0 text-muted-foreground`})]})}),(0,z.jsx)($N,{align:`start`,className:`w-[min(720px,calc(100vw-3rem))] p-0`,children:(0,z.jsxs)(GN,{children:[(0,z.jsx)(KN,{placeholder:`搜索 userId、团队成员名、kanban 线程`}),(0,z.jsxs)(qN,{className:`max-h-[380px]`,children:[(0,z.jsx)(JN,{children:`没有匹配到已发现的用户`}),y.map(e=>(0,z.jsx)(YN,{heading:e.label,children:e.users.map(e=>{let t=e.userId===v;return(0,z.jsxs)(XN,{value:yP(e),onSelect:()=>A(e.userId),className:`items-start gap-3 py-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0 flex-1 overflow-hidden`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`truncate text-sm font-semibold text-foreground`,children:xP(e.userId)}),e.hasMemory&&(0,z.jsxs)(X,{variant:`secondary`,className:`shrink-0 text-[10px]`,children:[e.memoryCount,` 条记忆`]}),e.hasDream&&(0,z.jsx)(X,{variant:`outline`,className:`shrink-0 text-[10px]`,children:`有梦境`})]}),(0,z.jsx)(`div`,{className:`mt-1 truncate font-mono text-xs text-muted-foreground`,children:e.userId}),(0,z.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.lastActivityAt?`最近活跃 ${wP(e.lastActivityAt)}`:`暂无活跃时间`})]}),t&&(0,z.jsx)(Aa,{className:`mt-0.5 h-4 w-4 shrink-0 text-primary`})]},e.userId)})},e.kind))]})]})})]})]}),(0,z.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/60 bg-muted/20 p-4 text-sm text-muted-foreground`,children:"选择器按用户类型分组显示,支持搜索。超长 `userId` 会在下拉列表中自动截断,避免把页面撑坏。"})]}),(0,z.jsxs)(`div`,{className:`rounded-2xl border border-border/60 bg-muted/20 p-4`,children:[(0,z.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`手动输入 userId`}),(0,z.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:`当目标用户还没出现在已发现列表里,或者你已经知道准确 userId 时,直接在这里输入更快。`}),(0,z.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,z.jsx)(px,{value:u,onChange:e=>d(e.target.value),placeholder:`例如:chat_xxx / kanban:goal:task / team mailbox id`}),(0,z.jsx)(Y,{className:`w-full`,onClick:k,disabled:!u.trim(),children:`应用这个 userId`})]})]})]})]})]}),v?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2 xl:grid-cols-4`,children:[(0,z.jsx)(gP,{icon:Ta,label:`长期记忆`,value:`${b?.length??0} 条`,note:`显式写入、可编辑`,loading:x}),(0,z.jsx)(gP,{icon:ja,label:`最近更新`,value:O?CP(O):`--`,note:O?wP(O):`暂无记忆更新`,loading:x}),(0,z.jsx)(gP,{icon:ho,label:`梦境摘要`,value:C?.dreamContent?`已生成`:`暂无`,note:C?.state?.lastDreamAt?`最近做梦 ${wP(C.state.lastDreamAt)}`:`尚未做梦`,loading:w}),(0,z.jsx)(gP,{icon:Za,label:`做梦次数`,value:C?.state?`${C.state.dreamCount} 次`:`--`,note:C?.state?.lastActivityAt?`最近活跃 ${wP(C.state.lastActivityAt)}`:`暂无活跃记录`,loading:w})]}),(0,z.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[340px_minmax(0,1fr)]`,children:[(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(V_,{className:`text-base`,children:`记忆列表`}),(0,z.jsx)(`p`,{className:`mt-1 font-mono text-xs text-muted-foreground`,children:v})]}),(0,z.jsxs)(Y,{variant:`outline`,size:`sm`,onClick:()=>{p(null),h(``),_(``)},children:[(0,z.jsx)(ao,{className:`h-4 w-4`}),`新建`]})]})}),(0,z.jsx)(U_,{children:x?(0,z.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(e=>(0,z.jsx)(W_,{className:`h-20 w-full`},e))}):!b||b.length===0?(0,z.jsx)(`div`,{className:`rounded-2xl border border-dashed px-4 py-10 text-center text-sm text-muted-foreground`,children:`这个 userId 还没有长期记忆。你可以先在右侧创建第一条。`}):(0,z.jsx)(Fg,{className:`max-h-[620px] pr-4`,children:(0,z.jsx)(`div`,{className:`space-y-3`,children:b.map(e=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>p(e.id),className:`w-full rounded-2xl border p-4 text-left transition-colors hover:bg-muted/35 ${f===e.id?`border-primary bg-primary/5`:``}`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:`font-mono text-[10px]`,children:e.id}),(0,z.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:wP(e.updatedAt)})]}),(0,z.jsx)(`div`,{className:`mt-3 text-sm font-semibold text-foreground`,children:e.title}),(0,z.jsx)(`div`,{className:`mt-2 text-sm leading-6 text-muted-foreground`,children:TP(EP(e.content),120)})]},e.id))})})})]}),(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(V_,{className:`text-base`,children:D?`编辑长期记忆`:`新建长期记忆`}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`长期记忆应该是稳定事实、偏好或约束;一次性任务数据不适合写在这里。`})]}),D&&(0,z.jsx)(X,{variant:`outline`,className:`font-mono`,children:D.id})]})}),(0,z.jsxs)(U_,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`标题`}),(0,z.jsx)(px,{value:m,onChange:e=>h(e.target.value),placeholder:`例如:偏好-包管理器 / 团队-部署环境 / 约束-回答风格`})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`label`,{className:`text-sm font-medium`,children:`内容`}),(0,z.jsx)(mM,{value:g,onChange:e=>_(e.target.value),placeholder:`完整写下这条长期记忆,保留足够上下文,便于未来复用。`,className:`min-h-40`})]}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`userId: `,(0,z.jsx)(`span`,{className:`font-mono`,children:v})]}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[D&&(0,z.jsxs)(Y,{variant:`destructive`,onClick:async()=>{!v||!D||(await a.mutateAsync({id:D.id,userId:v}),p(null))},disabled:a.isPending,children:[(0,z.jsx)(yo,{className:`h-4 w-4`}),`删除`]}),(0,z.jsxs)(Y,{onClick:async()=>{if(!(!v||!m.trim()||!g.trim())){if(D){await i.mutateAsync({id:D.id,data:{userId:v,title:m.trim(),content:g.trim()}});return}p((await r.mutateAsync({userId:v,title:m.trim(),content:g.trim()})).id)}},disabled:!m.trim()||!g.trim()||r.isPending||i.isPending,children:[(0,z.jsx)(lo,{className:`h-4 w-4`}),D?`保存修改`:`创建记忆`]})]})]})]})]}),(0,z.jsxs)(`div`,{className:`grid gap-6 2xl:grid-cols-2`,children:[(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-base`,children:[(0,z.jsx)(ho,{className:`h-4 w-4 text-primary`}),`梦境摘要`]})}),(0,z.jsx)(U_,{children:w?(0,z.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(e=>(0,z.jsx)(W_,{className:`h-16 w-full`},e))}):C?.dreamContent?(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2 text-xs`,children:[C.state?.lastDreamAt&&(0,z.jsxs)(X,{variant:`outline`,children:[`最近做梦 `,wP(C.state.lastDreamAt)]}),C.state?.dreamCount!==void 0&&(0,z.jsxs)(X,{variant:`outline`,children:[`累计 `,C.state.dreamCount,` 次`]})]}),(0,z.jsx)(`div`,{className:`max-h-[320px] overflow-auto rounded-2xl border bg-muted/25 p-4 pr-5`,children:(0,z.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-sm leading-6 text-foreground`,children:C.dreamContent})})]}):(0,z.jsx)(`div`,{className:`rounded-2xl border border-dashed px-4 py-10 text-center text-sm text-muted-foreground`,children:`还没有梦境摘要。系统会在长时间不活跃或上下文压缩时生成它。`})})]}),(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-base`,children:[(0,z.jsx)(Za,{className:`h-4 w-4 text-primary`}),`注入预览`]})}),(0,z.jsx)(U_,{children:E?(0,z.jsx)(`div`,{className:`space-y-3`,children:[1,2].map(e=>(0,z.jsx)(W_,{className:`h-24 w-full`},e))}):(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsx)(_P,{title:`长期记忆注入块`,content:T?.memoryContextBlock||`当前没有长期记忆注入块。`}),(0,z.jsx)(_P,{title:`梦境注入块`,content:T?.dreamContextBlock||`当前没有梦境注入块。`})]})})]})]})]})]})]}):(0,z.jsx)(z_,{children:(0,z.jsx)(U_,{className:`py-16 text-center text-muted-foreground`,children:`先选择一个 userId,再查看长期记忆与梦境摘要。`})})]})})}function gP({icon:e,label:t,value:n,note:r,loading:i}){return(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2 text-sm font-medium text-muted-foreground`,children:[(0,z.jsx)(e,{className:`h-4 w-4`}),t]})}),(0,z.jsxs)(U_,{children:[i?(0,z.jsx)(W_,{className:`h-8 w-24`}):(0,z.jsx)(`div`,{className:`text-2xl font-semibold`,children:n}),(0,z.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:r})]})]})}function _P({title:e,content:t}){return(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:e}),(0,z.jsx)(`div`,{className:`max-h-[180px] overflow-auto rounded-2xl border bg-muted/25 p-4 pr-5`,children:(0,z.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-xs leading-6 text-foreground`,children:t})})]})}function vP(e){let t=[`Chat`,`Team`,`Kanban`,`User`],n=new Map;for(let t of e){let e=bP(t.userId),r=n.get(e)??[];r.push(t),n.set(e,r)}return t.map(e=>({kind:e,label:e,users:(n.get(e)??[]).sort((e,t)=>(t.lastActivityAt??0)-(e.lastActivityAt??0)||(t.memoryCount??0)-(e.memoryCount??0)||e.userId.localeCompare(t.userId))})).filter(e=>e.users.length>0)}function yP(e){return[e.userId,xP(e.userId),bP(e.userId),e.hasMemory?`has-memory`:``,e.hasDream?`has-dream`:``].filter(Boolean).join(` `)}function bP(e){return e.startsWith(`kanban:`)?`Kanban`:e.includes(`::`)?`Team`:e.startsWith(`oc_`)||e.startsWith(`chat_`)?`Chat`:`User`}function xP(e){if(e.startsWith(`kanban:`)){let t=e.split(`:`);return t[t.length-1]||e}return e.includes(`::`)&&e.split(`::`).slice(-1)[0]||e}function SP(e){return xP(e)!==e}function CP(e){try{return new Date(e).toLocaleString(`zh-CN`,{month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return String(e)}}function wP(e){try{let t=Date.now()-e;return t<6e4?`刚刚`:t<36e5?`${Math.max(1,Math.floor(t/6e4))} 分钟前`:t<864e5?`${Math.max(1,Math.floor(t/36e5))} 小时前`:CP(e)}catch{return String(e)}}function TP(e,t){return e.length<=t?e:`${e.slice(0,t)}...`}function EP(e){return e.replace(/\r\n?/g,`
|
|
94
|
+
`).replace(/```[\s\S]*?```/g,e=>e.replace(/```[\w-]*\n?/g,``).trim()).replace(/^#{1,6}\s+/gm,``).replace(/\[([^\]]+)\]\(([^)]+)\)/g,`$1`).replace(/[*_~`]/g,``).replace(/\n{3,}/g,`
|
|
95
|
+
|
|
96
|
+
`).trim()}var DP=()=>Yg(`/api/system/info`),OP={info:[`system`,`info`]};function kP(){return gi({queryKey:OP.info,queryFn:DP,refetchInterval:3e4})}function AP(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,a=[];return t>0&&a.push(`${t} 天`),n>0&&a.push(`${n} 小时`),r>0&&a.push(`${r} 分钟`),(i>0||a.length===0)&&a.push(`${i} 秒`),a.join(` `)}function jP(){let{data:e,isLoading:t}=kP();return(0,z.jsxs)(R_,{children:[(0,z.jsxs)(`div`,{className:`mb-6`,children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Settings`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`系统配置与状态信息`})]}),(0,z.jsxs)(z_,{className:`mb-6`,children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Sa,{className:`h-4 w-4`}),`系统状态`]})}),(0,z.jsx)(U_,{children:t?(0,z.jsx)(`div`,{className:`space-y-3`,children:Array.from({length:4}).map((e,t)=>(0,z.jsx)(W_,{className:`h-5 w-full`},t))}):e?(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`grid grid-cols-[120px_1fr] items-center gap-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`版本`}),(0,z.jsx)(X,{variant:`secondary`,children:e.version})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-[120px_1fr] items-center gap-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`运行时间`}),(0,z.jsx)(`span`,{children:AP(e.uptime)})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-[120px_1fr] items-center gap-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`环境`}),(0,z.jsx)(X,{variant:e.env===`production`?`default`:`secondary`,children:e.env})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-[120px_1fr] items-center gap-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`Node.js`}),(0,z.jsx)(`code`,{className:`rounded bg-muted px-2 py-0.5 text-xs`,children:e.nodeVersion})]})]}):(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`无法获取系统信息`})})]}),(0,z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Va,{className:`h-4 w-4`}),`关于`]})}),(0,z.jsx)(U_,{children:(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`DuClaw Agent Manager 是一个多 Agent 协作管理平台, 提供 Kanban 看板、团队管理、定时任务、技能/工具管理等功能。`})})]}),(0,z.jsxs)(z_,{children:[(0,z.jsx)(B_,{children:(0,z.jsxs)(V_,{className:`flex items-center gap-2`,children:[(0,z.jsx)(V,{className:`h-4 w-4`}),`API 端点`]})}),(0,z.jsx)(U_,{children:(0,z.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:`text-xs`,children:`GET`}),(0,z.jsx)(`code`,{className:`text-xs`,children:`/api/goals`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:`text-xs`,children:`GET`}),(0,z.jsx)(`code`,{className:`text-xs`,children:`/api/teams`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:`text-xs`,children:`GET`}),(0,z.jsx)(`code`,{className:`text-xs`,children:`/api/tools`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:`text-xs`,children:`GET`}),(0,z.jsx)(`code`,{className:`text-xs`,children:`/api/skills`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:`text-xs`,children:`GET`}),(0,z.jsx)(`code`,{className:`text-xs`,children:`/api/cron/jobs`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(X,{variant:`outline`,className:`text-xs`,children:`GET`}),(0,z.jsx)(`code`,{className:`text-xs`,children:`/api/system/info`})]})]})})]})]})]})}function MP(){return(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground`,children:(0,z.jsxs)(`div`,{className:`text-center`,children:[(0,z.jsx)(`h1`,{className:`text-4xl font-bold text-foreground`,children:`404`}),(0,z.jsx)(`p`,{className:`mt-2`,children:`页面不存在`})]})})}function NP({delayDuration:e=0,...t}){return(0,z.jsx)(lh,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function PP(){return(0,z.jsx)(NP,{children:(0,z.jsx)(Ft,{children:(0,z.jsxs)(Nt,{element:(0,z.jsx)(Kg,{}),children:[(0,z.jsx)(Nt,{index:!0,element:(0,z.jsx)(jt,{to:`/dashboard`,replace:!0})}),(0,z.jsx)(Nt,{path:`dashboard`,element:(0,z.jsx)(K_,{})}),(0,z.jsx)(Nt,{path:`kanban`,element:(0,z.jsx)(dx,{})}),(0,z.jsx)(Nt,{path:`kanban/:goalId`,element:(0,z.jsx)(dx,{})}),(0,z.jsx)(Nt,{path:`teams`,element:(0,z.jsx)(Sx,{})}),(0,z.jsx)(Nt,{path:`teams/:teamName`,element:(0,z.jsx)(Dj,{})}),(0,z.jsx)(Nt,{path:`memory`,element:(0,z.jsx)(hP,{})}),(0,z.jsx)(Nt,{path:`cron`,element:(0,z.jsx)(gM,{})}),(0,z.jsx)(Nt,{path:`tools`,element:(0,z.jsx)(PM,{})}),(0,z.jsx)(Nt,{path:`skills`,element:(0,z.jsx)(FM,{})}),(0,z.jsx)(Nt,{path:`settings`,element:(0,z.jsx)(jP,{})}),(0,z.jsx)(Nt,{path:`mailbox`,element:(0,z.jsx)(jt,{to:`/teams`,replace:!0})}),(0,z.jsx)(Nt,{path:`*`,element:(0,z.jsx)(MP,{})})]})})})}(0,vi.createRoot)(document.getElementById(`root`)).render((0,z.jsx)(S.StrictMode,{children:(0,z.jsx)(Ii,{children:(0,z.jsx)(ni,{client:yi,children:(0,z.jsxs)(Cn,{basename:bi(),children:[(0,z.jsx)(PP,{}),(0,z.jsx)(Oo,{position:`top-right`,richColors:!0})]})})})}));
|