agent-lyceum 0.54.1 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/README.zh-TW.md +2 -0
- package/dist/adapters/cursor.js +5 -1
- package/dist/attribution.d.ts +2 -0
- package/dist/cli.js +33 -7
- package/dist/config.d.ts +3 -0
- package/dist/config.js +5 -1
- package/dist/dispatcher.js +7 -2
- package/dist/doctor.js +12 -3
- package/dist/format.d.ts +4 -1
- package/dist/format.js +40 -2
- package/dist/mailbox.d.ts +29 -1
- package/dist/mailbox.js +56 -15
- package/dist/message-store.d.ts +10 -0
- package/dist/message-store.js +26 -0
- package/dist/open-pr.d.ts +13 -1
- package/dist/open-pr.js +12 -4
- package/dist/playbook.d.ts +28 -0
- package/dist/playbook.js +40 -0
- package/dist/policy.d.ts +12 -0
- package/dist/policy.js +55 -0
- package/dist/project-lock.d.ts +16 -0
- package/dist/project-lock.js +34 -2
- package/dist/prompt.d.ts +2 -0
- package/dist/prompt.js +25 -7
- package/dist/records.d.ts +10 -0
- package/dist/records.js +46 -0
- package/dist/review-gate.d.ts +33 -0
- package/dist/review-gate.js +78 -0
- package/dist/run-cleanup.d.ts +9 -2
- package/dist/run-cleanup.js +67 -4
- package/dist/run-outcome.d.ts +4 -0
- package/dist/run-outcome.js +8 -1
- package/dist/run-session.d.ts +27 -0
- package/dist/run-session.js +347 -39
- package/dist/run-store.d.ts +17 -3
- package/dist/run-store.js +10 -2
- package/dist/scaffold.d.ts +1 -1
- package/dist/scaffold.js +5 -2
- package/dist/schema.d.ts +12 -0
- package/dist/schema.js +6 -0
- package/dist/status.d.ts +1 -1
- package/dist/task-bind.d.ts +4 -0
- package/dist/task-bind.js +42 -0
- package/dist/wake-cap.d.ts +5 -0
- package/dist/wake-cap.js +11 -0
- package/dist/worktree.d.ts +153 -6
- package/dist/worktree.js +378 -15
- package/package.json +1 -1
- package/web/dist/public/assets/index-CVkc3V2B.js +92 -0
- package/web/dist/public/assets/index-zT-RkrlC.css +2 -0
- package/web/dist/public/index.html +2 -2
- package/web/dist/public/assets/index-BPY1-W3F.css +0 -2
- package/web/dist/public/assets/index-CbQs5aMP.js +0 -92
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(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,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var te=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ne(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,te)}catch(e){te(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function re(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ne(re.bind(null,e))}var ie={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=re,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ne,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(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=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(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=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),m=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),N=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),P=Symbol.for(`react.context`),F=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),I=Symbol.for(`react.legacy_hidden`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.for(`react.view_transition`),L=Symbol.for(`react.recoverable`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var R=Symbol.for(`react.client.reference`);function ue(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===R?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case N:return`Profiler`;case M:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`;case se:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case P:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case F:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var de=Array.isArray,z=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},pe=[],me=-1;function he(e){return{current:e}}function V(e){0>me||(e.current=pe[me],pe[me]=null,me--)}function ge(e,t){me++,pe[me]=e.current,e.current=t}var _e=he(null),ve=he(null),ye=he(null),be=he(null);function xe(e,t){switch(ge(ye,t),ge(ve,e),ge(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}V(_e),ge(_e,e)}function Se(){V(_e),V(ve),V(ye)}function Ce(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,ge(be,e)),t=_e.current;var n=dp(t,e.type);t!==n&&(ge(ve,e),ge(_e,n))}function we(e){ve.current===e&&(V(_e),V(ve)),be.current===e&&(V(be),sh._currentValue=fe)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+Te+e+Ee}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return De(`Activity`);case 30:return De(`ViewTransition`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Me=Object.prototype.hasOwnProperty,Ne=t.unstable_scheduleCallback,Pe=t.unstable_cancelCallback,Fe=t.unstable_shouldYield,Ie=t.unstable_requestPaint,Le=t.unstable_now,Re=t.unstable_getCurrentPriorityLevel,ze=t.unstable_ImmediatePriority,Be=t.unstable_UserBlockingPriority,Ve=t.unstable_NormalPriority,He=t.unstable_LowPriority,Ue=t.unstable_IdlePriority,We=t.log,Ge=t.unstable_setDisableYieldValue,Ke=null,qe=null;function Je(e){if(typeof We==`function`&&Ge(e),qe&&typeof qe.setStrictMode==`function`)try{qe.setStrictMode(Ke,e)}catch{}}var Ye=Math.clz32?Math.clz32:Qe,Xe=Math.log,Ze=Math.LN2;function Qe(e){return e>>>=0,e===0?32:31-(Xe(e)/Ze|0)|0}var $e=256,et=262144,tt=4194304;function nt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function rt(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=nt(n))):i=nt(o):i=nt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=nt(n))):i=nt(o)):i=nt(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 it(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function at(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ye(n),i=1<<r;t|=e[r],n&=~i}return t}function ot(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 st(){var e=tt;return tt<<=1,!(tt&62914560)&&(tt=4194304),e}function ct(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ut(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-Ye(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&&dt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function dt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ye(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ft(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function pt(e,t){var n=t&-t;return n=n&42?1:mt(n),(n&(e.suspendedLanes|t))===0?n:0}function mt(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 ht(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=B.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function _t(e,t){var n=B.p;try{return B.p=e,t()}finally{B.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt,Dt=`__reactLoad$`+vt;function Ot(e){delete e[yt],delete e[bt],delete e[Ct],delete e[wt]}function kt(e){var t;if(t=e[yt])return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[yt])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function At(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function jt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Mt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Nt(e){e[Et]=!0}function Pt(e){e[Dt]=void 0}var Ft=new Set,It={};function Lt(e,t){Rt(e,t),Rt(e+`Capture`,t)}function Rt(e,t){for(It[e]=t,e=0;e<t.length;e++)Ft.add(t[e])}var zt=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]*$`),Bt={},Vt={};function Ht(e){return Me.call(Vt,e)?!0:Me.call(Bt,e)?!1:zt.test(e)?Vt[e]=!0:(Bt[e]=!0,!1)}var Ut=!1;function Wt(){var e=Ut;return Ut=!1,e}function Gt(e,t,n){if(Ht(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 qt(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 Yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Xt(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 Zt(e){if(!e._valueTracker){var t=Yt(e)?`checked`:`value`;e._valueTracker=Xt(e,t,``+e[t])}}function Qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var $t=/[\n"\\]/g;function en(e){return e.replace($t,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function H(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`):nn(e,Jt(n)):o===`number`&&e.value==t?nn(e,Jt(e.value)):nn(e,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 tn(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)){Zt(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),Zt(e)}function nn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function rn(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 an(e,t,n){t!=null&&(t=``+Jt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Jt(n)}function on(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(de(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),Zt(e)}function sn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cn=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 ln(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||cn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function un(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]=``,Ut=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(ln(e,a,r),Ut=!0)}else for(var o in t)t.hasOwnProperty(o)&&ln(e,o,t[o])}function dn(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 fn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),U=/^[\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 pn(e){return U.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function mn(){}var hn=null;function gn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _n=null,vn=null;function yn(e){var t=At(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(H(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="`+en(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[bt]||null;if(!a)throw Error(i(90));H(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&&Qt(r)}break a;case`textarea`:an(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&rn(e,!!n.multiple,t,!1)}}}var W=!1;function bn(e,t,n){if(W)return e(t,n);W=!0;try{return e(t)}finally{if(W=!1,(_n!==null||vn!==null)&&(Ld(),_n&&(t=_n,e=vn,vn=_n=null,yn(t),e)))for(t=0;t<e.length;t++)yn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||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 Sn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(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 An(){return!0}function jn(){return!1}function Mn(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)?An:jn,this.isPropagationStopped=jn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=D({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,G,Rn,K=D({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yn,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!==Rn&&(Rn&&e.type===`mousemove`?(Ln=e.screenX-Rn.screenX,G=e.screenY-Rn.screenY):G=Ln=0,Rn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:G}}),zn=Mn(K),Bn=Mn(D({},K,{dataTransfer:0})),Vn=Mn(D({},Fn,{relatedTarget:0})),Hn=Mn(D({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Un=Mn(D({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Wn=Mn(D({},Nn,{data:0})),Gn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Kn={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`},qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qn[e])?!!t[e]:!1}function Yn(){return Jn}var Xn=Mn(D({},Fn,{key:function(e){if(e.key){var t=Gn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Kn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Zn=Mn(D({},K,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Qn=Mn(D({},Nn,{submitter:0})),$n=Mn(D({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yn})),er=Mn(D({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),tr=Mn(D({},K,{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})),nr=Mn(D({},Nn,{newState:0,oldState:0,source:0})),rr=[9,13,27,32],ir=Sn&&`CompositionEvent`in window,ar=null;Sn&&`documentMode`in document&&(ar=document.documentMode);var or=Sn&&`TextEvent`in window&&!ar,sr=Sn&&(!ir||ar&&8<ar&&11>=ar),cr=` `,lr=!1;function ur(e,t){switch(e){case`keyup`:return rr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function dr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var fr=!1;function pr(e,t){switch(e){case`compositionend`:return dr(t);case`keypress`:return t.which===32?(lr=!0,cr):null;case`textInput`:return e=t.data,e===cr&&lr?null:e;default:return null}}function mr(e,t){if(fr)return e===`compositionend`||!ir&&ur(e,t)?(e=On(),Dn=En=Tn=null,fr=!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 sr&&t.locale!==`ko`?null:t.data;default:return null}}var hr={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 gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!hr[e.type]:t===`textarea`}function _r(e,t,n,r){_n?vn?vn.push(r):vn=[r]:_n=r,t=qf(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var vr=null,yr=null;function br(e){Bf(e,0)}function xr(e){if(Qt(jt(e)))return e}function Sr(e,t){if(e===`change`)return t}var Cr=!1;if(Sn){var wr;if(Sn){var Tr=`oninput`in document;if(!Tr){var Er=document.createElement(`div`);Er.setAttribute(`oninput`,`return;`),Tr=typeof Er.oninput==`function`}wr=Tr}else wr=!1;Cr=wr&&(!document.documentMode||9<document.documentMode)}function Dr(){vr&&(vr.detachEvent(`onpropertychange`,Or),yr=vr=null)}function Or(e){if(e.propertyName===`value`&&xr(yr)){var t=[];_r(t,yr,e,gn(e)),bn(br,t)}}function kr(e,t,n){e===`focusin`?(Dr(),vr=t,yr=n,vr.attachEvent(`onpropertychange`,Or)):e===`focusout`&&Dr()}function Ar(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return xr(yr)}function jr(e,t){if(e===`click`)return xr(t)}function Mr(e,t){if(e===`input`||e===`change`)return xr(t)}function Nr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Pr=typeof Object.is==`function`?Object.is:Nr;function Fr(e,t){if(Pr(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(!Me.call(t,i)||!Pr(e[i],t[i]))return!1}return!0}function Ir(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(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=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ir(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=Ir(e.document)}return t}function Vr(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 Hr=Sn&&`documentMode`in document&&11>=document.documentMode,Ur=null,Wr=null,Gr=null,Kr=!1;function qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||Ur==null||Ur!==Ir(r)||(r=Ur,`selectionStart`in r&&Vr(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}),Gr&&Fr(Gr,r)||(Gr=r,r=qf(Wr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Yr={animationend:Jr(`Animation`,`AnimationEnd`),animationiteration:Jr(`Animation`,`AnimationIteration`),animationstart:Jr(`Animation`,`AnimationStart`),transitionrun:Jr(`Transition`,`TransitionRun`),transitionstart:Jr(`Transition`,`TransitionStart`),transitioncancel:Jr(`Transition`,`TransitionCancel`),transitionend:Jr(`Transition`,`TransitionEnd`)},Xr={},Zr={};Sn&&(Zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),`TransitionEvent`in window||delete Yr.transitionend.transition);function Qr(e){if(Xr[e])return Xr[e];if(!Yr[e])return e;var t=Yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zr)return Xr[e]=t[n];return e}var $r=Qr(`animationend`),ei=Qr(`animationiteration`),ti=Qr(`animationstart`),ni=Qr(`transitionrun`),ri=Qr(`transitionstart`),ii=Qr(`transitioncancel`),ai=Qr(`transitionend`),oi=new Map,si=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);si.push(`scrollEnd`);function ci(e,t){oi.set(e,t),Lt(t,[e])}var li=0;function ui(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=vd.identifierPrefix;var n=li++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function di(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ed;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function fi(e,t){return e=di(e),t=di(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var pi=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)},mi=[],hi=0,gi=0;function _i(){for(var e=hi,t=gi=hi=0;t<e;){var n=mi[t];mi[t++]=null;var r=mi[t];mi[t++]=null;var i=mi[t];mi[t++]=null;var a=mi[t];if(mi[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&&xi(n,i,a)}}function vi(e,t,n,r){mi[hi++]=e,mi[hi++]=t,mi[hi++]=n,mi[hi++]=r,gi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function yi(e,t,n,r){return vi(e,t,n,r),Si(e)}function bi(e,t){return vi(e,null,null,t),Si(e)}function xi(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-Ye(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Si(e){if(50<Dd)throw Dd=0,Od=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ci={};function wi(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 Ti(e,t,n,r){return new wi(e,t,n,r)}function Ei(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Di(e,t){var n=e.alternate;return n===null?(n=Ti(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Oi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ki(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ei(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ae:return e=Ti(31,n,t,a),e.elementType=ae,e.lanes=o,e;case j:return Ai(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Ti(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case te:return e=Ti(13,n,t,a),e.elementType=te,e.lanes=o,e;case ne:return e=Ti(19,n,t,a),e.elementType=ne,e.lanes=o,e;case I:case se:return e=a|32,e=Ti(30,n,t,e),e.elementType=se,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case P:s=10;break a;case ee:s=9;break a;case F:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ti(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ai(e,t,n,r){return e=Ti(7,e,r,t),e.lanes=n,e}function ji(e,t,n){return e=Ti(6,e,null,t),e.lanes=n,e}function Mi(e){var t=Ti(18,null,null,0);return t.stateNode=e,t}function Ni(e,t,n){return t=Ti(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pi=new WeakMap;function Fi(e,t){if(typeof e==`object`&&e){var n=Pi.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},Pi.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var Ii=[],Li=0,Ri=null,zi=0,Bi=[],Vi=0,Hi=null,Ui=1,Wi=``;function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Ri,Ri=e,zi=t}function Ki(e,t,n){Bi[Vi++]=Ui,Bi[Vi++]=Wi,Bi[Vi++]=Hi,Hi=e;var r=Ui;e=Wi;var i=32-Ye(r)-1;r&=~(1<<i),n+=1;var a=32-Ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ui=1<<32-Ye(t)+i|n<<i|r,Wi=a+e}else Ui=1<<a|n<<i|r,Wi=e}function qi(e){e.return!==null&&(Gi(e,1),Ki(e,1,0))}function Ji(e){for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null;for(;e===Hi;)Hi=Bi[--Vi],Bi[Vi]=null,Wi=Bi[--Vi],Bi[Vi]=null,Ui=Bi[--Vi],Bi[Vi]=null}function Yi(e,t){Bi[Vi++]=Ui,Bi[Vi++]=Wi,Bi[Vi++]=Hi,Ui=t.id,Wi=t.overflow,Hi=e}var Xi=null,Zi=null,q=!1,Qi=null,$i=!1,ea=Error(i(519));function J(e){throw oa(Fi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ea}function ta(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<Rf.length;n++)$(Rf[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),tn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),on(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||$f(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=mn),t=!0):t=!1,t||J(e,!0)}function na(e){for(Xi=e.return;Xi;)switch(Xi.tag){case 5:case 31:case 13:$i=!1;return;case 27:case 3:$i=!0;return;default:Xi=Xi.return}}function ra(e){if(e!==Xi)return!1;if(!q)return na(e),q=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&Zi&&J(e),na(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Zi=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Zi=dm(e)}else t===27?(t=Zi,Sp(e.type)?(e=um,um=null,Zi=e):Zi=t):Zi=Xi?lm(e.stateNode.nextSibling):null;return!0}function ia(){Zi=Xi=null,q=!1}function aa(){var e=Qi;return e!==null&&(ud===null?ud=e:ud.push.apply(ud,e),Qi=null),e}function oa(e){Qi===null?Qi=[e]:Qi.push(e)}var sa=he(null),ca=null,la=null;function ua(e,t,n){ge(sa,t._currentValue),t._currentValue=n}function da(e){e._currentValue=sa.current,V(sa)}function fa(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 pa(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),fa(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),fa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),fa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ma(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;Pr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===be.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&pa(t,e,n,r),t.flags|=262144,e!==null}function ha(e){for(e=e.firstContext;e!==null;){if(!Pr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ga(e){ca=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _a(e){return ya(ca,e)}function va(e,t){return ca===null&&ga(e),ya(e,t)}function ya(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},la===null){if(e===null)throw Error(i(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return n}var ba=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()})}},xa=t.unstable_scheduleCallback,Sa=t.unstable_NormalPriority,Ca={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wa(){return{controller:new ba,data:new Map,refCount:0}}function Ta(e){e.refCount--,e.refCount===0&&xa(Sa,function(){e.controller.abort()})}function Ea(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Da=null;function Oa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ka=null,Aa=0,ja=0,Ma=null;function Na(e,t){if(ka===null){var n=ka=[];Aa=0,ja=Nf(),Ma={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Aa++,t.then(Pa,Pa),t}function Pa(){if(--Aa===0&&(Da=null,ka!==null)){Ma!==null&&(Ma.status=`fulfilled`);var e=ka;ka=null,ja=0,Ma=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Fa(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 Ia=z.S;z.S=function(e,t){if(pd=Le(),typeof t==`object`&&t&&typeof t.then==`function`&&Na(e,t),Da!==null)for(var n=yf;n!==null;)Ea(n,Da),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)Ea(r,n),r=r.next;if(ja!==0){r=Da,r===null&&(r=Da=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ia!==null&&Ia(e,t)};var La=he(null);function Ra(){var e=La.current;return e===null?Yu.pooledCache:e}function za(e,t){t===null?ge(La,La.current):ge(La,t.pool)}function Ba(){var e=Ra();return e===null?null:{parent:Ca._currentValue,pool:e}}var Va=Error(i(460)),Ha=Error(i(474)),Ua=Error(i(542)),Wa={then:function(){}};function Ga(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(mn,mn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Xa(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(mn,mn);else{if(e=Yu,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,Xa(e),e}throw Ja=t,Va}}function qa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ja=e,Va):e}}var Ja=null;function Ya(){if(Ja===null)throw Error(i(459));var e=Ja;return Ja=null,e}function Xa(e){if(e===Va||e===Ua)throw Error(i(483))}var Za=null,Qa=0;function $a(e){var t=Qa;return Qa+=1,Za===null&&(Za=[]),Ka(Za,e,t)}function eo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function to(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function no(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=Di(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ji(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===j?(e=d(e,t,n.props.children,r,n.key),eo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ie&&qa(i)===t.type)?(t=a(t,n.props),eo(t,n),t.return=e,t):(t=ki(n.type,n.key,n.props,null,e.mode,r),eo(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=Ni(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=Ai(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=ji(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=ki(t.type,t.key,t.props,null,e.mode,n),eo(n,t),n.return=e,n;case A:return t=Ni(t,e.mode,n),t.return=e,t;case ie:return t=qa(t),f(e,t,n)}if(de(t)||le(t))return t=Ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,$a(t),n);if(t.$$typeof===P)return f(e,va(e,t),n);to(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 k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case ie:return n=qa(n),p(e,t,n,r)}if(de(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,$a(n),r);if(n.$$typeof===P)return p(e,t,va(e,n),r);to(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 k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ie:return r=qa(r),m(e,t,n,r,i)}if(de(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,$a(r),i);if(r.$$typeof===P)return m(e,t,n,va(t,r),i);to(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),q&&Gi(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 q&&Gi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),q&&Gi(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),q&&Gi(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 q&&Gi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),q&&Gi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),eo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&qa(l)===r.type){n(e,r.sibling),c=a(r,o.props),eo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Ai(o.props.children,e.mode,c,o.key),eo(c,o),c.return=e,e=c):(c=ki(o.type,o.key,o.props,null,e.mode,c),eo(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ni(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=qa(o),_(e,r,o,c)}if(de(o))return h(e,r,o,c);if(le(o)){if(l=le(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,$a(o),c);if(o.$$typeof===P)return _(e,r,va(e,o),c);to(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=ji(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Qa=0;var i=_(e,t,n,r);return Za=null,i}catch(t){if(t===Va||t===Ua)throw t;var a=Ti(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ro=no(!0),io=no(!1),ao=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function so(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 co(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function lo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ju&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Si(e),xi(e,null,n),t}return vi(e,r,t,n),Si(e)}function uo(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,ft(e,n)}}function fo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var po=!1;function mo(){if(po){var e=Ma;if(e!==null)throw e}}function ho(e,t,n,r){po=!1;var i=e.updateQueue;ao=!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?(Xu&f)===f:(r&f)===f){f!==0&&f===ja&&(po=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:ao=!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),id|=o,e.lanes=o,e.memoizedState=d}}function go(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function _o(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)go(n[e],t)}var vo=he(null),yo=he(0);function bo(e,t){e=nd,ge(yo,e),ge(vo,t),nd=e|t.baseLanes}function xo(){ge(yo,nd),ge(vo,vo.current)}function So(){nd=yo.current,V(vo),V(yo)}var Co=he(null),wo=null;function To(e){var t=e.alternate;ge(Ao,Ao.current&1),ge(Co,e),wo===null&&(t===null||vo.current!==null||t.memoizedState!==null)&&(wo=e)}function Eo(e){ge(Ao,Ao.current),ge(Co,e),wo===null&&(wo=e)}function Do(e){e.tag===22?(ge(Ao,Ao.current),ge(Co,e),wo===null&&(wo=e)):Oo()}function Oo(){ge(Ao,Ao.current),ge(Co,Co.current)}function ko(e){V(Co),wo===e&&(wo=null),V(Ao)}var Ao=he(0);function jo(e,t){ge(Co,Co.current),ge(Ao,t)}function Mo(e){V(Ao),V(Co),wo===e&&(wo=null)}function No(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Po=0,Y=null,Fo=null,Io=null,Lo=!1,Ro=!1,zo=!1,Bo=0,Vo=0,Ho=null,Uo=0;function Wo(){throw Error(i(321))}function Go(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pr(e[n],t[n]))return!1;return!0}function Ko(e,t,n,r,i,a){return Po=a,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?lc:uc,zo=!1,a=n(r,i),zo=!1,Ro&&(a=Jo(t,n,r,i)),qo(e),a}function qo(e){z.H=cc;var t=Fo!==null&&Fo.next!==null;if(Po=0,Io=Fo=Y=null,Lo=!1,Vo=0,Ho=null,t)throw Error(i(300));e===null||Dc||(e=e.dependencies,e!==null&&ha(e)&&(Dc=!0))}function Jo(e,t,n,r){Y=e;var a=0;do{if(Ro&&(Ho=null),Vo=0,Ro=!1,25<=a)throw Error(i(301));if(a+=1,Io=Fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}z.H=dc,o=t(n,r)}while(Ro);return o}function Yo(){var e=z.H,t=e.useState()[0];return t=typeof t.then==`function`?ns(t):t,e=e.useState()[0],(Fo===null?null:Fo.memoizedState)!==e&&(Y.flags|=1024),t}function Xo(){var e=Bo!==0;return Bo=0,e}function Zo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Qo(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}Po=0,Io=Fo=Y=null,Ro=!1,Vo=Bo=0,Ho=null}function $o(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Io===null?Y.memoizedState=Io=e:Io=Io.next=e,Io}function es(){if(Fo===null){var e=Y.alternate;e=e===null?null:e.memoizedState}else e=Fo.next;var t=Io===null?Y.memoizedState:Io.next;if(t!==null)Io=t,Fo=e;else{if(e===null)throw Y.alternate===null?Error(i(467)):Error(i(310));Fo=e,e={memoizedState:Fo.memoizedState,baseState:Fo.baseState,baseQueue:Fo.baseQueue,queue:Fo.queue,next:null},Io===null?Y.memoizedState=Io=e:Io=Io.next=e}return Io}function ts(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ns(e){var t=Vo;return Vo+=1,Ho===null&&(Ho=[]),e=Ka(Ho,e,t),t=Y,(Io===null?t.memoizedState:Io.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?lc:uc),e}function rs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ns(e);if(e.$$typeof===L)return;if(e.$$typeof===P)return _a(e)}throw Error(i(438,String(e)))}function is(e){var t=null,n=Y.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Y.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=ts(),Y.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]=oe;return t.index++,n}function as(e,t){return typeof t==`function`?t(e):t}function os(e){return ss(es(),Fo,e)}function ss(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?(Po&f)===f:(Xu&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===ja&&(d=!0);else if((Po&p)===p){u=u.next,p===ja&&(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,Y.lanes|=p,id|=p;f=u.action,zo&&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,Y.lanes|=f,id|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Pr(o,e.memoizedState)&&(Dc=!0,d&&(n=Ma,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 cs(e){var t=es(),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);Pr(o,t.memoizedState)||(Dc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ls(e,t,n){var r=Y,a=es(),o=q;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Pr((Fo||a).memoizedState,n);if(s&&(a.memoizedState=n,Dc=!0),a=a.queue,Ps(fs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Io!==null&&!!(Io.memoizedState.tag&1),ks(e?9:8,{destroy:void 0},ds.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Yu===null)throw Error(i(349));o||Po&127||us(r,t,n)}return n}function us(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Y.updateQueue,t===null?(t=ts(),Y.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ds(e,t,n,r){t.value=n,t.getSnapshot=r,ps(t)&&ms(e)}function fs(e,t,n){return n(function(){ps(t)&&ms(e)})}function ps(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pr(e,n)}catch{return!0}}function ms(e){var t=bi(e,2);t!==null&&Md(t,e,2)}function hs(e){var t=$o();if(typeof e==`function`){var n=e;if(e=n(),zo){Je(!0);try{n()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:e},t}function gs(e,t,n,r){return e.baseState=n,ss(e,Fo,typeof r==`function`?r:as)}function _s(e,t,n,r,a){if(ac(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)}};z.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,vs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function vs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=z.T,o={};o.types=a===null?null:a.types,z.T=o;try{var s=n(i,r),c=z.S;c!==null&&c(o,s),ys(e,t,s)}catch(n){xs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),z.T=a}}else try{a=n(i,r),ys(e,t,a)}catch(n){xs(e,t,n)}}function ys(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){bs(e,t,n)},function(n){return xs(e,t,n)}):bs(e,t,n)}function bs(e,t,n){t.status=`fulfilled`,t.value=n,Ss(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,vs(e,n)))}function xs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ss(t),t=t.next;while(t!==r)}e.action=null}function Ss(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Cs(e,t){return t}function ws(e,t){if(q){var n=Yu.formState;if(n!==null){a:{var r=Y;if(q){if(Zi){b:{for(var i=Zi,a=$i;i.nodeType!==8;)if(!a||(i=lm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Zi=lm(i.nextSibling),r=i.data===`F!`;break a}}J(r)}r=!1}r&&(t=n[0])}}return n=$o(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:t},n.queue=r,n=nc.bind(null,Y,r),r.dispatch=n,r=hs(!1),a=ic.bind(null,Y,!1,r.queue),r=$o(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=_s.bind(null,Y,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ts(e){return Es(es(),Fo,e)}function Es(e,t,n){if(t=ss(e,t,Cs)[0],e=os(as)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ns(t)}catch(e){throw e===Va?Ua:e}else r=t;t=es();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Y.flags|=2048,ks(9,{destroy:void 0},Ds.bind(null,i,n),null)),[r,a,e]}function Ds(e,t){e.action=t}function Os(e){var t=es(),n=Fo;if(n!==null)return Es(t,n,e);es(),t=t.memoizedState,n=es();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ks(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Y.updateQueue,t===null&&(t=ts(),Y.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 As(){return es().memoizedState}function js(e,t,n,r){var i=$o();Y.flags|=e,i.memoizedState=ks(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ms(e,t,n,r){var i=es();r=r===void 0?null:r;var a=i.memoizedState.inst;Fo!==null&&r!==null&&Go(r,Fo.memoizedState.deps)?i.memoizedState=ks(t,a,n,r):(Y.flags|=e,i.memoizedState=ks(1|t,a,n,r))}function Ns(e,t){js(8390656,8,e,t)}function Ps(e,t){Ms(2048,8,e,t)}function Fs(e){Y.flags|=4;var t=Y.updateQueue;if(t===null)t=ts(),Y.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Is(e){var t=es().memoizedState;return Fs({ref:t,nextImpl:e}),function(){if(Ju&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ls(e,t){return Ms(4,2,e,t)}function Rs(e,t){return Ms(4,4,e,t)}function zs(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 Bs(e,t,n){n=n==null?null:n.concat([e]),Ms(4,4,zs.bind(null,t,e),n)}function Vs(){}function Hs(e,t){var n=es();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Us(e,t){var n=es();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Go(t,r[1]))return r[0];if(r=e(),zo){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r}function Ws(e,t,n){return n===void 0||Po&1073741824&&!(Xu&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ad(),Y.lanes|=e,id|=e,n)}function Gs(e,t,n,r){return Pr(n,t)?n:vo.current===null?!(Po&106)||Po&1073741824&&!(Xu&261930)?(Dc=!0,e.memoizedState=n):(e=Ad(),Y.lanes|=e,id|=e,t):(e=Ws(e,n,r),Pr(e,t)||(Dc=!0),e)}function Ks(e,t,n,r,i){var a=B.p;B.p=a!==0&&8>a?a:8;var o=z.T,s={};s.types=o===null?null:o.types,z.T=s,ic(e,!1,t,n);try{var c=i(),l=z.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?rc(e,t,Fa(c,r),kd(e)):rc(e,t,r,kd(e))}catch(n){rc(e,t,{then:function(){},status:`rejected`,reason:n},kd())}finally{B.p=a,o!==null&&s.types!==null&&(o.types=s.types),z.T=o}}function qs(){}function Js(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ys(e).queue;Ks(e,a,t,fe,n===null?qs:function(){return Xs(e),n(r)})}function Ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:fe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xs(e){var t=Ys(e);t.next===null&&(t=e.alternate.memoizedState),rc(e,t.next.queue,{},kd())}function Zs(){return _a(sh)}function Qs(){return es().memoizedState}function $s(){return es().memoizedState}function ec(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=kd();e=co(n);var r=lo(t,e,n);r!==null&&(Md(r,t,n),uo(r,t,n)),t={cache:wa()},e.payload=t;return}t=t.return}}function tc(e,t,n){var r=kd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)?oc(t,n):(n=yi(e,t,n,r),n!==null&&(Md(n,e,r),sc(n,t,r)))}function nc(e,t,n){rc(e,t,n,kd())}function rc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ac(e))oc(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,Pr(s,o))return vi(e,t,i,0),Yu===null&&_i(),!1}catch{}if(n=yi(e,t,i,r),n!==null)return Md(n,e,r),sc(n,t,r),!0}return!1}function ic(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(i(479))}else t=yi(e,n,r,2),t!==null&&Md(t,e,2)}function ac(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function oc(e,t){Ro=Lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ft(e,n)}}var cc={readContext:_a,use:rs,useCallback:Wo,useContext:Wo,useEffect:Wo,useImperativeHandle:Wo,useLayoutEffect:Wo,useInsertionEffect:Wo,useMemo:Wo,useReducer:Wo,useRef:Wo,useState:Wo,useDebugValue:Wo,useDeferredValue:Wo,useTransition:Wo,useSyncExternalStore:Wo,useId:Wo,useHostTransitionStatus:Wo,useFormState:Wo,useActionState:Wo,useOptimistic:Wo,useMemoCache:Wo,useCacheRefresh:Wo,useEffectEvent:Wo},lc={readContext:_a,use:rs,useCallback:function(e,t){return $o().memoizedState=[e,t===void 0?null:t],e},useContext:_a,useEffect:Ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),js(4194308,4,zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){js(4,2,e,t)},useMemo:function(e,t){var n=$o();t=t===void 0?null:t;var r=e();if(zo){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=$o();if(n!==void 0){var i=n(t);if(zo){Je(!0);try{n(t)}finally{Je(!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=tc.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=$o();return e={current:e},t.memoizedState=e},useState:function(e){e=hs(e);var t=e.queue,n=nc.bind(null,Y,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Vs,useDeferredValue:function(e,t){return Ws($o(),e,t)},useTransition:function(){var e=hs(!1);return e=Ks.bind(null,Y,e.queue,!0,!1),$o().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Y,a=$o();if(q){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yu===null)throw Error(i(349));Xu&127||us(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ns(fs.bind(null,r,o,e),[e]),r.flags|=2048,ks(9,{destroy:void 0},ds.bind(null,r,o,n,t),null),n},useId:function(){var e=$o(),t=Yu.identifierPrefix;if(q){var n=Wi,r=Ui;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Uo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Zs,useFormState:ws,useActionState:ws,useOptimistic:function(e){var t=$o();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ic.bind(null,Y,!0,n),n.dispatch=t,[e,t]},useMemoCache:is,useCacheRefresh:function(){return $o().memoizedState=ec.bind(null,Y)},useEffectEvent:function(e){var t=$o(),n={impl:e};return t.memoizedState=n,function(){if(Ju&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},uc={readContext:_a,use:rs,useCallback:Hs,useContext:_a,useEffect:Ps,useImperativeHandle:Bs,useInsertionEffect:Ls,useLayoutEffect:Rs,useMemo:Us,useReducer:os,useRef:As,useState:function(){return os(as)},useDebugValue:Vs,useDeferredValue:function(e,t){return Gs(es(),Fo.memoizedState,e,t)},useTransition:function(){var e=os(as)[0],t=es().memoizedState;return[typeof e==`boolean`?e:ns(e),t]},useSyncExternalStore:ls,useId:Qs,useHostTransitionStatus:Zs,useFormState:Ts,useActionState:Ts,useOptimistic:function(e,t){return gs(es(),Fo,e,t)},useMemoCache:is,useCacheRefresh:$s,useEffectEvent:Is},dc={readContext:_a,use:rs,useCallback:Hs,useContext:_a,useEffect:Ps,useImperativeHandle:Bs,useInsertionEffect:Ls,useLayoutEffect:Rs,useMemo:Us,useReducer:cs,useRef:As,useState:function(){return cs(as)},useDebugValue:Vs,useDeferredValue:function(e,t){var n=es();return Fo===null?Ws(n,e,t):Gs(n,Fo.memoizedState,e,t)},useTransition:function(){var e=cs(as)[0],t=es().memoizedState;return[typeof e==`boolean`?e:ns(e),t]},useSyncExternalStore:ls,useId:Qs,useHostTransitionStatus:Zs,useFormState:Os,useActionState:Os,useOptimistic:function(e,t){var n=es();return Fo===null?(n.baseState=e,[e,n.queue.dispatch]):gs(n,Fo,e,t)},useMemoCache:is,useCacheRefresh:$s,useEffectEvent:Is};function fc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var pc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kd(),i=co(r);i.payload=t,n!=null&&(i.callback=n),t=lo(e,i,r),t!==null&&(Md(t,e,r),uo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kd(),i=co(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=lo(e,i,r),t!==null&&(Md(t,e,r),uo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kd(),r=co(n);r.tag=2,t!=null&&(r.callback=t),t=lo(e,r,n),t!==null&&(Md(t,e,n),uo(t,e,n))}};function mc(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?!Fr(n,r)||!Fr(i,a):!0}function hc(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&&pc.enqueueReplaceState(t,t.state,null)}function gc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function _c(e){pi(e)}function vc(e){console.error(e)}function yc(e){pi(e)}function bc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function xc(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 Sc(e,t,n){return n=co(n),n.tag=3,n.payload={element:null},n.callback=function(){bc(e,t)},n}function Cc(e){return e=co(e),e.tag=3,e}function wc(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(){xc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){xc(t,n,r),typeof i!=`function`&&(gd===null?gd=new Set([this]):gd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ma(t,n,a,!0),n=Co.current,n!==null){switch(n.tag){case 31:case 13:case 19:return wo===null?Wd():n.alternate===null&&rd===0&&(rd=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),pf(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)),pf(e,r,a)),!1}throw Error(i(435,n.tag))}return pf(e,r,a),Wd(),!1}if(q)return t=Co.current,t===null?(r!==ea&&(t=Error(i(423),{cause:r}),oa(Fi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Fi(r,n),a=Sc(e.stateNode,r,a),fo(e,a),rd!==4&&(rd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ea&&(e=Error(i(422),{cause:r}),oa(Fi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Fi(o,n),ld===null?ld=[o]:ld.push(o),rd!==4&&(rd=2),t===null)return!0;r=Fi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Sc(n.stateNode,r,e),fo(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`&&(gd===null||!gd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Cc(a),wc(a,e,n,r),fo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ec=Error(i(461)),Dc=!1;function Oc(e,t,n,r){t.child=e===null?io(t,null,n,r):ro(t,e.child,n,r)}function kc(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 ga(t),r=Ko(e,t,n,o,a,i),s=Xo(),e!==null&&!Dc?(Zo(e,t,i),rl(e,t,i)):(q&&s&&qi(t),t.flags|=1,Oc(e,t,r,i),t.child)}function Ac(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ei(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,jc(e,t,a,r,i)):(e=ki(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!il(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Fr:n,n(o,r)&&e.ref===t.ref)return rl(e,t,i)}return t.flags|=1,e=Di(a,r),e.ref=t.ref,e.return=t,t.child=e}function jc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Fr(a,r)&&e.ref===t.ref){if(Dc=!1,t.pendingProps=r=a,il(e,i))e.flags&131072&&(Dc=!0);else return t.lanes=e.lanes,rl(e,t,i)}}return zc(e,t,n,r,i)}function Mc(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 Pc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&za(t,a===null?null:a.cachePool),a===null?xo():bo(t,a),Do(t);else return r=t.lanes=536870912,Pc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&za(t,null),xo(),Oo()):(za(t,a.cachePool),bo(t,a),Oo(),t.memoizedState=null);return Oc(e,t,i,n),t.child}function Nc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Pc(e,t,n,r,i){var a=Ra();return a=a===null?null:{parent:Ca._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&za(t,null),xo(),Do(t),e!==null&&ma(e,t,r,!0),t.childLanes=i,null}function Fc(e,t){return t=Jc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ic(e,t,n){return ro(t,e.child,null,n),e=Fc(t,t.pendingProps),e.flags|=2,ko(t),t.memoizedState=null,e}function Lc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(q){if(r.mode===`hidden`)return e=Fc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Nc(null,e);if(Eo(t),(e=Zi)?(e=am(e,$i),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Hi===null?null:{id:Ui,overflow:Wi},retryLane:536870912,hydrationErrors:null},n=Mi(e),n.return=t,t.child=n,Xi=t,Zi=null)):e=null,e===null)throw J(t);return t.lanes=536870912,null}return Fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Eo(t),a){if(t.flags&256)t.flags&=-257,t=Ic(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Dc||ma(e,t,n,!1),a=(n&e.childLanes)!==0,Dc||a){if(vo.current===null){if(r=Yu,r!==null&&(s=pt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,bi(e,s),Md(r,e,s),Ec;Wd()}t=Ic(e,t,n)}else e=o.treeContext,Zi=lm(s.nextSibling),Xi=t,q=!0,Qi=null,$i=!1,e!==null&&Yi(t,e),t=Fc(t,r),t.flags|=134221824;return t}return e=Di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Rc(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 zc(e,t,n,r,i){return ga(t),n=Ko(e,t,n,r,void 0,i),r=Xo(),e!==null&&!Dc?(Zo(e,t,i),rl(e,t,i)):(q&&r&&qi(t),t.flags|=1,Oc(e,t,n,i),t.child)}function Bc(e,t,n,r,i,a){return ga(t),t.updateQueue=null,n=Jo(t,r,n,i),qo(e),r=Xo(),e!==null&&!Dc?(Zo(e,t,a),rl(e,t,a)):(q&&r&&qi(t),t.flags|=1,Oc(e,t,n,a),t.child)}function Vc(e,t,n,r,i){if(ga(t),t.stateNode===null){var a=Ci,o=n.contextType;typeof o==`object`&&o&&(a=_a(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=pc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},oo(t),o=n.contextType,a.context=typeof o==`object`&&o?_a(o):Ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(fc(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&&pc.enqueueReplaceState(a,a.state,null),ho(t,r,a,i),mo(),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=gc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ci,typeof u==`object`&&u&&(o=_a(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)&&hc(t,a,r,o),ao=!1;var f=t.memoizedState;a.state=f,ho(t,r,a,i),mo(),l=t.memoizedState,s||f!==l||ao?(typeof d==`function`&&(fc(t,n,d,r),l=t.memoizedState),(c=ao||mc(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,so(e,t),o=t.memoizedProps,u=gc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ci,typeof l==`object`&&l&&(c=_a(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)&&hc(t,a,r,c),ao=!1,f=t.memoizedState,a.state=f,ho(t,r,a,i),mo();var p=t.memoizedState;o!==d||f!==p||ao||e!==null&&e.dependencies!==null&&ha(e.dependencies)?(typeof s==`function`&&(fc(t,n,s,r),p=t.memoizedState),(u=ao||mc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ha(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,Rc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ro(t,e.child,null,i),t.child=ro(t,null,n,i)):Oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=rl(e,t,i),e}function Hc(e,t,n,r){return ia(),t.flags|=256,Oc(e,t,n,r),t.child}var Uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wc(e){return{baseLanes:e,cachePool:Ba()}}function Gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=sd),e}function Kc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Ao.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(q){if(i?To(t):Oo(),(e=Zi)?(e=am(e,$i),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Hi===null?null:{id:Ui,overflow:Wi},retryLane:536870912,hydrationErrors:null},n=Mi(e),n.return=t,t.child=n,Xi=t,Zi=null)):e=null,e===null)throw J(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Oo(),i=t.mode,a=Jc({mode:`hidden`,children:a},i),r=Ai(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Wc(n),r.childLanes=Gc(e,o,n),t.memoizedState=Uc,Nc(null,r)):(To(t),qc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Xc(e,t,a,o,r,c,s,n)}return i?(Oo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Di(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ai(i,a,n,null),i.flags|=2):i=Di(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Nc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Wc(n):(a=i.cachePool,a===null?a=Ba():(s=Ca._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Gc(e,o,n),t.memoizedState=Uc,Nc(e.child,r)):(To(t),n=e.child,e=n.sibling,n=Di(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function qc(e,t){return t=Jc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Jc(e,t){return e=Ti(22,e,null,t),e.lanes=0,e}function Yc(e,t,n){return ro(t,e.child,null,n),e=qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(To(t),t.flags&=-257,Yc(e,t,c)):t.memoizedState===null?(Oo(),o=a.fallback,s=t.mode,a=Jc({mode:`visible`,children:a.children},s),o=Ai(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,ro(t,e.child,null,c),a=t.child,a.memoizedState=Wc(c),a.childLanes=Gc(e,r,c),t.memoizedState=Uc,Nc(null,a)):(Oo(),t.child=e.child,t.flags|=128,null);if(To(t),sm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,oa({value:a,source:null,stack:null})),Yc(e,t,c)}if(Dc||ma(e,t,c,!1),r=(c&e.childLanes)!==0,Dc||r){if(vo.current!==null)return Yc(e,t,c);if(r=Yu,r!==null&&(a=pt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,bi(e,a),Md(r,e,a),Ec;return om(o)||Wd(),Yc(e,t,c)}return om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,Zi=lm(o.nextSibling),Xi=t,q=!0,Qi=null,$i=!1,e!==null&&Yi(t,e),t=qc(t,a.children),t.flags|=134221824,t)}function Zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fa(e.return,t,n)}function Qc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&No(n)===null&&(t=e),e=e.sibling}return t}function $c(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 el(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function tl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Ao.current;if(t.flags&128)return jo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,jo(t,o),i===`backwards`&&e!==null?(el(e),Oc(e,t,r,n),el(e)):Oc(e,t,r,n),r=q?zi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zc(e,n,t);else if(e.tag===19)Zc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Qc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,el(t)),$c(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&No(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$c(t,!0,n,null,a,r);break;case`together`:$c(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Qc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$c(t,!1,i,n,a,r)}return t.child}function nl(e,t,n){var r=t.pendingProps;return ua(t,t.type,r.value),Oc(e,t,r.children,n),t.child}function rl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),id|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ma(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=Di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function il(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ha(e)))}function al(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),ua(t,Ca,e.memoizedState.cache),ia();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:ua(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Eo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return To(t),t.flags|=128,null;r=ma(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Kc(e,t,n):(To(t),e=rl(e,t,n),e===null?null:e.sibling)}To(t);break;case 19:if(t.flags&128)return tl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ma(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return tl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),jo(t,Ao.current),r)break;return null;case 22:return t.lanes=0,Mc(e,t,n,t.pendingProps);case 24:ua(t,Ca,e.memoizedState.cache)}return rl(e,t,n)}function ol(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Dc=!0;else{if(!il(e,n)&&!(t.flags&128))return Dc=!1,al(e,t,n);Dc=!!(e.flags&131072)}}else Dc=!1,q&&t.flags&1048576&&Ki(t,zi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=qa(t.elementType),t.type=e,typeof e==`function`)Ei(e)?(r=gc(e,r),t.tag=1,t=Vc(null,t,e,r,n)):(t.tag=0,t=zc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===F){t.tag=11,t=kc(null,t,e,r,n);break a}if(a===re){t.tag=14,t=Ac(null,t,e,r,n);break a}if(a===P){t.tag=10,t.type=e,t=nl(null,t,n);break a}}throw t=ue(e)||e,Error(i(306,t,``))}}return t;case 0:return zc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=gc(r,t.pendingProps),Vc(e,t,r,a,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,so(e,t),ho(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ua(t,Ca,r),r!==o.cache&&pa(t,[Ca],n,!0),mo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Hc(e,t,r,n);break a}if(r!==a){a=Fi(Error(i(424)),t),oa(a),t=Hc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Zi=lm(e.firstChild),Xi=t,q=!0,Qi=null,$i=!0,n=io(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ia(),r===a){t=rl(e,t,n);break a}Oc(e,t,r,n)}t=t.child}return t;case 26:return Rc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:q||(t.stateNode=fp(t.type,t.pendingProps,ye.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&q&&(r=t.stateNode=hm(t.type,t.pendingProps,ye.current),Xi=t,$i=!0,a=Zi,Sp(t.type)?(um=a,Zi=lm(r.firstChild)):Zi=a),Oc(e,t,t.pendingProps.children,n),Rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&q&&((a=r=Zi)&&(r=rm(r,t.type,t.pendingProps,$i),r===null?a=!1:(t.stateNode=r,Xi=t,Zi=lm(r.firstChild),$i=!1,a=!0)),a||J(t)),Ce(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(a,o)?r=null:s!==null&&pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Ko(e,t,Yo,null,null,n),sh._currentValue=a),Rc(e,t),Oc(e,t,r,n),t.child;case 6:return e===null&&q&&((e=n=Zi)&&(n=im(n,t.pendingProps,$i),n===null?e=!1:(t.stateNode=n,Xi=t,Zi=null,e=!0)),e||J(t)),null;case 13:return Kc(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ro(t,null,r,n):Oc(e,t,r,n),t.child;case 11:return kc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Rc(e,t),Oc(e,t,r,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 nl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ga(t),a=_a(a),r=r(a),t.flags|=1,Oc(e,t,r,n),t.child;case 14:return Ac(e,t,t.type,t.pendingProps,n);case 15:return jc(e,t,t.type,t.pendingProps,n);case 19:return tl(e,t,n);case 31:return Lc(e,t,n);case 22:return Mc(e,t,n,t.pendingProps);case 24:return ga(t),r=_a(Ca),e===null?(a=Ra(),a===null&&(a=Yu,o=wa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},oo(t),ua(t,Ca,a)):((e.lanes&n)!==0&&(so(e,t),ho(t,null,null,n),mo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ua(t,Ca,r),r!==a.cache&&pa(t,[Ca],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ua(t,Ca,r))),Oc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:q&&qi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Rc(e,t),Oc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function sl(e){e.flags|=4}function cl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Vd())e.flags|=8192;else throw Ja=Wa,Ha}}else e.flags&=-16777217}function ll(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Vd())e.flags|=8192;else throw Ja=Wa,Ha}}function ul(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:st(),e.lanes|=t,cd|=t)}function dl(e,t){if(!q)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function fl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pl(e,t,n){var r=t.pendingProps;switch(Ji(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fl(t),null;case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),da(Ca),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ra(t)?sl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,aa())),fl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(sl(t),o===null?(fl(t),cl(t,a,null,r,n)):(fl(t),ll(t,o))):o?o===e.memoizedState?(fl(t),t.flags&=-16777217):(sl(t),fl(t),ll(t,o)):(e=e.memoizedProps,e!==r&&sl(t),fl(t),cl(t,a,e,r,n)),null;case 27:if(we(t),n=ye.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return fl(t),t.subtreeFlags&=-33554433,null}e=_e.current,ra(t)?ta(t,e):(e=hm(a,r,n),t.stateNode=e,sl(t))}return fl(t),t.subtreeFlags&=-33554433,null;case 5:if(we(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return fl(t),t.subtreeFlags&=-33554433,null}if(o=_e.current,ra(t))ta(t,o);else{var s=lp(ye.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[yt]=t,o[bt]=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(np(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&&sl(t)}}return fl(t),t.subtreeFlags&=-33554433,cl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ye.current,ra(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Xi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||$f(e.nodeValue,n)),e||J(t,!0)}else e=lp(e).createTextNode(r),e[yt]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ra(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[yt]=t}else ia(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=aa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ko(t),t):(ko(t),null);if(t.flags&128)throw Error(i(558))}return fl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ra(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[yt]=t}else ia(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fl(t),a=!1}else a=aa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ko(t),t):(ko(t),null)}return ko(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),ul(t,t.updateQueue),fl(t),null);case 4:return Se(),e===null&&Uf(t.stateNode.containerInfo),t.flags|=67108864,fl(t),null;case 10:return da(t.type),fl(t),null;case 19:if(Mo(t),r=t.memoizedState,r===null)return fl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)dl(r,!1);else{if(rd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=No(e),o!==null){for(t.flags|=128,dl(r,!1),e=o.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Oi(n,e),n=n.sibling;return jo(t,Ao.current&1|2),q&&Gi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Le()>md&&(t.flags|=128,a=!0,dl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=No(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!q)return fl(t),null}else 2*Le()-r.renderingStartTime>md&&n!==536870912&&(t.flags|=128,a=!0,dl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Le(),e.sibling=null,o=Ao.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||q?jo(t,o):(n=o,ge(Co,t),ge(Ao,n),wo===null&&(wo=t)),q&&Gi(t,r.treeForkCount),e}return fl(t),null;case 22:case 23:return ko(t),So(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(fl(t),t.subtreeFlags&6&&(t.flags|=8192)):fl(t),n=t.updateQueue,n!==null&&ul(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&&V(La),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),da(Ca),fl(t),null;case 25:return null;case 30:return t.flags|=33554432,fl(t),null}throw Error(i(156,t.tag))}function ml(e,t){switch(Ji(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return da(Ca),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(ko(t),t.alternate===null)throw Error(i(340));ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ko(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Se(),null;case 10:return da(t.type),null;case 22:case 23:return ko(t),So(),e!==null&&V(La),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return da(Ca),null;case 25:return null;default:return null}}function hl(e,t){switch(Ji(t),t.tag){case 3:da(Ca),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&ko(t);break;case 13:ko(t);break;case 19:Mo(t);break;case 10:da(t.type);break;case 22:case 23:ko(t),So(),e!==null&&V(La);break;case 24:da(Ca)}}function gl(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){ff(t,t.return,e)}}function _l(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){ff(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ff(t,t.return,e)}}function vl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_o(t,n)}catch(t){ff(e,e.return,t)}}}function yl(e,t,n){n.props=gc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ff(e,t,n)}}function bl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=ui(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ff(e,t,n)}}function xl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ff(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){ff(e,t,n)}else n.current=null}}function Sl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function Cl(e){for(var t=e.return;t!==null&&(El(t)&&em(e.stateNode,t.stateNode),!Tl(t));)t=t.return}function wl(e){for(var t=e.return;t!==null&&(El(t)&&tm(e.stateNode,t.stateNode),!Tl(t));)t=t.return}function Tl(e){return e.tag===5||e.tag===3||e.tag===27}function El(e){return e&&e.tag===7&&e.stateNode!==null}function Dl(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){ff(e,e.return,t)}}function Ol(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[bt]=t}catch(t){ff(e,e.return,t)}}function kl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function Al(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||kl(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&&Sp(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 jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mn)),Sl(e,r),Ut=!0;else if(i!==4&&(i===27&&(Sl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(jl(e,t,n,r),e=e.sibling;e!==null;)jl(e,t,n,r),e=e.sibling}function Ml(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Sl(e,r),Ut=!0;else if(i!==4&&(i===27&&(Sl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ml(e,t,n,r),e=e.sibling;e!==null;)Ml(e,t,n,r),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]);np(t,r,n),t[yt]=e,t[bt]=n}catch(t){ff(e,e.return,t)}}var Pl=!1,Fl=null;function Il(e){(e.tag===30||e.subtreeFlags&33554432)&&(Pl=!0)}var Ll=null;function Rl(){var e=Ll;return Ll=null,e}var zl=0;function Bl(e,t,n,r,i){return zl=0,Vl(e.child,t,n,r,i)}function Vl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);Pl=!0,Tp(o,zl===0?t:t+`_`+zl,n),zl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Vl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Hl(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Hl(e.child,t),e=e.sibling}function Ul(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ul(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=fi(t.default,t.share),t!==`none`&&(Bl(e,n,t,null,!1)||Hl(e.child,!1))}e=e.sibling}}function Wl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=ui(r,n),a=fi(r.default,n.paired?r.share:r.enter);a===`none`?Ul(e):Bl(e,i,a,null,!1)?(Ul(e),n.paired||t||jd(e,r.onEnter)):Hl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Wl(e,t),e=e.sibling;else Ul(e)}function Gl(e){if(Fl!==null&&Fl.size!==0){var t=Fl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=fi(n.default,n.share);if(a!==`none`&&(Bl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,jd(e,n.onShare)):Hl(e.child,!1)),t.delete(r),t.size===0)break}}}Gl(e)}e=e.sibling}}}function Kl(e){if(e.tag===30){var t=e.memoizedProps,n=ui(t,e.stateNode),r=Fl===null?void 0:Fl.get(n),i=fi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Bl(e,n,i,null,!1)?r===void 0?jd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Fl.delete(n),jd(e,t.onShare)):Hl(e.child,!1)),Fl!==null&&Gl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Kl(e),e=e.sibling;else Fl!==null&&Gl(e)}function ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=ui(t,e.stateNode);t=fi(t.default,t.update),e.flags&=-5,t!==`none`&&Bl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&ql(e);e=e.sibling}}function Jl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Hl(e.child,!1))}Jl(e)}e=e.sibling}}function Yl(e){if(e.tag===30)e.stateNode.paired=null,Hl(e.child,!1),Jl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e),e=e.sibling;else Jl(e)}function Xl(e){for(e=e.child;e!==null;)e.tag===30?Hl(e.child,!1):e.subtreeFlags&33554432&&Xl(e),e=e.sibling}function Zl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&zl<a.length){var l=a[zl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,zl===0?n:n+`_`+zl,i),s&&e.flags&4||(Ll===null&&(Ll=[]),Ll.push(c,zl===0?r:r+`_`+zl,t.memoizedProps)),zl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Zl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Ql(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=ui(n,r),a=fi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;zl=0,i=Zl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||jd(e,n.onUpdate))}else e.subtreeFlags&33554432&&Ql(e,t);e=e.sibling}}var $l=!1,eu=!1,tu=!1,nu=!1,ru=typeof WeakSet==`function`?WeakSet:Set,iu=null,au=!1,ou=!1,su=!1,cu=!1;function lu(e,t,n){if(e=e.containerInfo,sp=gh,e=Br(e),Vr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,iu=t,t=n?9270:1024;iu!==null;){if(e=iu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Kl(r[a]);if(e.alternate===null&&e.flags&2)n&&Il(e),uu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Kl(r),uu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Il(e),uu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,iu=r):(n&&ql(e),uu(n))}}Fl=null}function uu(e){for(;iu!==null;){var t=iu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=gc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){ff(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=ui(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=fi(a.default,a.update),a!==`none`&&Bl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,iu=r;break}iu=t.return}}function du(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Au(e,n),r&4&&gl(5,n);break;case 1:if(Au(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ff(n,n.return,e)}else{var i=gc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ff(n,n.return,e)}}}r&64&&vl(n),r&512&&bl(n,n.return);break;case 3:if(Au(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{_o(e,t)}catch(e){ff(n,n.return,e)}}break;case 27:t===null&&r&4&&Nl(n);case 26:case 5:Au(e,n),t===null&&r&4&&Dl(n),r&512&&bl(n,n.return);break;case 12:Au(e,n);break;case 31:Au(e,n),r&4&&yu(e,n);break;case 13:Au(e,n),r&4&&bu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gf.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||$l,!r){var a=t!==null&&t.memoizedState!==null||eu;t=$l,i=eu,$l=r,(eu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Mu(e,n,r)):Au(e,n),$l=t,eu=i}break;case 30:Au(e,n),r&512&&bl(n,n.return);break;case 7:r&512&&bl(n,n.return);default:Au(e,n)}}function fu(e,t){for(e=e.child;e!==null;)pu(e,t),e=e.sibling}function pu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){ff(e,e.return,t)}mu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Ut=!0}catch(t){ff(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){ff(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&fu(e,t);break;default:fu(e,t)}}function mu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:pu(n,r);break a;case 22:n.memoizedState===null&&mu(n,r);break a;default:mu(n,r)}}e=e.sibling}}function hu(e){var t=e.alternate;t!==null&&(e.alternate=null,hu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ot(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 X=null,gu=!1;function _u(e,t,n){for(n=n.child;n!==null;)vu(e,t,n),n=n.sibling}function vu(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount==`function`)try{qe.onCommitFiberUnmount(Ke,n)}catch{}switch(n.tag){case 26:eu||xl(n,t),_u(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!eu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:eu||xl(n,t),wl(n);var r=X,i=gu;Sp(n.type)&&(X=n.stateNode,gu=!1),_u(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),X=r,gu=i;break;case 5:eu||xl(n,t),wl(n);case 6:if(n.tag===6&&wl(n),r=X,i=gu,X=null,_u(e,t,n),X=r,gu=i,X!==null){if(gu)try{(X.nodeType===9?X.body:X.nodeName===`HTML`?X.ownerDocument.body:X).removeChild(n.stateNode),Ut=!0}catch(e){ff(n,t,e)}else try{X.removeChild(n.stateNode),Ut=!0}catch(e){ff(n,t,e)}}break;case 18:X!==null&&(gu?(e=X,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(X,n.stateNode));break;case 4:r=X,i=gu,X=n.stateNode.containerInfo,gu=!0,_u(e,t,n),X=r,gu=i;break;case 0:case 11:case 14:case 15:_l(2,n,t),eu||_l(4,n,t),_u(e,t,n);break;case 1:eu||(xl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&yl(n,t,r)),_u(e,t,n);break;case 21:_u(e,t,n);break;case 22:eu=(r=eu)||n.memoizedState!==null,_u(e,t,n),eu=r;break;case 30:xl(n,t),_u(e,t,n);break;case 7:eu||xl(n,t),_u(e,t,n);break;default:_u(e,t,n)}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){ff(t,t.return,e)}}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){ff(t,t.return,e)}}function xu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ru),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ru),t;default:throw Error(i(435,e.tag))}}function Su(e,t){var n=xu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function Cu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){X=l.stateNode,gu=!1;break a}break;case 5:X=l.stateNode,gu=!1;break a;case 3:case 4:X=l.stateNode.containerInfo,gu=!0;break a}l=l.return}if(X===null)throw Error(i(160));vu(s,c,o),X=null,gu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tu(t,e,n),t=t.sibling}var wu=null;function Tu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Cu(t,e,n),Eu(e),a&4&&(_l(3,e,e.return),gl(3,e),_l(5,e,e.return));break;case 1:Cu(t,e,n),Eu(e),a&512&&(eu||r===null||xl(r,r.return)),a&64&&$l&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=wu,Cu(t,e,n),Eu(e),a&512&&(eu||r===null||xl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if($l)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Et]||r[yt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),np(r,t,n),r[yt]=e,Nt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[yt]=e,Nt(r),t=r}e.stateNode=t}}else $l||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ol(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||eu||t.parentNode.removeChild(t)):a.count--,n===null?$l||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:Cu(t,e,n),Eu(e),a&512&&(eu||r===null||xl(r,r.return)),r!==null&&a&4&&Ol(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=tu,tu=!1,Cu(t,e,n),tu=o,Eu(e),a&512&&(eu||r===null||xl(r,r.return)),e.flags&32){t=e.stateNode;try{sn(t,``),Ut=!0}catch(t){ff(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ol(e,t,r===null?t:r.memoizedProps)),a&1024&&(nu=!0);break;case 6:if(Cu(t,e,n),Eu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ut=!0}catch(t){ff(e,e.return,t)}}break;case 3:if(Ut=!1,Wm=null,o=wu,wu=bm(t.containerInfo),Cu(t,e,n),wu=o,Eu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){ff(e,e.return,t)}nu&&(nu=!1,Du(e)),Ut=!1;break;case 4:a=tu,tu=$l,r=Wt(),o=wu,wu=bm(e.stateNode.containerInfo),Cu(t,e,n),Eu(e),wu=o,Ut&&ou&&(su=!0),Ut=r,tu=a;break;case 12:Cu(t,e,n),Eu(e);break;case 31:Cu(t,e,n),Eu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 13:Cu(t,e,n),Eu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(fd=Le()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=$l,l=eu,u=tu;$l=c||o,tu=u||o,eu=l||s,Cu(t,e,n),eu=l,tu=u,$l=c,Eu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||$l||eu||(t=s||eu,n=$l,r=eu,$l=o||$l,eu=t,ju(e,2),$l=n,eu=r),!o&&tu||fu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Su(e,n))));break;case 19:Cu(t,e,n),Eu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 30:a&512&&(eu||r===null||xl(r,r.return)),a=Wt(),o=ou,s=(n&335544064)===n,c=e.memoizedProps,ou=s&&fi(c.default,c.update)!==`none`,Cu(t,e,n),Eu(e),s&&r!==null&&Ut&&(e.flags|=4),ou=o,Ut=a;break;case 21:break;case 7:a&512&&(eu||r===null||xl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Cu(t,e,n),Eu(e)}}function Eu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(kl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(El(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Tl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Ml(e,Al(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(sn(l,``),n.flags&=-33),Ml(e,Al(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;jl(e,Al(e),u,s);break;default:throw Error(i(161))}}catch(t){ff(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Du(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Du(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Ou(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ku(t,e),t=t.sibling;else Ql(t,!1)}function ku(e,t){var n=e.alternate;if(n===null)Wl(e,!1);else switch(e.tag){case 3:if(cu=au=!1,Rl(),Ou(t,e),!au&&!su){if(e=Ll,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),cu=!0}Ll=null;break;case 5:Ou(t,e);break;case 4:r=au,au=!1,Ou(t,e),au&&(su=!0),au=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Ou(t,e):Wl(e,!1));break;case 30:r=au,i=Rl(),au=!1,Ou(t,e),au&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=ui(a,o),o=ui(n.memoizedProps,o);var s=fi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,zl=0,t=Zl(e,n,t,o,s,a,!0),zl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(jd(e,e.memoizedProps.onUpdate),Ll=i):i!==null&&(i.push.apply(i,Ll),Ll=i),au=e.flags&32?!0:r;break;default:Ou(t,e)}}function Au(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)du(e,t.alternate,t),t=t.sibling}function ju(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:_l(4,n,n.return),ju(n,r);break;case 1:xl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&yl(n,n.return,i),ju(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:xl(n,n.return),n.tag!==5&&n.tag!==27||wl(n),ju(n,r);break;case 6:wl(n);break;case 26:xl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||eu||i.parentNode.removeChild(i),ju(n,r);break;case 22:n.memoizedState===null&&ju(n,r);break;case 30:xl(n,n.return),ju(n,r);break;case 7:xl(n,n.return);default:ju(n,r)}e=e.sibling}}function Mu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Mu(i,a,n),gl(4,a);break;case 1:if(Mu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ff(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)go(l[i],c)}catch(e){ff(r,r.return,e)}}s&&o&64&&vl(a),bl(a,a.return);break;case 27:n&2&&Nl(a);case 5:a.tag!==5&&a.tag!==27||Cl(a),Mu(i,a,n),s&&r===null&&o&4&&Dl(a),bl(a,a.return);break;case 6:Cl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||$l||Km(bm(c.ownerDocument),a.type,c),Mu(i,a,n),s&&r===null&&o&4&&Dl(a),bl(a,a.return);break;case 12:Mu(i,a,n);break;case 31:Mu(i,a,n),s&&o&4&&yu(i,a);break;case 13:Mu(i,a,n),s&&o&4&&bu(i,a);break;case 22:a.memoizedState===null&&Mu(i,a,n),bl(a,a.return);break;case 30:Mu(i,a,n),bl(a,a.return);break;case 7:bl(a,a.return);default:Mu(i,a,n)}t=t.sibling}}function Nu(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&&Ta(n))}function Pu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ta(e))}function Fu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Iu(e,t,n,r),t=t.sibling;else i&&Xl(t)}function Iu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Yl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Fu(e,t,n,r),a&2048&&gl(9,t);break;case 1:Fu(e,t,n,r);break;case 3:Fu(e,t,n,r),i&&cu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ta(a)));break;case 12:if(a&2048){Fu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){ff(t,t.return,e)}}else Fu(e,t,n,r);break;case 31:Fu(e,t,n,r);break;case 13:Fu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Yl(t),o._visibility&2?Fu(e,t,n,r):(o._visibility|=2,Lu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Yl(s),o._visibility&2?Fu(e,t,n,r):Ru(e,t)),a&2048&&Nu(s,t);break;case 24:Fu(e,t,n,r),a&2048&&Pu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Hl(a.child,!0),Hl(t.child,!0))),Fu(e,t,n,r);break;default:Fu(e,t,n,r)}}function Lu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Lu(a,o,s,c,i),gl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Lu(a,o,s,c,i)):u._visibility&2?Lu(a,o,s,c,i):Ru(a,o),i&&l&2048&&Nu(o.alternate,o);break;case 24:Lu(a,o,s,c,i),i&&l&2048&&Pu(o.alternate,o);break;default:Lu(a,o,s,c,i)}t=t.sibling}}function Ru(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:Ru(n,r),i&2048&&Nu(r.alternate,r);break;case 24:Ru(n,r),i&2048&&Pu(r.alternate,r);break;default:Ru(n,r)}t=t.sibling}}var zu=8192;function Bu(e,t,n){if(e.subtreeFlags&zu)for(e=e.child;e!==null;)Vu(e,t,n),e=e.sibling}function Vu(e,t,n){switch(e.tag){case 26:Bu(e,t,n),e.flags&zu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,wu,e.memoizedState,e.memoizedProps));break;case 5:Bu(e,t,n),e.flags&zu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=wu;wu=bm(e.stateNode.containerInfo),Bu(e,t,n),wu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=zu,zu=16777216,Bu(e,t,n),zu=r):Bu(e,t,n));break;case 30:if((e.flags&zu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Fl===null&&(Fl=new Map),Fl.set(r,i)}Bu(e,t,n);break;default:Bu(e,t,n)}}function Hu(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 Z(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];iu=r,Gu(r,e)}Hu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Uu(e),e=e.sibling}function Uu(e){switch(e.tag){case 0:case 11:case 15:Z(e),e.flags&2048&&_l(9,e,e.return);break;case 3:Z(e);break;case 12:Z(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wu(e)):Z(e);break;default:Z(e)}}function Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];iu=r,Gu(r,e)}Hu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_l(8,t,t.return),Wu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wu(t));break;default:Wu(t)}e=e.sibling}}function Gu(e,t){for(;iu!==null;){var n=iu;switch(n.tag){case 0:case 11:case 15:_l(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:Ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,iu=r;else a:for(n=e;iu!==null;){r=iu;var i=r.sibling,a=r.return;if(hu(r),r===n){iu=null;break a}if(i!==null){i.return=a,iu=i;break a}iu=a}}}var Ku={getCacheForType:function(e){var t=_a(Ca),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return _a(Ca).controller.signal}},qu=typeof WeakMap==`function`?WeakMap:Map,Ju=0,Yu=null,Q=null,Xu=0,Zu=0,Qu=null,$u=!1,ed=!1,td=!1,nd=0,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=null,ud=null,dd=!1,fd=0,pd=0,md=1/0,hd=null,gd=null,_d=0,vd=null,yd=null,bd=0,xd=0,Sd=null,Cd=null,wd=null,Td=null,Ed=null,Dd=0,Od=null;function kd(){return Ju&2&&Xu!==0?Xu&-Xu:z.T===null?gt():Nf()}function Ad(){if(sd===0){if(!(Xu&536870912)||q){var e=et;et<<=1,!(et&3932160)&&(et=262144),sd=e}else sd=536870912}return e=Co.current,e!==null&&(e.flags|=32),sd}function jd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(ui(e.memoizedProps,n))),Td===null&&(Td=[]),Td.push(t.bind(null,r))}}function Md(e,t,n){(e===Yu&&(Zu===2||Zu===9)||e.cancelPendingCommit!==null)&&(zd(e,0),Id(e,Xu,sd,!1)),lt(e,n),Ju&2&&e===Yu||(e===Yu&&(!(Ju&2)&&(ad|=n),rd===4&&Id(e,Xu,sd,!1)),Tf(e))}function Nd(e,t,n){if(Ju&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||it(e,t),a=r?qd(e,t):Gd(e,t,!0),o=r;do{if(a===0){ed&&!r&&Id(e,t,0,!1);break}if(n=e.current.alternate,o&&!Fd(n))a=Gd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ld;var l=c.current.memoizedState.isDehydrated;if(l&&(zd(c,s).flags|=256),s=Gd(c,s,!1),s!==2&&s!==6){if(td&&!l){c.errorRecoveryDisabledLanes|=o,ad|=o,a=4;break a}o=ud,ud=a,o!==null&&(ud===null?ud=o:ud.push.apply(ud,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){zd(e,0),Id(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Id(r,t,sd,!$u);break a;case 2:ud=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=fd+300-Le(),10<a)){if(Id(r,t,sd,!$u),rt(r,0,!0)!==0)break a;bd=t,r.timeoutHandle=gp(Pd.bind(null,r,n,ud,hd,dd,t,sd,ad,cd,$u,o,`Throttled`,-0,0),a);break a}Pd(r,n,ud,hd,dd,t,sd,ad,cd,$u,o,null,-0,0)}break}}while(1);Tf(e)}function Pd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:mn},Fl=null,Vu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?fd-Le():(a&4194048)===a?pd-Le():0,m=eh(d,m),m!==null)?(bd=a,e.cancelPendingCommit=m(ef.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Id(e,a,o,!l)):ef(e,t,a,n,r,i,o,s,c,l,u,d)}function Fd(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(!Pr(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 Id(e,t,n,r){t=at(e,t),t&=~od,t&=~ad,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ye(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&dt(e,n,t)}function Ld(){return Ju&6?!0:(Ef(0,!1),!1)}function Rd(){if(Q!==null){if(Zu===0)var e=Q.return;else e=Q,la=ca=null,Qo(e),Za=null,Qa=0,e=Q;for(;e!==null;)hl(e.alternate,e),e=e.return;Q=null}}function zd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),bd=0,Rd(),Yu=e,Q=n=Di(e.current,null),Xu=t,Zu=0,Qu=null,$u=!1,ed=it(e,t),td=!1,cd=sd=od=ad=id=rd=0,ud=ld=null,dd=!1,nd=at(e,t),_i(),n}function Bd(e,t){Y=null,z.H=cc,t===Va||t===Ua?(t=Ya(),Zu=3):t===Ha?(t=Ya(),Zu=4):Zu=t===Ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Qu=t,Q===null&&(rd=1,bc(e,Fi(t,e.current)))}function Vd(){var e=Co.current;return e===null?!0:(Xu&4194048)===Xu?wo===null:(Xu&62914560)===Xu||Xu&536870912?e===wo:!1}function Hd(){var e=z.H;return z.H=cc,e===null?cc:e}function Ud(){var e=z.A;return z.A=Ku,e}function Wd(){rd=4,$u||(Xu&4194048)!==Xu&&Co.current!==null||(ed=!0),!(id&134217727)&&!(ad&134217727)||Yu===null||Id(Yu,Xu,sd,!1)}function Gd(e,t,n){var r=Ju;Ju|=2;var i=Hd(),a=Ud();(Yu!==e||Xu!==t)&&(hd=null,zd(e,t)),t=!1;var o=rd;a:do try{if(Zu!==0&&Q!==null){var s=Q,c=Qu;switch(Zu){case 8:Rd(),o=6;break a;case 3:case 2:case 9:case 6:Co.current===null&&(t=!0);var l=Zu;if(Zu=0,Qu=null,Zd(e,s,c,l),n&&ed){o=0;break a}break;default:l=Zu,Zu=0,Qu=null,Zd(e,s,c,l)}}Kd(),o=rd;break}catch(t){Bd(e,t)}while(1);return t&&e.shellSuspendCounter++,la=ca=null,Ju=r,z.H=i,z.A=a,Q===null&&(Yu=null,Xu=0,_i()),o}function Kd(){for(;Q!==null;)Yd(Q)}function qd(e,t){var n=Ju;Ju|=2;var r=Hd(),a=Ud();Yu!==e||Xu!==t?(hd=null,md=Le()+500,zd(e,t)):ed=it(e,t);a:do try{if(Zu!==0&&Q!==null){t=Q;var o=Qu;b:switch(Zu){case 1:Zu=0,Qu=null,Zd(e,t,o,1);break;case 2:case 9:if(Ga(o)){Zu=0,Qu=null,Xd(t);break}t=function(){Zu!==2&&Zu!==9||Yu!==e||(Zu=7),Tf(e)},o.then(t,t);break a;case 3:Zu=7;break a;case 4:Zu=5;break a;case 7:Ga(o)?(Zu=0,Qu=null,Xd(t)):(Zu=0,Qu=null,Zd(e,t,o,7));break;case 5:var s=null;switch(Q.tag){case 26:s=Q.memoizedState;case 5:case 27:var c=Q;if(s?Ym(s):c.stateNode.complete){Zu=0,Qu=null;var l=c.sibling;if(l!==null)Q=l;else{var u=c.return;u===null?Q=null:(Q=u,Qd(u))}break b}}Zu=0,Qu=null,Zd(e,t,o,5);break;case 6:Zu=0,Qu=null,Zd(e,t,o,6);break;case 8:Rd(),rd=6;break a;default:throw Error(i(462))}}Jd();break}catch(t){Bd(e,t)}while(1);return la=ca=null,z.H=r,z.A=a,Ju=n,Q===null?(Yu=null,Xu=0,_i(),rd):0}function Jd(){for(;Q!==null&&!Fe();)Yd(Q)}function Yd(e){var t=ol(e.alternate,e,nd);e.memoizedProps=e.pendingProps,t===null?Qd(e):Q=t}function Xd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Bc(n,t,t.pendingProps,t.type,void 0,Xu);break;case 11:t=Bc(n,t,t.pendingProps,t.type.render,t.ref,Xu);break;case 5:Qo(t);var r=t;r===Xi&&(q?(na(r),r.tag===5&&r.stateNode!=null&&(Zi=r.stateNode)):(na(r),q=!0));default:hl(n,t),t=Q=Oi(t,nd),t=ol(n,t,nd)}e.memoizedProps=e.pendingProps,t===null?Qd(e):Q=t}function Zd(e,t,n,r){la=ca=null,Qo(t),Za=null,Qa=0;var i=t.return;try{if(Tc(e,i,t,n,Xu)){rd=1,bc(e,Fi(n,e.current)),Q=null;return}}catch(t){if(i!==null)throw Q=i,t;rd=1,bc(e,Fi(n,e.current)),Q=null;return}t.flags&32768?(q||r===1?e=!0:ed||Xu&536870912?e=!1:($u=e=!0,(r===2||r===9||r===3||r===6)&&(r=Co.current,r!==null&&r.tag===13&&(r.flags|=16384))),$d(t,e)):Qd(t)}function Qd(e){var t=e;do{if(t.flags&32768){$d(t,$u);return}e=t.return;var n=pl(t.alternate,t,nd);if(n!==null){Q=n;return}if(t=t.sibling,t!==null){Q=t;return}Q=t=e}while(t!==null);rd===0&&(rd=5)}function $d(e,t){do{var n=ml(e.alternate,e);if(n!==null){n.flags&=32767,Q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Q=e;return}Q=e=n}while(e!==null);rd=6,Q=null}function ef(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do lf();while(_d!==0);if(Ju&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Yu&&(Q=Yu=null,Xu=0),yd=t,vd=e,bd=n,Sd=a,Cd=r,tf(e,t,n,s,c,l,f)}}function tf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(xd=s,s|=gi,ut(e,n,s,r,i,a),Td=null,(n&335544064)===n?(Ed=Oa(e),r=10262):(Ed=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,vf(Ve,function(){return uf(),null})):(e.callbackNode=null,e.callbackPriority=0),Pl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=z.T,z.T=null,i=B.p,B.p=2,a=Ju,Ju|=4;try{lu(e,t,n)}finally{Ju=a,B.p=i,z.T=r}}_d=1,Pl?wd=Mp(o,e.containerInfo,Ed,af,of,rf,sf,uf,nf,null,null):(af(),of(),sf())}function nf(e){if(_d!==0){var t=vd.onRecoverableError;t(e,{componentStack:null})}}function rf(){_d===3&&(_d=0,ku(yd,vd),_d=4)}function af(){if(_d===1){_d=0;var e=vd,t=yd,n=bd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=z.T,z.T=null;var i=B.p;B.p=2;var a=Ju;Ju|=4;try{ou=su=!1,Tu(t,e,n),n=cp;var o=Br(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&zr(s.ownerDocument.documentElement,s)){if(c!==null&&Vr(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 _=Rr(s,h),v=Rr(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}}gh=!!sp,cp=sp=null}finally{Ju=a,B.p=i,z.T=r}}e.current=t,_d=2}}function of(){if(_d===2){_d=0;var e=vd,t=yd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=z.T,z.T=null;var r=B.p;B.p=2;var i=Ju;Ju|=4;try{du(e,t.alternate,t)}finally{Ju=i,B.p=r,z.T=n}}_d=3}}function sf(){if(_d===4||_d===3){_d=0;var e=wd;wd=null,Ie();var t=vd,n=yd,r=bd,i=Cd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?_d=5:(_d=0,yd=vd=null,cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(gd=null),ht(r),n=n.stateNode,qe&&typeof qe.onCommitFiberRoot==`function`)try{qe.onCommitFiberRoot(Ke,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=z.T,a=B.p,B.p=2,z.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{z.T=n,B.p=a}}if(i=Td,o=Ed,Ed=null,i!==null&&(Td=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);bd&3&&lf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===Od?Dd++:(Dd=0,Od=t):(Dd=0,Od=null),Ef(0,!1)}}function cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ta(t)))}function lf(){return wd!==null&&(wd.skipTransition(),wd=null),af(),of(),sf(),uf()}function uf(){if(_d!==5)return!1;var e=vd,t=xd;xd=0;var n=ht(bd),r=z.T,a=B.p;try{B.p=32>n?32:n,z.T=null,n=Sd,Sd=null;var o=vd,s=bd;if(_d=0,yd=vd=null,bd=0,Ju&6)throw Error(i(331));var c=Ju;if(Ju|=4,Uu(o.current),Iu(o,o.current,s,n),Ju=c,Ef(0,!1),qe&&typeof qe.onPostCommitFiberRoot==`function`)try{qe.onPostCommitFiberRoot(Ke,o)}catch{}return!0}finally{B.p=a,z.T=r,cf(e,t)}}function df(e,t,n){t=Fi(n,t),t=Sc(e.stateNode,t,2),e=lo(e,t,2),e!==null&&(lt(e,2),Tf(e))}function ff(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gd===null||!gd.has(r))){e=Fi(n,e),n=Cc(2),r=lo(t,n,2),r!==null&&(wc(n,r,t,e),lt(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qu;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)||(td=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yu===e&&(Xu&n)===n&&(rd===4||rd===3&&(Xu&62914560)===Xu&&300>Le()-fd?Ju&2?od|=n:zd(e,0):od|=n,cd===Xu&&(cd=0)),Tf(e)}function hf(e,t){t===0&&(t=st()),e=bi(e,t),e!==null&&(lt(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(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),hf(e,n)}function vf(e,t){return Ne(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;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-Ye(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=Xu,a=rt(r,r===Yu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||it(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&hp()&&(e=wf);for(var t=Le(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}_d!==0&&_d!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ye(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ot(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Yu,n=Xu,n=rt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Zu===2||Zu===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||it(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Pe(r),ht(n)){case 2:case 8:n=Be;break;case 32:n=Ve;break;case 268435456:n=Ue;break;default:n=Ve}return r=Af.bind(null,e),n=Ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Pe(r),e.callbackPriority=2,e.callbackNode=null,2}function Af(e,t){if(_d!==0&&_d!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lf()&&e.callbackNode!==n)return null;var r=Xu;return r=rt(e,e===Yu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Nd(e,r,t),kf(e,Le()),e.callbackNode!=null&&e.callbackNode===n?Af.bind(null,e):null)}function jf(e,t){if(lf())return null;Nd(e,t,!0)}function Mf(){bp(function(){Ju&6?Ne(ze,Df):Of()})}function Nf(){if(wf===0){var e=ja;e===0&&(e=$e,$e<<=1,!($e&261888)&&($e=256)),wf=e}return wf}function Pf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:pn(e)}function Ff(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Pf((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?Pf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(wf!==0){var e=new FormData(i,o);Js(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Js(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var If=0;If<si.length;If++){var Lf=si[If];ci(Lf.toLowerCase(),`on`+(Lf[0].toUpperCase()+Lf.slice(1)))}ci($r,`onAnimationEnd`),ci(ei,`onAnimationIteration`),ci(ti,`onAnimationStart`),ci(`dblclick`,`onDoubleClick`),ci(`focusin`,`onFocus`),ci(`focusout`,`onBlur`),ci(ni,`onTransitionRun`),ci(ri,`onTransitionStart`),ci(ii,`onTransitionCancel`),ci(ai,`onTransitionEnd`),Rt(`onMouseEnter`,[`mouseout`,`mouseover`]),Rt(`onMouseLeave`,[`mouseout`,`mouseover`]),Rt(`onPointerEnter`,[`pointerout`,`pointerover`]),Rt(`onPointerLeave`,[`pointerout`,`pointerover`]),Lt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Lt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Lt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Lt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Lt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Lt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Rf=`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(` `),zf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Rf));function Bf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){pi(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){pi(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Wf(t,e,2,!1),n.add(r))}function Vf(e,t,n){var r=0;t&&(r|=4),Wf(n,e,r,t)}var Hf=`_reactListening`+Math.random().toString(36).slice(2);function Uf(e){if(!e[Hf]){e[Hf]=!0,Ft.forEach(function(t){t!==`selectionchange`&&(zf.has(t)||Vf(t,!1,e),Vf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hf]||(t[Hf]=!0,Vf(`selectionchange`,!1,t))}}function Wf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!Cn||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 Gf(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=kt(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}bn(function(){var r=a,i=gn(n),s=[];a:{var c=oi.get(e);if(c!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:l=Xn;break;case`focusin`:u=`focus`,l=Vn;break;case`focusout`:u=`blur`,l=Vn;break;case`beforeblur`:case`afterblur`:l=Vn;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=zn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Bn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=$n;break;case $r:case ei:case ti:l=Hn;break;case ai:l=er;break;case`scroll`:case`scrollend`:l=In;break;case`wheel`:l=tr;break;case`copy`:case`cut`:case`paste`:l=Un;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Zn;break;case`submit`:l=Qn;break;case`toggle`:case`beforetoggle`:l=nr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(Kf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==hn&&(u=n.relatedTarget||n.fromElement)&&(kt(u)||u[xt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?kt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=zn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:jt(c),h=l==null?u:jt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,kt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Jf):null,c!==null&&Yf(s,u,c,d,!1),l!==null&&f!==null&&Yf(s,f,l,d,!0)))}a:{if(c=r?jt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Sr;else if(gr(c)){if(Cr)_=Mr;else{_=Ar;var v=kr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&dn(r.elementType)&&(_=Sr):_=jr;if(_&&=_(e,r)){_r(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?jt(r):window,e){case`focusin`:(gr(v)||v.contentEditable===`true`)&&(Ur=v,Wr=r,Gr=null);break;case`focusout`:Gr=Wr=Ur=null;break;case`mousedown`:Kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Kr=!1,qr(s,n,i);break;case`selectionchange`:if(Hr)break;case`keydown`:case`keyup`:qr(s,n,i)}var y;if(ir)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else fr?ur(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(sr&&n.locale!==`ko`&&(fr||b!==`onCompositionStart`?b===`onCompositionEnd`&&fr&&(y=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,fr=!0)),v=qf(r,b),0<v.length&&(b=new Wn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=dr(n),y!==null&&(b.data=y)))),(y=or?pr(e,n):mr(e,n))&&(b=qf(r,`onBeforeInput`),0<b.length&&(v=new Wn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Ff(s,e,r,n,i)}Bf(s,t)})}function Kf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qf(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=xn(e,n),i!=null&&r.unshift(Kf(e,i,a)),i=xn(e,t),i!=null&&r.push(Kf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Jf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yf(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=xn(n,a),l!=null&&o.unshift(Kf(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(Kf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Xf=/\r\n?/g,Zf=/\u0000|\uFFFD/g;function Qf(e){return(typeof e==`string`?e:``+e).replace(Xf,`
|
|
9
|
+
`).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&sn(e,``+r);else return;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`:un(e,r,o);return;case`data`:if(t!==`object`){Kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=pn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,a.name,a,null),ep(e,t,`formEncType`,a.formEncType,a,null),ep(e,t,`formMethod`,a.formMethod,a,null),ep(e,t,`formTarget`,a.formTarget,a,null)):(ep(e,t,`encType`,a.encType,a,null),ep(e,t,`method`,a.method,a,null),ep(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=pn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=mn);return;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=pn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Gt(e,`popover`,r);break;case`xlinkActuate`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Gt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=fn.get(n)||n,Gt(e,n,r);else return}Ut=!0}function tp(e,t,n,r,a,o){switch(n){case`style`:un(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)sn(e,``+r);else return;break;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=mn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!It.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[bt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Ut=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Gt(e,n,r)}return}Ut=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`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:ep(e,t,o,s,n,null)}}a&&ep(e,t,`srcSet`,n.srcSet,n,null),r&&ep(e,t,`src`,n.src,n,null);return;case`input`:$(`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:ep(e,t,r,d,n,null)}}tn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`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:ep(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&rn(e,!!r,n,!0):rn(e,!!r,t,!1);return;case`textarea`:for(s in $(`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:ep(e,t,s,c,n,null)}on(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:ep(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)$(Rf[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`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:ep(e,t,u,r,n,null)}return;default:if(dn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ep(e,t,c,r,n,null))}var rp={};function ip(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)||ep(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Ut=!0),o=m;break;case`name`:m!==f&&(Ut=!0),a=m;break;case`checked`:m!==f&&(Ut=!0),u=m;break;case`defaultChecked`:m!==f&&(Ut=!0),d=m;break;case`value`:m!==f&&(Ut=!0),s=m;break;case`defaultValue`:m!==f&&(Ut=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ep(e,t,p,m,r,f)}}H(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)||ep(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Ut=!0),p=o;break;case`defaultValue`:o!==l&&(Ut=!0),c=o;break;case`multiple`:o!==l&&(Ut=!0),s=o;default:o!==l&&ep(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?rn(e,!!n,n?[]:``,!1):rn(e,!!n,t,!0)):rn(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:ep(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Ut=!0),p=a;break;case`defaultValue`:a!==o&&(Ut=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ep(e,t,s,a,r,o)}an(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:ep(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Ut=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ep(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)&&ep(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:ep(e,t,u,p,r,m)}return;default:if(dn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(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||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ep(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||ep(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){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&&ap(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&&ap(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 sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(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 dp(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 fp(e,t,n,r){return n=lp(n).createElement(e),n[yt]=r,n[bt]=t,np(n,e,t),Nt(n),n}function pp(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 mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(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),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(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 Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=kt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Zp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(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`:nm(n),Ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(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[Et])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=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(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 lm(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 um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(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 pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(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 gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ep(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===mn&&(e.onclick=null),Ot(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ot(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=B.d;B.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=Ld();return e||t}function Cm(e){var t=At(e);t!==null&&t.tag===5&&t.type===`form`?Xs(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Dt]=!0,o.onload=o.onerror=function(){Pt(o)}),Nt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Mt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Nt(c),np(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,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Mt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Nt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Mt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Nt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=ye.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Mt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Mt(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(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Mt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+en(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Dt]){r.loading=1;return}}else t=e.createElement(`link`),t[Dt]=!0,t.onload=t.onerror=Pt.bind(null,t),np(t,`link`,n),Nt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+en(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Nt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Nt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Nt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Nt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Nt(a),a):(r=n,(a=vm.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Nt(a),np(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,Vm(r,n.precedence,e));return t.instance}function Vm(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 Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,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[Et]||a[yt]||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 Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(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 Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(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=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(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=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.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=nh.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 sh={$$typeof:P,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function ch(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=ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ct(0),this.hiddenUpdates=ct(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ti(3,null,null,t),e.current=a,a.stateNode=e,t=wa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},oo(a),e}function uh(e){return e?(e=Ci,e):Ci}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=co(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=lo(e,r,t),n!==null&&(Md(n,e,t),uo(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=bi(e,67108864);t!==null&&Md(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=kd();t=mt(t);var n=bi(e,t);n!==null&&Md(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=z.T;z.T=null;var a=B.p;try{B.p=2,yh(e,t,n,r)}finally{B.p=a,z.T=i}}function vh(e,t,n,r){var i=z.T;z.T=null;var a=B.p;try{B.p=8,yh(e,t,n,r)}finally{B.p=a,z.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Gf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=At(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(Ju&6)&&(md=Le()+500,Ef(0,!1))}}break;case 31:case 13:s=bi(a,2),s!==null&&Md(s,a,2),Ld(),ph(a,2)}if(a=bh(r),a===null&&Gf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Gf(e,t,r,null,n)}}function bh(e){return e=gn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=kt(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 xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`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 Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(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=At(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=kt(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,_t(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){hh(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 Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);hn=r,n.target.dispatchEvent(r),hn=null}else return t=At(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=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(Sh(r||n)===null)continue;break}var a=At(n);a!==null&&(e.splice(t,3),t-=3,Js(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.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[bt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){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 Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,kd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Ld(),t[xt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));B.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:z,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Ke=Jh.inject(qh),qe=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=_c,s=vc,c=yc;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=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[xt]=t.current,Uf(e),new Wh(t)}})),g=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()}));function _(){return typeof window<`u`}function v(e){return x(e)?(e.nodeName||``).toLowerCase():`#document`}function y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function b(e){return((x(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function x(e){return _()?e instanceof Node||e instanceof y(e).Node:!1}function S(e){return _()?e instanceof Element||e instanceof y(e).Element:!1}function C(e){return _()?e instanceof HTMLElement||e instanceof y(e).HTMLElement:!1}function w(e){return!_()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof y(e).ShadowRoot}function T(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=F(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function E(e){return/^(table|td|th)$/.test(v(e))}function D(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var O=/transform|translate|scale|rotate|perspective|filter/,k=/paint|layout|strict|content/,A=e=>!!e&&e!==`none`,j;function M(e){let t=S(e)?F(e):e;return A(t.transform)||A(t.translate)||A(t.scale)||A(t.rotate)||A(t.perspective)||!ee()&&(A(t.backdropFilter)||A(t.filter))||O.test(t.willChange||``)||k.test(t.contain||``)}function N(e){let t=ne(e);for(;C(t)&&!P(t);){if(M(t))return t;if(D(t))return null;t=ne(t)}return null}function ee(){return j??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),j}function P(e){return/^(html|body|#document)$/.test(v(e))}function F(e){return y(e).getComputedStyle(e)}function te(e){return S(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ne(e){if(v(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||w(e)&&e.host||b(e);return w(t)?t.host:t}function re(e){let t=ne(e);return P(t)?(e.ownerDocument||e).body:C(t)&&T(t)?t:re(t)}function ie(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=re(e),i=r===e.ownerDocument?.body,a=y(r);if(i){let e=ae(a);return t.concat(a,a.visualViewport||[],T(r)?r:[],e&&n?ie(e):[])}return t.concat(r,ie(r,[],n))}function ae(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var I=c(u(),1),oe={...I},se={};function L(e,t){let n=I.useRef(se);return n.current===se&&(n.current=e(t)),n}var ce=oe.useInsertionEffect,le=ce&&ce!==oe.useLayoutEffect?ce:e=>e();function R(e){let t=L(ue).current;return t.next=e,le(t.effect),t.trampoline}function ue(){let e={next:void 0,callback:de,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function de(){}var z=typeof document<`u`?I.useLayoutEffect:()=>{};function B(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var fe={};function pe(e,t,n,r,i){if(!n&&!r&&!i&&!e)return he(t);let a=he(e);return t&&(a=V(a,t)),n&&(a=V(a,n)),r&&(a=V(a,r)),i&&(a=V(a,i)),a}function me(e){if(e.length===0)return fe;if(e.length===1)return he(e[0]);let t=he(e[0]);for(let n=1;n<e.length;n+=1)t=V(t,e[n]);return t}function he(e){return ye(e)?{...e(fe)}:ge(e)}function V(e,t){return ye(t)?t(e):_e(e,t)}function ge(e){let t={...e};for(let e in t){let n=t[e];ve(e,n)&&(t[e]=xe(n))}return t}function _e(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=B(e.style,r);break;case`className`:e[n]=Ce(e.className,r);break;default:e[n]=ve(n,r)?be(e[n],r):r}}return e}function ve(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function ye(e){return typeof e==`function`}function be(e,t){return t?e?(...n)=>{let r=n[0];if(we(r)){let i=r;Se(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:xe(t):e}function xe(e){return e&&((...t)=>{let n=t[0];return we(n)&&Se(n),e(...t)})}function Se(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ce(e,t){return t?e?t+` `+e:t:e}function we(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Te(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Ee=Te(`https://base-ui.com/production-error`,`Base UI`),De=I.createContext(void 0);function Oe(e=!1){let t=I.useContext(De);if(t===void 0&&!e)throw Error(Ee(16));return t}function ke(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:I.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Ae(e){return e?.ownerDocument||document}function je(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(y(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Me(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=I.useRef(null),s=Oe(!0),c=a??s!==void 0,{props:l}=ke({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=I.useCallback(()=>{let e=o.current;Ne(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return z(u,[u]),{getButtonProps:I.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return pe({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Se(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Ne(r),s=!i&&Pe(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),je(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),je(r,e)))},onKeyUp(e){t||(Se(e),a?.(e),e.target===e.currentTarget&&i&&c&&Ne(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),je(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:R(e=>{o.current=e,u()})}}function Ne(e){return C(e)&&e.tagName===`BUTTON`}function Pe(e){return C(e)&&e.tagName===`A`&&!!e.href}function Fe(e,t,n,r){let i=L(Le).current;return Re(i,e,t,n,r)&&Be(i,[e,t,n,r]),i.callback}function Ie(e){let t=L(Le).current;return ze(t,e)&&Be(t,e),t.callback}function Le(){return{callback:null,cleanup:null,refs:[]}}function Re(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function ze(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Be(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var Ve=19;function He(e){return Ve>=e}function Ue(e){if(!I.isValidElement(e))return null;let t=e,n=t.props;return(He(19)?n?.ref:t.ref)??null}function We(){}var Ge=Object.freeze([]),Ke=Object.freeze({});function qe(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Je(e,t){return typeof e==`function`?e(t):e}function Ye(e,t){return typeof e==`function`?e(t):e}function Xe(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=et(r));let i=Ze(t,n,r);if(n.enabled===!1)return null;let a=n.state??Ke;return tt(e,r,i,a)}function Ze(e,t,n){let{className:r,style:i}=e,{state:a=Ke,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Je(r,a):void 0,d=l?Ye(i,a):void 0,f=l?qe(a,c):Ke,p=l&&s?Qe(s):void 0,m=l?B(f,p)??{}:Ke;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Ie([m.ref,Ue(n),...o]):Fe(m.ref,Ue(n),o):Fe(null,null)),l?(u!==void 0&&(m.className=Ce(m.className,u)),d!==void 0&&(m.style=B(m.style,d)),m):Ke}function Qe(e){return Array.isArray(e)?me(e):pe(void 0,e)}var $e=Symbol.for(`react.lazy`);function et(e){if(e?.$$typeof!==$e)return e;let t=I.Children.toArray(e)[0];return I.isValidElement(t)?t:e}function tt(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=pe(n,t.props);return e.ref=n.ref,I.cloneElement(t,e)}return nt(e,n)}function nt(e,t){return e===`button`?(0,I.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,I.createElement)(`img`,{alt:``,...t,key:t.key}):I.createElement(e,t)}var rt=I.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Me({disabled:i,focusableWhenDisabled:a,native:o});return Xe(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),it=g();function at(e){return e<20?`low`:e<50?`mid`:`ok`}function ot(e){return Math.min(100,Math.max(0,Math.round(e)))}var st={claude:{name:`Claude`,rank:0},codex:{name:`Codex`,rank:1},cursor:{name:`Cursor`,rank:2}};function ct(e){return st[e].name}function lt(e){return[...e].sort((e,t)=>st[e.runtime].rank-st[t.runtime].rank)}function ut(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=ut(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function dt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ut(e))&&(r&&(r+=` `),r+=t);return r}var ft=(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},pt=(e,t)=>({classGroupId:e,validator:t}),mt=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ht=`-`,gt=[],_t=`arbitrary..`,vt=e=>{let t=xt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bt(e);let n=e.split(ht);return yt(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ft(i,t):t:i||gt}return n[e]||gt}}},yt=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yt(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ht):e.slice(t).join(ht),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bt=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?_t+r:void 0})(),xt=e=>{let{theme:t,classGroups:n}=e;return St(n,t)},St=(e,t)=>{let n=mt();for(let r in e){let i=e[r];Ct(i,n,r,t)}return n},Ct=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wt(i,t,n,r)}},wt=(e,t,n,r)=>{typeof e==`string`?Tt(e,t,n):typeof e==`function`?Et(e,t,n,r):Dt(e,t,n,r)},Tt=(e,t,n)=>{let r=e===``?t:Ot(t,e);r.classGroupId=n},Et=(e,t,n,r)=>{kt(e)?Ct(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(pt(n,e)))},Dt=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ct(o,Ot(t,a),n,r)}},Ot=(e,t)=>{let n=e,r=t.split(ht),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=mt(),n.nextPart.set(t,i)),n=i}return n},kt=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,At=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)}}},jt=`!`,Mt=`:`,Nt=[],Pt=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ft=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===Mt){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(jt)?(c=s.slice(0,-1),l=!0):s.startsWith(jt)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pt(t,l,c,u)};if(t){let e=t+Mt,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pt(Nt,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},It=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}},Lt=e=>({cache:At(e.cacheSize),parseClassName:Ft(e),sortModifiers:It(e),postfixLookupClassGroupIds:Rt(e),...vt(e)}),Rt=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zt=/\s+/,Bt=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zt),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jt:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vt=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ht(n))&&(i&&(i+=` `),i+=r);return i},Ht=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ht(e[r]))&&(n&&(n+=` `),n+=t);return n},Ut=(e,...t)=>{let n,r,i,a,o=o=>(n=Lt(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=Bt(e,n);return i(e,a),a};return a=o,(...e)=>a(Vt(...e))},Wt=[],Gt=e=>{let t=t=>t[e]||Wt;return t.isThemeGetter=!0,t.themeKey=e,t},Kt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xt=/\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$/,Zt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Qt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$t=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,en=e=>Jt.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),tn=e=>!!e&&Number.isInteger(Number(e)),nn=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),rn=e=>Yt.test(e),an=()=>!0,on=e=>Xt.test(e)&&!Zt.test(e),sn=()=>!1,cn=e=>Qt.test(e),ln=e=>$t.test(e),un=e=>!U(e)&&!W(e),dn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),fn=e=>Dn(e,jn,sn),U=e=>Kt.test(e),pn=e=>Dn(e,Mn,on),mn=e=>Dn(e,Nn,H),hn=e=>Dn(e,Fn,an),gn=e=>Dn(e,Pn,sn),_n=e=>Dn(e,kn,sn),vn=e=>Dn(e,An,ln),yn=e=>Dn(e,In,cn),W=e=>qt.test(e),bn=e=>On(e,Mn),xn=e=>On(e,Pn),Sn=e=>On(e,kn),Cn=e=>On(e,jn),wn=e=>On(e,An),Tn=e=>On(e,In,!0),En=e=>On(e,Fn,!0),Dn=(e,t,n)=>{let r=Kt.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},On=(e,t,n=!1)=>{let r=qt.exec(e);return r?r[1]?t(r[1]):n:!1},kn=e=>e===`position`||e===`percentage`,An=e=>e===`image`||e===`url`,jn=e=>e===`length`||e===`size`||e===`bg-size`,Mn=e=>e===`length`,Nn=e=>e===`number`,Pn=e=>e===`family-name`,Fn=e=>e===`number`||e===`weight`,In=e=>e===`shadow`,Ln=Ut(()=>{let e=Gt(`color`),t=Gt(`font`),n=Gt(`text`),r=Gt(`font-weight`),i=Gt(`tracking`),a=Gt(`leading`),o=Gt(`breakpoint`),s=Gt(`container`),c=Gt(`spacing`),l=Gt(`radius`),u=Gt(`shadow`),d=Gt(`inset-shadow`),f=Gt(`text-shadow`),p=Gt(`drop-shadow`),m=Gt(`blur`),h=Gt(`perspective`),g=Gt(`aspect`),_=Gt(`ease`),v=Gt(`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(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[en,`full`,`auto`,...w()],E=()=>[tn,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,tn,W,U]},tn,W,U],O=()=>[tn,`auto`,W,U],k=()=>[`auto`,`min`,`max`,`fr`,W,U],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=()=>[en,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[s,en,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[en,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,W,U],te=()=>[...b(),Sn,_n,{position:[W,U]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,Cn,fn,{size:[W,U]}],ie=()=>[nn,bn,pn],ae=()=>[``,`none`,`full`,l,W,U],I=()=>[``,H,bn,pn],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],L=()=>[H,nn,Sn,_n],ce=()=>[``,`none`,m,W,U],le=()=>[`none`,H,W,U],R=()=>[`none`,H,W,U],ue=()=>[H,W,U],de=()=>[en,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[rn],breakpoint:[rn],color:[an],container:[rn],"drop-shadow":[rn],ease:[`in`,`out`,`in-out`],font:[un],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[rn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[rn],shadow:[rn],spacing:[`px`,H],text:[rn],"text-shadow":[rn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,en,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[dn],columns:[{columns:[H,`auto`,U,W,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:[tn,`auto`,W,U]}],basis:[{basis:[en,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,en,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[tn,`first`,`last`,`none`,W,U]}],"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`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],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`,`none`,...N()]}],"font-size":[{text:[`base`,n,bn,pn]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,En,hn]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,nn,U]}],"font-family":[{font:[xn,gn,t]}],"font-features":[{"font-features":[U]}],"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,W,U]}],"line-clamp":[{"line-clamp":[H,`none`,W,mn]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,W,pn]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[H,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[tn,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],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`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},tn,W,U],radial:[``,W,U],conic:[``,tn,W,U]},wn,vn]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,bn,pn]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`inner`,`none`,u,Tn,yn]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Tn,yn]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[H,pn]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Tn,yn]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[H,W,U]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"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":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:ce()}],brightness:[{brightness:[H,W,U]}],contrast:[{contrast:[H,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Tn,yn]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,H,W,U]}],"hue-rotate":[{"hue-rotate":[H,W,U]}],invert:[{invert:[``,H,W,U]}],saturate:[{saturate:[H,W,U]}],sepia:[{sepia:[``,H,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[H,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[H,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,H,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[H,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[H,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,W,U]}],"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`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[H,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:R()}],"scale-x":[{"scale-x":R()}],"scale-y":[{"scale-y":R()}],"scale-z":[{"scale-z":R()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[W,U,``,`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`],zoom:[{zoom:[tn,W,U]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"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`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"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`,W,U]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[H,bn,pn,mn]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],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":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`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-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`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-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`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-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function G(...e){return Ln(dt(e))}var Rn=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})),K=o(((e,t)=>{t.exports=Rn()}))(),zn={ok:`bg-signal`,mid:`bg-warn`,low:`bg-failed`},Bn={ok:`text-ink`,mid:`text-warn`,low:`text-failed`};function Vn({reports:e,onReports:t}){let[n,r]=(0,I.useState)(!1),[i,a]=(0,I.useState)(),o=()=>{r(!0),a(void 0),fetch(`/quota`,{method:`POST`}).then(async e=>{if(!e.ok)throw Error(`重新取得失敗`);t(await e.json())}).catch(()=>a(`重新取得失敗`)).finally(()=>r(!1))},s=lt(e);return(0,K.jsxs)(`section`,{"aria-label":`剩餘額度`,className:`border-b border-line bg-paper`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 pt-2 sm:px-4`,children:[(0,K.jsx)(`h2`,{className:`eyebrow`,children:`剩餘額度`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i&&(0,K.jsx)(`span`,{role:`alert`,className:`text-pretty text-sm text-failed`,children:i}),(0,K.jsx)(rt,{type:`button`,disabled:n,className:`min-h-11 rounded-md border border-line px-3 py-1 text-xs hover:bg-wall disabled:opacity-60 sm:min-h-8`,onClick:o,children:n?`正在取得`:`重新取得`})]})]}),s.length===0?(0,K.jsx)(`div`,{className:`px-3 pt-1 pb-3 sm:px-4`,children:(0,K.jsx)(`div`,{"aria-hidden":!0,className:`h-8 w-1/2 rounded-md bg-ink/10 motion-safe:animate-pulse`})}):(0,K.jsx)(`div`,{className:G(`grid`,s.length===2&&`md:grid-cols-2 md:divide-x md:divide-line`,s.length>=3&&`md:grid-cols-3 md:divide-x md:divide-line`),children:s.map((e,t)=>(0,K.jsx)(`div`,{className:G(t>0&&`border-t border-line md:border-t-0`),children:(0,K.jsx)(Hn,{report:e})},e.runtime))})]})}function Hn({report:e}){let t=ct(e.runtime);return(0,K.jsxs)(`div`,{className:`min-w-0 px-3 py-3 sm:px-4`,children:[(0,K.jsx)(`h3`,{className:`text-sm text-ink/60`,children:`${t} 剩餘額度`}),e.error?(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-failed`,children:e.error}):e.windows.length===0?(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-ink/60`,children:`沒有讀到額度`}):(0,K.jsx)(`div`,{className:`mt-2 space-y-3`,children:e.windows.map(e=>(0,K.jsx)(Un,{runtime:t,window:e},e.label))})]})}function Un({runtime:e,window:t}){let n=ot(t.remaining_percent),r=at(t.remaining_percent);return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`span`,{className:`w-16 shrink-0 text-sm text-ink/60`,children:t.label}),(0,K.jsx)(`span`,{className:G(`w-14 shrink-0 font-mono text-xl font-medium tabular-nums`,Bn[r]),children:`${n}%`}),(0,K.jsx)(`div`,{role:`meter`,"aria-label":`${e} ${t.label} 剩餘額度`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,"aria-valuetext":`剩餘 ${n}%`,className:`h-2 min-w-0 flex-1 overflow-hidden rounded-full bg-ink/10`,children:(0,K.jsx)(`div`,{className:G(`h-full rounded-full motion-safe:transition-[width] motion-safe:duration-300`,zn[r]),style:{width:`${n}%`}})}),r===`low`&&(0,K.jsx)(`span`,{className:`shrink-0 text-sm text-failed`,children:`快用完`})]}),(0,K.jsx)(`p`,{className:`mt-0.5 pl-[4.75rem] text-sm tabular-nums text-ink/60`,children:`重設 ${t.resets}`})]})}function Wn(){return document.querySelector(`meta[name="lyceum-token"]`)?.getAttribute(`content`)??``}var Gn=()=>({"Content-Type":`application/json`,"X-Lyceum-Token":Wn()});async function Kn(e){return await e.json().catch(()=>({}))??{}}async function qn(e,t){let n;try{n=await fetch(`/api/cmd/${e}`,{method:`POST`,headers:Gn(),body:JSON.stringify(t)})}catch{return{kind:`error`,message:`連不上本機伺服器。`}}let r=await Kn(n);if(n.status===403)return{kind:`stale`};if(n.status===428)return{kind:`need`,need:r.need===`typed`?`typed`:`confirm`,...typeof r.target==`string`?{target:r.target}:{}};if(n.status===400)return{kind:`invalid`,error:String(r.error??`輸入不對。`),...typeof r.field==`string`?{field:r.field}:{}};let i={kind:`error`,message:`伺服器回應格式不對。`};return n.status===202?typeof r.jobId==`string`&&typeof r.pid==`number`?{kind:`job`,job:{jobId:r.jobId,pid:r.pid}}:i:n.status===200?r.mode!==`short`||r.exit!==null&&typeof r.exit!=`number`||typeof r.stdout!=`string`||typeof r.stderr!=`string`||typeof r.timedOut!=`boolean`?i:{kind:`short`,result:{mode:`short`,exit:r.exit,signal:typeof r.signal==`string`?r.signal:null,stdout:r.stdout,stderr:r.stderr,timedOut:r.timedOut,truncated:r.truncated===!0}}:{kind:`error`,message:String(r.error??`伺服器回了 ${n.status}。`)}}async function Jn(){try{let e=await fetch(`/api/jobs`);if(!e.ok)return null;let t=await e.json();return Array.isArray(t.jobs)?t.jobs:[]}catch{return null}}function Yn(e,t){return t===null?e:t}function Xn(e,t,n){return!t||!n||n.id!==t||e.some(e=>e.id===t)?e:[...e,n]}async function Zn(e){try{let t=await fetch(`/api/jobs/${encodeURIComponent(e)}`);return t.ok?await t.json():void 0}catch{return}}async function Qn(e,t){try{let n=await fetch(`/api/ask?project=${encodeURIComponent(e)}&run=${encodeURIComponent(t)}`);return n.ok?await n.json():void 0}catch{return}}async function $n(e,t,n,r){let i={complete:!1,problems:[`送出答案失敗,請稍後再試。`]};try{let a=await fetch(`/api/ask/answers`,{method:`POST`,headers:Gn(),body:JSON.stringify({project:e,run:t,answers:n,assumeDefaults:r})}),o=await Kn(a);return a.ok?typeof o.complete==`boolean`&&Array.isArray(o.problems)?{complete:o.complete,problems:o.problems.map(String)}:i:Array.isArray(o.problems)&&o.problems.length>0&&o.problems.every(e=>typeof e==`string`)?{complete:!1,problems:o.problems}:typeof o.error==`string`&&o.error?{complete:!1,problems:[o.error]}:i}catch{return i}}async function er(e,t){try{let n=await fetch(`/api/reports?project=${encodeURIComponent(e)}&run=${encodeURIComponent(t)}`,{headers:{"X-Lyceum-Token":Wn()}});return n.ok?(await n.json()).reports??[]:void 0}catch{return}}async function tr(e,t,n){try{let r=await fetch(`/api/report?project=${encodeURIComponent(e)}&run=${encodeURIComponent(t)}&id=${encodeURIComponent(n)}`,{headers:{"X-Lyceum-Token":Wn()}});return r.ok?await r.json():void 0}catch{return}}async function nr(){try{let e=await fetch(`/api/decisions`,{headers:{"X-Lyceum-Token":Wn()}});return e.ok?(await e.json()).projects??[]:void 0}catch{return}}async function rr(e,t){try{let n=await fetch(`/api/decision?project=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{headers:{"X-Lyceum-Token":Wn()}});return n.ok?await n.json():void 0}catch{return}}function ir(e,t){this.v=e,this.k=t}function ar(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function or(e){if(Array.isArray(e))return e}function sr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function cr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lr(e,t){return or(e)||sr(e,t)||ur(e,t)||cr()}function ur(e,t){if(e){if(typeof e==`string`)return ar(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ar(e,t):void 0}}function dr(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof ir;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}dr.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},dr.prototype.next=function(e){return this._invoke(`next`,e)},dr.prototype.throw=function(e){return this._invoke(`throw`,e)},dr.prototype.return=function(e){return this._invoke(`return`,e)};var fr=Object.entries,pr=Object.keys,mr=Object.setPrototypeOf,hr=Object.isFrozen,gr=Object.getPrototypeOf,_r=Object.getOwnPropertyDescriptor,vr=Object.freeze,yr=Object.seal,br=Object.create,xr=typeof Reflect<`u`&&Reflect,Sr=xr.apply,Cr=xr.construct;vr||=function(e){return e},yr||=function(e){return e},Sr||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Cr||=function(e){return new e(...[...arguments].slice(1))};var wr=$r(Array.prototype.forEach),Tr=$r(Array.prototype.lastIndexOf),Er=$r(Array.prototype.pop),Dr=$r(Array.prototype.push),Or=$r(Array.prototype.slice),kr=$r(Array.prototype.splice),Ar=Array.isArray,jr=ei(Set),Mr=$r(Set.prototype.add),Nr=$r(Set.prototype.has),Pr=$r(Set.prototype.delete),Fr=ei(Map),Ir=$r(Map.prototype.get),Lr=$r(Map.prototype.set),Rr=$r(String.prototype.toLowerCase),zr=$r(String.prototype.toString),Br=$r(String.prototype.match),Vr=$r(String.prototype.replace),Hr=$r(String.prototype.indexOf),Ur=$r(String.prototype.trim),Wr=$r(Number.prototype.toString),Gr=$r(Boolean.prototype.toString),Kr=typeof BigInt>`u`?null:$r(BigInt.prototype.toString),qr=typeof Symbol>`u`?null:$r(Symbol.prototype.toString),Jr=$r(Object.prototype.hasOwnProperty),Yr=$r(Object.prototype.toString),Xr=RegExp.prototype.test,Zr=function(e,t){return e instanceof RegExp&&(e.lastIndex=0),Sr(Xr,e,[t])},Qr=ei(TypeError);function $r(e){return function(t){var n=[...arguments].slice(1);return Sr(e,t,n)}}function ei(e){return function(){return Cr(e,[...arguments])}}function ti(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Rr;if(mr&&mr(e,null),!Ar(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(hr(t)||(t[r]=e),i=e)}e[i]=!0}return e}function ni(e){for(let t=0;t<e.length;t++)Jr(e,t)||(e[t]=null);return e}function ri(e){let t=br(null);for(let r of fr(e)){var n=lr(r,2);let i=n[0],a=n[1];Jr(e,i)&&(t[i]=Ar(a)?ni(a):a&&typeof a==`object`&&a.constructor===Object?ri(a):a)}return t}function ii(e){let t=br(null),n=pr(e),r=n.length;for(;r--;)t[n[r]]=e[n[r]];return t}function ai(e){switch(typeof e){case`string`:return e;case`number`:return Wr(e);case`boolean`:return Gr(e);case`bigint`:return Kr?Kr(e):`0`;case`symbol`:return qr?qr(e):`Symbol()`;case`undefined`:return Yr(e);case`function`:case`object`:{if(e===null)return Yr(e);let t=e,n=oi(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Yr(e)}return Yr(e)}default:return Yr(e)}}function oi(e,t){for(;e!==null;){let n=_r(e,t);if(n){if(n.get)return $r(n.get);if(typeof n.value==`function`)return $r(n.value)}e=gr(e)}function n(){return null}return n}function si(e,t){for(;e!==null;){let n=_r(e,t);if(n)return n.get?$r(n.get):null;e=gr(e)}return null}function ci(e){if(!e)return!1;try{return Zr(e,``),!0}catch{return!1}}var li=vr(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ui=vr(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.filter.font.g.glyph.glyphref.hkern.image.line.lineargradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),di=vr([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),fi=vr([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),pi=vr(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),mi=vr([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),hi=vr([`#text`]),gi=vr(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),_i=vr(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),vi=vr(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),yi=vr([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),bi=yr(/{{[\w\W]*|^[\w\W]*}}/g),xi=yr(/<%[\w\W]*|^[\w\W]*%>/g),Si=yr(/\${[\w\W]*/g),Ci=yr(/{{|}}|\${|<%|%>/),wi=yr(/[^\t\n\f\r ]/),Ti=yr(/\u0000/g),Ei=yr(/^data-[\-\w.\u00B7-\uFFFF]+$/),Di=yr(/^aria-[\-\w]+$/),Oi=yr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ki=yr(/^(?:\w+script|data):/i),Ai=yr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ji=yr(/^html$/i),Mi=yr(/^[a-z][.\w]*(-[.\w]+)+$/i),Ni=yr(/<[/\w!]/g),Pi=yr(/<[/\w]/g),Fi=yr(/<[/\w]|^-?>|--!?>|<!-$/g),Ii=yr(/<\/no(script|embed|frames)/i),Li=yr(/\/>/i),Ri=yr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i),zi=yr(/^[\r\n\t ]+/),Bi={element:1,text:3,processingInstruction:7,comment:8,document:9,documentFragment:11},Vi=vr(ti({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),Hi=vr(ti({},[`textarea`,`title`])),Ui=vr(ti({},[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`embed`,`frame`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`])),Wi=function(){return typeof window>`u`?null:window},Gi=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ki=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},qi=function(e,t,n,r){return Jr(e,t)&&Ar(e[t])?ti(r.base?ii(r.base):{},e[t],r.transform):n},Ji=function(e,t,n){let r=Jr(e,t)?e[t]:void 0;return r&&typeof r==`object`?ri(r):n};function Yi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wi(),t=e=>Yi(e);if(t.version=`3.5.0`,t.removed=[],!e||!e.document||e.document.nodeType!==Bi.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript,a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter,l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=oi(d,`cloneNode`),p=oi(d,`remove`),m=oi(d,`removeChild`),h=oi(d,`removeAttributeNode`),g=oi(d,`nextSibling`),_=oi(d,`childNodes`),v=oi(d,`parentNode`),y=oi(d,`shadowRoot`),b=oi(d,`attributes`),x=o&&o.prototype?oi(o.prototype,`nodeType`):null,S=o&&o.prototype?oi(o.prototype,`nodeName`):null,C=o&&o.prototype?oi(o.prototype,`ownerDocument`):null,w=function(e){return x?x(e):e.nodeType},T=function(e){return S?S(e):e.nodeName},E=si(d,`namespaceURI`),D=function(e){return E?E(e):e.namespaceURI},O=function(e){return w(e)===Bi.element?b(e):null};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let k,A=``,j,M=!1,N=0,ee=function(){if(N>0)throw Qr(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},P=function(e){ee(),N++;try{return k.createHTML(e)}finally{N--}},F=function(e){return k&&Pe?P(e):e},te=function(e){ee(),N++;try{return k.createScriptURL(e)}finally{N--}},ne=function(){return M||=(j=Gi(u,i),!0),j},re=n,ie=re.implementation,ae=re.createNodeIterator,I=re.createDocumentFragment,oe=re.getElementsByTagName,se=r.importNode,L=Ki();t.isSupported=typeof fr==`function`&&typeof v==`function`&&ie&&ie.createHTMLDocument!==void 0;let ce=bi,le=xi,R=Si,ue=Ei,de=Di,z=ki,B=Ai,fe=Mi,pe=Oi,me=null,he=ti({},[...li,...ui,...di,...pi,...hi]),V=null,ge=ti({},[...gi,..._i,...vi,...yi]),_e=null,ve=null,ye=null,be=Object.seal(br(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),xe=!0,Se=!0,Ce=!1,we=!0,Te=!1,Ee=!0,De=!1,Oe=!1,ke=null,Ae=null,je=!1,Me=!1,Ne=!1,Pe=!1,Fe=!0,Ie=!1,Le=`user-content-`,Re=!0,ze=!1,Be=null,Ve=null,He=!1,Ue=null,We=ti({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ge=null,Ke=ti({},[`audio`,`video`,`img`,`source`,`image`,`track`]),qe=null,Je=ti({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ye=`http://www.w3.org/1998/Math/MathML`,Xe=`http://www.w3.org/2000/svg`,Ze=`http://www.w3.org/1999/xhtml`,Qe=Ze,$e=!1,et=null,tt=ti({},[Ye,Xe,Ze],zr),nt=vr(ti({},[`mi`,`mo`,`mn`,`ms`,`mtext`])),rt=null,it=vr(ti({},[`annotation-xml`])),at=null,ot=vr(br(null)),st=ti({},[`title`,`style`,`font`,`a`,`script`]),ct=null,lt=[`application/xhtml+xml`,`text/html`],ut=null,dt=null,ft=null,pt=n.createElement(`form`),mt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e&&typeof e==`object`||(e={}),e=ri(e),ct=lt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ut=ct===`application/xhtml+xml`?zr:Rr,me=qi(e,`ALLOWED_TAGS`,he,{transform:ut}),V=qi(e,`ALLOWED_ATTR`,ge,{transform:ut}),et=qi(e,`ALLOWED_NAMESPACES`,tt,{transform:zr}),qe=qi(e,`ADD_URI_SAFE_ATTR`,Je,{transform:ut,base:Je}),Ge=qi(e,`ADD_DATA_URI_TAGS`,Ke,{transform:ut,base:Ke}),Ue=qi(e,`FORBID_CONTENTS`,We,{transform:ut}),ve=qi(e,`FORBID_TAGS`,br(null),{transform:ut}),ye=qi(e,`FORBID_ATTR`,br(null),{transform:ut}),He=Jr(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?ri(e.USE_PROFILES):e.USE_PROFILES:!1,xe=e.ALLOW_ARIA_ATTR!==!1,Se=e.ALLOW_DATA_ATTR!==!1,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,De=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Ne=e.RETURN_DOM_FRAGMENT||!1,Pe=e.RETURN_TRUSTED_TYPE||!1,je=e.FORCE_BODY||!1,Fe=e.SANITIZE_DOM!==!1,Ie=e.SANITIZE_NAMED_PROPS||!1,Re=e.KEEP_CONTENT!==!1,ze=e.IN_PLACE||!1,pe=ci(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Oi,Qe=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ze,rt=Ji(e,`MATHML_TEXT_INTEGRATION_POINTS`,nt),at=Ji(e,`HTML_INTEGRATION_POINTS`,it);let t=Ji(e,`CUSTOM_ELEMENT_HANDLING`,ot);if(_e=br(null),Jr(t,`tagNameCheck`)&&mt(t.tagNameCheck)&&(_e.tagNameCheck=t.tagNameCheck),Jr(t,`attributeNameCheck`)&&mt(t.attributeNameCheck)&&(_e.attributeNameCheck=t.attributeNameCheck),Jr(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(_e.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),yr(_e),Te&&(Se=!1),Ne&&(Me=!0),He&&((Jr(e,`ALLOWED_TAGS`)||Jr(e,`ALLOWED_ATTR`))&&typeof console<`u`&&typeof console.warn==`function`&&console.warn(`DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together.`),me=ti({},hi),V=br(null),He.html===!0&&(ti(me,li),ti(V,gi)),He.svg===!0&&(ti(me,ui),ti(V,_i),ti(V,yi)),He.svgFilters===!0&&(ti(me,di),ti(V,_i),ti(V,yi)),He.mathMl===!0&&(ti(me,pi),ti(V,vi),ti(V,yi))),be.tagCheck=null,be.attributeCheck=null,Jr(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?be.tagCheck=e.ADD_TAGS:Ar(e.ADD_TAGS)&&(me===he&&(me=ii(me)),ti(me,e.ADD_TAGS,ut))),Jr(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?be.attributeCheck=e.ADD_ATTR:Ar(e.ADD_ATTR)&&(V===ge&&(V=ii(V)),ti(V,e.ADD_ATTR,ut))),Jr(e,`ADD_FORBID_CONTENTS`)&&Ar(e.ADD_FORBID_CONTENTS)&&(Ue===We&&(Ue=ii(Ue)),ti(Ue,e.ADD_FORBID_CONTENTS,ut)),Re&&(me[`#text`]=!0),De&&ti(me,[`html`,`head`,`body`]),me.table&&(me.tbody=!0,delete ve.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Qr(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Qr(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=k;k=e.TRUSTED_TYPES_POLICY;try{A=P(``)}catch(e){throw k=t,e}}else e.TRUSTED_TYPES_POLICY===null?(k=void 0,A=``):(k===void 0&&(k=ne()),k&&typeof A==`string`&&(A=P(``)));dt=vr(e)},gt=ti({},[...ui,...di,...fi]),_t=ti({},[...pi,...mi]),vt=function(e,t,n){return t===Ze?e===`svg`:t===Ye?e===`svg`&&(n===`annotation-xml`||rt[n]):!!gt[e]},yt=function(e,t,n){return t===Ze?e===`math`:t===Xe?e===`math`&&at[n]:!!_t[e]},bt=function(e,t,n){return t===Xe&&!at[n]||t===Ye&&!rt[n]?!1:!_t[e]&&(st[e]||!gt[e])},xt=function(e){let t=D(e),n=Rr(T(e)),r=v(e),i=Qe,a=`template`;return r&&w(r)===Bi.element&&(i=D(r),a=Rr(T(r))),et[t]?t===Xe?vt(n,i,a):t===Ye?yt(n,i,a):t===Ze?bt(n,i,a):ct===`application/xhtml+xml`:!1},St=function(e){Dr(t.removed,{element:e}),It(e);try{v(e).removeChild(e)}catch{if(p(e),!v(e))throw Qr(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},Ct=function(e,t,n){try{h(e,t)}catch{try{e.removeAttribute(n)}catch{}}},wt=function(e){Ot(e);let t=_(e);t&&wr(Or(t),t=>{try{m(e,t)}catch{}}),w(e)===Bi.element&&Et(e,!1)},Tt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}if(Dr(t.removed,{attribute:r||null,from:n}),r)Ct(n,r,e);else try{n.removeAttribute(e)}catch{}if(e===`is`){if(Me||Ne)try{St(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},Et=function(e,t){let n=b(e);if(n)for(let r=n.length-1;r>=0;--r){let i=n[r],a=i&&i.name;typeof a==`string`&&!(t&&V[ut(a)])&&Ct(e,i,a)}},Dt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&w(e)===Bi.element){let t=y(e);Jt(t)&&r.push(t)}let i=_(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},Ot=function(e){Dt(e,e=>{w(e)===Bi.element&&Et(e,!0)})},kt=function(e){let t=[];return Dt(e,e=>{t.push(e)},!0),t},At=function(e,t){let n=jr();wr(kt(e),e=>{w(e)===Bi.element&&Mr(n,e)}),wr(t,e=>{w(e)===Bi.element&&!Nr(n,e)&&Et(e,!0)})},jt=function(e,n){let r=!1;return wr(t.removed,t=>{t.element&&(r||=t.element===e,Ot(t.element))}),At(e,n),r},Mt=function(e,t){wt(e),jt(e,t)},Nt=function(e,t){let n=Be,r=null,i=()=>(r||(r=jr(),wr(t,e=>{Mr(r,e)})),r);for(let t=0;;t++){let r=kt(e),a=[e],o=!1;if(wr(r,e=>{w(e)===Bi.documentFragment?Dr(a,e):!o&&!Nr(n,e)&&(o=Nr(i(),e))}),!o)return;if(t>=8)throw Qr(`the tree kept changing during in-place sanitization; refusing to return it`);wr(a,(t,n)=>{Pt(t,n>0,e,i())})}},Pt=function(e,t,n,r){let i=Bt(e),a;for(;a=i.nextNode();)Nr(r,a)&&!Nr(Be,a)&&(t&&Xt(L.uponSanitizeShadowNode,a,null),dn(a,n))},Ft=function(e){if(!Be)return;Mr(Be,e);let t=Ir(Ve,e);if(t!==void 0){if(t>=8)throw Qr(`the tree kept changing during in-place sanitization; refusing to return it`);Lr(Ve,e,t+1)}},It=function(e){Be&&(Pr(Be,e),Ir(Ve,e)===void 0&&Lr(Ve,e,0))},Lt=function(e,t){return Ee?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Rt=function(e){Ee&&Dt(e,e=>{let t=w(e);if(t===Bi.processingInstruction||t===Bi.comment&&Zr(Pi,e.data)){try{p(e)}catch{}return!1}if(t===Bi.element){let t=e,n=ut(T(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Lt(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},zt=function(e){let t=null,r=null;if(je)e=`<remove></remove>`+e;else{let t=Br(e,zi);r=t&&t[0]}ct===`application/xhtml+xml`&&Qe===Ze&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=k?P(e):e;if(Qe===Ze)try{t=new l().parseFromString(i,ct)}catch{}if(!t||!t.documentElement){t=ie.createDocument(Qe,`template`,null);try{t.documentElement.innerHTML=$e?A:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Qe===Ze?oe.call(t,De?`html`:`body`)[0]:De?t.documentElement:a},Bt=function(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=C?C(e):e.ownerDocument;return ae.call(n||e,e,(t?0:c.SHOW_ELEMENT)|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Vt=function(e){return e=Vr(e,ce,` `),e=Vr(e,le,` `),e=Vr(e,R,` `),e},Ht=function(e){Gt(e);let t=e.querySelectorAll?.call(e,`template`);t&&wr(t,e=>{Jt(e.content)&&Ht(e.content)})},Ut=ti({},[`caption`,`colgroup`,`col`,`thead`,`tbody`,`tfoot`,`tr`,`td`,`th`,`style`,`script`,`template`]),Wt=function(e){if(ct===`application/xhtml+xml`)return;let t=e.querySelectorAll?.call(e,`table,tbody,thead,tfoot,tr,colgroup`);t&&t.length!==0&&wr(t,t=>{wr(Or(_(t)),n=>{let r=w(n);if(!(r===Bi.text?Zr(wi,n.data):r===Bi.element&&!Ut[Rr(T(n))]))return;let i=t;for(;i&&Rr(T(i))!==`table`;)i=i===e?null:v(i);let a=i&&i!==e?v(i):null;if(a)try{a.insertBefore(n,i)}catch{}})})},Gt=function(e){Wt(e),e.normalize();let t=Bt(e,!0),n=null,r=t.nextNode();for(;r;){let e=r.data;if(Zr(Ti,e)&&(e=Vr(e,Ti,``),r.data=e),Zr(Ci,e)&&(e=Vt(e),r.data=e),e&&w(r)===Bi.text){if(n){let t=n.data;Zr(Ci,t[t.length-1]+e[0])&&(n.data=Vt(t+e[0]))}n=r}r=t.nextNode()}},Kt=function(e){let t=S?S(e):null;return typeof t!=`string`||ut(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==b(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==x(e)||e.childNodes!==_(e)},qt=function(e){if(!x||typeof e!=`object`||!e)return null;try{let t=x(e);return typeof t==`number`?t:null}catch{return null}},Jt=function(e){return qt(e)===Bi.documentFragment},Yt=function(e){return qt(e)!==null};function Xt(e,n,r){e.length!==0&&wr(e,e=>{e.call(t,n,r,dt)})}let Zt=function(e,t){let n=!!Ui[t],r=!!Vi[t];return!n&&!r&&!Hi[t]||D(e)!==Ze?!1:n?e.hasChildNodes():Yt(e.firstElementChild)?!0:r&&typeof e.textContent==`string`&&Zr(Ni,e.textContent)},Qt=function(e,t,n){return!!(Ee&&n===Bi.element&&e.hasChildNodes()&&!Yt(e.firstElementChild)&&Zr(Ni,e.textContent)&&Zr(Ni,e.innerHTML)||Ee&&n===Bi.element&&Zt(e,t)||n===Bi.processingInstruction||Ee&&n===Bi.comment&&Zr(Fi,e.data))},$t=function(e,t){return e instanceof RegExp?Zr(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},en=function(e,t,n){if(!ve[t]&&on(t)&&$t(_e.tagNameCheck,t))return!1;if(Re&&!Ue[t]&&!Ue[Rr(t)]){let t=v(e),r=_(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,g(e))}}}return St(e),!0},H=function(e,t,n,r){return e.length===0?t:t===n||t===r?ii(t):t},tn=function(e,t){return e===t||v(e)!==null?!1:(ze&&Ot(e),It(e),!0)},nn=function(e,n){if(Ft(e),Xt(L.beforeSanitizeElements,e,null),tn(e,n))return!0;if(Kt(e))return St(e),!0;let r=ut(T(e)),i=w(e);if(me=H(L.uponSanitizeElement,me,he,ke),Xt(L.uponSanitizeElement,e,{tagName:r,allowedTags:me}),tn(e,n))return!0;if(Qt(e,r,i))return St(e),!0;if((ve[r]||!(be.tagCheck instanceof Function&&be.tagCheck(r))&&!me[r])&&en(e,r,n))return!0;if(i===Bi.element&&!xt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Zr(Ii,e.innerHTML))return St(e),!0;if(Te&&i===Bi.text){let n=e.textContent,r=Vt(n);n!==r&&(Dr(t.removed,{element:e.cloneNode()}),e.textContent=r)}return Xt(L.afterSanitizeElements,e,null),tn(e,n)},rn=function(e,t,r){if(ye[t]||Lt(t,e)||Fe&&(t===`id`||t===`name`)&&(r in n||r in pt))return!1;let i=V[t]||be.attributeCheck instanceof Function&&be.attributeCheck(t,e);if(Se&&Zr(ue,t)||xe&&Zr(de,t))return!0;if(!i)return on(e)&&$t(_e.tagNameCheck,e)&&$t(_e.attributeNameCheck,t,e)||t===`is`&&_e.allowCustomizedBuiltInElements&&$t(_e.tagNameCheck,r);if(qe[t])return!0;let a=Vr(r,B,``);return Zr(pe,a)||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Hr(r,`data:`)===0&&Ge[e]||Ce&&!Zr(z,a)?!0:!r},an=ti({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),on=function(e){return!an[Rr(e)]&&Zr(fe,e)},sn=function(e,t,n,r){if(k&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return P(r);case`TrustedScriptURL`:return te(r)}return r},cn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Kt(e)||(St(e),!1)}catch{return Tt(t,e),!1}},ln=function(e,t){return Ee&&Zr(Ri,t)?!0:Rr(e)===`attributename`&&Hr(t,`href`)!==-1},un=function(e,n){if(Xt(L.beforeSanitizeAttributes,e,null),tn(e,n))return;let r=O(e);if(!r||Kt(e))return;V=H(L.uponSanitizeAttribute,V,ge,Ae);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0},a=r.length,o=ut(T(e));for(;a--;){let n=r[a];if(!n)continue;let s=n.name,c=n.namespaceURI,l=n.value,u=ut(s),d=l,f=s===`value`?d:Ur(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Xt(L.uponSanitizeAttribute,e,i),f=i.attrValue,Ie&&(u===`id`||u===`name`)&&Hr(f,Le)!==0&&(Tt(s,e,n),f=Le+f,p=!0),ln(s,f)?Tt(s,e,n):i.forceKeepAttr||(i.keepAttr?!we&&Zr(Li,f)?Tt(s,e,n):(Te&&(f=Vt(f)),rn(o,u,f)?(f=sn(o,u,c,f),f!==d&&cn(e,s,c,f)&&p&&Er(t.removed)):Tt(s,e,n)):Tt(s,e,n))}Xt(L.afterSanitizeAttributes,e,null),tn(e,n)},dn=function(e,t){nn(e,t),un(e,t),Jt(e.content)&&fn(e.content)},fn=function(e){let t=null,n=Bt(e);for(Xt(L.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Xt(L.uponSanitizeShadowNode,t,null),dn(t,e),w(t)===Bi.element){let e=y(t);Jt(e)&&(U(e),fn(e))}Te&&Gt(e),Xt(L.afterSanitizeShadowDOM,e,null)},U=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){fn(e.shadow);continue}let n=e.node,r=w(n)===Bi.element,i=_(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=S?S(n):null;if(typeof e==`string`&&ut(e)===`template`){let e=n.content;Jt(e)&&t.push({node:e,shadow:null})}}if(r){let e=y(n);Jt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}},pn=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if($e=!e,$e&&(e=`<!-->`),typeof e!=`string`&&!Yt(e)&&(e=ai(e),typeof e!=`string`))throw Qr(`dirty is not a string, aborting`);if(!t.isSupported)return e;Oe?(me=ke,V=Ae):ht(n),ft=dt,t.removed=[];let c=ze&&typeof e!=`string`&&Yt(e),l=[],u=Be,d=Ve;if(c){Rt(e),l=kt(e);let t=T(e);if(typeof t==`string`){let n=ut(t);if(!me[n]||ve[n])throw Mt(e,l),Qr(`root node is forbidden and cannot be sanitized in-place`)}if(Kt(e))throw Mt(e,l),Qr(`root node is clobbered and cannot be sanitized in-place`);Be=jr(),Ve=Fr()}else if(Yt(e))i=zt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Bi.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),U(i);else{if(!Me&&!Te&&!De&&e.indexOf(`<`)===-1)return F(e);if(i=zt(e),!i)return Me?null:Pe?A:``}i&&je&&St(i.firstChild);let f=c?e:i;try{c&&U(e);let t=Bt(f);for(;o=t.nextNode();)dn(o,f);c&&Nt(e,l)}catch(t){throw c&&Mt(e,l),t}finally{Be=u,Ve=d}if(c){if(jt(e,l))throw Qr(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Te&&Ht(e),e}if(Me){if(Te&&Ht(i),Ne)for(s=I.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(V.shadowroot||V.shadowrootmode)&&(s=se.call(r,s,!0)),s}Te&&Gt(i);let p=De?i.outerHTML:i.innerHTML;return De&&me[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Zr(ji,i.ownerDocument.doctype.name)&&(p=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
11
|
+
`+p),F(p)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=ft,i=me,a=V,o=t.removed;ft=null;try{return pn(e,n)}finally{ft=r,r&&(Oe||ht(r),me=i,V=a,t.removed=o)}},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ht(e),Oe=!0,ke=me,Ae=V},t.clearConfig=function(){dt=null,Oe=!1,ke=null,Ae=null,k=j,A=``},t.isValidAttribute=function(e,t,n){dt||ht({});let r=ut(e),i=ut(t);return typeof n==`string`&&(ln(t,n)||!we&&Zr(Li,n))?!1:rn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Jr(L,e)&&Dr(L[e],t)},t.removeHook=function(e,t){if(Jr(L,e)){if(t!==void 0){let n=Tr(L[e],t);return n===-1?void 0:kr(L[e],n,1)[0]}return Er(L[e])}},t.removeHooks=function(e){Jr(L,e)&&(L[e]=[])},t.removeAllHooks=function(){L=Ki()},t}var Xi=Yi();function Zi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var q=Zi();function Qi(e){q=e}var $i={exec:()=>null};function ea(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function J(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(na.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ta=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),na={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)(\t[ \t]*)/gm,nestedBlockMarker:/^ {0,3}(?:(?:[*+-]|\d{1,9}[.)])(?: |$)|> ?)/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ea(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ea(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:ea(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:ea(e=>RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:ea(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:ea(e=>RegExp(`^ {0,${e}}(?:</?(?:${la})(?:[ \\t]+|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,`i`)),blockquoteBeginRegex:ea(e=>RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},ra=/^(?:[ \t]*(?:\n|$))+/,ia=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,aa=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,oa=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sa=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ca=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,la=`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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,ua=J(` {0,3}(?:</?(?:tag)(?:[ \\t]+|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,la).getRegex(),da=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,fa=J(da).replace(/bull/g,ca).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/\|table/g,``).replace(/html/g,ua).getRegex(),pa=J(da).replace(/bull/g,ca).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).replace(/html/g,ua).getRegex(),ma=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ha=/^[^\n]+/,ga=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,_a=J(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<(?:\\.|[^\n<>\\])*>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,ga).replace(`title`,/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),va=J(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ca).getRegex(),ya=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ba=J(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*?[ \\t]*/?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,ya).replace(`tag`,la).replace(`attribute`,/[ \t]+[a-zA-Z:_][\w.:-]*(?:[ \t]*=[ \t]*"[^"\n]*"|[ \t]*=[ \t]*'[^'\n]*'|[ \t]*=[ \t]*[^\s"'=<>`]+)?/).getRegex(),xa=e=>J(ma).replace(`hr`,oa).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,ua).getRegex(),Sa=xa(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Ca=xa(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),wa={blockquote:J(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ca).getRegex(),code:ia,def:_a,fences:aa,heading:sa,hr:oa,html:ba,lheading:fa,list:va,newline:ra,paragraph:Sa,table:$i,text:ha},Ta=J(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,oa).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,ua).getRegex(),Ea={...wa,lheading:pa,table:Ta,paragraph:J(ma).replace(`hr`,oa).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Ta).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,ua).getRegex()},Da={...wa,html:J(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace(`comment`,ya).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:J(ma).replace(`hr`,oa).replace(`heading`,` *#{1,6} *[^
|
|
12
|
+
]`).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).replace(`lheading`,fa).getRegex()},Oa=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ka=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Aa=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,ja=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ma=/[\p{P}\p{S}]/u,Na=/[\s\p{P}\p{S}]/u,Pa=/[^\s\p{P}\p{S}]/u,Fa=J(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Na).getRegex(),Ia=/[\p{Pi}\p{Ps}"']/u,La=/(?!~)[\p{P}\p{S}]/u,Ra=/(?!~)[\s\p{P}\p{S}]/u,za=/(?:[^\s\p{P}\p{S}]|~)/u,Ba=J(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ta?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Va=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ha=J(Va,`u`).replace(/punct/g,Ma).getRegex(),Ua=J(Va,`u`).replace(/punct/g,La).getRegex(),Wa=J(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Ia).replace(/punct/g,Ma).getRegex(),Ga=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Ka=J(Ga,`gu`).replace(/notPunctSpace/g,Pa).replace(/punctSpace/g,Na).replace(/punct/g,Ma).getRegex(),qa=J(Ga,`gu`).replace(/notPunctSpace/g,za).replace(/punctSpace/g,Ra).replace(/punct/g,La).getRegex(),Ja=J(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Pa).replace(/punctSpace/g,Na).replace(/punct/g,Ma).getRegex(),Ya=J(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Pa).replace(/punctSpace/g,Na).replace(/punct/g,Ma).getRegex(),Xa=J(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Pa).replace(/punctSpace/g,Na).replace(/punct/g,Ma).getRegex(),Za=J(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Ma).getRegex(),Qa=J(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Pa).replace(/punctSpace/g,Na).replace(/punct/g,Ma).getRegex(),$a=J(/\\(punct)/,`gu`).replace(/punct/g,Ma).getRegex(),eo=J(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,`gu`).replace(/punct/g,Ma).getRegex(),to=J(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),no=J(ya).replace(`(?:-->|$)`,`-->`).getRegex(),ro=J(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,no).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),io=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,ao=J(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,io).getRegex(),oo=J(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,ao).replace(`href`,/<(?:\\.|[^\n<>\\])*>|(?!<)[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),so=J(/^!?\[(label)\]\[(ref)\]/).replace(`label`,ao).replace(`ref`,ga).getRegex(),co=J(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,ga).getRegex(),lo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,uo=J(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,io).getRegex(),fo=J(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,J(/^!?\[(label)\]\[(ref)\]/).replace(`label`,uo).replace(`ref`,lo).getRegex()).replace(`nolink`,J(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,lo).getRegex()).getRegex(),po=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mo=J(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),ho={_backpedal:$i,anyPunctuation:$a,anyPunctuationOutsideCode:eo,autolink:to,blockSkip:Ba,br:Aa,code:ka,del:$i,delLDelim:$i,delRDelim:$i,emStrongLDelim:Ha,emStrongRDelimAst:Ka,emStrongRDelimUnd:Ya,escape:Oa,link:oo,nolink:co,punctuation:Fa,reflink:so,reflinkSearch:fo,tag:ro,text:ja,url:$i},go={...ho,emStrongLDelim:Wa,emStrongRDelimAst:Ja,emStrongRDelimUnd:Xa,link:J(/^!?\[(label)\]\((.*?)\)/).replace(`label`,ao).getRegex(),reflink:J(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,ao).getRegex()},_o={...ho,emStrongRDelimAst:qa,emStrongLDelim:Ua,delLDelim:Za,delRDelim:Qa,url:J(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,mo).replace(`protocol`,po).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:J(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,po).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace(`wwwStart`,ta?`(?<![^\\s*_~(])www\\.`:`www\\.`).getRegex()},vo={..._o,br:J(Aa).replace(`{2,}`,`*`).getRegex(),text:J(_o.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},yo={normal:wa,gfm:Ea,pedantic:Da},bo={normal:ho,gfm:_o,breaks:vo,pedantic:go},xo={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},So=e=>xo[e];function Co(e,t){if(t){if(na.escapeTest.test(e))return e.replace(na.escapeReplace,So)}else if(na.escapeTestNoEncode.test(e))return e.replace(na.escapeReplaceNoEncode,So);return e}function wo(e){return na.numericCharacterReference.test(e)?e.replace(na.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return`&`;let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:r===38?`&`:String.fromCodePoint(r)}):e}function To(e){try{e=encodeURI(e).replace(na.percentDecode,`%`)}catch{return null}return e}function Eo(e,t){let n=e.replace(na.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(na.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(na.slashPipe,`|`);return n}function Do(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Oo(e){let t=e.split(`
|
|
13
|
+
`),n=t.length-1;for(;n>=0&&na.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
14
|
+
`)}function ko(e){return e.trim().replace(na.multipleSpaceGlobal,` `).toLowerCase().toUpperCase().toLowerCase()}function Ao(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}var jo=new WeakMap;function Mo(e){let t={"*":-1,_:-1},n=-1,r=e.length;for(let i=0;i<r;i++){let a=e[i];if(a!==`*`&&a!==`_`&&a!==`~`)continue;let o=i===0?`
|
|
15
|
+
`:e[i-1],s=i+1;for(;s<r&&e[s]===a;)s++;o!==` `&&o!==` `&&o!==`
|
|
16
|
+
`&&o!==`\r`&&o!==`\f`&&(a===`~`?n=i:t[a]=i),i=s-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:t,lastPossibleDelCloserIndex:n}}function No(e,t){let n=Mo(t),r=jo.get(e);r?r.push(n):jo.set(e,[n])}function Po(e){let t=jo.get(e);t&&(t.pop(),t.length===0&&jo.delete(e))}function Y(e,t,n){let r=jo.get(e)?.at(-1);return r&&r.maskedSrc===t?r.lastPossibleEmStrongCloserIndex[n]:Mo(t).lastPossibleEmStrongCloserIndex[n]}function Fo(e,t){let n=jo.get(e)?.at(-1);return n&&n.maskedSrc===t?n.lastPossibleDelCloserIndex:Mo(t).lastPossibleDelCloserIndex}function Io(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Lo(e,t){let n=``;for(let r=0;r<e.length;r++){if(e[r]==="`"){let i=t.inline.code.exec(e.slice(r));if(i){n+=i[0],r+=i[0].length-1;continue}}e[r]===`\\`&&(e[r+1]===`[`||e[r+1]===`]`)?(n+=e[r+1],r++):n+=e[r]}return n}function Ro(e,t,n,r,i){let a=t.href,o=t.title||null,s=Lo(e[1],i),c=e[0].charAt(0)===`!`,l=r.state.inLink,u=r.state.linkEmitted,d=r.state.inRawBlock;r.state.inLink=!0,r.state.linkEmitted=!1;let f=r.inlineTokens(s),p=r.state.linkEmitted;if(r.state.linkEmitted=u,r.state.inLink=l,!c){if(p){r.state.inRawBlock=d;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:f}}function zo(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
17
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
18
|
+
`)}function Bo(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var Vo=class{options;rules;lexer;constructor(e){this.options=e||q}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:Oo(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=zo(e,t[3]||``,this.rules);return t[3]!==void 0&&(n===``||n.endsWith(`
|
|
19
|
+
`))&&(n+=`
|
|
20
|
+
`),{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Do(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:Do(t[0],`
|
|
21
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Do(t[0],`
|
|
22
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Do(t[0],`
|
|
23
|
+
`).split(`
|
|
24
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
25
|
+
`),c=s.replace(this.rules.other.blockquoteMarkerWhitespace,(e,t,n)=>n.startsWith(` `)?t+` `+n.slice(1):t+Io(n,t.length)).replace(this.rules.other.blockquoteSetextReplace,`
|
|
26
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
27
|
+
${s}`:s,r=r?`${r}
|
|
28
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`||u?.type===`heading`||u?.type===`hr`||u?.type===`html`||u?.type===`table`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
29
|
+
`),o=t.raw+`
|
|
30
|
+
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
|
|
31
|
+
`).length:0,d=l?e.slice(0,-l):e;if(d.length>0&&(n=`${n}
|
|
32
|
+
${d.join(`
|
|
33
|
+
`)}`),r=r.substring(0,r.length-t.text.length)+s.text,e=e.slice(d.length),e.length>0&&this.rules.other.blockquoteStart.test(e[0]))continue;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
34
|
+
`+e.join(`
|
|
35
|
+
`),o=this.list(a);i[i.length-1]=o;let s=o.raw.length>t.raw.length?a.slice(t.raw.length+1,o.raw.length).split(`
|
|
36
|
+
`).length:0;if(s>0){let t=e.slice(0,s).join(`
|
|
37
|
+
`);n=`${n}
|
|
38
|
+
${t}`,r=`${r}
|
|
39
|
+
${t}`}if(e=e.slice(s),e.length>0&&!this.rules.other.blockquoteStart.test(e[0]))break}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){if(!this.options.pedantic&&this.lexer.state.lastToken?.type===`text`&&!this.rules.other.listInterruptsParagraph.test(e))return;let n=e,r=()=>n.length-e.length,i=t[1].trim(),a=i.length>1,o={type:`list`,raw:``,ordered:a,start:a?+i.slice(0,-1):``,loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:`[*+-]`);let s=this.rules.other.listItemRegex(i),c=!1;for(;e;){let i=!1,a=``;if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;let l=r();e=e.substring(t[0].length);let u=t[2].split(`
|
|
40
|
+
`,1)[0],d=t[1].length,f=this.options.pedantic?Io(u,d):u.replace(this.rules.other.leadingSpaceTab,e=>Io(e,d)),p=e.split(`
|
|
41
|
+
`,1)[0],m=!f.trim(),h=0;if(this.options.pedantic?(h=2,a=f.trimStart()):m?h=d+1:(h=f.search(this.rules.other.nonSpaceChar),h=h>4?1:h,a=f.slice(h),h+=d),m&&this.rules.other.blankLine.test(p)&&(e=e.substring(p.length+1),i=!0),!i){let t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),r=this.rules.other.fencesBeginRegex(h),i=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(h):this.rules.other.headingBeginRegex(h),o=this.rules.other.htmlBeginRegex(h),s=this.rules.other.blockquoteBeginRegex(h),c=!1;for(;e;){let l=e.split(`
|
|
42
|
+
`,1)[0],u;if(p=l,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting,` `),u=p):u=p.replace(this.rules.other.leadingSpaceTab,e=>Io(e)),r.test(p)||i.test(p)||o.test(p)||s.test(p)||t.test(p)||n.test(p))break;if(u.search(this.rules.other.nonSpaceChar)>=h||!p.trim())a+=`
|
|
43
|
+
`+u.slice(h),c=!1;else{if(m)break;let e=f;if(!this.options.pedantic&&!a.includes(`
|
|
44
|
+
`)&&!f.includes(` `)){let t;for(;!n.test(e)&&(t=this.rules.other.nestedBlockMarker.exec(e));)e=e.slice(t[0].length);if(!e.trim())break}if(e.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||r.test(e)||i.test(e)||o.test(e)||n.test(e))break;if(!this.options.pedantic&&!c){let e=f.replace(this.rules.other.nestedContainerMarkers,``);if(this.rules.block.fences.test(e)||this.rules.block.heading.test(e)||this.rules.block.hr.test(e))break}let t=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(p)&&this.rules.block.lheading.test(`${f}
|
|
45
|
+
${p}`)?` ${u.replace(/^ {0,3}/,``)}`:p;a+=`
|
|
46
|
+
`+t,c=!0}m=!p.trim(),e=e.substring(l.length+1),f=u.slice(h)}}let g=n.slice(l,r());o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(c=!0)),o.items.push({type:`list_item`,raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]})}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=n.slice(0,r()).trimEnd();let u=[];for(let e of o.items)if(this.lexer.state.top=!1,u.push(this.lexer.inlineQueue.length),e.tokens=this.lexer.blockTokens(e.text,[]),!o.loose){let t=e.tokens.filter(e=>e.type===`space`);o.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e=0;e<o.items.length;e++){let t=o.items[e],n=t.tokens[0];if(t.task&&(n?.type===`text`||n?.type===`paragraph`)){t.text=t.text.replace(this.rules.other.listReplaceTask,``),n.raw=n.raw.replace(this.rules.other.listReplaceTask,``),n.text=n.text.replace(this.rules.other.listReplaceTask,``);let r=this.lexer.inlineQueue;for(let t=u[e];t<r.length;t++)if(r[t].tokens===n.tokens){r[t].src=r[t].src.replace(this.rules.other.listReplaceTask,``);break}let i=this.rules.other.listTaskCheckbox.exec(t.raw);if(i){let e={type:`checkbox`,raw:i[0]+` `,checked:i[0]!==`[ ]`};t.checked=e.checked,o.loose?t.tokens[0]&&[`paragraph`,`text`].includes(t.tokens[0].type)&&`tokens`in t.tokens[0]&&t.tokens[0].tokens?(t.tokens[0].raw=e.raw+t.tokens[0].raw,t.tokens[0].text=e.raw+t.tokens[0].text,t.tokens[0].tokens.unshift(e)):t.tokens.unshift({type:`paragraph`,raw:e.raw,text:e.raw,tokens:[e]}):t.tokens.unshift(e)}}else t.task&&=!1}if(o.loose)for(let e of o.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){if(this.lexer.state.lastToken?.type===`paragraph`&&!this.rules.other.htmlBeginRegex(4).test(e))return;let n=Oo(t[0]);return{type:`html`,block:!0,raw:n,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&Ao(t[2],`()`)!==-1)return;let e=ko(t[1]),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:Do(t[0],`
|
|
47
|
+
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Eo(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
48
|
+
`):[],a={type:`table`,raw:Do(t[0],`
|
|
49
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Eo(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:Do(t[0],`
|
|
50
|
+
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
51
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){if(e.charCodeAt(0)!==92)return;let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){if(e.charCodeAt(0)!==60)return;let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=e.charCodeAt(0);if(t!==91&&t!==33)return;let n=this.rules.inline.link.exec(e);if(n){let t=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&Bo(e,n[1],t,this.rules))return;let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=Do(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=Ao(n[2],`()`);if(e===-2)return;if(e>-1){let t=(n[0].indexOf(`!`)===0?5:4)+n[1].length+e;n[2]=n[2].substring(0,e),n[0]=n[0].substring(0,t).trim(),n[3]=``}}let i=Do(n[0].slice(0,-1),`\\`);if((n[0].length-i.length)%2==0)return;let a=n[2],o=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(a);e&&(a=e[1],o=e[3])}else o=n[3]?n[3].slice(1,-1):``;return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(a=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?a.slice(1):a.slice(1,-1)),Ro(n,{href:a&&a.replace(this.rules.inline.anyPunctuation,`$1`),title:o&&o.replace(this.rules.inline.anyPunctuation,`$1`)},n[0],this.lexer,this.rules)}}reflink(e,t){let n=e.charCodeAt(0);if(n!==91&&n!==33)return;let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=r[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&Bo(e,r[1],n,this.rules))return;let i=t[ko(r[2]||r[1])];if(!i){let e=r[0].charAt(0);return{type:`text`,raw:e,text:e}}return Ro(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||!r[1]&&!r[2]&&!r[3]&&!r[4])return;let i=r[0][0],a=n===i,o=t.length-e.length,s=o;for(;!this.options.pedantic&&s>0&&t[s-1]===i;)s--;let c=[...t.slice(Math.max(0,s-2),s)].at(-1)??``,l=c===`*`||c===`_`||!!this.rules.inline.punctuation.exec(c);s<o&&(n=c);let u=s<o?l:n===`*`||n===`_`||!!this.rules.inline.punctuation.exec(n);if(r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))return;let d=r[1]||r[3]||``;if(!d||!n||u){let n=[...r[0]].length-1,u,f,p=n,m=0,h=o-s+n,g=!this.options.pedantic&&!!c.trim()&&(!!d||i===`*`&&!l);if(i!==`*`&&i!==`_`)return;let _=i===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,v=Y(this,t,i),y=t.length-e.length+n;if(v<y)return;t=t.slice(-1*e.length+n);let b=v-y;for(_.lastIndex=0;(r=_.exec(t))!==null&&!(r.index>b);){if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!u)continue;if(f=[...u].length,r[3]||r[4]){p+=f;continue}if((r[5]||r[6]||g)&&h%3&&!((h+f)%3)){if(a&&(r[5]||r[6]))break;m+=f;continue}if(p-=f,p>0)continue;f=Math.min(f,f+p+m);let t=[...r[0]][0].length,i=e.slice(0,n+r.index+t+f);if(Math.min(n,f)%2){let e=i.slice(1,-1);return{type:`em`,raw:i,text:e,tokens:this.lexer.inlineTokens(e)}}let o=i.slice(2,-2);return{type:`strong`,raw:i,text:o,tokens:this.lexer.inlineTokens(o)}}}}codespan(e){if(e.charCodeAt(0)!==96)return;let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=e.charCodeAt(0);if(t!==32&&t!==92&&t!==10)return;let n=this.rules.inline.br.exec(e);if(n)return{type:`br`,raw:n[0]}}del(e,t,n=``){if(e.charCodeAt(0)!==126)return;let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim,c=Fo(this,t),l=t.length-e.length+n;if(c<l)return;t=t.slice(-1*e.length+n);let u=c-l;for(s.lastIndex=0;(r=s.exec(t))!==null&&!(r.index>u);){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){if(e.charCodeAt(0)!==60)return;let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:wo(t[0]),escaped:e}}}},Ho=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||q,this.options.tokenizer=this.options.tokenizer||new Vo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:na,block:yo.normal,inline:bo.normal};this.options.pedantic?(t.block=yo.pedantic,t.inline=bo.pedantic):this.options.gfm&&(t.block=yo.gfm,t.inline=this.options.breaks?bo.breaks:bo.gfm),this.tokenizer.rules=t}static get rules(){return{block:yo,inline:bo}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(na.carriageReturn,`
|
|
52
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.state.inRawBlock=!1,this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this;let r=this.state.lastToken;this.options.pedantic&&(e=e.replace(na.tabCharGlobal,` `).replace(na.spaceLine,``));let i=1/0,a,o=this.options.gfm&&!this.options.pedantic&&this.tokenizer.paragraph===Vo.prototype.paragraph;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}this.state.lastToken=t.at(-1);let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
53
|
+
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
54
|
+
`)?``:`
|
|
55
|
+
`)+r.raw,n.text+=`
|
|
56
|
+
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if((r=this.tokenizer.fences(e))||(r=this.tokenizer.heading(e))||(r=this.tokenizer.hr(e))||(r=this.tokenizer.blockquote(e))||(r=this.tokenizer.list(e))||(r=this.tokenizer.html(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
57
|
+
`)?``:`
|
|
58
|
+
`)+r.raw,n.text+=`
|
|
59
|
+
`+r.raw,this.inlineQueue.at(-1).src=n.text):(this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}),t.push(r));continue}if((r=this.tokenizer.table(e))||(r=this.tokenizer.lheading(e))){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){let i=t.at(-1);(n||i===a&&o)&&i?.type===`paragraph`?(i.raw+=(i.raw.endsWith(`
|
|
60
|
+
`)?``:`
|
|
61
|
+
`)+r.raw,i.text+=`
|
|
62
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text,a=i):(t.push(r),a=r),n=s.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
63
|
+
`)?``:`
|
|
64
|
+
`)+r.raw,n.text+=`
|
|
65
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=r,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,ko(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e.includes(`*`)||e.includes(`_`)||e.includes(`~`),r=n||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==Vo.prototype.emStrong||this.tokenizer.del!==Vo.prototype.del?this.#r(e):e;if(!n)return this.#t(e,r,t);No(this.tokenizer,r);try{return this.#t(e,r,t)}finally{Po(this.tokenizer)}}#t(e,t,n){let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(t=>(o=t.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let t=n.at(-1);o.type===`text`&&t?.type===`text`?(t.raw+=o.raw,t.text+=o.text):n.push(o);continue}let s=e[0];if(s===`*`||s===`_`){let a=t.length-e.length;if(Y(this.tokenizer,t,s)<=a){let t=1;for(;t<e.length&&e.charCodeAt(t)===s.charCodeAt(0);)t++;let a=e.substring(0,t),o=n.at(-1);o?.type===`text`&&!o.escaped?(o.raw+=a,o.text+=a):n.push({type:`text`,raw:a,text:a,escaped:!1}),e=e.substring(t),i=s,r=!0;continue}}else if(s===`~`){let a=t.length-e.length;if(Fo(this.tokenizer,t)<=a){let t=1;for(;t<e.length&&e.charCodeAt(t)===126;)t++;let a=e.substring(0,t),o=n.at(-1);o?.type===`text`&&!o.escaped?(o.raw+=a,o.text+=a):n.push({type:`text`,raw:a,text:a,escaped:!1}),e=e.substring(t),i=s,r=!0;continue}}if((o=this.tokenizer.emStrong(e,t,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,t,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let c=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(c=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let t=n.at(-1);t?.type===`text`?(t.raw+=o.raw,t.text+=o.text):n.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}#n(e){let{blockSkip:t,tag:n,autolink:r}=this.tokenizer.rules.inline,i=``,a=0,o;for(t.lastIndex=0;o=t.exec(e);){let s=o.index+(o[2]?o[2].length:0),c=o.index+o[0].length;if(e.charAt(s)===`<`){let i=e.slice(s),a=n.exec(i)||r.exec(i);if(!a){t.lastIndex=s+1;continue}c=s+a[0].length,t.lastIndex=c}i+=e.slice(a,s)+`[`+`a`.repeat(c-s-2)+`]`,a=c}return i+e.slice(a)}#r(e){let t=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,n=t=>{let r=t.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,ko(t.slice(r+1,-1))))return t;if(r>1&&t.charAt(0)!==`!`){let i=t.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,n)+`][`+`a`.repeat(t.length-r-2)+`]`}return`[`+`a`.repeat(t.length-2)+`]`};t=t.replace(e,n)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(e,t,n)=>n?`+`.repeat(e.length):t?t+e.slice(t.length,-t.length).replace(/`/g,`+`)+t:e),t=this.#n(t),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},Uo=class{options;parser;constructor(e){this.options=e||q}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(na.notSpaceStart)?.[0],i=e?e.replace(na.endingNewline,``)+`
|
|
66
|
+
`:``;return r?`<pre><code class="language-`+Co(r)+`">`+(n?i:Co(i,!0))+`</code></pre>
|
|
67
|
+
`:`<pre><code>`+(n?i:Co(i,!0))+`</code></pre>
|
|
68
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
69
|
+
${this.parser.parse(e)}</blockquote>
|
|
70
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
71
|
+
`}hr(e){return`<hr>
|
|
72
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
73
|
+
`+r+`</`+i+`>
|
|
74
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
75
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
76
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
77
|
+
<thead>
|
|
78
|
+
`+t+`</thead>
|
|
79
|
+
`+r+`</table>
|
|
80
|
+
`}tablerow({text:e}){return`<tr>
|
|
81
|
+
${e}</tr>
|
|
82
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
83
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Co(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?Co(n,!0):this.parser.parseInline(r),o=To(e);if(o===null)return a;e=Co(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+Co(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=To(e);if(i===null)return Co(n);e=i;let a=`<img src="${Co(e)}" alt="${Co(n)}"`;return t&&(a+=` title="${Co(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Co(e.text)}},Wo=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`
|
|
84
|
+
`}checkbox({raw:e}){return e}},Go=class e{options;renderer;textRenderer;constructor(e){this.options=e||q,this.options.renderer=this.options.renderer||new Uo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Wo,this.textRenderer.parser=this}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n===!1?``:n??``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e===!1?``:e??``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Ko=class{options;block;constructor(e){this.options=e||q}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Ho.lex:Ho.lexInline}provideParser(e=this.block){return e?Go.parse:Go.parseInline}};function qo(e,t){if(Array.isArray(t))for(let n=0;n<t.length;n++)e.push(t[n]);else e.push(t)}var Jo=new class{defaults=Zi();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Go;Renderer=Uo;TextRenderer=Wo;Lexer=Ho;Tokenizer=Vo;Hooks=Ko;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(qo(n,t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)qo(n,this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)qo(n,this.walkTokens(e.tokens,t));break}case`list`:{let e=r;qo(n,this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);qo(n,this.walkTokens(i,t))}):e.tokens&&qo(n,this.walkTokens(e.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Uo(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n===!1?``:n??``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Vo(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Ko;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Ko.passThroughHooks.has(n)?e=>{if(t.options.async&&Ko.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(t.options.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return qo(n,r.call(this,e)),t&&qo(n,t.call(this,e)),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Ho.lex(e,t??this.defaults)}parser(e,t){return Go.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?Ho.lex:Ho.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Go.parse:Go.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?Ho.lex:Ho.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Go.parse:Go.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
85
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Co(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Yo(e,t){return Jo.parse(e,t)}Yo.options=Yo.setOptions=function(e){return Jo.setOptions(e),Yo.defaults=Jo.defaults,Qi(Yo.defaults),Yo},Yo.getDefaults=Zi,Yo.defaults=q;function Xo(...e){return Jo.use(...e),Yo.defaults=Jo.defaults,Qi(Yo.defaults),Yo}Yo.use=Xo,Yo.walkTokens=function(e,t){return Jo.walkTokens(e,t)},Yo.parseInline=Jo.parseInline,Yo.Parser=Go,Yo.parser=Go.parse,Yo.Renderer=Uo,Yo.TextRenderer=Wo,Yo.Lexer=Ho,Yo.lexer=Ho.lex,Yo.Tokenizer=Vo,Yo.Hooks=Ko,Yo.parse=Yo,Yo.options,Yo.setOptions,Yo.walkTokens,Yo.parseInline,Go.parse,Ho.lex,Xi.addHook(`afterSanitizeAttributes`,e=>{e instanceof HTMLAnchorElement&&e.hasAttribute(`href`)&&(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`))});function Zo(e){let t=Yo.parse(e,{async:!1,gfm:!0});return Xi.sanitize(t,{USE_PROFILES:{html:!0}})}var Qo={active:`有效`,superseded:`已被取代`},$o=`inline-flex min-h-11 shrink-0 items-center gap-2 rounded-lg border px-3 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`;function es(){let[e,t]=(0,I.useState)(),[n,r]=(0,I.useState)(),[i,a]=(0,I.useState)(!1),[o,s]=(0,I.useState)();(0,I.useEffect)(()=>{let e=!0;return nr().then(n=>e&&t(n??`error`)),()=>{e=!1}},[]);let c=Array.isArray(e)?e:[],l=c.find(e=>e.project===n)??c.find(e=>e.decisions.length>0)??c[0],u=(l?.decisions??[]).filter(e=>i||e.status===`active`),d=(l?.decisions.length??0)-u.length;return(0,K.jsxs)(`article`,{className:`enter animate-in fade-in p-4 duration-200 sm:p-6`,children:[(0,K.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:`決策`}),(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-ink/70`,children:`依專案分類,以 ADR 格式呈現。資料來自專案紀錄,清除任務後仍會保留。`}),e===void 0?(0,K.jsx)(`p`,{role:`status`,className:`mt-6 text-sm`,children:`讀取中…`}):e===`error`?(0,K.jsx)(`p`,{role:`alert`,className:`mt-6 text-sm text-failed`,children:`讀不到決策,請重新整理頁面。`}):c.length===0?(0,K.jsx)(`p`,{className:`mt-6 text-sm`,children:`還沒有已註冊的專案。`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`ul`,{"aria-label":`專案`,className:`mt-5 flex gap-2 overflow-x-auto pb-1`,children:c.map(e=>{let t=e.project===l?.project;return(0,K.jsx)(`li`,{children:(0,K.jsxs)(`button`,{type:`button`,"aria-pressed":t,className:G($o,t?`border-line bg-paper font-medium`:`border-transparent hover:bg-paper/70`),onClick:()=>{r(e.project),s(void 0)},children:[(0,K.jsx)(`span`,{className:`truncate`,children:e.project}),(0,K.jsx)(`span`,{className:`font-mono text-xs tabular-nums text-ink/60`,children:e.decisions.filter(e=>e.status===`active`).length})]})},e.project)})}),l?.error&&(0,K.jsx)(`p`,{role:`alert`,className:`mt-4 text-sm text-failed`,children:l.error}),(0,K.jsxs)(`div`,{className:`mt-4 grid gap-4 lg:grid-cols-[minmax(0,22rem)_minmax(0,1fr)]`,children:[(0,K.jsxs)(`section`,{"aria-label":`決策列表`,children:[(0,K.jsxs)(`label`,{className:`flex min-h-11 items-center gap-2 text-sm`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--c-signal)]`,checked:i,onChange:e=>a(e.target.checked)}),`顯示已被取代的決策`,d>0&&!i?`(${d})`:``]}),u.length===0?(0,K.jsx)(`p`,{className:`panel mt-2 p-4 text-sm text-ink/70`,children:l&&l.decisions.length===0?`這個專案還沒有決策紀錄。`:`沒有有效的決策。`}):(0,K.jsx)(`ul`,{className:`mt-2 grid gap-2`,children:u.map(e=>{let t=o?.project===l?.project&&o?.id===e.id;return(0,K.jsx)(`li`,{children:(0,K.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,className:G(`panel block min-h-11 w-full p-3 text-left hover:bg-wall focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,t&&`border-signal`,e.status===`superseded`&&`opacity-70`),onClick:()=>l&&s({project:l.project,id:e.id}),children:[(0,K.jsxs)(`span`,{className:`block font-mono text-xs tabular-nums text-ink/60`,children:[e.date||`日期不明`,` · `,e.id]}),(0,K.jsx)(`span`,{className:`text-pretty mt-1 block text-sm font-medium`,children:e.title}),(0,K.jsx)(ts,{item:e})]})},e.id)})})]}),(0,K.jsx)(`section`,{"aria-label":`決策內容`,"aria-live":`polite`,children:o?(0,K.jsx)(ns,{pick:o,onJump:e=>s({project:o.project,id:e})},`${o.project}/${o.id}`):(0,K.jsx)(`p`,{className:`panel p-4 text-sm text-ink/70`,children:`從左邊選一個決策來閱讀。`})})]})]})]})}function ts({item:e}){return(0,K.jsxs)(`span`,{className:G(`mt-2 inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs`,e.status===`active`?`bg-signal-soft text-signal`:`bg-warn-soft text-warn`),children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-current`}),Qo[e.status],e.invalid?`・格式有問題`:``]})}function ns({pick:e,onJump:t}){let[n,r]=(0,I.useState)();(0,I.useEffect)(()=>{let t=!0;return rr(e.project,e.id).then(e=>t&&r(e??`error`)),()=>{t=!1}},[e.project,e.id]);let i=(0,I.useMemo)(()=>n&&n!==`error`?Zo(n.markdown):``,[n]);if(n===void 0)return(0,K.jsx)(`p`,{role:`status`,className:`panel p-4 text-sm`,children:`讀取中…`});if(n===`error`)return(0,K.jsx)(`p`,{role:`alert`,className:`panel p-4 text-sm text-failed`,children:`找不到這個決策。`});let a=e=>e.map(e=>(0,K.jsx)(`button`,{type:`button`,className:`mr-2 min-h-11 font-mono text-xs underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,onClick:()=>t(e),children:e},e));return(0,K.jsxs)(`div`,{className:`panel p-4 sm:p-6`,children:[(0,K.jsxs)(`p`,{className:`eyebrow`,children:[`ADR · `,e.project]}),(0,K.jsx)(`h2`,{className:`text-balance mt-1 text-xl font-semibold tracking-tight`,children:n.title}),(0,K.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 border-y border-line py-3 text-sm`,children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`狀態`}),(0,K.jsx)(`dd`,{children:(0,K.jsx)(ts,{item:n})}),(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`日期`}),(0,K.jsx)(`dd`,{className:`font-mono tabular-nums`,children:n.date||`不明`}),n.run&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`來源任務`}),(0,K.jsx)(`dd`,{className:`truncate font-mono text-xs`,children:n.run})]}),n.supersedes.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`取代`}),(0,K.jsx)(`dd`,{children:a(n.supersedes)})]}),n.supersededBy.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`被取代於`}),(0,K.jsx)(`dd`,{children:a(n.supersededBy)})]})]}),n.invalid&&(0,K.jsxs)(`p`,{role:`alert`,className:`mt-3 text-sm text-failed`,children:[`這份紀錄的格式有問題:`,n.invalid]}),(0,K.jsx)(`article`,{className:`report-prose mt-4`,dangerouslySetInnerHTML:{__html:i}})]})}function rs(e,t){return t?{tone:`fail`,text:`等太久,已中止`}:e===null?{tone:`fail`,text:`沒能啟動`}:e===0?{tone:`ok`,text:`完成`}:e===2?{tone:`warn`,text:`部分完成,或被擋住(結束碼 2)`}:e===3?{tone:`warn`,text:`正在等你回答問題`}:{tone:`fail`,text:`失敗(結束碼 ${e})`}}var is=60;function as(e){let t=e.indexOf(`--`),n=t<0?e:e.slice(0,t),r=t<0?[]:e.slice(t+1),i=e=>{let t=n.indexOf(e);return t>=0?n[t+1]:void 0},a=i(`-p`),o=e[0],s=n.includes(`--tidy`)||/tidy/i.test(i(`--name`)??``)||o===`tidy`&&!n.includes(`--dry-run`)&&!n.includes(`--undo`),c;return o===`run`?c=i(`--name`)??ss(r[0]):o===`resume`?c=r[0]:o===`call`?c=[n[1],ss(r[0])].filter(Boolean).join(`:`)||void 0:o===`tidy`&&(c=i(`--agent`)??`全部`),{project:a,target:c,tidy:s}}function os(e){if(as(e.argv).tidy)return e.state===`running`?{text:`tidy 進行中`,tone:`progress`}:e.state===`ended`&&e.exit===0?{text:`已 tidy`,tone:`ok`}:e.state===`lost`||e.state===`ended`&&(e.exit===2||e.exit===3||e.exit===130||e.exit==null&&e.signal)?{text:`tidy 未完成`,tone:`warn`}:{text:`tidy 失敗`,tone:`fail`}}function ss(e){let t=e?.split(`
|
|
86
|
+
`).find(e=>e.trim())?.trim();if(t)return t.length>is?`${t.slice(0,is)}…`:t}var cs=new TextEncoder;function ls(e){return String(e)}function us(e,t,n){if(e.has(t)===n)return e;let r=new Set(e);return n?r.add(t):r.delete(t),r}var ds=/^\[round (\d+)(?:\/(\d+))?\] waking (\S+) \(([^)]+)\)(?: — retry (\d+))?$/,fs=/^Run (.+) ended: ([^,]+), outcome: ([^,]+), after (\d+) round\(s\)\. Logs: (.+)$/,ps=/^Note: (.*)$/,ms=/^The work is on branch (\S+) \((\d+) file\(s\)\); your working tree was not touched\.$/,hs=/^Bring it in with: (.+)$/,gs=/^\(or apply the patch: (.+)\)$/,_s=/^\s*(\S+) \((project|global)\): skipped — (.*)$/,vs=/^\s*(\S+) \((project|global)\): tidied\. Archive: (.+) — undo with: (.+)$/,ys=/^promoted \d+ decision\(s\) into the project records: /,bs=/^tidying (?:project|global) memory of \S+ \(/,xs=/^Lead's final message — /,Ss=/^Verification \(/;function Cs(e){if(!Number.isFinite(e)||e<0)return`0 秒`;let t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n} 小時 ${r} 分`:r>0?`${r} 分 ${i} 秒`:`${i} 秒`}function ws(e,t){let n=t?.truncated===!0,r=t?.byteStart??0,i=t?.gaps??[];if(e===``)return{truncated:n,conclusions:[],blocks:[]};let a=Es(Ts(e,r,i),e,n,t?.lineStart===!0),o=a.body,s=[],c=[],l,u,d,f=!1,p=`log`,m=!1;for(let e=0;e<o.length;e++){let t=o[e];if(t===void 0)continue;if(xs.test(t.text)&&(p!==`verification`||m)&&(p=`report`),p===`report`){f=Rs(Ls(l,c),{kind:`text`,at:t.at,text:t.text},f),m=t.text===``;continue}if(p===`verification`){if(t.text!==``&&m&&Fs(t.text))p=`footer`;else{f=Rs(Ls(l,c),{kind:`text`,at:t.at,text:t.text},f),m=t.text===``;continue}}if(p===`footer`&&Ss.test(t.text)){p=`verification`,f=Rs(Ls(l,c),{kind:`text`,at:t.at,text:t.text},f),m=!1;continue}if(p===`log`&&fs.test(t.text)&&(p=`footer`),!n&&p===`footer`){let t=Ds(o,e);if(t){s.push(t.conclusion),f=!0,m=o[t.next-1]?.text===``,e=t.next-1;continue}}let r=js(t);if(r){l=r,c.push(l),f=!0,m=!1;continue}if(bs.test(t.text)){l=void 0,d||(d={kind:`tidying`,at:t.at,lines:[]},c.push(d)),d.lines.push(t.text),f=!0,m=!1;continue}let i=t.text.match(_s);if(i?.[1]&&i[2]&&i[3]!==void 0){l=void 0,u||(u={kind:`skipped`,at:t.at,count:0,items:[]},c.push(u)),u.items.push({agent:i[1],layer:i[2],reason:i[3]}),u.count=u.items.length,f=!0,m=!1;continue}let a=Ns(t);if(a){l=void 0,c.push(a),f=!0,m=!1;continue}if(ys.test(t.text)){l=void 0,c.push({kind:`promoted`,at:t.at,text:t.text}),f=!0,m=!1;continue}let h=Is(t.text);h===void 0?(f=Rs(Ls(l,c),{kind:`text`,at:t.at,text:t.text},f),m=t.text===``):(f=Rs(Ls(l,c),{kind:`error`,at:t.at,message:h,count:1,raw:t.text},f),m=!1)}let h={truncated:n,conclusions:s,blocks:c};return a.partial&&(h.partial=a.partial.text,h.partialAt=a.partial.at),h}function Ts(e,t,n){let r=new Map(n.map(e=>[e.at,e.source])),i=[],a=t,o=t,s=0;for(let t=0;t<e.length;){if(e[t]===`
|
|
87
|
+
`){i.push({text:e.slice(s,t),at:o}),a+=r.get(t)??1,t+=1,s=t,o=a;continue}let n=e.codePointAt(t);if(n===void 0)break;let c=n>65535?2:1,l=r.get(t);a+=l??cs.encode(e.slice(t,t+c)).length,t+=c}return e.endsWith(`
|
|
88
|
+
`)||i.push({text:e.slice(s),at:o}),i}function Es(e,t,n,r){if(!n)return{body:e};if(r||t.startsWith(`
|
|
89
|
+
`))return t.startsWith(`
|
|
90
|
+
`)&&e[0]?.text===``?{body:e.slice(1)}:{body:e};let[i,...a]=e;return i?{partial:i,body:a}:{body:[]}}function Ds(e,t){return Os(e,t)??ks(e,t)??As(e,t)}function Os(e,t){let n=e[t]?.text.match(fs);if(!n?.[2]||!n[3]||!n[4]||!n[5])return;let r=t+1,i=e[r]?.text.match(ps),a=i?.[1];return i&&(r+=1),{conclusion:{kind:`ended`,endReason:n[2],outcome:n[3],rounds:n[4],logs:n[5],...a?{note:a}:{}},next:r}}function ks(e,t){if(e[t]?.text!==`To go on:`)return;let n=[],r=t+1;for(;r<e.length;){let t=e[r]?.text;if(t===void 0||!/^\s+\S/.test(t))break;n.push(t.trim()),r+=1}if(n.length!==0)return{conclusion:{kind:`next`,lines:n},next:r}}function As(e,t){let n=e[t]?.text.match(ms);if(!n?.[1]||!n[2])return;let r=t+1,i=e[r]?.text.match(hs);if(!i?.[1])return;let a=i[1];r+=1;let o=e[r]?.text.match(gs)?.[1];return o&&(r+=1),{conclusion:{kind:`branch`,branch:n[1],files:n[2],bringIn:a,...o?{patch:o}:{}},next:r}}function js(e){let t=e.text.match(ds);if(!t?.[1]||!t[3]||!t[4])return;let n=Ms(t[4]),r={kind:`round`,at:e.at,n:t[1],agent:t[3],runtime:n.runtime,body:[]};return t[2]&&(r.max=t[2]),n.model&&(r.model=n.model),n.tier&&(r.tier=n.tier),t[5]&&(r.retry=t[5]),r}function Ms(e){let t=e.match(/^(.*), tier (low|mid|high|\d+)$/),n=t?.[1]??e,r=t?.[2],i=n.indexOf(`/`),a=i<0?{runtime:n}:{runtime:n.slice(0,i),model:n.slice(i+1)};return r?{...a,tier:r}:a}function Ns(e){let t=e.text.match(vs);if(!t?.[1]||!t[2]||!t[3]||!t[4])return;let n=Ps(t[3]),r={kind:`tidied`,at:e.at,agent:t[1],layer:t[2],archive:n.archive,undo:t[4]};return n.records&&(r.records=n.records),n.proposals&&(r.proposals=n.proposals),r}function Ps(e){let t=e,n,r,i=t.lastIndexOf(`, proposals: `);i>=0&&(n=t.slice(i+13),t=t.slice(0,i));let a=t.lastIndexOf(`, records: `);return a>=0&&(r=t.slice(a+11),t=t.slice(0,a)),{archive:t,...r===void 0?{}:{records:r},...n===void 0?{}:{proposals:n}}}function Fs(e){return ms.test(e)||e.startsWith(`Dispatcher verification (run by agent-lyceum):`)||e.startsWith(`Pull request `)||e.startsWith(`A pull request `)||e.startsWith(`The pull request could not be opened`)}function Is(e){let t=e.trim();if(!t.startsWith(`{`)||!t.endsWith(`}`))return;let n;try{n=JSON.parse(t)}catch{return}if(typeof n!=`object`||!n)return;let r=n;if(r.type===`error`&&typeof r.message==`string`)return r.message;if(r.type===`turn.failed`&&typeof r.error?.message==`string`)return r.error.message}function Ls(e,t){let n=e?e.body:t;return{last(){let e=n.at(-1);if(e?.kind===`text`||e?.kind===`error`)return e},push(e){n.push(e)},setText(e){let t=n.at(-1);t?.kind===`text`&&(t.text=e)}}}function Rs(e,t,n){let r=e.last();if(t.kind===`text`){if(t.text===``){if(r?.kind===`text`)e.setText(`${r.text}\n`);else return!0;return!1}return r?.kind===`text`?e.setText(`${r.text}\n${t.text}`):e.push(t),!1}return!n&&r?.kind===`error`&&r.message===t.message?(r.count+=1,r.raw=`${r.raw}\n${t.raw}`,!1):(e.push(t),!1)}var zs={completed:`完成`,partial:`部分完成`,blocked:`受阻`,failed:`失敗`,waiting:`等待回答`,cancelled:`已取消`},Bs={done:`完成回報`,lead_failed:`負責人失敗`,agent_failed:`成員失敗`,waiting:`等待回答`,cancelled:`已取消`,idle:`沒有後續`,max_rounds:`達到輪數上限`},Vs={running:`執行中`,lost:`已結束(結束碼不明)`};function Hs(e){if(e.state===`running`)return{text:Vs.running,tone:`signal`};if(e.state===`lost`)return{text:Vs.lost,tone:`warn`};let t=rs(e.exit??null,!1);return{text:t.text,tone:t.tone===`ok`?`signal`:t.tone===`warn`?`warn`:`failed`}}function Us(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Ws(e){let t=new Date(e.started_at).getTime();if(Number.isNaN(t))return;if(e.state===`running`)return{label:`已進行`,text:Cs(Date.now()-t)};if(!e.ended_at)return;let n=new Date(e.ended_at).getTime();if(!Number.isNaN(n))return{label:`耗時`,text:Cs(n-t)}}var Gs={signal:`text-signal`,warn:`text-warn`,failed:`text-failed`},Ks=`max-w-full overflow-auto whitespace-pre-wrap break-all font-mono text-xs`,qs=`min-h-11 cursor-pointer rounded-sm py-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,Js=`min-w-0 wrap-break-word`;function Ys({job:e,stale:t,raw:n,onRaw:r}){let i=as(e.argv),a=Hs(e),o=Ws(e),s=ws(e.tail,{truncated:e.truncated===!0,lineStart:e.lineStart===!0,byteStart:e.byteStart,gaps:e.gaps}),c=e.tail===``&&s.partial===void 0,[l,u]=(0,I.useState)(()=>new Set),d=(e,t)=>u(n=>us(n,e,t));return(0,K.jsxs)(`section`,{"aria-label":`任務詳情`,className:`min-w-0 max-w-full rounded-lg border border-line bg-wall p-3`,children:[(0,K.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1 text-sm`,children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`狀態`}),(0,K.jsx)(`dd`,{className:Gs[a.tone],children:a.text}),i.project&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`專案`}),(0,K.jsx)(`dd`,{className:G(Js,`font-mono`),children:i.project})]}),i.target&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`目標`}),(0,K.jsx)(`dd`,{className:G(Js,`font-medium`),children:i.target})]}),(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`開始`}),(0,K.jsx)(`dd`,{children:(0,K.jsx)(`time`,{dateTime:e.started_at,children:Us(e.started_at)})}),e.ended_at&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`結束`}),(0,K.jsx)(`dd`,{children:(0,K.jsx)(`time`,{dateTime:e.ended_at,children:Us(e.ended_at)})})]}),o&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:o.label}),(0,K.jsx)(`dd`,{children:o.text})]})]}),(0,K.jsxs)(`details`,{className:`mt-2`,children:[(0,K.jsx)(`summary`,{className:G(qs,`text-sm text-ink/70`),children:`完整指令`}),(0,K.jsx)(`pre`,{className:G(Ks,`mt-1 max-h-40 rounded-md border border-line bg-paper p-2`),children:e.argv.join(` `)})]}),t&&(0,K.jsx)(`p`,{className:`mt-2 text-sm text-warn`,children:`更新失敗,稍後重試`}),(0,K.jsxs)(`div`,{role:`group`,"aria-label":`輸出格式`,className:`mt-3 flex flex-wrap gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-pressed":!n,className:G(`min-h-11 rounded-full border px-3 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,n?`border-line`:`border-ink/40 bg-paper`),onClick:()=>r(!1),children:`整理後的輸出`}),(0,K.jsx)(`button`,{type:`button`,"aria-pressed":n,className:G(`min-h-11 rounded-full border px-3 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,n?`border-ink/40 bg-paper`:`border-line`),onClick:()=>r(!0),children:`原始輸出`})]}),s.truncated&&(0,K.jsx)(`p`,{className:`mt-3 text-sm text-warn`,children:`輸出超過尾端上限,這裡只顯示最後的部分。`}),n?(0,K.jsx)(`pre`,{className:G(Ks,`mt-3 max-h-[60dvh] rounded-lg border border-line bg-paper p-3`),children:e.tail||`(還沒有輸出)`}):c?(0,K.jsx)(`p`,{className:`mt-3 text-sm`,children:`(還沒有輸出)`}):(0,K.jsxs)(`div`,{className:`mt-3 flex max-h-[60dvh] min-w-0 flex-col gap-3 overflow-auto`,children:[s.partial!==void 0&&s.partialAt!==void 0&&(0,K.jsx)(sc,{id:ls(s.partialAt),open:l.has(ls(s.partialAt)),onOpen:d,summary:`開頭被截斷的半行`,summaryClass:`text-sm text-ink/70`,className:`rounded-lg border border-line bg-paper px-3`,children:(0,K.jsx)(`pre`,{className:G(Ks,`mb-2 max-h-40`),children:s.partial})}),s.conclusions.length>0&&(0,K.jsx)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-line bg-paper p-3`,children:s.conclusions.map((e,t)=>(0,K.jsx)(Xs,{item:e},`${e.kind}-${t}`))}),s.blocks.map(e=>(0,K.jsx)(ec,{block:e,openIds:l,onOpen:d},ls(e.at)))]})]})}function Xs({item:e}){return e.kind===`ended`?(0,K.jsx)(Zs,{item:e}):e.kind===`next`?(0,K.jsx)(Qs,{item:e}):(0,K.jsx)($s,{item:e})}function Zs({item:e}){let t=zs[e.outcome]??e.outcome,n=Bs[e.endReason]??e.endReason;return(0,K.jsxs)(`div`,{className:`text-sm`,children:[(0,K.jsxs)(`p`,{children:[`結束:`,t,`(`,n,`),`,e.rounds,` 輪`]}),(0,K.jsxs)(`p`,{className:`mt-1 break-all text-xs text-ink/70`,children:[`紀錄:`,e.logs]}),e.note&&(0,K.jsx)(`p`,{className:G(Js,`mt-1 text-ink/80`),children:e.note})]})}function Qs({item:e}){return(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h3`,{className:`text-sm font-medium`,children:`下一步`}),(0,K.jsx)(`ul`,{className:`mt-1 flex flex-col gap-1`,children:e.lines.map((e,t)=>(0,K.jsx)(`li`,{className:`break-all font-mono text-xs`,children:e},t))})]})}function $s({item:e}){return(0,K.jsxs)(`div`,{className:`text-sm`,children:[(0,K.jsxs)(`p`,{className:Js,children:[`結果在分支 `,(0,K.jsx)(`span`,{className:`break-all font-mono`,children:e.branch}),`(`,e.files,` 個檔案),工作目錄沒有被改動。`]}),e.bringIn&&(0,K.jsxs)(`p`,{className:`mt-1 break-all font-mono text-xs`,children:[`帶進來:`,e.bringIn]}),e.patch&&(0,K.jsxs)(`p`,{className:`mt-1 break-all font-mono text-xs`,children:[`或套用補丁:`,e.patch]})]})}function ec({block:e,openIds:t,onOpen:n}){return e.kind===`round`?(0,K.jsx)(tc,{block:e,openIds:t,onOpen:n}):e.kind===`error`?(0,K.jsx)(nc,{block:e,open:t.has(ls(e.at)),onOpen:n}):e.kind===`text`?(0,K.jsx)(rc,{block:e}):e.kind===`skipped`?(0,K.jsx)(ac,{block:e,open:t.has(ls(e.at)),onOpen:n}):e.kind===`tidied`?(0,K.jsx)(oc,{block:e,open:t.has(ls(e.at)),onOpen:n}):e.kind===`tidying`?(0,K.jsx)(ic,{block:e,open:t.has(ls(e.at)),onOpen:n}):(0,K.jsx)(`p`,{className:G(Js,`text-sm`),children:e.text})}function tc({block:e,openIds:t,onOpen:n}){let r=e.model?`${e.runtime}/${e.model}`:e.runtime,i=[`第 ${e.n}${e.max?`/${e.max}`:``} 輪`,e.agent,r];return e.tier&&i.push(`層級 ${e.tier}`),e.retry&&i.push(`重試 ${e.retry}`),(0,K.jsxs)(`section`,{className:`min-w-0 rounded-lg border border-line bg-paper p-3`,children:[(0,K.jsx)(`h3`,{className:G(Js,`text-sm font-medium`),children:i.join(` · `)}),e.body.length>0&&(0,K.jsx)(`div`,{className:`mt-2 flex min-w-0 flex-col gap-2`,children:e.body.map(e=>e.kind===`error`?(0,K.jsx)(nc,{block:e,open:t.has(ls(e.at)),onOpen:n},ls(e.at)):(0,K.jsx)(rc,{block:e},ls(e.at)))})]})}function nc({block:e,open:t,onOpen:n}){let r=ls(e.at);return(0,K.jsxs)(`div`,{className:`min-w-0 rounded-md border border-failed/40 bg-failed-soft px-3 py-2`,children:[(0,K.jsxs)(`p`,{className:G(Js,`text-sm text-failed`),children:[e.message,e.count>1?`(連續 ${e.count} 次)`:``]}),(0,K.jsx)(sc,{id:r,open:t,onOpen:n,summary:`原始片段`,summaryClass:`text-xs text-ink/60`,children:(0,K.jsx)(`pre`,{className:G(Ks,`mb-2 max-h-40`),children:e.raw})})]})}function rc({block:e}){return(0,K.jsx)(`pre`,{className:Ks,children:e.text})}function ic({block:e,open:t,onOpen:n}){return(0,K.jsx)(sc,{id:ls(e.at),open:t,onOpen:n,summary:`整理記憶(${e.lines.length})`,summaryClass:`text-sm`,className:`rounded-lg border border-line bg-paper px-3`,children:(0,K.jsx)(`pre`,{className:G(Ks,`mb-2 max-h-40`),children:e.lines.join(`
|
|
91
|
+
`)})})}function ac({block:e,open:t,onOpen:n}){return(0,K.jsx)(sc,{id:ls(e.at),open:t,onOpen:n,summary:`略過 ${e.count} 個`,summaryClass:`text-sm`,className:`min-w-0 rounded-lg border border-line bg-paper px-3`,children:(0,K.jsx)(`ul`,{className:`mb-2 flex min-w-0 flex-col gap-1 text-sm`,children:e.items.map((e,t)=>(0,K.jsxs)(`li`,{className:Js,children:[e.agent,`(`,e.layer,`):`,e.reason]},`${e.agent}-${e.layer}-${t}`))})})}function oc({block:e,open:t,onOpen:n}){return(0,K.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-line bg-paper px-3 py-2 text-sm`,children:[(0,K.jsxs)(`p`,{className:Js,children:[e.agent,`(`,e.layer,`)已整理`]}),(0,K.jsx)(sc,{id:ls(e.at),open:t,onOpen:n,summary:`封存路徑與還原指令`,summaryClass:`text-ink/70`,children:(0,K.jsxs)(`dl`,{className:`mb-2 space-y-1 break-all font-mono text-xs`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`封存`}),(0,K.jsx)(`dd`,{children:e.archive})]}),e.records&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`紀錄封存`}),(0,K.jsx)(`dd`,{children:e.records})]}),e.proposals&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`提案封存`}),(0,K.jsx)(`dd`,{children:e.proposals})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`dt`,{className:`text-ink/60`,children:`還原`}),(0,K.jsx)(`dd`,{children:e.undo})]})]})})]})}function sc({id:e,open:t,onOpen:n,summary:r,summaryClass:i,className:a,children:o}){return(0,K.jsxs)(`details`,{className:a,open:t,onToggle:r=>{r.currentTarget.open!==t&&n(e,r.currentTarget.open)},children:[(0,K.jsx)(`summary`,{className:G(qs,i),children:r}),o]})}function cc(e){return e?e.state!==`running`||e.live===!1:!1}function lc(e){return e?.tidy===!0||/tidy/i.test(e?.name??``)}var uc={progress:`text-ink/70`,ok:`text-signal`,warn:`text-warn`,fail:`text-failed`};function dc(e){if(lc(e)&&e)return e.state===`running`&&e.live!==!1?{text:`tidy 進行中`,tone:`progress`}:e.outcome===`failed`||e.end_reason===`lead_failed`||e.end_reason===`agent_failed`?{text:`tidy 失敗`,tone:`fail`}:e.outcome===`completed`&&e.end_reason===`done`?{text:`已 tidy`,tone:`ok`}:{text:`tidy 未完成`,tone:`warn`}}function fc(e,t){return t!==`clear`&&dc(e)?.text===`已 tidy`}function pc({info:e,className:t}){return(0,K.jsx)(`span`,{className:G(`rounded-full border border-line px-2 py-0.5 text-xs font-normal tracking-normal`,uc[e.tone],t),children:e.text})}function mc(e,t=160){let[n,r]=(0,I.useState)(!1);return(0,I.useEffect)(()=>{if(!e){r(!1);return}let n=window.setTimeout(()=>r(!0),t);return()=>window.clearTimeout(n)},[e,t]),n}function hc({label:e,className:t}){return(0,K.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:G(`flex min-h-11 items-center gap-2 text-sm text-ink/70`,t),children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:`pulse-dot size-2 shrink-0 rounded-full bg-signal`}),(0,K.jsx)(`span`,{children:e})]})}function gc({label:e,className:t}){return(0,K.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:G(`enter animate-in fade-in p-4 duration-200 sm:p-6`,t),children:[(0,K.jsx)(hc,{label:e}),(0,K.jsxs)(`div`,{className:`mt-4 space-y-3`,"aria-hidden":`true`,children:[(0,K.jsx)(`div`,{className:`h-3 w-2/3 motion-safe:animate-pulse rounded bg-line`}),(0,K.jsx)(`div`,{className:`h-3 w-full motion-safe:animate-pulse rounded bg-line`}),(0,K.jsx)(`div`,{className:`h-3 w-5/6 motion-safe:animate-pulse rounded bg-line`}),(0,K.jsxs)(`div`,{className:`mt-6 grid gap-3 sm:grid-cols-2`,children:[(0,K.jsx)(`div`,{className:`panel h-24 motion-safe:animate-pulse bg-paper`}),(0,K.jsx)(`div`,{className:`panel h-24 motion-safe:animate-pulse bg-paper`})]})]})]})}function _c({label:e}){return(0,K.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`relative h-1 overflow-hidden bg-line`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:e}),(0,K.jsx)(`span`,{"aria-hidden":!0,className:`loading-bar absolute inset-y-0 w-1/3 rounded-full bg-signal`})]})}function vc(e,t,n){let r=!0,i,a=async()=>{let o,s=!0;try{o=await e()}catch{s=!1}r&&(s&&t(o),i=setTimeout(()=>void a(),n))};return a(),()=>{r=!1,i!==void 0&&clearTimeout(i)}}var yc={running:`執行中`,ended:`已結束`,lost:`已結束(結束碼不明)`};function bc(){let[e,t]=(0,I.useState)(),[n,r]=(0,I.useState)(),[i,a]=(0,I.useState)(),[o,s]=(0,I.useState)(!1),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1),[f,p]=(0,I.useState)();if((0,I.useEffect)(()=>vc(Jn,e=>{d(e===null),t(t=>Yn(t,e))},3e3),[]),(0,I.useEffect)(()=>{if(a(void 0),s(!1),l(!1),n)return vc(()=>Zn(n),e=>{e?(a(e),s(!1)):(a(e=>e??null),s(!0))},2e3)},[n]),(0,I.useEffect)(()=>{if(!n){p(void 0);return}let t=e?.find(e=>e.id===n);t?p(t):i?.id===n&&p(e=>e?.id===n?e:i)},[e,n,i]),e===void 0)return u?(0,K.jsx)(`p`,{className:`text-pretty p-4 text-sm text-failed`,children:`無法取得任務清單,稍後會自動重試。`}):(0,K.jsx)(gc,{label:`正在讀取任務清單…`});let m=Xn(e,n,f);return(0,K.jsxs)(`article`,{className:`enter animate-in fade-in p-4 duration-200 sm:p-6`,children:[(0,K.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:`任務輸出`}),(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-sm`,children:`從網頁啟動的背景指令。它們獨立於這個頁面,關掉頁面也會繼續跑。`}),u&&(0,K.jsx)(`p`,{className:`mt-2 text-sm text-warn`,children:`清單更新失敗,顯示上次的結果。`}),m.length===0?(0,K.jsx)(`p`,{className:`text-pretty mt-6 text-sm`,children:`還沒有從網頁啟動過的背景指令;若剛啟動過卻沒看到,可能是暫時無法取得清單,稍後會自動重試。`}):(0,K.jsx)(`ul`,{className:`mt-6 flex flex-col gap-2`,children:m.map(e=>{let t=e.state===`ended`?rs(e.exit??null,!1):void 0,a=as(e.argv),s=os(e),u=n===e.id;return(0,K.jsxs)(`li`,{className:`min-w-0`,children:[(0,K.jsxs)(`button`,{type:`button`,"aria-pressed":u,"aria-expanded":u,className:G(`panel flex min-h-11 w-full flex-wrap items-center gap-x-4 gap-y-1 px-3 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,u&&`border-ink/40`),onClick:()=>r(u?void 0:e.id),children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.command}),a.project&&(0,K.jsx)(`span`,{className:`font-mono text-ink/70`,children:a.project}),a.target&&(0,K.jsx)(`span`,{className:`min-w-0 max-w-full truncate font-medium`,children:a.target}),s&&(0,K.jsx)(pc,{info:s}),(0,K.jsx)(`span`,{className:`text-ink/60`,children:new Date(e.started_at).toLocaleString()}),(0,K.jsx)(`span`,{className:G(e.state===`running`||t?.tone===`ok`?`text-signal`:t?.tone===`warn`||e.state===`lost`?`text-warn`:`text-failed`),children:e.state===`ended`&&t?t.text:yc[e.state]})]}),u&&(0,K.jsx)(xc,{picked:e.id,detail:i,stale:o,raw:c,onRaw:l})]},e.id)})})]})}function xc({picked:e,detail:t,stale:n,raw:r,onRaw:i}){return t===void 0||t!==null&&t.id!==e?(0,K.jsxs)(`div`,{className:`mt-2 rounded-lg border border-line bg-paper p-4`,children:[(0,K.jsx)(hc,{label:`正在讀取輸出…`}),(0,K.jsxs)(`div`,{className:`mt-3 space-y-2`,"aria-hidden":`true`,children:[(0,K.jsx)(`div`,{className:`h-3 w-full motion-safe:animate-pulse rounded bg-line`}),(0,K.jsx)(`div`,{className:`h-3 w-5/6 motion-safe:animate-pulse rounded bg-line`}),(0,K.jsx)(`div`,{className:`h-3 w-2/3 motion-safe:animate-pulse rounded bg-line`})]})]}):t===null?(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-failed`,children:`無法取得這個任務的輸出,稍後會自動重試。`}):(0,K.jsx)(`div`,{className:`mt-2`,children:(0,K.jsx)(Ys,{job:t,stale:n,raw:r,onRaw:i})})}function Sc({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=I.useRef(e!==void 0),[a,o]=I.useState(()=>t);return[i&&e!==void 0?e:a,I.useCallback(e=>{i||o(e)},[])]}function Cc(){let[,e]=I.useState({});return I.useCallback(()=>{e({})},[])}var wc=0;function Tc(e,t=`mui`){let n=I.useRef(void 0),r=Cc(),i=e??n.current;return I.useEffect(()=>{n.current??(wc+=1,n.current=`${t}-${wc}`,e??r())},[e,t,r]),i}var Ec=oe.useId;function Dc(e,t){if(Ec!==void 0){let n=Ec();return e??(t?`${t}-${n}`:n)}return Tc(e,t)}function Oc(e){return Dc(e,`base-ui`)}function kc(e,t,n,r){let i=!1,a=!1,o=r??Ke;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var Ac=`none`,jc=`trigger-press`,Mc=`trigger-hover`,Nc=`trigger-focus`,Pc=`outside-press`,Fc=`escape-key`,Ic=`disabled`,Lc=`imperative-action`;function Rc(e){I.useEffect(e,Ge)}var zc=null;globalThis.requestAnimationFrame;var Bc=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Vc=class e{static create(){return new e}static request(e){return Bc.request(e)}static cancel(e){return Bc.cancel(e)}currentId=zc;request(e){this.cancel(),this.currentId=Bc.request(()=>{this.currentId=zc,e()})}cancel=()=>{this.currentId!==zc&&(Bc.cancel(this.currentId),this.currentId=zc)};disposeEffect=()=>this.cancel};function Hc(){let e=L(Vc.create).current;return Rc(e.disposeEffect),e}function Uc(e,t=!1,n=!1,r=!1){let[i,a]=I.useState(e&&t?`idle`:void 0),[o,s]=I.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),z(()=>{if(!e&&o&&i!==`ending`&&n){let e=Vc.request(()=>{a(`ending`)});return()=>{Vc.cancel(e)}}},[e,o,i,n]),z(()=>{if(!e||t||i===void 0)return;let n=Vc.request(()=>{a(void 0)});return()=>{Vc.cancel(n)}},[t,e,i]),z(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Vc.request(()=>{a(`idle`)});return()=>{Vc.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Wc(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Sc({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=Uc(a,!0,!0),u=Oc(),[d,f]=I.useState(),p=d===null?void 0:d??u,m=R(e=>{let t=!a,n=kc(jc,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return I.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var Gc=I.createContext(void 0);function Kc(){let e=I.useContext(Gc);if(e===void 0)throw Error(Ee(15));return e}var qc=`data-starting-style`,Jc=`data-ending-style`,Yc={[qc]:``},Xc={[Jc]:``},Zc={transitionStatus(e){return e===`starting`?Yc:e===`ending`?Xc:null}},Qc=`data-open`,$c=`data-closed`,el=qc,tl=`data-panel-open`,nl={[Qc]:``},rl={[$c]:``},il={open(e){return e?{[tl]:``}:null}},al={open(e){return e?nl:rl},...Zc},ol=I.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=R(o),d=Wc({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=I.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=I.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=Xe(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:al});return(0,K.jsx)(Gc.Provider,{value:p,children:m})}),sl={...il,...Zc},cl=I.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=Kc(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=Me({disabled:c,native:u});return Xe(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:sl})});function ll(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}var ul=0,dl=class e{static create(){return new e}currentId=ul;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ul,t()},e)}isStarted(){return this.currentId!==ul}clear=()=>{this.currentId!==ul&&(clearTimeout(this.currentId),this.currentId=ul)};disposeEffect=()=>this.clear};function fl(){let e=L(dl.create).current;return Rc(e.disposeEffect),e}function pl(e){let t=L(ml,e).current;return t.next=e,z(t.effect),t}function ml(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function hl(e){return e==null?e:`current`in e?e.current:e}function gl(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var _l=c(m(),1),vl=null;function yl(e){if(!vl){let e=[];vl=e,queueMicrotask(()=>{vl=null,_l.flushSync(()=>{for(let t of e)t()})})}vl.push(e)}function bl(e,t=!1,n=!1){let r=Hc();return R((i,a=null)=>{r.cancel();let o=hl(e);if(o==null)return;let s=o,c=()=>{n?yl(()=>{a?.aborted||i()}):_l.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(gl(s).map(e=>e.finished.then(We))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(gl(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=qc;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function xl(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=R(a),s=bl(r,n,i);I.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var Sl={height:void 0,width:void 0};function Cl(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=I.useRef(null),f=I.useRef(null),[p,m]=I.useState(Sl),h=I.useRef(Sl),g=I.useRef(!1),_=I.useRef(s),v=I.useRef(!1),[y,b]=I.useState(!1),x=I.useRef(null),S=Fe(t,d),C=pl(s),w=bl(d),T=!s&&!a,E=y?`idle`:u,D=s&&(_.current||v.current),O=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,k=n&&T&&f.current!==`css-animation`,A=R((e,t=!0)=>{t&&(h.current=e),m(e)}),j=R(()=>{x.current?.(),x.current=null}),M=R(e=>{j(),x.current=()=>{x.current=null,e()}}),N=R(()=>{s&&a&&f.current===`css-animation`&&(v.current=!0)});z(()=>{y&&u!==`starting`&&b(!1)},[y,u]),I.useEffect(()=>()=>{N(),j()},[N,j]),z(()=>{s||(_.current=!1,v.current=!1);let e=d.current;if(!e)return;!s&&x.current&&j();let t=Tl(e,D);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=wl(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){A(wl(e)),b(!0);return}if(t===`css-transition`){let t=Ol(e);if(A(wl(e)),!n)return t;let r=Dl(e,`transition-duration`,`0s`);return M(r),b(!0),t}A(wl(e));let r=Dl(e,`animation-name`,`none`);if(!n){r();return}let i=Dl(e,`animation-duration`,`0s`);r(),M(i),b(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){A(Sl,!1),c(!1);return}A(wl(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=wl(e);n.height>0||n.width>0?(A(n),t===`css-animation`&&Dl(e,`animation-name`,`none`)()):c(!1)},[a,s,j,A,c,M,D,u]),xl({enabled:s&&a&&E===`idle`,open:!0,ref:d,onComplete(){s&&A(Sl,!1)}}),I.useEffect(()=>{if(s||!a||E!==`ending`)return;if(!d.current){c(!1),A(Sl,!1);return}let e=new AbortController,t=-1;function n(){C.current||(c(!1),A(Sl,!1))}return t=Vc.request(()=>{w(n,e.signal)}),()=>{Vc.cancel(t),e.abort()}},[C,a,s,E,w,A,c]),z(()=>{let e=d.current;e&&n&&T&&e.setAttribute(`hidden`,`until-found`)},[T,n]),I.useEffect(function(){let e=d.current;if(!e)return;let t=dl.create(),n=-1,r=(r,i)=>{t.start(0,()=>{C.current||(n=Vc.request(()=>{C.current||(r&&(g.current=!1),i&&e.setAttribute(el,``),e.setAttribute(`hidden`,`until-found`))}))})},i=ll(e,`beforematch`,t=>{let n=kc(Ac,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}g.current=!0;let i=e.hasAttribute(el);e.removeAttribute(el),l(!0),r(!0,i)});return()=>{t.clear(),Vc.cancel(n),i()}},[C,o,l]);let ee=i||n||a||s;return{height:O.height,props:{...k?{[el]:``}:void 0,hidden:T,id:r},ref:S,shouldPreventOpenAnimation:D,shouldRender:ee,transitionStatus:E,width:O.width}}function wl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Tl(e,t){let n=y(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&El(n.animationDuration),i=El(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function El(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function Dl(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function Ol(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=Vc.request(n);return()=>{Vc.cancel(r),n()}}var kl=`--collapsible-panel-height`,Al=`--collapsible-panel-width`,jl=I.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=Kc(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;z(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:C,ref:w,shouldPreventOpenAnimation:T,shouldRender:E,transitionStatus:D,width:O}=Cl({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),k={...g,transitionStatus:D},A=Ye(s,k),j=Xe(`div`,{...e,style:void 0},{state:k,ref:w,props:[C,{style:{[kl]:S===void 0?`auto`:`${S}px`,[Al]:O===void 0?`auto`:`${O}px`}},c,A?{style:A}:void 0,T?{style:{animationName:`none`}}:void 0],stateAttributesMapping:al});return E?j:null}),Ml=(0,I.createContext)({});function Nl(e){let t=(0,I.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Pl=typeof window<`u`?I.useLayoutEffect:I.useEffect,Fl=(0,I.createContext)(null);function Il(e,t){e.indexOf(t)===-1&&e.push(t)}function Ll(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Rl=(e,t,n)=>n>t?t:n<e?e:n,zl={},Bl=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Vl=e=>typeof e==`object`&&!!e,Hl=e=>/^0[^.\s]+$/u.test(e);function Ul(e){let t;return()=>(t===void 0&&(t=e()),t)}var Wl=e=>e,Gl=(...e)=>e.reduce((e,t)=>n=>t(e(n))),Kl=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ql=class{constructor(){this.subscriptions=[]}add(e){return Il(this.subscriptions,e),()=>this.remove(e)}remove(e){Ll(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Jl=e=>e*1e3,Yl=e=>e/1e3,Xl=(e,t)=>t?1e3/t*e:0,Zl=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function Ql(e,t,n,r){return e===t&&n===r?Wl:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=Zl(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(Zl(s+1e-7,e,n)-i-r)}return Zl(s,t,r)}}var $l=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eu=e=>t=>1-e(1-t),tu=Ql(.33,1.53,.69,.99),nu=eu(tu),ru=$l(nu),iu=e=>e>=1?1:(e*=2)<1?.5*nu(e):.5*(2-2**(-10*(e-1))),au=e=>1-Math.sin(Math.acos(e)),ou=eu(au),su=$l(au),cu=Ql(.42,0,1,1),lu=Ql(0,0,.58,1),uu=Ql(.42,0,.58,1),du=e=>Array.isArray(e)&&typeof e[0]!=`number`,fu=e=>Array.isArray(e)&&typeof e[0]==`number`,pu={linear:Wl,easeIn:cu,easeInOut:uu,easeOut:lu,circIn:au,circInOut:su,circOut:ou,backIn:nu,backInOut:ru,backOut:tu,anticipate:iu},mu=e=>typeof e==`string`,hu=e=>{if(fu(e)){let[t,n,r,i]=e;return Ql(t,n,r,i)}return mu(e)?pu[e]:e},X={delta:0,timestamp:0,isProcessing:!1},gu;function _u(){gu=void 0}var vu={now:()=>(gu===void 0&&vu.set(X.isProcessing||zl.useManualTiming?X.timestamp:performance.now()),gu),set:e=>{gu=e,queueMicrotask(_u)}},yu=e=>Math.round(e*1e5)/1e5,bu=e=>t=>typeof t==`string`&&t.startsWith(e),xu=bu(`--`),Su=bu(`var(--`),Cu=e=>Su(e)?wu.test(e.split(`/*`)[0].trim()):!1,wu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Tu(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Eu={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Du={...Eu,transform:e=>Rl(0,1,e)},Ou={...Eu,default:1},ku=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Au(e){return e==null}var ju=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mu=(e,t)=>n=>!!(typeof n==`string`&&ju.test(n)&&n.startsWith(e)||t&&!Au(n)&&Object.prototype.hasOwnProperty.call(n,t)),Nu=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ku);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Pu=e=>Rl(0,255,e),Fu={...Eu,transform:e=>Math.round(Pu(e))},Iu={test:Mu(`rgb`,`red`),parse:Nu(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Fu.transform(e)+`, `+Fu.transform(t)+`, `+Fu.transform(n)+`, `+yu(Du.transform(r))+`)`},Lu=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function Ru(e){let t=e.length>5?2:1,n=Lu(e,3,t);return{red:parseInt(Lu(e,0,t),16),green:parseInt(Lu(e,1,t),16),blue:parseInt(Lu(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var zu={test:Mu(`#`),parse:Ru,transform:Iu.transform},Bu=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vu=Bu(`deg`),Hu=Bu(`%`),Z=Bu(`px`),Uu=Bu(`vh`),Wu=Bu(`vw`),Gu={...Hu,parse:e=>Hu.parse(e)/100,transform:e=>Hu.transform(e*100)},Ku={test:Mu(`hsl`,`hue`),parse:Nu(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Hu.transform(yu(t))+`, `+Hu.transform(yu(n))+`, `+yu(Du.transform(r))+`)`},qu={test:e=>Iu.test(e)||zu.test(e)||Ku.test(e),parse:e=>Iu.test(e)?Iu.parse(e):Ku.test(e)?Ku.parse(e):zu.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Iu.transform(e):Ku.transform(e),getAnimatableNone:e=>{let t=qu.parse(e);return t.alpha=0,qu.transform(t)}},Ju=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Yu=new RegExp(ku.source),Q=new RegExp(Ju.source,`i`);function Xu(e){return isNaN(e)&&typeof e==`string`&&(Yu.test(e)||Q.test(e))}var Zu=`number`,Qu=`color`,$u=`var`,ed=`var(`,td="${}",nd=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function rd(e){let t=e.toString();return Yu.test(t)||Q.test(t)}function id(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(nd,e=>(qu.test(e)?(r.color.push(a),i.push(Qu),n.push(qu.parse(e))):e.startsWith(ed)?(r.var.push(a),i.push($u),n.push(e)):(r.number.push(a),i.push(Zu),n.push(parseFloat(e))),++a,td)).split(td),indexes:r,types:i}}function ad(e){return id(e).values}function od({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Zu?yu(r[a]):e===Qu?qu.transform(r[a]):r[a]}return i}}function sd(e){return od(id(e))}var cd=e=>typeof e==`number`?0:qu.test(e)?qu.getAnimatableNone(e):e,ld=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:cd(e);function ud(e){let t=id(e);return od(t)(t.values.map((e,n)=>ld(e,t.split[n])))}var dd={test:Xu,parse:ad,createTransformer:sd,getAnimatableNone:ud};function fd(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pd({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=fd(s,r,e+1/3),a=fd(s,r,e),o=fd(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function md(e,t){return n=>n>0?t:e}var hd=(e,t,n)=>e+(t-e)*n,gd=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},_d=[zu,Iu,Ku],vd=e=>_d.find(t=>t.test(e));function yd(e){let t=vd(e);if(!t)return!1;let n=t.parse(e);return t===Ku&&(n=pd(n)),n}var bd=(e,t)=>{let n=yd(e),r=yd(t);if(!n||!r)return md(e,t);let i={...n};return e=>(i.red=gd(n.red,r.red,e),i.green=gd(n.green,r.green,e),i.blue=gd(n.blue,r.blue,e),i.alpha=hd(n.alpha,r.alpha,e),Iu.transform(i))},xd=new Set([`none`,`hidden`]);function Sd(e,t){return xd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Cd(e,t){return n=>hd(e,t,n)}function wd(e){return typeof e==`number`?Cd:typeof e==`string`?Cu(e)?md:qu.test(e)?bd:Od:Array.isArray(e)?Td:typeof e==`object`?qu.test(e)?bd:Ed:md}function Td(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>wd(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ed(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=wd(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Dd(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Od=(e,t)=>{let n=id(e),r=id(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?xd.has(e)&&!r.values.length||xd.has(t)&&!n.values.length?Sd(e,t):Gl(Td(Dd(n,r),r.values),od(r)):md(e,t)},kd=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ad(e,t){let n=kd.exec(e);if(!n)return;let r=kd.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>yu(hd(a,o,e))+i}function jd(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return hd(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Ad(e,t);if(n)return n}return wd(e)(e,t)}var Md=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Nd(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var Pd=40;function Fd(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Md.reduce((e,t)=>(e[t]=Nd(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=zl.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,Pd),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:Md.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Md.length;t++)o[Md[t]].cancel(e)},state:n,steps:o}}var{schedule:Id,cancel:Ld,steps:Rd}=Fd(typeof requestAnimationFrame<`u`?requestAnimationFrame:Wl,!0,X),zd=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Id.update(t,e),stop:()=>Ld(t),now:()=>X.isProcessing?X.timestamp:vu.now()}},Bd=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Vd=2e4;function Hd(e,t=50,n=Vd,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function Ud(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(Hd(o),Vd);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:Yl(s)}}var Wd=100,Gd=10,Kd=1,qd=800,Jd=.3,Yd=.3,Xd=.01,Zd=2,Qd=.005,$d=.5,ef=.01,tf=10,nf=.05,rf=e=>e<0?1/Math.max(1+e,nf):Math.max(1-e,nf);function af(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return cf(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function of(e,t){return e*Math.sqrt(1-t*t)}var sf=12;function cf(e,t,n){let r=n;for(let n=1;n<sf;n++)r-=e(r)/t(r);return r}var lf=.001;function uf({duration:e=qd,bounce:t=Jd}){let n,r,i=rf(t);e=Rl(ef,tf,Yl(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=of(t,i),o=Math.exp(-r);return lf-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=of(t*t,i);return(-n(t)+lf>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=cf(n,r,a),s=o*af(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:Jl(e)}}var df=(e,t)=>(t?e>=0:e>0)&&e<1/0;function ff(e,t){if(df(e,t))return e}function pf(e){let t=ff(e.stiffness),n=ff(e.damping,!0),r=ff(e.mass),i={...e,stiffness:t??Wd,damping:n??Gd,mass:r??Kd,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=rf(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*af(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,uf(i)),i.isResolvedFromDuration=!0;df(i.stiffness)&&df(i.damping,!0)||(i.stiffness=Wd,i.damping=Gd)}return i}function mf(e=Yd,t=Jd){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=pf({...n}),f=e=>d?0:-Yl(e),p=s/(2*Math.sqrt(o*c)),m=Yl(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?Xd:Zd),g.restDelta=n.restDelta||(e?Qd:$d)};_();let v,y,b;if(p<1){let e=of(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=e<1||d?1/0:300/e,i=(e,t)=>Math.exp(t>r?(h-e)*r-h*t:-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>Jl(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=Jl(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(Hd(S),Vd),t=Bd(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}var hf=Object.assign(mf,{applyToOptions:e=>{let t=Ud(e,100,mf);return e.ease=t.ease,e.duration=Jl(t.duration),e.type=`keyframes`,e}});function gf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o?o(g):g;_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:e?_+t:d},b,x,S=e=>{p(f.value)&&(b=e,x=hf({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function _f(e,t,n){let r=[],i=n||zl.mix||jd,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Gl(Array.isArray(t)?t[n]||Wl:t,a)),r.push(a)}return r}function vf(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=_f(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Kl(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Rl(e[0],e[a-1],t)):l}function yf(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Kl(0,t,r);e.push(hd(n,1,i))}}function bf(e){let t=[0];return yf(t,e.length-1),t}function xf(e,t){return e.map(e=>e*t)}function Sf(e,t){return e.map(()=>t||uu).splice(0,e.length-1)}function Cf({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=du(r)?r.map(hu):hu(r)||uu,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(zl.mix||jd)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?Rl(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=vf(xf(n&&n.length===t.length?n:bf(t),e),t,{ease:Array.isArray(i)?i:Sf(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var wf=5;function Tf(e,t,n){let r=Math.max(t-wf,0);return Xl(n-e(r),t-r)}function Ef(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):Tf(t=>e.next(t).value,t,e.next(t).value)}var Df=e=>e!==null;function Of(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Df),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var kf={decay:gf,inertia:gf,tween:Cf,keyframes:Cf,spring:hf};function Af(e){typeof e.type==`string`&&(e.type=kf[e.type])}var jf=40,Mf=(e,t)=>t-e>jf&&!zl.useManualTiming?t:e;function Nf(e,t){return{kind:e,animation:t,timestamp:vu.now(),frameTimestamp:X.timestamp,frameIsProcessing:X.isProcessing}}function Pf(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Nf(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function Ff(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Nf(`layout-animation-start`,e),node:t})}catch{}}var If=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Lf=e=>e/100,Rf=e=>Math.round(e*1e4)/1e4,zf=class extends If{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==vu.now()&&this.tick(vu.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Pf(this,this.options)}initAnimation(){let{options:e}=this;Af(e);let{type:t=Cf,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Cf;s!==Cf&&typeof o[0]!=`number`&&(this.mixKeyframes=Gl(Lf,jd(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Hd(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){this.currentTime=this.holdTime??Math.round(e-this.startTime)*this.playbackSpeed}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Mf(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;d||(p=this.playbackSpeed>=0?i<1/0?this.currentTime>=r:p:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==gf&&(f.value=Of(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??Rf((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==gf?Of(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=Rl(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}get duration(){return Yl(this.calculatedDuration)}get iterationDuration(){return this.duration+Yl(this.options.delay??0)}get time(){return Yl(this.currentTime)}set time(e){e=Jl(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Ef(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(vu.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Yl(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=zd,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(vu.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Bf=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function $(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ku)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Bf.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Vf=/\b([a-z-]*)\(.*?\)/gu,Hf={...dd,getAnimatableNone:e=>{let t=e.match(Vf);return t?t.map($).join(` `):e}},Uf={...dd,getAnimatableNone:e=>{let t=dd.parse(e);return dd.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Wf={...Eu,transform:Math.round},Gf={rotate:Vu,pathRotation:Vu,rotateX:Vu,rotateY:Vu,rotateZ:Vu,scale:Ou,scaleX:Ou,scaleY:Ou,scaleZ:Ou,skew:Vu,skewX:Vu,skewY:Vu,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:Du,originX:Gu,originY:Gu,originZ:Z},Kf={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,inset:Z,insetBlock:Z,insetBlockStart:Z,insetBlockEnd:Z,insetInline:Z,insetInlineStart:Z,insetInlineEnd:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,paddingBlock:Z,paddingBlockStart:Z,paddingBlockEnd:Z,paddingInline:Z,paddingInlineStart:Z,paddingInlineEnd:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,marginBlock:Z,marginBlockStart:Z,marginBlockEnd:Z,marginInline:Z,marginInlineStart:Z,marginInlineEnd:Z,fontSize:Z,backgroundPositionX:Z,backgroundPositionY:Z,...Gf,zIndex:Wf,fillOpacity:Du,strokeOpacity:Du,numOctaves:Wf},qf={...Kf,color:qu,backgroundColor:qu,outlineColor:qu,fill:qu,stroke:qu,borderColor:qu,borderTopColor:qu,borderRightColor:qu,borderBottomColor:qu,borderLeftColor:qu,filter:Hf,WebkitFilter:Hf,mask:Uf,WebkitMask:Uf},Jf=e=>qf[e],Yf=new Set([Hf,Uf]);function Xf(e,t){let n=Jf(e);return Yf.has(n)||(n=dd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function Zf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Qf=e=>e*180/Math.PI,$f=e=>tp(Qf(Math.atan2(e[1],e[0]))),ep={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:$f,rotateZ:$f,skewX:e=>Qf(Math.atan(e[1])),skewY:e=>Qf(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},tp=e=>(e%=360,e<0&&(e+=360),e),np=$f,rp=e=>Math.hypot(e[0],e[1]),ip=e=>Math.hypot(e[4],e[5]),ap={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:rp,scaleY:ip,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(rp(e)+ip(e))/2,rotateX:e=>tp(Qf(Math.atan2(e[6],e[5]))),rotateY:e=>tp(Qf(Math.atan2(-e[2],e[0]))),rotateZ:np,rotate:np,skewX:e=>Qf(Math.atan(e[4])),skewY:e=>Qf(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function op(e){return+!!e.includes(`scale`)}function sp(e,t){if(!e||e===`none`)return op(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return op(t);let r=(n[1]?ap:ep)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var cp=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return sp(n,t)},lp=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],up=new Set([...lp,`pathRotation`]),dp=e=>e===Eu||e===Z,fp=new Set([`x`,`y`,`z`]),pp=lp.filter(e=>!fp.has(e));function mp(e){let t=[];return pp.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var hp=new Set([`bottom`,`right`]);function gp(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var _p=({transform:e})=>sp(e,`x`),vp=({transform:e})=>sp(e,`y`),yp={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>gp(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>gp(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:_p,y:vp,translateX:_p,translateY:vp},bp=new Set,xp=!1,Sp=!1,Cp=!1;function wp(){if(Sp){let e=[],t=new Set,n=new Set;bp.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),hp.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=mp(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Sp=!1,xp=!1,bp.forEach(e=>e.complete(Cp)),bp.clear()}function Tp(){bp.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Sp=!0)})}function Ep(){Cp=!0,Tp(),wp(),Cp=!1}function Dp(e,t,n){if(typeof e==`string`){if(Bl(e)||Hl(e))return parseFloat(e);if(!dd.test(e)&&dd.test(n))return Xf(t,n)}return e??void 0}var Op=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(bp.add(this),xp||(xp=!0,Id.read(Tp),Id.resolveKeyframes(wp))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Dp(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Zf(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),bp.delete(this)}cancel(){this.state===`scheduled`&&(bp.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},kp=e=>e.startsWith(`--`);function Ap(e,t,n){kp(t)?e.style.setProperty(t,n):e.style[t]=n}var jp={};function Mp(e,t){let n=Ul(e);return()=>jp[t]??n()}var Np=Mp(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Pp=Mp(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Fp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ip={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Fp([0,.65,.55,1]),circOut:Fp([.55,0,1,.45]),backIn:Fp([.31,.01,.66,-.59]),backOut:Fp([.33,1.53,.69,.99])};function Lp(e,t){if(e)return typeof e==`function`?Pp()?Bd(e,t):`ease-out`:fu(e)?Fp(e):Array.isArray(e)?e.map(e=>Lp(e,t)||Ip.easeOut):Ip[e]}function Rp(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Lp(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function zp(e){return typeof e==`function`&&`applyToOptions`in e}function Bp({type:e,...t}){return zp(e)&&Pp()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Vp=class extends If{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e;let c=Bp(e);this.animation=Rp(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Of(r,this.options,o,this.speed);this.updateMotionValue?.(e),Ap(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Pf(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Yl(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Yl(e)}get time(){return Yl(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Jl(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Np()?(this.animation.timeline=e,t?.(this.animation),Wl):n(this)}},Hp={anticipate:iu,backInOut:ru,circInOut:su};function Up(e){return e in Hp}function Wp(e){typeof e.ease==`string`&&Up(e.ease)&&(e.ease=Hp[e.ease])}var Gp=class extends Vp{constructor(e){Wp(e),Af(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(vu.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new zf({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?Rl(0,10,a):0,s=this.sample(a);n&&r&&Ap(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},Kp=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(dd.test(e)||e===`0`)&&!e.startsWith(`url(`));function qp(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Jp(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Kp(i,t),s=Kp(a,t);return!o||!s?!1:qp(e)||(n===`spring`||zp(n))&&r}function Yp(e){e.duration=0,e.type=`keyframes`}var Xp=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Zp=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Qp(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Zp.test(e[t]))return!0;return!1}var $p=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),em=()=>!zl.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function tm(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Xp.has(n)||$p.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return em()&&(Xp.has(n)||$p.has(n)&&Qp(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var nm=(e,t)=>t&&typeof e==`number`?t.transform(e):e,rm={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},im=lp.length,am={},om=(e,t,n=nm(t,Gf[e]))=>(am[e]||(am[e]=(rm[e]||e)+`(`))+n+`)`,sm=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function cm(e,t,n){let r=``;for(let i=0;i<im;i++){let a=lp[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=nm(o,Kf[a]));sm(a,o)||(r+=om(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=om(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var lm=new WeakMap,um=200,dm=.001,fm=.1,pm=.001,mm=100,hm=e=>/^(linear|ease(In|Out|InOut))$/.test(e),gm=(e,t)=>e-t,_m=(e,t,n)=>{let r=[];for(let i=0;i<=n;i++)r.push(hd(e,t,i/n));return r},vm=e=>e.motionValue.owner,ym=e=>lm.get(e),bm=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),xm=({name:e,motionValue:t})=>e&&lp.includes(e)&&t?.owner?.current instanceof HTMLElement&&em()&&Pp();function Sm(e){let t=vm(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(bm(t,`transform`)||`none`)===`none`&&!bm(t,`pathRotation`)&&!t.projection?.isProjecting()}var Cm=class extends zf{constructor(e){let t=vm(e).current,{driver:n=zd}=e,r,i=Sm(e);e.driver=e=>{let i=n(e);return{js:i,now:i.now,start:(e=!0)=>{let n=ym(t);!n||n.isJS?i.start(e):n.schedule(!1,!e)},stop:()=>{i.stop();let e=ym(t);e&&!e.isFinishing&&e.release(r)}}},super(e),r=this,this.canAccelerate=i;let{stop:a}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),a()}}get group(){return ym(vm(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(vu.now()):void 0}tween(){let{keyframes:e,type:t,ease:n,times:r,repeat:i,delay:a=0}=this.options,o=fu(n)?Fp(n):hm(n)&&Ip[n];if(o&&!i&&!r&&e.length===2&&t===Cf&&this.holdTime===null){let e=this.startTime+a/this.speed;return[e,e+this.resolvedDuration/this.speed,o]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,times:u,keyframes:d,type:f}=a,p=(f||Cf)===Cf?u||bf(d):[0,1],m=n+o/r,h=[];if(this.holdTime!==null||!(i>0))return h;for(let n=Math.max(0,Math.floor((e-m)*r/i));n<=s;n++){let a=m+n*i/r;if(a>t)break;for(let o of p){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&h.push(s)}}return h}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=vu.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-10,!0),this.sampleAt(e,!0),10)}play(){this.isStopped||((this.group||wm(vm(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.canAccelerate&&this.tick(vu.now())}get time(){return this.isAccelerated()?Yl(Rl(0,this.totalDuration,this.at(vu.now())-(this.options.delay||0))):super.time}set time(e){super.time=e,this.isAccelerated()&&this.sync()}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}};function wm(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p=e=>{for(let t of n)if(t.name===e)return!0},m=(t,n)=>{let o={};for(let s of t===void 0?lp:a){let a=r.get(s),c=t===void 0?bm(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},h=(e,t)=>{let n=``;for(let r in e){let i=e[r];t&&sm(r,i)||(n+=om(r,i)+` `)}return(t?n.trim():n)||`none`},g=(e,t)=>h(m(e,t)),_=(e=m())=>{t.style.transform=h(e,!0)},v=(e=!0)=>{e&&_(),s.forEach(({animation:e})=>e.cancel()),s=[]},y=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),b=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=vu.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(e.cancel(),s=s.filter(e=>e!==r)),A.schedule(!1)}),e.oncancel=()=>s.includes(r)&&A.demote(),s.push(r)},x=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},S=(e,t,n,r)=>{let i=Math.min(um,Math.max(2,Math.ceil((n-t)/10)));if(r.length*4>i)return;let a=_m(t,n,i).concat(r).sort(gm),o=e=>Kl(t,n,e),s,c;for(let t of e){let e=a.map(e=>t.numberAt(e)),[n]=e,r=e.map(e=>e-n),i=r[r.length-1],o=r.some(e=>Math.abs(e)*dm>Math.abs(i))?0:i,l=r.map(e=>o?e/o:e);if(!o){if(l.some(e=>!(Math.abs(e)<=dm)))return}else if(!s)s=l,c=e=>(t.numberAt(e)-n)/o;else if(l.some((e,t)=>!(Math.abs(e-s[t])<=dm)))return}if(!s||s.every((e,t)=>Math.abs(e-o(a[t]))<=dm))return`linear`;let l=[],u=(e,t=c(e))=>l.push(Rf(t)+` `+Rf(o(e)*100)+`%`);return s.forEach((e,t)=>{t&&Math.abs(e-s[t-1])>.2&&x(c,a[t-1],a[t]).forEach(e=>u(e)),u(a[t],e)}),`linear(`+l+`)`},C=(e,t,n,r)=>{let i=[t],a=(t,n)=>e.every(e=>!(Math.abs(e.numberAt((t+n)/2)-(e.numberAt(t)+e.numberAt(n))/2)>(e.name.startsWith(`scale`)?pm:fm))),o=(t,n,r)=>{if(n-t<1||a(t,n))i.push(n);else if(r<4)o(t,(t+n)/2,r+1),o((t+n)/2,n,r+1);else{for(let r of e)i.push(...x(e=>r.numberAt(e),t,n));i.push(n)}},s=_m(t,n,Math.ceil((n-t)/100));for(let e of r)s.push(e,Math.min(e+.01,n));let c=t;for(let e of s.sort(gm))e>c&&o(c,e,0),c=e;return i.sort(gm)},w=e=>{let t;for(let n of e){let e=n.tween();if(!e||t?.some((t,n)=>n<2?Math.abs(e[n]-t)>1:e[n]!==t))return;t=e}return t},T=(e,t,n,r={fill:`both`},i,a)=>{let o=e.flatMap(e=>e.boundaries(t,n)),s=a||S(e,t,n,o),c=s?[t,n]:C(e,t,n,o),l=c.map(e=>g(e,i)),u={transform:l};return s||(u.offset=c.map(e=>Kl(t,n,e))),l.every(e=>e===l[0])&&(_(m(t,i)),u=null),y(u,{...r,duration:n-t,easing:s||`linear`})},E=t=>{let c=t,l=0,u=0,d=[],f=[],p=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[n,i]=e.timing(),a=n===1/0;if(o.set(e,[e.at(t),e.speed,a]),a)e.sync();else{if(e.speed<0)return;if(i){if(l){let e=(n-u)/i;if(Math.abs(i-l)>1||Math.abs(e-Math.round(e))*l>1)return}else l=i,u=n;f.push(e)}else p.add(n);d.push(e),c=Math.max(c,n)}}i={},a=lp.filter(t=>{if(r.has(t))return!0;let n=i[t]=bm(e,t);return n!==void 0&&parseFloat(n)!==+!!t.startsWith(`scale`)}),v(!1);let m=!l&&w(d);try{if(m&&m[1]>t){let[e,n,r]=m;b(T(d,e,n,void 0,void 0,r),e-t,n-e)}else c>t&&(b(T(d,t,c),0,c-t),p.forEach(e=>e<c-1&&b(y(null,{duration:e-t}),0,e-t)));if(l){let e=u+Math.floor((c-u)/l)*l;b(T(f,e,e+l,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||v(),!0},D=e=>{let t,r=0;for(let i of n){let n=o.get(i);if(!n)return!1;let[a,s,c]=n,l=i.at(e),u=i.timing()[0]===1/0;if(c){if(u&&l===a)continue;return!1}let d=(l-a)/s,f=u?0:i.speed/s;if(t===void 0)t=d,r=f;else if(Math.abs(d-t)>1||f!==r)return!1}if(t===void 0)return!0;if(!s.length)return!1;for(let{offset:e,end:n,isDone:r}of s){let i=t-e;if(n<1/0&&(r?i<n-1:i<0||i>=n))return!1}for(let{animation:n,offset:i,isDone:a}of s){if(a)continue;let o=t-i;r&&n.updatePlaybackRate&&n.playState===`running`&&Math.abs(Number(n.currentTime)-o)<20?n.playbackRate!==r&&n.updatePlaybackRate(r):r?(n.playbackRate=r,n.startTime=e-o/r):(n.startTime=null,n.currentTime=o)}return!0},O=()=>!n.size&&(u=!0,ym(t)===A&&lm.delete(t),A.isJS||v(),!0),k=()=>{let t=vu.now();if(A.isJS||(A.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=bm(e,n.name),o.has(n)||(c=!0))}),A.isFinishing=!1),l=!1,u||(n.forEach(({state:e},t)=>{(e===`idle`||e===`finished`)&&n.delete(t)}),O()))return;for(let e of n)if(!e.canAccelerate)return A.demote(!0);A.isJS&&(A.isJS=!1,c=!0,n.forEach(e=>e.js?.stop()));let r=c,a=d;if(c=d=!1,r||!D(t)){if(a){if(t-f<mm)return A.demote();f=t}if(!E(t))return A.demote()}},A={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,X.isProcessing?Id.render(k,!1,!0):queueMicrotask(k)))},release(e){let{state:t}=e;(t===`idle`||t===`finished`)&&n.delete(e),O()||A.schedule(!0)},check(){if(!A.isJS){for(let t in i)if(bm(e,t)!==i[t]&&!p(t))return A.schedule(!0,!0)}},demote(e){if(!(A.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),A.isJS=!0,o=new Map,v(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return lm.set(t,A),A}var Tm=class extends If{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=vu.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||Op;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=vu.now();let u=Jp(e,i,a,o);u||((zl.instantAnimations||!s)&&l?.(Of(e,n,t)),e[0]=e[e.length-1],Yp(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&tm(n),p=!f&&xm(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=Mf(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new Gp(n)}catch{m=new zf(n)}}else m=p?new Cm(n):new zf(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ep()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}};function Em(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Dm=30,Om=e=>!isNaN(parseFloat(e)),km={current:void 0},Am=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=vu.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=vu.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Om(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new ql)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new ql,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){Id.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect?.()}dirty(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){(this.dependents||=new Set).add(e)}removeDependent(e){this.dependents?.delete(e)}get(){km.current?.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=vu.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Dm)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Dm);return Xl(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&(this.animation=void 0),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}};function jm(e,t){return new Am(e,t)}function Mm(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Nm(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Mm(n,e)}var Pm={type:`spring`,stiffness:500,damping:25,restSpeed:10},Fm=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Im={type:`keyframes`,duration:.8},Lm={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Rm=(e,{keyframes:t})=>t.length>2?Im:up.has(e)?e.startsWith(`scale`)?Fm(t[1]):Pm:Lm,zm=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`]);function Bm(e){for(let t in e)if(!zm.has(t))return!0;return!1}var Vm=(e,t,n,r={},i,a)=>o=>{let s=Nm(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Jl(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};Bm(s)||Object.assign(u,Rm(e,u)),u.duration&&=Jl(u.duration),u.repeatDelay&&=Jl(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Yp(u),u.delay===0&&(d=!0)),(zl.instantAnimations||zl.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Yp(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Of(u.keyframes,s);if(e!==void 0){Id.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new zf(u):new Tm(u)},Hm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Um(e){let t=Hm.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Wm(e,t,n=1){let[r,i]=Um(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Bl(e)?parseFloat(e):e}return Cu(i)?Wm(i,t,n+1):i}function Gm(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Km(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Gm(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function qm(e,t,n){return Km(e.getProps(),t,n,e)}var Jm=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Ym=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...lp]),Xm=e=>Array.isArray(e);function Zm(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,jm(n))}function Qm(e){return Xm(e)?e[e.length-1]||0:e}function $m(e,t){let{transitionEnd:n={},transition:r={},...i}=qm(e,t)||{};i={...i,...n};for(let t in i)Zm(e,t,Qm(i[t]))}var eh=e=>!!(e&&e.getVelocity);function th(e){return!!(eh(e)&&e.add)}function nh(e,t){let n=e.getValue(`willChange`);if(th(n))return n.add(t);if(!n&&zl.WillChange){let n=new zl.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var rh=`data-framer-appear-id`;function ih(e){return e.props[rh]}var ah=typeof window<`u`;function oh({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function sh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Mm(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&oh(f,t))continue;let o={delay:n,...Nm(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Id.update(()=>r.set(i));continue}let p=!1;if(ah&&window.MotionHandoffAnimation){let n=ih(e);if(n){let e=window.MotionHandoffAnimation(n,t,Id);e!==null&&(o.startTime=e,p=!0)}}nh(e,t);let m=l??e.shouldReduceMotion;r.start(Vm(t,r,i,m&&Ym.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Id.update(()=>{o&&$m(e,o)});d.length?Promise.all(d).then(t):t()}return d}function ch(e,t,n={}){let r=qm(e,t,Jm(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?sh(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(ch(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Em(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function lh(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>ch(e,t,n))):typeof t==`string`?ch(e,t,n):Promise.all(sh(e,qm(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var uh={test:e=>e===`auto`,parse:e=>e},dh=e=>t=>t.test(e),fh=[Eu,Z,Hu,Vu,Wu,Uu,uh],ph=e=>fh.find(dh(e));function mh(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||Hl(e)}var hh=new Set([`auto`,`none`,`0`]);function gh(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!hh.has(t)&&rd(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=Xf(n,i))}var _h=class extends Op{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(Tu(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t?.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Cu(r))){let i=Wm(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Ym.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=ph(r),o=ph(i);if(Tu(r)!==Tu(i)&&yp[n])this.needsMeasurement=!0;else if(a!==o){if(dp(a)&&dp(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else yp[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||mh(e[t]))&&n.push(t);n.length&&gh(e,n,t)}measure(){let{element:e,name:t}=this;return yp[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e?.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.resolveNoneKeyframes()}},vh=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function yh(e){return Vl(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function bh(e){return Vl(e)&&`ownerSVGElement`in e}var xh={};function Sh(e){return xh.current?.add(e),e}var Ch=e=>xh.current?xh.current.bind(e):e;function wh(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:xh.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function Th(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function Eh(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(up.has(e))o=!0;else if(xu(e))i[e]=n;else{let t=nm(n,Kf[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=cm(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Dh={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Oh={offset:`strokeDashoffset`,array:`strokeDasharray`};function kh(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Dh:Oh;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Ah=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function jh(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Eh(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Ah)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&kh(d,i,a,o,!1)}function Mh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Nh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ph(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fh(e){return e===void 0||e===1}function Ih({scale:e,scaleX:t,scaleY:n}){return!Fh(e)||!Fh(t)||!Fh(n)}var Lh=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function Rh(e){return Ih(e)||Bh(e)||zh(e)}function zh(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function Bh(e){return Vh(e.x)||Vh(e.y)}function Vh(e){return e&&e!==`0%`}function Hh(e,t,n){return n+t*(e-n)}function Uh(e,t,n,r,i){return i!==void 0&&(e=Hh(e,i,r)),Hh(e,n,r)+t}function Wh(e,t=0,n=1,r,i){e.min=Uh(e.min,t,n,r,i),e.max=Uh(e.max,t,n,r,i)}function Gh(e,{x:t,y:n}){Wh(e.x,t.translate,t.scale,t.originPoint),Wh(e.y,n.translate,n.scale,n.originPoint)}var Kh=.999999999999,qh=1.0000000000001;function Jh(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.options.visualElement?.props.style?.display!==`contents`&&(r===!0&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Yh(e.x,-a.scroll.offset.x),Yh(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gh(e,o)),r&&(r.path?.[s]||r)!==a&&Rh(a.latestValues)&&Qh(e,a.latestValues,a.layout?.layoutBox));t.x<qh&&t.x>Kh&&(t.x=1),t.y<qh&&t.y>Kh&&(t.y=1)}function Yh(e,t){e.min+=t,e.max+=t}function Xh(e,t,n,r,i=.5){Wh(e,t,n,hd(e.min,e.max,i),r)}function Zh(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Qh(e,t,n){let r=n??e;Xh(e.x,Zh(t.x,r.x),t.scaleX,t.scale,t.originX),Xh(e.y,Zh(t.y,r.y),t.scaleY,t.scale,t.originY)}function $h(e,t){return Mh(Ph(e.getBoundingClientRect(),t))}function eg(e,t,n){let r=$h(e,n),{scroll:i}=t;return i&&(Yh(r.x,i.offset.x),Yh(r.y,i.offset.y)),r}var{schedule:tg,cancel:ng}=Fd(queueMicrotask,!1);function rg(e,t,n){let r=eh(e)?e:jm(e);return r.start(Vm(``,r,t,n)),r.animation}var ig={},ag={value:null,addProjectionMetrics:null};function og(e,t){let n=vu.now();e=Ch(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(Ld(r),e(a-t))};return Id.setup(r,!0),Sh(()=>Ld(r))}function sg(e){return bh(e)&&e.tagName===`svg`}function cg(e){return eh(e)?e.get():e}var lg=e=>typeof e==`number`?e:parseFloat(e),ug=vh.length,dg=e=>typeof e==`number`||Z.test(e);function fg(e,t,n,r,i,a){i?(e.opacity=hd(0,n.opacity??1,mg(r)),e.opacityExit=hd(t.opacity??1,0,hg(r))):a&&(e.opacity=hd(t.opacity??1,n.opacity??1,r));for(let i=0;i<ug;i++){let a=vh[i],o=pg(t,a),s=pg(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||dg(o)===dg(s)?(e[a]=Math.max(hd(lg(o),lg(s),r),0),(Hu.test(s)||Hu.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<Lh.length;i++){let a=Lh[i];(t[a]||n[a])&&(e[a]=hd(t[a]||0,n[a]||0,r))}}function pg(e,t){return e[t]===void 0?e.borderRadius:e[t]}var mg=gg(0,.5,ou),hg=gg(.5,.95,Wl);function gg(e,t,n){return r=>r<e?0:r>t?1:n(Kl(e,t,r))}function _g(e,t){e.min=t.min,e.max=t.max}function vg(e,t){_g(e.x,t.x),_g(e.y,t.y)}function yg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var bg=.9999,xg=1.0001,Sg=-.01,Cg=.01;function wg(e){return e.max-e.min}function Tg(e,t,n){return Math.abs(e-t)<=n}function Eg(e,t,n,r=.5){e.origin=r,e.originPoint=hd(t.min,t.max,e.origin),e.scale=wg(n)/wg(t),e.translate=hd(n.min,n.max,e.origin)-e.originPoint,(e.scale>=bg&&e.scale<=xg||isNaN(e.scale))&&(e.scale=1),(e.translate>=Sg&&e.translate<=Cg||isNaN(e.translate))&&(e.translate=0)}function Dg(e,t,n,r){Eg(e.x,t.x,n.x,r?.originX),Eg(e.y,t.y,n.y,r?.originY)}function Og(e,t,n,r=0){e.min=(r?hd(n.min,n.max,r):n.min)+t.min,e.max=e.min+wg(t)}function kg(e,t,n,r){Og(e.x,t.x,n.x,r?.x),Og(e.y,t.y,n.y,r?.y)}function Ag(e,t,n,r=0){let i=r?hd(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+wg(t)}function jg(e,t,n,r){Ag(e.x,t.x,n.x,r?.x),Ag(e.y,t.y,n.y,r?.y)}function Mg(e,t,n,r,i){return e-=t,e=Hh(e,1/n,r),i!==void 0&&(e=Hh(e,1/i,r)),e}function Ng(e,t=0,n=1,r=.5,i,a=e,o=e){if(Hu.test(t)&&(t=parseFloat(t),t=hd(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=hd(a.min,a.max,r);e===a&&(s-=t),e.min=Mg(e.min,t,n,s,i),e.max=Mg(e.max,t,n,s,i)}function Pg(e,t,[n,r,i],a,o){Ng(e,t[n],t[r],t[i],t.scale,a,o)}var Fg=[`x`,`scaleX`,`originX`],Ig=[`y`,`scaleY`,`originY`];function Lg(e,t,n,r){Pg(e.x,t,Fg,n?.x,r?.x),Pg(e.y,t,Ig,n?.y,r?.y)}var Rg=()=>({translate:0,scale:1,origin:0,originPoint:0}),zg=()=>({x:Rg(),y:Rg()}),Bg=()=>({min:0,max:0}),Vg=()=>({x:Bg(),y:Bg()});function Hg(e){return e.translate===0&&e.scale===1}function Ug(e){return Hg(e.x)&&Hg(e.y)}function Wg(e,t){return e.min===t.min&&e.max===t.max}function Gg(e,t){return Wg(e.x,t.x)&&Wg(e.y,t.y)}function Kg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qg(e,t){return Kg(e.x,t.x)&&Kg(e.y,t.y)}function Jg(e){return wg(e.x)/wg(e.y)}function Yg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Xg=class{constructor(){this.members=[]}add(e){Il(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(Ll(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Ll(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function Zg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Qg={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(Z.test(e))e=parseFloat(e);else return e}return`${Zg(e,t.target.x)}% ${Zg(e,t.target.y)}%`}},$g={borderRadius:Object.assign({},Qg,{applyTo:vh.slice()}),borderTopLeftRadius:Qg,borderTopRightRadius:Qg,borderBottomLeftRadius:Qg,borderBottomRightRadius:Qg,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=dd.parse(e);if(i.length>5)return r;let a=dd.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=hd(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function e_(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<Lh.length;e++){let t=Lh[e],i=n[t];i&&(r+=`${t}(${i}deg) `),!e&&n.pathRotation&&(r+=`rotate(${n.pathRotation}deg) `)}}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function t_(e){return[e(`x`),e(`y`)]}var n_=(e,t)=>e.depth-t.depth,r_=class{constructor(){this.children=[],this.isDirty=!1}add(e){Il(this.children,e),this.isDirty=!0}remove(e){Ll(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(n_),this.isDirty=!1,this.children.forEach(e)}},i_={hasAnimatedSinceResize:!0,hasEverUpdated:!1},a_={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},o_=[`z`,`skew`,`skewZ`],s_=1e3,c_=0;function l_(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var u_=e=>e.instance&&lm.get(e.instance)?.demote()&&e.resetSkewAndRotation();function d_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=ih(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Id,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&d_(r)}function f_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(ig,{...$g,...ig}),class{constructor(e={},n=t?.()){this.id=c_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ag.value&&(a_.nodes=a_.calculatedTargetDeltas=a_.calculatedProjections=0),this.nodes.forEach(h_),this.nodes.forEach(E_),this.nodes.forEach(D_),this.nodes.forEach(g_),ag.addProjectionMetrics&&ag.addProjectionMetrics(a_)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new r_)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ql),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=bh(t)&&!sg(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;Id.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=og(i,250),i_.hasAnimatedSinceResize&&(i_.hasAnimatedSinceResize=!1,this.nodes.forEach(T_)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||N_,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!qg(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Nm(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||T_(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Ld(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(O_),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&d_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;u_(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,u_(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(y_),this.nodes.forEach(v_);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(b_);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(S_),this.nodes.forEach(C_),this.nodes.forEach(w_),this.nodes.forEach(p_),this.nodes.forEach(m_)):this.nodes.forEach(b_),this.clearAllSnapshots();let e=vu.now();X.delta=Rl(0,1e3/60,e-X.timestamp),X.timestamp=e,X.isProcessing=!0,Rd.update.process(X),Rd.preRender.process(X),Rd.render.process(X),X.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(__),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Id.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Id.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!wg(this.snapshot.measuredBox.x)&&!wg(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=Vg(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&u_(this);let t=this.projectionDelta&&!Ug(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Rh(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),L_(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Vg();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(B_))){let{scroll:e}=this.root;e&&(Yh(t.x,e.offset.x),Yh(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Vg();if(vg(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&vg(t,e),Yh(t.x,i.offset.x),Yh(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||Vg();vg(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Yh(a.x,-n.scroll.offset.x),Yh(a.y,-n.scroll.offset.y)),Rh(n.latestValues)&&Qh(a,n.latestValues,n.layout?.layoutBox)}return!r&&Rh(this.latestValues)&&Qh(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=Vg();vg(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Rh(n.latestValues))continue;let r;n.instance&&(Ih(n.latestValues)&&n.updateSnapshot(),r=Vg(),vg(r,n.measurePageBox())),Lg(t,n.latestValues,n.snapshot?.layoutBox,r)}return Rh(this.latestValues)&&Lg(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==X.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=X.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=Vg(),this.targetWithTransforms=Vg()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kg(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):vg(this.target,this.layout.layoutBox),Gh(this.target,this.targetDelta)):vg(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),ag.value&&a_.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Ih(this.parent.latestValues)||Bh(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Vg(),this.relativeTargetOrigin=Vg(),jg(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),vg(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===X.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;vg(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Jh(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Vg());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yg(this.prevProjectionDelta.x,this.projectionDelta.x),yg(this.prevProjectionDelta.y,this.projectionDelta.y)),Dg(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Yg(this.projectionDelta.x,this.prevProjectionDelta.x)&&Yg(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),ag.value&&a_.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zg(),this.projectionDelta=zg(),this.projectionDeltaWithTransform=zg()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=zg();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Vg(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(M_));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);k_(o.x,e.x,n),k_(o.y,e.y,n),r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jg(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),j_(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Gg(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Vg(),vg(f,this.relativeTarget)),c&&(this.animationValues=a,fg(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Ld(this.pendingAnimation),void 0),this.pendingAnimation=Id.update(()=>{i_.hasAnimatedSinceResize=!0,this.motionValue||=jm(0),this.motionValue.jump(0,!1),this.currentAnimation=rg(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),Ff(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(s_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&z_(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||Vg(),R_(i.x,t.x,e.x),R_(i.y,t.y,e.y)}vg(t,i),Qh(t,r),Dg(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Xg),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!zh(t))return;let n={};for(let t=0;t<o_.length;t++)l_(o_[t],e,n,this.animationValues);for(let t=0;t<Lh.length;t++)l_(Lh[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=cg(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=cg(t?.pointerEvents)||``),this.hasProjected&&!Rh(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=e_(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in ig){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=ig[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?cg(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(v_),this.root.sharedNodes.clear()}}}function p_(e){e.updateLayout(),x_(e)}function m_(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)t_(e=>{let t=wg(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;_g(r[e],a[e])}else z_(i,t.layoutBox,n)&&t_(t=>{let n=wg(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=zg();Dg(c,n,t.layoutBox);let l=zg();Dg(l,a?e.applyTransform(r,!0):n,s);let u=!Ug(c),d=!1,f=e.getClosestProjectingParent();if((!e.resumeFrom||f?.options.layoutRoot&&e.resumeFrom.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=Vg();jg(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=Vg();jg(l,n,i.layoutBox,s),a&&o(c,l),qg(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function h_(e){ag.value&&a_.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function g_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function __(e){e.clearSnapshot()}function v_(e){e.clearMeasurements()}function y_(e){e.isLayoutDirty=!0,e.updateLayout()}function b_(e){e.isLayoutDirty=!1}function x_(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;t_(e=>Yh(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function S_(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function C_(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function w_(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function T_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function E_(e){e.resolveTargetDelta()}function D_(e){e.calcProjection()}function O_(e){e.resetSkewAndRotation()}function k_(e,t,n){e.translate=hd(t.translate,0,n),e.scale=hd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function A_(e,t,n,r){e.min=hd(t.min,n.min,r),e.max=hd(t.max,n.max,r)}function j_(e,t,n,r){A_(e.x,t.x,n.x,r),A_(e.y,t.y,n.y,r)}function M_(e){return e.animationValues?.opacityExit!==void 0}var N_={duration:.45,ease:[.4,0,.1,1]},P_=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),F_=P_(`applewebkit/`)&&!P_(`chrome/`)?Math.round:Wl;function I_(e){e.min=F_(e.min),e.max=F_(e.max)}function L_(e){I_(e.x),I_(e.y)}function R_(e,t,n){e.max=wg(n)+(e.min=t.min)}function z_(e,t,n){return e===`position`||e===`preserve-aspect`&&!Tg(Jg(t),Jg(n),.2)}function B_(e){return e!==e.root&&e.scroll?.wasRoot}function V_(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var H_=f_({attachResizeListener:(e,t)=>V_(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),U_={current:void 0},W_=f_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!U_.current){let e=new H_({});e.mount(window),e.setOptions({layoutScroll:!0}),U_.current=e}return U_.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),G_=new WeakMap;function K_(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function q_(e){return typeof e==`string`||Array.isArray(e)}var J_=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Y_=[`initial`].concat(J_);function X_(e){if(K_(e.animate))return!0;for(let t=0;t<Y_.length;t++)if(q_(e[Y_[t]]))return!0;return!1}function Z_(e){return!!(X_(e)||e.variants)}function Q_(e,t,n){for(let r in t){let i=t[r],a=n[r];if(eh(i))e.addValue(r,i);else if(eh(a))e.addValue(r,jm(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,jm(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var $_={current:null},ev={current:!1},tv=typeof window<`u`;function nv(){if(ev.current=!0,tv){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>$_.current=e.matches;e.addEventListener(`change`,t),t()}else $_.current=!1}}var rv=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],iv={};function av(e){iv=e}function ov(){return iv}var sv=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Op,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=vu.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Id.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=X_(t),this.isVariantNode=Z_(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&eh(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,G_.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ev.current||nv(),this.shouldReduceMotion=$_.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Ld(this.notifyUpdate),Ld(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),(this.enteringChildren||=new Set).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.get(e)?.(),t.accelerate&&Xp.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Vp({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Jl(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=up.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Id.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),lm.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i?.()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in iv){let t=iv[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Vg()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&lm.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<rv.length;t++){let n=rv[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Q_(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let n=this.props.values?.[e];return n||(n=this.values.get(e),n===void 0&&t!==void 0&&(n=jm(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n)}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Bl(n)||Hl(n))?n=parseFloat(n):typeof n!=`number`&&!dd.test(n)&&dd.test(t)&&(n=Xf(e,t)),this.setBaseTarget(e,eh(n)?n.get():n)),eh(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new ql)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){tg.render(this.render)}},cv=class extends sv{constructor(){super(...arguments),this.KeyframeResolver=_h}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;eh(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function lv(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function uv(e,{layout:t,layoutId:n}){return up.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!ig[e]||e===`opacity`)}function dv(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(eh(r[t])||i&&eh(i[t])||uv(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function fv(e){return window.getComputedStyle(e)}var pv=class extends cv{constructor(){super(...arguments),this.type=`html`,this.renderInstance=lv}mount(e){super.mount(e)}readValueFromInstance(e,t){if(up.has(t))return this.projection?.isProjecting?op(t):cp(e,t);{let n=fv(e),r=(xu(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return $h(e,t)}build(e,t,n){Eh(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return dv(e,t,n)}},mv=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function hv(e){return{point:{x:e.pageX,y:e.pageY}}}var gv=e=>t=>mv(t)&&e(t,hv(t));function _v(e,t,n,r){return V_(e,t,gv(n),r)}var vv=new WeakMap,yv,bv=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:bh(r)&&`getBBox`in r?r.getBBox()[t]:r[n],xv=bv(`inline`,`width`,`offsetWidth`),Sv=bv(`block`,`height`,`offsetHeight`);function Cv({target:e,borderBoxSize:t}){vv.get(e)?.forEach(n=>{n(e,{get width(){return xv(e,t)},get height(){return Sv(e,t)}})})}function wv(e){e.forEach(Cv)}function Tv(){typeof ResizeObserver<`u`&&(yv=new ResizeObserver(wv))}function Ev(e,t){yv||Tv();let n=wh(e);return n.forEach(e=>{let n=vv.get(e);n||(n=new Set,vv.set(e,n)),n.add(t),yv?.observe(e)}),()=>{n.forEach(e=>{let n=vv.get(e);n?.delete(t),n?.size||yv?.unobserve(e)})}}var Dv=new Set,Ov;function kv(){Ov=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Dv.forEach(t=>t(e))},window.addEventListener(`resize`,Ov)}function Av(e){return Dv.add(e),Ov||kv(),()=>{Dv.delete(e),!Dv.size&&typeof Ov==`function`&&(window.removeEventListener(`resize`,Ov),Ov=void 0)}}function jv(e,t){return Sh(typeof e==`function`?Av(e):Ev(e,t))}var Mv=(e,t)=>Math.abs(e-t);function Nv(e,t){let n=Mv(e.x,t.x),r=Mv(e.y,t.y);return Math.sqrt(n**2+r**2)}var Pv=new Set([`auto`,`scroll`]),Fv=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Lv(this.lastRawMoveEventInfo,this.transformPagePoint));let e=zv(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Nv(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:vu.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Lv(t,this.transformPagePoint),this.hasPendingMove=!0,Id.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=zv(e.type===`pointercancel`?this.lastMoveEventInfo:Lv(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!mv(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Lv(hv(e),this.transformPagePoint),{point:c}=s;this.history=[{...c,timestamp:vu.now()}];let{onSessionStart:l}=t;l&&l(e,zv(s,this.history));let u={passive:!0,capture:!0};this.removeListeners=Gl(_v(this.contextWindow,`pointermove`,this.handlePointerMove,u),_v(this.contextWindow,`pointerup`,this.handlePointerUp,u),_v(this.contextWindow,`pointercancel`,this.handlePointerUp,u)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Pv.has(e.overflowX)||Pv.has(e.overflowY))&&this.scrollPositions.set(t,Iv(t)),t=t.parentElement}this.scrollPositions.set(window,Iv(window)),this.removeScrollListeners=Gl(V_(window,`scroll`,this.onElementScroll,{capture:!0}),V_(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=Iv(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Id.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Ld(this.updatePoint)}},Iv=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function Lv(e,t){return t?{point:t(e.point)}:e}function Rv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zv({point:e},t){return{point:e,delta:Rv(e,Vv(t)),offset:Rv(e,Bv(t)),velocity:Hv(t,.1)}}function Bv(e){return e[0]}function Vv(e){return e[e.length-1]}function Hv(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Vv(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Jl(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Jl(t)*2&&(r=e[1]);let a=Yl(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var Uv=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Wv(e){return Uv.has(e.tagName)||e.isContentEditable===!0}var Gv=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Kv(e){return Gv.has(e.tagName)||e.isContentEditable===!0}var qv={x:!1,y:!1};function Jv(){return qv.x||qv.y}function Yv(e){return e===`x`||e===`y`?qv[e]?null:(qv[e]=!0,()=>{qv[e]=!1}):qv.x||qv.y?null:(qv.x=qv.y=!0,()=>{qv.x=qv.y=!1})}function Xv(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?hd(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?hd(n,e,r.max):Math.min(e,n)),e}function Zv(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Qv(e,{top:t,left:n,bottom:r,right:i}){return{x:Zv(e.x,n,i),y:Zv(e.y,t,r)}}function $v(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ey(e,t){return{x:$v(e.x,t.x),y:$v(e.y,t.y)}}function ty(e,t){let n=.5,r=wg(e),i=wg(t);return i>r?n=Kl(t.min,t.max-r,e.min):r>i&&(n=Kl(e.min,e.max-i,t.min)),Rl(0,1,n)}function ny(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var ry=.35;function iy(e=ry){return e===!1?e=0:e===!0&&(e=ry),{x:ay(e,`left`,`right`),y:ay(e,`top`,`bottom`)}}function ay(e,t,n){return{min:oy(e,t),max:oy(e,n)}}function oy(e,t){return typeof e==`number`?e:e[t]||0}function sy(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var cy=new WeakMap,ly=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Vg(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let r=e=>{t&&this.snapToCursor(e),this.stopAnimation()},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock?.(),this.openDragLock=Yv(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:a}=this.visualElement;a&&(a.isAnimationBlocked=!0,a.target=void 0),t_(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Cu(t)&&(t=Wm(t,this.visualElement.current)||0),Z.test(t))t=parseFloat(t);else if(Hu.test(t)){let n=a?.layout?.layoutBox[e];n&&(t=wg(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),i&&Id.update(()=>i(e,t),!1,!0),nh(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=hy(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.visualElement.render(),a&&Id.update(()=>a(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},s=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Fv(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&Id.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!my(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=Xv(i,a,this.elastic[e])),r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;uy(e)?this.constraints&&this.scroll===sy(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r?Qv(r.layoutBox,e):!1,this.elastic=iy(t),i!==this.constraints&&!uy(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&t_(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ny(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!uy(e))return!1;let n=dy(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=sy(r);let i=eg(n,r.root,this.visualElement.getTransformPagePoint()),a=ey(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(Nh(a));this.hasMutatedConstraints=!!e,e&&(a=Mh(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=t_(s=>{if(!my(s,t||n,this.currentDirection))return;let l=c[s]||{};(o===!0||o===s)&&(l={min:0,max:0});let u=i?200:1e6,d=i?40:1e7,f={type:`inertia`,velocity:r?e[s]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(s,f)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return nh(this.visualElement,e),n.start(Vm(e,n,0,t,this.visualElement,!1))}stopAnimation(){t_(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();t_(e=>{if(!my(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-hd(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!uy(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};t_(e=>{let t=this.getAxisMotionValue(e).get();i[e]=ty({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),t_(t=>{let n=this.getAxisMotionValue(t);if(!my(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(hd(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;cy.set(this.visualElement,this);let e=this.visualElement.current,t=_v(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Kv(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=uy(t)&&dy(t);r&&(this.constraints=this.resolveRefConstraints(),n||=py(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),Id.read(r);let o=V_(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(t_(t=>{if(!my(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=ry,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function uy(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var dy=e=>`current`in e?e.current:e;function fy(e){let t=!0;return()=>{t?t=!1:e()}}function py(e,t,n){let r=jv(e,fy(n)),i=jv(t,fy(n));return()=>{r(),i()}}function my(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hy(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function gy(e,t){let n=wh(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},Sh(()=>r.abort())]}function _y(e){return!(e.pointerType===`touch`||Jv())}function vy(e,t,n={}){t=Ch(t);let[r,i,a]=gy(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!_y(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var yy=(e,t)=>t?e===t||yy(e,t.parentElement):!1,by=new WeakSet;function xy(e){return t=>{t.key===`Enter`&&e(t)}}function Sy(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Cy=(e,t)=>{let n=!1,r=xy(()=>{by.has(e)||(n=!0,Sy(e,`down`))}),i=xy(()=>{n&&(n=!1,Sy(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&Sy(e,`cancel`)},{...t,once:!0})};function wy(e){return mv(e)&&!Jv()}var Ty=new WeakSet;function Ey(e,t,n={}){t=Ch(t);let[r,i,a]=gy(e,n),o=e=>{let r=e.currentTarget;if(!wy(e)||Ty.has(e))return;by.add(r),n.stopPropagation&&Ty.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),by.has(r)&&by.delete(r),wy(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||yy(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),yh(e)&&(e.addEventListener(`focus`,()=>Cy(e,i),i),!Wv(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var Dy=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Oy=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),ky=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Ay(e,t,n,r){lv(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Oy.has(n)?n:Th(n),t.attrs[n])}function jy(e,t,n){let r=dv(e,t,n);for(let n in e)if(n!==`children`&&(eh(e[n])||eh(t[n]))){let t=lp.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var My=class extends cv{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Vg}getBaseTargetFromProps(e,t){return up.has(t)?super.getBaseTargetFromProps(e,t)??op(t):e[t]}getDefaultValue(e){return up.has(e)?this.latestValues[e]??op(e):void 0}readValueFromInstance(e,t){if(up.has(t)){let e=Jf(t);return e&&e.default||0}if(Ah.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Oy.has(t)?t:Th(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return jy(e,t,n)}build(e,t,n){jh(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Ay(e,t,n,r)}mount(e){this.isSVGTag=ky(e.tagName),super.mount(e)}};function Ny(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Py=[...J_].reverse(),Fy=e=>e?.out===!0?e:e?.out;function Iy(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>lh(e,t,n))),n=Ry(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&qm(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&Fy(f(l??(g&&g.props.initial))?.transition);if(Py.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?q_(f)||f===!1?f:void 0:l,y=q_(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||K_(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=Ly(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=qm(e,n,Jm(e,t))||{};E={...E,...a,...i},D=Fy(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!Ny(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=qm(s,n)?.transition?.delayChildren;r.delay=Em(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!eh(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Ry(),i=!0}}}function Ly(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Ny(t,e):!1}function Ry(){let e={};for(let t of J_)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var zy=(0,I.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function By(e=!0){let t=(0,I.useContext)(Fl);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,I.useId)();(0,I.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,I.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Vy=(0,I.createContext)({strict:!1}),Hy={animation:[`variants`,...J_],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Uy=!1;function Wy(){if(Uy)return;let e={};for(let t in Hy)e[t]={isEnabled:e=>Hy[t].some(t=>!!e[t])};av(e),Uy=!0}function Gy(){return Wy(),ov()}function Ky(e){let t=Gy();for(let n in e)t[n]={...t[n],...e[n]};av(t)}var qy=(0,I.createContext)({});function Jy(e,t){if(X_(e)){let{initial:t,animate:n}=e;return{initial:t===!1||q_(t)?t:void 0,animate:q_(n)?n:void 0}}return e.inherit===!1?{}:t}function Yy(e){let{initial:t,animate:n}=Jy(e,(0,I.useContext)(qy));return(0,I.useMemo)(()=>({initial:t,animate:n}),[Xy(t),Xy(n)])}function Xy(e){return Array.isArray(e)?e.join(` `):e}var Zy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qy(e,t,n){for(let r in t)!eh(t[r])&&!uv(r,n)&&(e[r]=t[r])}function $y({transformTemplate:e},t){return(0,I.useMemo)(()=>{let n=Zy();return Eh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function eb(e,t){let n=e.style||{},r={};return Qy(r,n,e),Object.assign(r,$y(e,t)),r}function tb(e,t){let n={},r=eb(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var nb=()=>({...Zy(),attrs:{}});function rb(e,t,n,r){let i=(0,I.useMemo)(()=>{let n=nb();return jh(n,t,ky(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return Qy(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var ib=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function ab(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||ib.has(e)}function ob(e,t){return e.startsWith(`on`)?!ab(e):t?.(e)??!ab(e)}function sb(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||eh(e[a])||(ob(a,r)||n===!0&&ab(a)||!t&&!ab(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var cb=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function lb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(cb.indexOf(e)>-1||/[A-Z]/u.test(e))}function ub(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??lb(e)?rb:tb)(t,r,i,e),l=sb(t,typeof e==`string`,a,s),u=e===I.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,I.useMemo)(()=>eh(d)?d.get():d,[d]);return(0,I.createElement)(e,{...u,children:f})}function db({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:fb(n,r,i,e),renderState:t()}}function fb(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=cg(a[e]);let{initial:o,animate:s}=e,c=X_(e),l=Z_(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!K_(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Km(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var pb=e=>(t,n)=>{let r=(0,I.useContext)(qy),i=(0,I.useContext)(Fl),a=()=>db(e,t,r,i);return n?a():Nl(a)},mb=pb({scrapeMotionValuesFromProps:dv,createRenderState:Zy}),hb=pb({scrapeMotionValuesFromProps:jy,createRenderState:nb}),gb=Symbol.for(`motionComponentSymbol`);function _b(e,t,n){let r=(0,I.useRef)(n);(0,I.useInsertionEffect)(()=>{r.current=n});let i=(0,I.useRef)(null);return(0,I.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var vb=(0,I.createContext)({});function yb(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function bb(e,t,n,r,i,a){let{visualElement:o}=(0,I.useContext)(qy),s=(0,I.useContext)(Vy),c=(0,I.useContext)(Fl),l=(0,I.useContext)(zy),u=l.reducedMotion,d=l.skipAnimations,f=(0,I.useRef)(null),p=(0,I.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,I.useContext)(vb);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&xb(f.current,n,i,h),(0,I.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[rh],_=(0,I.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Pl(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),Pl(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,I.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function xb(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t,f=e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Sb(e.parent));f.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&yb(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u});let p=f.getStack()?.lead;p&&!f.root.isUpdateBlocked()&&(p.willUpdate(),p.scheduleCheckAfterUnmount())}function Sb(e){if(e)return e.options.allowProjection===!1?Sb(e.parent):e.projection}function Cb(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Ky(r);let a=n?n===`svg`:lb(e),o=a?hb:mb;function s(n,s){let c,l=wb(n);Nl(()=>!!U_.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,I.useContext)(zy),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=Yy(n),m=o(n,d);if(!d&&typeof window<`u`){Tb(u,r);let t=Eb(u);p.visualElement=bb(e,m,u,i,t.ProjectionNode,a),(t.isEnabled||p.visualElement?.projection?.options.layoutId)&&(c=t.MeasureLayout)}return(0,K.jsxs)(qy.Provider,{value:p,children:[c&&p.visualElement?(0,K.jsx)(c,{visualElement:p.visualElement,...u}):null,ub(e,n,_b(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,I.forwardRef)(s);return c[gb]=e,c}function wb({layoutId:e}){let t=(0,I.useContext)(Ml).id;return t&&e!==void 0?t+`-`+e:e}function Tb(e,t){(0,I.useContext)(Vy).strict}function Eb(e){let{drag:t,layout:n}=Gy();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function Db(e,t){if(typeof Proxy>`u`)return Cb;let n=new Map,r=(n,r)=>Cb(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Cb(a,void 0,e,t)),n.get(a))})}var Ob=(e,t)=>t.isSVG??lb(e)?new My(t):new pv(t,{allowProjection:e!==I.Fragment}),kb=class extends Dy{constructor(e){super(e),e.animationState||=Iy(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();K_(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Ab=0,jb={animation:{Feature:kb},exit:{Feature:class extends Dy{constructor(){super(...arguments),this.id=Ab++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=qm(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},Mb=class extends Dy{constructor(e){super(e),this.removeGroupControls=Wl,this.removeListeners=Wl,this.controls=new ly(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wl}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Nb=e=>(t,n)=>{e&&Id.update(()=>e(t,n),!1,!0)},Pb=class extends Dy{constructor(){super(...arguments),this.removePointerDownListener=Wl}onPointerDown(e){this.session=new Fv(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Nb(e),onStart:Nb(t),onMove:Nb(n),onEnd:(e,t)=>{delete this.session,r&&Id.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=_v(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},Fb=!1,Ib=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),Lb=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},Rb=class extends I.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),Fb&&i.root.didUpdate(),i.options.layoutId!==r&&Lb(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...Ib(this.props),onExitComplete:()=>this.safeToRemove()})),i_.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),Lb(o,n)),o.setOptions({...o.options,...Ib(this.props)}),Fb=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Id.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),tg.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Fb=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function zb(e){let[t,n]=By(),r=(0,I.useContext)(Ml);return(0,K.jsx)(Rb,{...e,layoutGroup:r,switchLayoutGroup:(0,I.useContext)(vb),isPresent:t,safeToRemove:n})}var Bb={pan:{Feature:Pb},drag:{Feature:Mb,ProjectionNode:W_,MeasureLayout:zb}};function Vb(e,t,n,r){let{props:i}=e,a=`while`+n;e.animationState&&i[a]&&e.animationState.setActive(a,r===`Start`);let o=i[`on`+n+r];o&&Id.postRender(()=>o(t,hv(t)))}var Hb=class extends Dy{mount(){let{current:e}=this.node;e&&(this.unmount=vy(e,(e,t)=>(Vb(this.node,t,`Hover`,`Start`),e=>Vb(this.node,e,`Hover`,`End`))))}unmount(){}},Ub=class extends Dy{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Gl(V_(this.node.current,`focus`,()=>this.onFocus()),V_(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Wb(e,t,n){e.current instanceof HTMLButtonElement&&e.current.disabled||Vb(e,t,`Tap`,n)}var Gb=class extends Dy{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ey(e,(e,t)=>(Wb(this.node,t,`Start`),(e,{success:t})=>Wb(this.node,e,t?``:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Kb=new WeakMap,qb=new WeakMap,Jb=e=>{let t=Kb.get(e.target);t&&t(e)},Yb=e=>{e.forEach(Jb)};function Xb({root:e,...t}){let n=e||document;qb.has(n)||qb.set(n,{});let r=qb.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Yb,{root:e,...t})),r[i]}function Zb(e,t,n){let r=Xb(t);return Kb.set(e,n),r.observe(e),()=>{Kb.delete(e),r.unobserve(e)}}var Qb={some:0,all:1},$b=class extends Dy{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Qb[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Zb(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(ex(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function ex({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var tx=Db(Object.assign({},jb,{inView:{Feature:$b},tap:{Feature:Gb},focus:{Feature:Ub},hover:{Feature:Hb}},Bb,{layout:{ProjectionNode:W_,MeasureLayout:zb}}),Ob);function nx(){!ev.current&&nv();let[e]=(0,I.useState)($_.current);return e}var rx={some:0,all:1};function ix(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=wh(e);t=Ch(t);let o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let n=o.get(e.target);if(e.isIntersecting!==!!n){if(e.isIntersecting){let n=t(e.target,e);typeof n==`function`?o.set(e.target,n):s.unobserve(e.target)}else typeof n==`function`&&(n(e),o.delete(e.target))}})},{root:n,rootMargin:r,threshold:typeof i==`number`?i:rx[i]});return a.forEach(e=>s.observe(e)),Sh(()=>s.disconnect())}function ax(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,s]=(0,I.useState)(a),[c,l]=(0,I.useState)({});return(0,I.useEffect)(()=>{let a=c.current=e.current;return!a||i&&o?void 0:ix(a,()=>(s(!0),i?void 0:()=>s(!1)),{root:t&&t.current||void 0,margin:n,amount:r})},[t,e,n,i,r,c]),(0,I.useEffect)(()=>{e.current!==c.current&&(i||s(!1),l({}))}),o}var ox=tx,sx={task:`任務`,reply:`回覆`,done:`完成回報`,ask:`提問`,failure:`失敗`};function cx({mail:e}){let t=e.digest?.length?e.digest:e.brief?[{label:`摘要`,lines:[e.brief]}]:[];return(0,K.jsxs)(`article`,{className:`mt-3 rounded-lg border border-line bg-paper px-3 py-2`,children:[(0,K.jsxs)(`p`,{className:`eyebrow`,children:[sx[e.type]??e.type,`,來自 `,e.from]}),(0,K.jsx)(`p`,{className:`text-pretty mt-1 text-base font-semibold leading-snug`,children:e.subject}),e.held&&(0,K.jsx)(`p`,{className:`text-pretty mt-1 text-sm text-ink/70`,children:`這封在等空閒的實例。`}),t.length>0&&(0,K.jsx)(`dl`,{className:`mt-3`,children:t.map(e=>(0,K.jsxs)(`div`,{className:`mt-2 flex gap-3 first:mt-0`,children:[(0,K.jsx)(`dt`,{className:`w-16 shrink-0 sm:w-20 text-pretty text-xs text-ink/60`,children:e.label}),(0,K.jsx)(`dd`,{className:`min-w-0`,children:e.lines.map((e,t)=>(0,K.jsx)(`p`,{className:`text-pretty text-sm leading-relaxed`,children:e},`${t}-${e}`))})]},e.label))})]})}var lx={completed:`完成`,partial:`部分完成`,blocked:`受阻`,failed:`失敗`,cancelled:`已取消`,waiting:`等待回答`};function ux(e){let t=[],n=/"message"\s*:\s*"((?:\\.|[^"\\])*)"/g,r;for(;r=n.exec(e);){let e=r[1];e!==void 0&&t.push(e.replace(/\\n/g,` `).replace(/\\"/g,`"`).replace(/\\\\/g,`\\`))}let i=(t.at(-1)??e.split(/\n\s*\n/).find(e=>e.trim())??e).replace(/\s+/g,` `).trim();return i.length>280?`${i.slice(0,279)}…`:i}function dx(e){let t=e.match(/^(\S+) attempt (\d+) failed \(/);if(!t)return{head:``,body:e.trim()};let n=e.slice(t[0].length).replace(/\)(?:; [\s\S]*)?\.?\s*$/,``).trim();return{head:`${t[1]} 第 ${t[2]} 次失敗`,body:n}}function fx(e){return e.map(e=>{let t=e.match(/^(#{1,6})\s+(.*)$/),n=t?.[1];if(t&&n){let e=(t[2]??``).replace(/\*\*/g,``).trim();return{kind:n.length===1?`title`:`label`,text:e}}let r=e.match(/^\*\*([^*]+):\*\*\s*(.*)$/),i=r?.[1];if(r&&i){let e=r[2]??``;return{kind:`fact`,text:i.trim(),extra:lx[e.trim().toLowerCase()]??e.trim()}}return{kind:`text`,text:e.replace(/\*\*/g,``).replace(/`/g,``).trim()}})}var px={completed:`完成`,partial:`部分完成`,blocked:`受阻`,failed:`失敗`,waiting:`等待回答`,cancelled:`已取消`};function mx(e){return e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(1)}k`:`${(e/1e6).toFixed(1)}M`}function hx(e){return e.state===`running`?`執行中`:e.state===`interrupted`?`已中斷`:e.outcome_verified?px[e.outcome??``]??e.outcome??`結束`:e.end_reason===`done`?`完成(未驗證)`:`結束:${e.end_reason===`waiting`?`等待回答`:e.end_reason??`?`}`}function gx(e){return e.state!==`ended`||e.outcome!==`completed`}function _x(e){let t=e.steps??[];return t.length?`${t.filter(e=>e.done).length}/${t.length} 步`:`已用 ${e.rounds} 輪`}function vx(e){return e.instance!==void 0&&e.instance>=2&&e.role?`${e.role} #${e.instance}`:e.name}function yx(e){let t=Object.values(e.runs??{});return(t.length>0?t:e.report?[e.report]:[]).filter(e=>e.run).sort((e,t)=>Sx(t)-Sx(e))}function bx(e){let t=yx(e);return t.find(e=>e.run?.state===`running`)??t.find(e=>e.run&&gx(e.run))??t[0]}function xx(e){if(!e||e.error)return-1/0;let t=yx(e)[0];return t?Sx(t):-1/0}function Sx(e){let t=Date.parse(e.run?.started_at??``);return Number.isFinite(t)?t:-1/0}function Cx(e,t){let n=e+t;return n<=0?``:`快取 讀 ${mx(e)} 寫 ${mx(t)} 命中 ${Math.round(100*e/n)}%`}function wx(e,t){let n=t-Date.parse(e);if(!Number.isFinite(n)||n<0)return``;let r=Math.floor(n/1e3);return r<60?`${r}s`:`${Math.floor(r/60)}m${String(r%60).padStart(2,`0`)}s`}function Tx(e,t){if(e.state===`running`)return wx(e.started_at,t)||`0s`;let n=Ex(e);return n===void 0?`0s`:wx(e.started_at,n)||`0s`}function Ex(e){let t=Date.parse(e.ended_at??``);if(Number.isFinite(t))return t;let n=-1/0;for(let t of e.wakes??[]){let e=Date.parse(t.at);Number.isFinite(e)&&e>n&&(n=e)}return n===-1/0?void 0:n}function Dx(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function Ox(e,t,n){if(!e)return null;let r=[];for(let t of e.wakes){let e=Date.parse(t.at);if(!Number.isFinite(e))continue;let n=e+Math.max(0,t.duration_ms);r.push({agent:t.agent,start:e,end:n,ok:t.ok,live:!1,title:kx(t),lines:Ax(t)})}if(e.state===`running`)for(let[t,i]of Object.entries(e.active)){let e=Date.parse(i.since);if(!Number.isFinite(e))continue;let a=`${t} 第 ${i.round??`?`} 輪,進行中 ${wx(i.since,n)}`;r.push({agent:t,start:e,end:Math.max(n,e),ok:!0,live:!0,title:a,lines:[a]})}if(!r.length)return null;let i=Math.min(...r.map(e=>e.start)),a=Math.max(...r.map(e=>e.end),i+1),o=a-i,s=[...new Set([...t.map(e=>e.name),...r.map(e=>e.agent)])],c=new Set(t.filter(e=>e.lead).map(e=>e.name));return s.sort((e,t)=>Number(c.has(t))-Number(c.has(e))||e.localeCompare(t)),{start:i,end:a,lanes:s.map(e=>({agent:e,bars:r.filter(t=>t.agent===e).map(e=>({x:(e.start-i)/o*1e3,width:Math.max(4,(e.end-e.start)/o*1e3),ok:e.ok,live:e.live,title:e.title,lines:e.lines}))})).filter(e=>e.bars.length>0)}}function kx(e){return Ax(e).join(`,`)}function Ax(e){let t=[`${e.agent} 第 ${e.round} 輪,${e.ok?`成功`:`失敗`},${Math.round(e.duration_ms/1e3)}s`];return e.output_tokens&&t.push(`${mx(e.output_tokens)} token`),e.model&&t.push([e.runtime,e.model].filter(Boolean).join(`/`)),e.error&&t.push(e.error),t}function jx(e,t=6){let n=[];for(let r of[...e?.wakes??[]].reverse())for(let e of[...r.sent??[]].reverse())if(n.push({from:r.agent,to:e.to,type:e.type,subject:e.subject}),n.length>=t)return n;return n}function Mx(e){let t=new Map;for(let n of e?.wakes??[]){let e=t.get(n.agent)??{agent:n.agent,output:0,cacheRead:0,cacheWrite:0,failed:0};e.output+=n.output_tokens??0,e.cacheRead+=n.cache_read_tokens??0,e.cacheWrite+=n.cache_write_tokens??0,n.ok||(e.failed+=1),t.set(n.agent,e)}return[...t.values()].sort((e,t)=>t.output-e.output)}function Nx(e,t){return t?.state===`running`?t.active[e.name]?`active`:e.last_wake?.ok===!1?`failed`:(t.queue??[]).some(t=>t.agent===e.name)?`queued`:`idle`:`idle`}var Px={active:0,failed:1,queued:2,idle:3};function Fx(e,t){let n=e.filter(e=>e.lead),r=e.filter(e=>!e.lead).sort((e,n)=>Px[Nx(e,t)]-Px[Nx(n,t)]);return[...n,...r]}function Ix(e,t){return t?.state===`running`?e.filter(e=>Nx(e,t)===`active`).sort((e,n)=>(t.active[n.name]?.since??``).localeCompare(t.active[e.name]?.since??``)||e.name.localeCompare(n.name)):[]}function Lx(e){for(let t of[...e?.wakes??[]].reverse()){let e=[...t.sent??[]].reverse().find(e=>e.to!==`(done)`)?.to;if(e)return{from:t.agent,to:e}}}function Rx(e,t,n){let r=(e.can_message??[]).includes(t.name),i=(t.can_message??[]).includes(e.name);if(!r&&!i)return;let a=!!n&&(n.from===e.name&&n.to===t.name||n.from===t.name&&n.to===e.name);return{glyph:r&&i?`↕`:r?`▼`:`▲`,hot:a}}function zx({agents:e,run:t,now:n}){let r=Fx(e,t),i=r.find(e=>e.lead),a=r.filter(e=>!e.lead),o=Lx(t),s=jx(t),c=t?.state===`running`;return(0,K.jsxs)(`section`,{className:`panel p-3 sm:p-4`,children:[(0,K.jsx)(`h2`,{className:`text-balance text-base font-semibold`,children:`隊伍`}),r.length===0?(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`沒有 agent。`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`p`,{className:`text-pretty mt-2 text-sm text-ink/70`,children:[`連線是誰可以傳話給誰。▼ 往下,▲ 往上,↕ 雙方。`,c?`會移動的是最近一次交接。`:``]}),(0,K.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[i&&(0,K.jsx)(Hx,{agent:i,run:t,now:n}),a.length>0&&(0,K.jsx)(`ul`,{className:`mt-2 list-none space-y-2 border-l border-line p-0`,children:a.map(e=>{let r=i?Rx(i,e,o):void 0;return(0,K.jsxs)(`li`,{className:`relative pt-0 pl-8`,children:[r&&i?(0,K.jsx)(Bx,{glyph:r.glyph,hot:r.hot,live:c,title:qx(i,e,r)}):(0,K.jsx)(`div`,{className:`h-2`}),(0,K.jsx)(Hx,{agent:e,run:t,now:n})]},e.name)})})]})]}),s.length>0&&(0,K.jsx)(`ol`,{className:`mt-6 grid gap-3 text-sm md:grid-cols-2 xl:grid-cols-3`,children:s.map(e=>(0,K.jsxs)(`li`,{className:`rounded-lg border border-line bg-wall/50 px-3 py-2`,children:[(0,K.jsx)(`p`,{className:`eyebrow`,children:e.to===`(done)`?`${e.from} 結束`:`${e.from} 給 ${e.to}`}),(0,K.jsx)(`p`,{className:`text-pretty mt-0.5 leading-snug`,children:e.subject})]},`${e.from}-${e.to}-${e.subject}`))})]})}function Bx({glyph:e,hot:t,live:n,title:r}){let i=nx(),a=(0,I.useRef)(null),o=ax(a,{amount:.5}),s=n&&!i&&o,c=s&&t;return(0,K.jsxs)(`div`,{ref:a,title:r,className:`absolute top-3 -left-8 flex size-8 items-center justify-center`,children:[n&&e!==`▲`&&(0,K.jsx)(Vx,{y:[0,18],hot:t,play:s}),n&&e!==`▼`&&(0,K.jsx)(Vx,{y:[18,0],hot:t,play:s}),(0,K.jsx)(ox.span,{className:G(`relative text-sm`,c?`text-signal`:`text-ink/50`),animate:c?{y:e===`▲`?[0,-3,0]:[0,3,0]}:{y:0},transition:c?{duration:.85,repeat:1/0,ease:`easeOut`}:{duration:.2,ease:`easeOut`},children:e})]})}function Vx({y:e,hot:t,play:n}){return(0,K.jsx)(ox.span,{"aria-hidden":!0,className:G(`absolute left-1/2 size-1.5 -translate-x-1/2 rounded-full`,t?`bg-signal`:`bg-ink/30`),initial:!1,animate:n?{y:e,opacity:[0,1,0]}:{y:(e[0]+e[1])/2,opacity:t?.85:.35},transition:n?{duration:t?1.1:2.8,repeat:1/0,ease:`linear`}:{duration:.2,ease:`easeOut`}})}function Hx({agent:e,run:t,now:n}){let r=Nx(e,t),i=r===`active`,a=t?.state===`running`?t.active[e.name]:void 0,o=r===`queued`?(t?.queue??[]).filter(t=>t.agent===e.name).length:0,s=(t?.wakes??[]).filter(t=>t.agent===e.name),c=s.filter(e=>!e.ok).length,l=s.reduce((e,t)=>e+(t.output_tokens??0),0),u=Wx(e,t,r);return(0,K.jsxs)(ol,{defaultOpen:i,className:G(`group rounded-lg border bg-wall/50 px-3`,i?`border-signal/60 bg-signal-soft/40`:`border-line`),children:[(0,K.jsxs)(cl,{className:`flex w-full items-baseline gap-3 py-3 text-left`,children:[(0,K.jsx)(`strong`,{className:G(`min-w-0 flex-1`,i?`text-balance text-base`:`truncate text-sm text-ink/80`),children:vx(e)}),(0,K.jsx)(`span`,{className:G(`shrink-0 font-mono text-xs tabular-nums`,Kx(r)),children:Gx(r,a?.round,a?wx(a.since,n):``,o)}),(0,K.jsx)(`span`,{className:`shrink-0 text-sm text-ink/60 group-data-[open]:hidden`,children:`展開`}),(0,K.jsx)(`span`,{className:`hidden shrink-0 text-sm text-ink/60 group-data-[open]:inline`,children:`收合`})]}),(0,K.jsxs)(jl,{className:`pb-4 text-sm`,children:[(0,K.jsxs)(`dl`,{className:`mt-1 grid gap-x-8 gap-y-1 sm:grid-cols-2 xl:grid-cols-3`,children:[(0,K.jsx)(Ux,{label:`執行`,value:`${e.lead?`帶隊,`:``}${e.runtime??`?`}`}),(e.model||e.fallback)&&(0,K.jsx)(Ux,{label:`模型`,value:e.fallback?`備援中 ${e.model??``}`:e.model??``}),(0,K.jsx)(Ux,{label:`token`,value:mx(l)}),(0,K.jsx)(Ux,{label:`喚醒`,value:`${s.length} 次${c>0?`,失敗 ${c}`:``}`}),e.unread>0&&(0,K.jsx)(Ux,{label:`未看`,value:String(e.unread)}),(0,K.jsxs)(`div`,{className:`flex gap-3 sm:col-span-2 xl:col-span-3`,children:[(0,K.jsx)(`dt`,{className:`w-16 shrink-0 sm:w-20 text-ink/60`,children:`可傳話給`}),(0,K.jsx)(`dd`,{className:`flex min-w-0 flex-wrap gap-x-3 gap-y-1`,children:(e.can_message??[]).length>0?(e.can_message??[]).map(e=>(0,K.jsx)(`span`,{children:e},e)):`沒有人`})]})]}),r===`failed`&&e.last_wake?.error&&(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm leading-relaxed text-failed`,children:ux(e.last_wake.error)}),u.length>0&&(0,K.jsx)(`div`,{className:`flex flex-col`,children:u.map((e,t)=>(0,K.jsx)(cx,{mail:e},`${t}-${e.from}-${e.subject}`))})]})]},i?`${e.name}:on`:e.name)}function Ux({label:e,value:t}){return(0,K.jsxs)(`div`,{className:`flex gap-3`,children:[(0,K.jsx)(`dt`,{className:`w-16 shrink-0 sm:w-20 text-ink/60`,children:e}),(0,K.jsx)(`dd`,{className:`min-w-0 text-pretty tabular-nums`,children:t})]})}function Wx(e,t,n){return t?n===`active`?t.active[e.name]?.handling??[]:n===`queued`?(t.queue??[]).filter(t=>t.agent===e.name):[]:[]}function Gx(e,t,n,r){return e===`active`?`進行中${t?` #${t}`:``} ${n}`.trim():e===`failed`?`上次喚醒失敗`:e===`queued`?`排隊 ${r} 封`:`閒置`}function Kx(e){return e===`active`?`text-working`:e===`failed`?`text-failed`:`text-ink/60`}function qx(e,t,n){let r=n.glyph===`▼`?`${e.name} 可傳給 ${t.name}`:n.glyph===`▲`?`${t.name} 可傳給 ${e.name}`:`${e.name} 與 ${t.name} 可互傳`;return n.hot?`${r},最近一次交接`:r}function Jx({open:e,title:t,onClose:n,closable:r=!0,wide:i=!1,children:a}){let o=(0,I.useRef)(null),s=(0,I.useId)(),c=(0,I.useRef)(e);c.current=e;let l=(0,I.useRef)(r);l.current=r;let u=(0,I.useRef)(null);return(0,I.useEffect)(()=>{let t=o.current;t&&(e&&!t.open&&(u.current=document.activeElement instanceof HTMLElement?document.activeElement:null,t.showModal()),!e&&t.open&&t.close())},[e]),(0,I.useEffect)(()=>()=>{let e=u.current;c.current&&e?.isConnected&&queueMicrotask(()=>e.focus())},[]),(0,K.jsx)(`dialog`,{ref:o,"aria-labelledby":s,onCancel:e=>{r||e.preventDefault()},onClose:e=>{if(c.current){if(l.current)n();else{let t=e.currentTarget;t.open||t.showModal()}}},className:`m-auto ${i?`w-[min(56rem,calc(100vw-2rem))]`:`w-[min(38rem,calc(100vw-2rem))]`} max-h-[90dvh] overflow-y-auto rounded-xl border border-line bg-paper p-0 text-ink backdrop:bg-black/40`,children:e&&(0,K.jsxs)(`div`,{className:`p-4 sm:p-6`,children:[(0,K.jsx)(`h2`,{id:s,className:`text-balance text-xl font-semibold tracking-tight`,children:t}),a]})})}var Yx=`min-h-11 w-full rounded-lg border border-line bg-wall px-3 py-2 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,Xx=`min-h-11 rounded-lg border border-line px-4 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal disabled:opacity-50`;function Zx({project:e,runId:t,open:n,onClose:r}){let[i,a]=(0,I.useState)(),[o,s]=(0,I.useState)({}),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1),[f,p]=(0,I.useState)([]),[m,h]=(0,I.useState)();(0,I.useEffect)(()=>{if(!n)return;let r=!0;return a(void 0),s({}),l(!1),p([]),h(void 0),d(!1),Qn(e,t).then(e=>{r&&(a(e??`missing`),e&&s(Object.fromEntries(e.questions.filter(e=>!e.delivered&&e.answer).map(e=>[e.id,e.answer]))))}),()=>{r=!1}},[n,e,t]);let g=async()=>{if(u)return;d(!0),p([]);let n=await $n(e,t,o,c);n?n.complete?h(await qn(`resume`,{project:e,run:t,answer:!0})):p(n.problems):p([`沒能存下答案,請重新整理頁面再試。`]),d(!1)},_=i&&i!==`missing`?i.questions.filter(e=>!e.delivered):[],v=m?.kind===`short`?rs(m.result.exit,m.result.timedOut):void 0;return(0,K.jsxs)(Jx,{open:n,title:`回答問題`,onClose:r,closable:!u,children:[i===void 0&&(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(hc,{label:`正在讀取問題…`}),(0,K.jsxs)(`div`,{className:`mt-3 space-y-2`,"aria-hidden":`true`,children:[(0,K.jsx)(`div`,{className:`h-3 w-full motion-safe:animate-pulse rounded bg-line`}),(0,K.jsx)(`div`,{className:`h-3 w-4/5 motion-safe:animate-pulse rounded bg-line`}),(0,K.jsx)(`div`,{className:`h-3 w-3/5 motion-safe:animate-pulse rounded bg-line`})]})]}),i===`missing`&&(0,K.jsx)(`p`,{className:`mt-4 text-sm`,children:`這次任務現在沒有待回答的問題。`}),m?(0,K.jsxs)(`div`,{className:`mt-4 flex flex-col gap-3`,children:[m.kind===`job`?(0,K.jsxs)(`p`,{className:`text-sm`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:`mr-1 text-signal`,children:`✓`}),`答案已送出,任務在背景繼續。`]}):m.kind===`short`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`p`,{className:G(`text-sm font-medium`,v?.tone===`ok`?`text-signal`:v?.tone===`warn`?`text-warn`:`text-failed`),children:[v?.text,m.result.signal?(0,K.jsxs)(`span`,{className:`ml-2 font-mono text-xs`,children:[`(訊號 `,m.result.signal,`)`]}):null]}),(0,K.jsx)(`pre`,{className:`max-h-60 overflow-auto rounded-lg border border-line bg-wall p-3 font-mono text-xs whitespace-pre-wrap`,children:m.result.stdout||m.result.stderr})]}):(0,K.jsx)(`p`,{role:`alert`,className:`text-pretty text-sm text-failed`,children:m.kind===`error`?m.message:m.kind===`invalid`?m.error:`請求被拒絕,請重新整理頁面後再試。`}),(0,K.jsx)(`div`,{className:`flex justify-end`,children:(0,K.jsx)(`button`,{type:`button`,autoFocus:!0,className:G(Xx,`bg-ink text-paper`),onClick:r,children:`關閉`})})]}):_.length>0&&(0,K.jsxs)(`form`,{className:`mt-4 flex flex-col gap-5`,onSubmit:e=>{e.preventDefault(),g()},children:[_.map((e,t)=>(0,K.jsx)(Qx,{q:e,value:o[e.id]??``,autoFocus:t===0,onChange:t=>s(n=>({...n,[e.id]:t}))},e.id)),(0,K.jsxs)(`label`,{className:`flex min-h-11 items-center gap-3 text-sm`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`size-5`,checked:c,onChange:e=>l(e.target.checked)}),(0,K.jsx)(`span`,{children:`沒填的問題,有建議值就採用建議值`})]}),f.length>0&&(0,K.jsx)(`ul`,{role:`alert`,className:`rounded-lg border border-failed/40 bg-failed-soft px-3 py-2 text-sm text-failed`,children:f.map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,disabled:u,className:Xx,onClick:r,children:`取消`}),(0,K.jsx)(`button`,{type:`submit`,disabled:u,className:G(Xx,`bg-ink text-paper`),children:u?`送出中…`:`送出並繼續任務`})]})]}),(i===`missing`||i!==void 0&&!m&&_.length===0)&&(0,K.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,K.jsx)(`button`,{type:`button`,className:Xx,onClick:r,children:`關閉`})})]})}function Qx({q:e,value:t,autoFocus:n,onChange:r}){let i=(0,I.useId)();return(0,K.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,K.jsxs)(`legend`,{className:`text-pretty text-sm font-medium`,children:[e.text,` `,(0,K.jsxs)(`span`,{className:`font-mono text-xs text-ink/60`,children:[`(`,e.asker,`)`]})]}),e.options?.map(e=>(0,K.jsxs)(`label`,{className:`flex min-h-11 items-center gap-3 text-sm`,children:[(0,K.jsx)(`input`,{type:`radio`,name:i,className:`size-5`,checked:t===e,onChange:()=>r(e)}),(0,K.jsx)(`span`,{className:`text-pretty`,children:e})]},e)),(0,K.jsx)(`label`,{htmlFor:`${i}-text`,className:`text-xs text-ink/60`,children:e.options?.length?`或自己寫`:`你的答案`}),(0,K.jsx)(`input`,{id:`${i}-text`,className:Yx,value:t,autoFocus:n,autoComplete:`off`,onChange:e=>r(e.target.value)}),e.suggested&&(0,K.jsxs)(`button`,{type:`button`,className:`min-h-11 self-start rounded-lg px-1 text-left text-sm underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,onClick:()=>r(e.suggested?.value??``),children:[`採用建議:`,e.suggested.value,e.suggested.reason?`(${e.suggested.reason})`:``]})]})}var $x=`min-h-11 rounded-lg border border-line bg-paper px-3 text-sm hover:bg-wall focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,eS={result:`最終結果`,done:`完成回報`,agent:`Agent 報告`};function tS(e){let t=e?new Date(e):void 0;return!t||Number.isNaN(t.getTime())?``:t.toLocaleString(`zh-Hant`,{month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function nS({project:e,runId:t,open:n,onClose:r}){let[i,a]=(0,I.useState)(),[o,s]=(0,I.useState)();(0,I.useEffect)(()=>{if(!n)return;a(void 0),s(void 0);let r=!0;return er(e,t).then(e=>r&&a(e??`error`)),()=>{r=!1}},[n,e,t]);let c=n=>{s(`loading`),tr(e,t,n).then(e=>s(e??`error`))},l=(0,I.useMemo)(()=>o&&typeof o==`object`?Zo(o.markdown):``,[o]),u=o&&typeof o==`object`?o.title:`報告`;return(0,K.jsxs)(Jx,{open:n,title:u,onClose:r,wide:!0,children:[o===void 0?(0,K.jsx)(rS,{items:i,onPick:c}):(0,K.jsxs)(`div`,{className:`mt-3`,children:[(0,K.jsx)(`button`,{type:`button`,className:$x,onClick:()=>s(void 0),children:`← 回到列表`}),o===`loading`&&(0,K.jsx)(`p`,{className:`mt-4 text-sm`,children:`載入中…`}),o===`error`&&(0,K.jsx)(`p`,{className:`mt-4 text-sm text-failed`,children:`讀不到這份報告。`}),typeof o==`object`&&(0,K.jsx)(`article`,{className:`report-prose mt-4`,dangerouslySetInnerHTML:{__html:l}})]}),(0,K.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,K.jsx)(`button`,{type:`button`,className:$x,onClick:r,children:`關閉`})})]})}function rS({items:e,onPick:t}){return e===void 0?(0,K.jsx)(`p`,{className:`mt-4 text-sm`,children:`載入中…`}):e===`error`?(0,K.jsx)(`p`,{className:`mt-4 text-sm text-failed`,children:`讀不到報告列表。`}):e.length===0?(0,K.jsx)(`p`,{className:`mt-4 text-sm`,children:`這次任務還沒有報告。`}):(0,K.jsx)(`ul`,{className:`mt-4 flex flex-col gap-2`,children:e.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(`button`,{type:`button`,className:`${$x} block w-full py-2 text-left`,onClick:()=>t(e.id),children:[(0,K.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3 font-mono text-xs tabular-nums text-ink/70`,children:[(0,K.jsx)(`span`,{children:e.agent?`${eS[e.kind]}・${e.agent}`:eS[e.kind]}),(0,K.jsx)(`span`,{children:tS(e.created)})]}),(0,K.jsx)(`span`,{className:`text-pretty mt-1 block text-sm font-medium`,children:e.title}),e.outcome&&(0,K.jsx)(`span`,{className:`mt-0.5 block text-xs text-ink/60`,children:e.outcome})]})},e.id))})}var iS=class extends Error{field;constructor(e,t){super(t),this.field=e}},aS=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,oS=/^[a-z0-9-]{1,30}$/,sS=/^(\/|~\/|[A-Za-z]:[\\/])/,cS=[`claude-code`,`codex`],lS=[`project`,`global`],uS=2e5;function dS(e,t,n){let r=e[t];if(r==null||typeof r==`string`&&r.trim()===``){if(n.required)throw new iS(t,`${n.what}必填。`);return}if(typeof r!=`string`)throw new iS(t,`${n.what}格式不對。`);let i=r.trim();if(i.includes(`\0`))throw new iS(t,`${n.what}含有不能用的字元。`);if(i.length>(n.max??256))throw new iS(t,`${n.what}太長。`);if(n.re&&!n.re.test(i))throw new iS(t,`${n.what}格式不對。`);return i}function fS(e,t){let n=e[t];if(n==null||n===!1)return!1;if(n!==!0)throw new iS(t,`這個選項只能是勾選或不勾選。`);return!0}var pS=e=>e,mS=e=>pS(dS(e,`project`,{required:!0,re:aS,what:`專案`})),hS=(e,t,n,r)=>{let i=dS(e,t,{what:r});if(i!==void 0&&!n.includes(i))throw new iS(t,`${r}只能是 ${n.join(`、`)}。`);return i},gS={name:`project`,label:`專案`,kind:`text`,required:!0},_S=e=>()=>e,vS=()=>`normal`,yS=()=>``,bS={init:{id:`init`,label:`初始化 home`,scope:`home`,fields:[],mode:_S(`short`),tier:vS,target:yS,argv:()=>[`init`,`-y`]},"project.list":{id:`project.list`,label:`列出專案`,scope:`home`,fields:[],mode:_S(`short`),tier:vS,target:yS,argv:()=>[`project`]},"project.add":{id:`project.add`,label:`註冊專案`,scope:`home`,fields:[{name:`name`,label:`專案名稱`,kind:`text`,required:!0},{name:`dir`,label:`repo 的絕對路徑`,kind:`text`,required:!0,help:`agent 會在這個資料夾工作。`}],mode:_S(`short`),tier:vS,target:yS,argv:e=>{let t=pS(dS(e,`name`,{required:!0,re:aS,what:`專案名稱`})),n=pS(dS(e,`dir`,{required:!0,re:sS,what:`路徑`,max:1024}));if(n.startsWith(`~`))throw new iS(`dir`,`路徑請用絕對路徑,不支援 ~。`);return[`project`,`add`,t,`--dir`,n]}},"project.remove":{id:`project.remove`,label:`移除專案`,scope:`home`,fields:[{name:`name`,label:`專案名稱`,kind:`text`,required:!0},{name:`purge`,label:`連這個專案的所有 context 一起刪除`,kind:`checkbox`}],mode:_S(`short`),tier:e=>e.purge===!0?`typed`:`confirm`,target:e=>String(e.name??``),argv:e=>[`project`,`remove`,pS(dS(e,`name`,{required:!0,re:aS,what:`專案名稱`})),...fS(e,`purge`)?[`--purge`]:[]]},run:{id:`run`,label:`新任務`,scope:`project`,fields:[gS,{name:`task`,label:`任務`,kind:`textarea`,required:!0},{name:`name`,label:`任務名稱(可留空)`,kind:`text`,help:`小寫英數與 -,最多 30 字。`},{name:`agent`,label:`只交給這一位 agent(可留空)`,kind:`text`},{name:`tidy`,label:`標記為 tidy(整理 commit 的任務)`,kind:`checkbox`},{name:`assumeDefaults`,label:`有建議值的問題直接採用,不暫停`,kind:`checkbox`}],mode:_S(`detached`),tier:vS,target:yS,argv:e=>{let t=[`run`,`-p`,mS(e)],n=dS(e,`name`,{re:oS,what:`任務名稱`});n&&t.push(`--name`,n);let r=dS(e,`agent`,{re:aS,what:`agent`});return r&&t.push(`--agent`,r),fS(e,`tidy`)&&t.push(`--tidy`),fS(e,`assumeDefaults`)&&t.push(`--assume-defaults`),t.push(`--`,pS(dS(e,`task`,{required:!0,what:`任務`,max:uS}))),t}},call:{id:`call`,label:`呼叫單一 agent`,scope:`home`,fields:[{name:`agent`,label:`agent(全域 library 裡的名稱)`,kind:`text`,required:!0},{name:`dir`,label:`工作目錄(絕對路徑)`,kind:`text`,required:!0},{name:`task`,label:`任務`,kind:`textarea`,required:!0}],mode:_S(`detached`),tier:vS,target:yS,argv:e=>[`call`,pS(dS(e,`agent`,{required:!0,re:aS,what:`agent`})),`--dir`,pS(dS(e,`dir`,{required:!0,re:sS,what:`工作目錄`,max:1024})),`--`,pS(dS(e,`task`,{required:!0,what:`任務`,max:uS}))]},resume:{id:`resume`,label:`續跑/追問`,scope:`project`,fields:[gS,{name:`run`,label:`任務 id`,kind:`text`,required:!0},{name:`followup`,label:`追問(只用在已完成的任務,可留空)`,kind:`textarea`},{name:`assumeDefaults`,label:`有建議值的問題直接採用`,kind:`checkbox`}],mode:_S(`detached`),tier:vS,target:yS,argv:e=>{let t=mS(e),n=pS(dS(e,`run`,{required:!0,re:aS,what:`任務 id`,max:120})),r=fS(e,`answer`),i=dS(e,`followup`,{what:`追問`,max:uS});if(r&&i)throw new iS(`followup`,`回答問題時不能同時追問。`);let a=[`resume`,`-p`,t];return fS(e,`assumeDefaults`)&&a.push(`--assume-defaults`),r&&a.push(`--answer`,`--no-edit`),a.push(`--`,n),i&&a.push(i),a}},clear:{id:`clear`,label:`刪除任務`,scope:`project`,fields:[gS,{name:`run`,label:`任務 id`,kind:`text`,required:!0},{name:`dryRun`,label:`只預覽,不刪除`,kind:`checkbox`},{name:`keepWorktrees`,label:`保留 agent 的 worktree 與分支`,kind:`checkbox`},{name:`tidy`,label:`刪除成功後接著整理記憶(tidy,會把保留下來的決策併入專案記錄)`,kind:`checkbox`}],mode:_S(`short`),tier:e=>e.dryRun===!0?`normal`:`confirm`,target:yS,argv:e=>{let t=mS(e),n=pS(dS(e,`run`,{required:!0,re:aS,what:`任務 id`,max:120}));return[`clear`,`-p`,t,...fS(e,`dryRun`)?[`--dry-run`]:[],...fS(e,`keepWorktrees`)?[`--keep-worktrees`]:[],`--`,n]}},"clear.lock":{id:`clear.lock`,label:`清除殘留的 run lock`,scope:`project`,fields:[gS,{name:`run`,label:`任務 id(只有一個 lock 時可留空)`,kind:`text`}],mode:_S(`short`),tier:()=>`typed`,target:e=>typeof e.run==`string`&&e.run.trim()?e.run.trim():String(e.project??``),argv:e=>{let t=mS(e),n=dS(e,`run`,{re:aS,what:`任務 id`,max:120});return[`clear`,`-p`,t,`--lock`,`--force`,...n?[`--`,n]:[]]}},doctor:{id:`doctor`,label:`檢查設定`,scope:`project`,fields:[gS,{name:`resolved`,label:`顯示合併後的設定與來源`,kind:`checkbox`}],mode:_S(`short`),tier:vS,target:yS,argv:e=>[`doctor`,`-p`,mS(e),...fS(e,`resolved`)?[`--resolved`]:[]]},tidy:{id:`tidy`,label:`整理記憶`,scope:`project`,fields:[gS,{name:`agent`,label:`只整理這一位 agent(可留空)`,kind:`text`},{name:`layer`,label:`層級`,kind:`select`,options:lS},{name:`dryRun`,label:`只預覽,不整理`,kind:`checkbox`},{name:`undo`,label:`還原某次整理(填時間戳,需指定 agent)`,kind:`text`}],mode:e=>e.dryRun===!0||typeof e.undo==`string`&&e.undo.trim()!==``?`short`:`detached`,tier:e=>e.dryRun===!0?`normal`:`confirm`,target:yS,argv:e=>{let t=mS(e),n=dS(e,`agent`,{re:aS,what:`agent`}),r=hS(e,`layer`,lS,`層級`),i=fS(e,`dryRun`),a=dS(e,`undo`,{re:aS,what:`時間戳`,max:64});if(a!==void 0){if(i)throw new iS(`undo`,`還原不能和預覽一起用。`);if(!n)throw new iS(`agent`,`還原要指定是哪一位 agent。`)}let o=[`tidy`,`-p`,t];return n&&o.push(`--agent`,n),r&&o.push(`--layer`,r),i&&o.push(`--dry-run`),a!==void 0&&o.push(`--undo`,a),o}},demo:{id:`demo`,label:`示範`,scope:`home`,fields:[{name:`runtime`,label:`執行環境(可留空,自動偵測)`,kind:`select`,options:cS},{name:`setupOnly`,label:`只建立沙盒,不跑 agent`,kind:`checkbox`}],mode:e=>e.setupOnly===!0?`short`:`detached`,tier:vS,target:yS,argv:e=>{let t=hS(e,`runtime`,cS,`執行環境`);return[`demo`,`-y`,...t?[`--runtime`,t]:[],...fS(e,`setupOnly`)?[`--setup-only`]:[]]}}};Object.keys(bS);var xS={phase:`form`,errors:{}};function SS(e,t){switch(t.type){case`submit`:return e.phase===`running`?e:{phase:`running`};case`typed`:return e.phase===`confirm`?{...e,typed:t.value}:e;case`back`:case`reset`:return e.phase===`running`?e:xS;case`result`:{if(e.phase!==`running`)return e;let n=t.result;return n.kind===`short`||n.kind===`job`?{phase:`done`,result:n}:n.kind===`need`?{phase:`confirm`,need:n.need,...n.target===void 0?{}:{target:n.target},typed:``}:n.kind===`invalid`?n.field?{phase:`form`,errors:{[n.field]:n.error}}:{phase:`form`,errors:{},notice:n.error}:n.kind===`stale`?{phase:`form`,errors:{},notice:`請求被拒絕,請重新整理頁面後再試。`}:{phase:`form`,errors:{},notice:n.message}}}}function CS(e){return e.phase===`confirm`&&(e.need===`confirm`||e.typed===e.target)}function wS(){let e=0;return{next:()=>++e,invalidate:()=>{e+=1},isCurrent:t=>t===e}}var TS={ok:`text-signal`,warn:`text-warn`,fail:`text-failed`},ES={ok:`✓`,warn:`!`,fail:`✕`},DS=`min-h-11 w-full rounded-lg border border-line bg-wall px-3 py-2 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,OS=`min-h-11 rounded-lg border border-line px-4 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal disabled:opacity-50`;function kS(e,t){return e.fields.some(e=>e.name===`dryRun`)&&t.dryRun!==!0&&!t.undo}function AS({id:e,open:t,title:n,fixed:r,initial:i,fieldOptions:a,onShortResult:o,onClose:s}){let c=bS[e],[l,u]=(0,I.useState)(i??{}),[d,f]=(0,I.useReducer)(SS,xS),[p,m]=(0,I.useState)(),[h,g]=(0,I.useState)({}),_=(0,I.useRef)(wS());(0,I.useEffect)(()=>{t&&(_.current.invalidate(),u(i??{}),m(void 0),f({type:`reset`}))},[t]);let v=async(t={})=>{let n={...l,...r,...t},i=_.current.next();m(void 0),g(n),f({type:`submit`});let a=await qn(e,n);a.kind===`short`&&o?.(e,n,a.result),_.current.isCurrent(i)&&(a.kind===`need`&&kS(c,n)&&qn(e,{...n,dryRun:!0,confirm:void 0,confirmText:void 0}).then(e=>{e.kind===`short`&&_.current.isCurrent(i)&&m(e.result.stdout||e.result.stderr||void 0)}),f({type:`result`,result:a}))},y=c.fields.filter(e=>!(r&&e.name in r)),b=d.phase===`running`;return(0,K.jsxs)(Jx,{open:t,title:n??c.label,onClose:s,closable:!b,children:[(d.phase===`form`||d.phase===`running`)&&(0,K.jsxs)(`form`,{className:`mt-4 flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),b||v()},children:[y.map((e,t)=>(0,K.jsx)(MS,{field:e,value:l[e.name],error:d.phase===`form`?d.errors[e.name]:void 0,options:a?.[e.name],autoFocus:t===0,onChange:t=>u(n=>({...n,[e.name]:t}))},e.name)),d.phase===`form`&&d.notice&&(0,K.jsx)(`p`,{role:`alert`,className:`text-pretty rounded-lg border border-failed/40 bg-failed-soft px-3 py-2 text-sm text-failed`,children:d.notice}),(0,K.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,disabled:b,className:OS,onClick:s,children:`取消`}),(0,K.jsx)(`button`,{type:`submit`,disabled:b,className:G(OS,`bg-ink text-paper`),children:b?`執行中…`:c.label})]})]}),d.phase===`confirm`&&(0,K.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,K.jsxs)(`p`,{className:`text-pretty text-sm`,children:[`這個動作不能復原。確定要`,c.label,typeof h.run==`string`?`(${h.run})`:typeof h.name==`string`?`(${h.name})`:``,`嗎?`]}),p!==void 0&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`eyebrow`,children:`預覽(不會改動任何東西)`}),(0,K.jsx)(`pre`,{className:`mt-1 max-h-60 overflow-auto rounded-lg border border-line bg-wall p-3 font-mono text-xs whitespace-pre-wrap`,children:p})]}),d.need===`typed`&&(0,K.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm`,children:[(0,K.jsxs)(`span`,{children:[`輸入 `,(0,K.jsx)(`strong`,{className:`font-mono`,children:d.target}),` 以確認`]}),(0,K.jsx)(`input`,{className:DS,value:d.typed,autoComplete:`off`,onChange:e=>f({type:`typed`,value:e.target.value})})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,autoFocus:!0,className:OS,onClick:s,children:`取消`}),(0,K.jsx)(`button`,{type:`button`,className:OS,onClick:()=>{_.current.invalidate(),m(void 0),f({type:`back`})},children:`回上一步`}),(0,K.jsxs)(`button`,{type:`button`,disabled:!CS(d),className:G(OS,`border-failed bg-failed text-paper`),onClick:()=>void v({confirm:!0,...d.need===`typed`?{confirmText:d.typed}:{}}),children:[`確定`,c.label]})]})]}),d.phase===`done`&&(0,K.jsx)(jS,{result:d.result,onClose:s})]})}function jS({result:e,onClose:t}){if(e.kind===`job`)return(0,K.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,K.jsxs)(`p`,{className:`text-sm`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:`mr-1 text-signal`,children:`✓`}),`已在背景啟動(pid `,e.job.pid,`)。關掉這個頁面也會繼續跑。`]}),(0,K.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,K.jsx)(`a`,{className:G(OS,`inline-flex items-center`),href:`#!jobs`,onClick:t,children:`看任務輸出`}),(0,K.jsx)(`button`,{type:`button`,autoFocus:!0,className:G(OS,`bg-ink text-paper`),onClick:t,children:`關閉`})]})]});if(e.kind!==`short`)return null;let n=rs(e.result.exit,e.result.timedOut),r=[e.result.stdout,e.result.stderr].filter(Boolean).join(`
|
|
92
|
+
`);return(0,K.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,K.jsxs)(`p`,{className:G(`flex flex-wrap items-center gap-2 text-sm font-medium`,TS[n.tone]),children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:ES[n.tone]}),n.text,e.result.signal?(0,K.jsxs)(`span`,{className:`font-mono text-xs`,children:[`(訊號 `,e.result.signal,`)`]}):null]}),r&&(0,K.jsx)(`pre`,{className:`max-h-80 overflow-auto rounded-lg border border-line bg-wall p-3 font-mono text-xs whitespace-pre-wrap`,children:r}),e.result.truncated&&(0,K.jsx)(`p`,{className:`text-xs text-ink/60`,children:`輸出太長,已截斷。`}),(0,K.jsx)(`div`,{className:`flex justify-end`,children:(0,K.jsx)(`button`,{type:`button`,autoFocus:!0,className:G(OS,`bg-ink text-paper`),onClick:t,children:`關閉`})})]})}function MS({field:e,value:t,error:n,options:r,autoFocus:i,onChange:a}){let o=(0,I.useId)(),s=`${o}-err`,c={id:o,"aria-invalid":n?!0:void 0,"aria-describedby":n?s:void 0,autoFocus:i},l=r??e.options;return(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e.kind===`checkbox`?(0,K.jsxs)(`label`,{className:`flex min-h-11 items-center gap-3 text-sm`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`size-5`,checked:t===!0,onChange:e=>a(e.target.checked),...c}),(0,K.jsx)(`span`,{children:e.label})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`label`,{htmlFor:o,className:`text-sm font-medium`,children:[e.label,e.required&&(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-failed`,children:` *`})]}),e.kind===`textarea`?(0,K.jsx)(`textarea`,{className:G(DS,`min-h-32`),value:typeof t==`string`?t:``,onChange:e=>a(e.target.value),...c}):l?(0,K.jsxs)(`select`,{className:DS,value:typeof t==`string`?t:``,onChange:e=>a(e.target.value),...c,children:[(0,K.jsx)(`option`,{value:``,children:e.required?`請選擇`:`(預設)`}),l.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]}):(0,K.jsx)(`input`,{className:DS,value:typeof t==`string`?t:``,autoComplete:`off`,onChange:e=>a(e.target.value),...c})]}),e.help&&!n&&(0,K.jsx)(`p`,{className:`text-xs text-ink/60`,children:e.help}),n&&(0,K.jsx)(`p`,{id:s,role:`alert`,className:`text-sm text-failed`,children:n})]})}var NS=`lyceum.summaries`,PS=(e,t)=>`${e}/${t}`;function FS(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.text==`string`&&t.text.trim().length>0&&typeof t.generatedAt==`number`}function IS(e){try{let t=JSON.parse(e().getItem(NS)??`{}`);return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(([,e])=>FS(e)))}catch{return{}}}function LS(e,t){let n=Object.entries(t).sort(([,e],[,t])=>t.generatedAt-e.generatedAt);for(let t=n.length;t>=Math.min(1,n.length);t--)try{e().setItem(NS,JSON.stringify(Object.fromEntries(n.slice(0,t))));return}catch{}}function RS(e){let t=new Set,n=new Set;return{load:(t,n)=>IS(e)[PS(t,n)]??null,save:(r,i,a)=>{let o=PS(r,i);t.has(o)||n.has(r)||LS(e,{...IS(e),[o]:a})},forget:(n,r)=>{let i=PS(n,r);t.add(i);let a=IS(e);i in a&&(delete a[i],LS(e,a))},forgetProject:t=>{n.add(t);let r=`${t}/`,i=IS(e),a=Object.fromEntries(Object.entries(i).filter(([e])=>!e.startsWith(r)));Object.keys(a).length!==Object.keys(i).length&&LS(e,a)}}}var zS=RS(()=>window.localStorage);function BS(e){return(t,n,r)=>{r.exit===0&&(t===`clear`&&n.dryRun!==!0&&typeof n.project==`string`&&typeof n.run==`string`?e.forget(n.project,n.run):t===`project.remove`&&n.purge===!0&&typeof n.name==`string`&&e.forgetProject(n.name))}}var VS=BS(zS),HS=`min-h-11 rounded-lg border border-line bg-paper px-3 text-sm hover:bg-wall focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal disabled:cursor-not-allowed disabled:opacity-50`;function US({project:e,run:t}){let[n,r]=(0,I.useState)(),i=()=>r(void 0),a=cc(t),o=!!t?.ask&&t.ask.unanswered>0,s=fc(t);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{role:`toolbar`,"aria-label":`操作`,className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,className:HS,disabled:s,onClick:()=>r({id:`run`}),children:`新任務`}),o&&t&&(0,K.jsxs)(`button`,{type:`button`,className:`${HS} border-warn/60 bg-warn-soft text-warn`,disabled:s,onClick:()=>r(`answer`),children:[`回答問題(`,t.ask?.unanswered,`)`]}),a&&t&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,className:HS,disabled:s,onClick:()=>r({id:`resume`,initial:{run:t.run_id}}),children:`續跑/追問`}),(0,K.jsx)(`button`,{type:`button`,className:HS,disabled:fc(t,`clear`),onClick:()=>r({id:`clear`,initial:{run:t.run_id}}),children:`刪除這次任務`})]}),t&&(0,K.jsx)(`button`,{type:`button`,className:HS,disabled:s,onClick:()=>r(`reports`),children:`查看報告`}),(0,K.jsx)(`button`,{type:`button`,className:HS,disabled:s,onClick:()=>r({id:`tidy`,initial:t?{run:t.run_id}:void 0}),children:`整理記憶`}),(0,K.jsx)(`button`,{type:`button`,className:HS,disabled:s,onClick:()=>r({id:`doctor`}),children:`檢查設定`}),s&&(0,K.jsx)(`p`,{className:`text-pretty basis-full text-sm text-ink/70`,children:`這個任務已 tidy,除了刪除以外不能再操作。`})]}),n&&n!==`answer`&&n!==`reports`&&(0,K.jsx)(AS,{id:n.id,open:!0,fixed:{project:e},initial:n.initial,onShortResult:VS,onClose:i}),t&&(0,K.jsx)(nS,{project:e,runId:t.run_id,open:n===`reports`,onClose:i}),t&&(0,K.jsx)(Zx,{project:e,runId:t.run_id,open:n===`answer`,onClose:i})]})}var WS=[],GS=void 0;function KS(){return GS}function qS(e){WS.push(e)}function JS(e){let t=(t,n)=>{let r=L(XS).current,i;try{GS=r;for(let e of WS)e.before(r);i=e(t,n);for(let e of WS)e.after(r);r.didInitialize=!0}finally{GS=void 0}return i};return t.displayName=e.displayName||e.name,t}function YS(e){return I.forwardRef(JS(e))}function XS(){return{didInitialize:!1}}var ZS=I.createContext(void 0);function QS(e){let t=I.useContext(ZS);if(t===void 0&&!e)throw Error(Ee(72));return t}function $S(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:eC,platform:tC,maxTouchPoints:nC}=$S(),rC=eC.toLowerCase(),iC=tC.toLowerCase(),aC=/^i(os$|p)/.test(iC)||iC===`macintel`&&nC>1,oC=`android`,sC=iC===oC||rC.includes(oC),cC=!aC&&iC.startsWith(`mac`);iC.startsWith(`win`),!sC&&/^(linux|chrome os)/.test(iC);var lC=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!lC&&rC.includes(`firefox`),!lC&&rC.includes(`chrom`);var uC=/jsdom|happydom/.test(rC);function dC(e){return`nativeEvent`in e}function fC(e){return e.pointerType===``&&e.isTrusted?!0:sC&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function pC(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function mC(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function hC(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function gC(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&w(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function _C(e,t){let n=e;for(;n;){if(S(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(w(n)?n.host:null)}return null}function vC(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var yC=`data-base-ui-focusable`,bC=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,xC=`data-open`,SC=`data-closed`,CC=`data-anchor-hidden`,wC={"data-popup-open":``},TC={[xC]:``},EC={[SC]:``},DC={[CC]:``},OC={open(e){return e?wC:null}},kC={open(e){return e?TC:EC},anchorHidden(e){return e?DC:null}},AC={...kC,...Zc},jC=`data-trigger-disabled`;function MC(e,t){if(!S(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(jC);for(let[,e]of t.entries())if(gC(e,n))return!e.hasAttribute(jC);return!1}function NC(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function PC(e){return e.matches(`html,body`)}function FC(e){return C(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function IC(e){return _C(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${bC}`)!=null}function LC(e){if(!e||uC)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function RC(e,t){return t!=null&&!pC(t)?0:typeof e==`function`?e():e}function zC(e,t,n){let r=RC(e,n);return typeof r==`number`?r:r?.[t]}function BC(e){return typeof e==`function`?e():e}function VC(e,t){return t||e===`click`||e===`mousedown`}function HC(e){return e?.includes(`mouse`)&&e!==`mousedown`}var UC=I.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new dl,currentIdRef:{current:null},currentContextRef:{current:null}});function WC(e,t){e.current=t.current}function GC(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=I.useRef(n),a=I.useRef(n),o=I.useRef(null),s=I.useRef(null),c=fl();return z(()=>{a.current=n,o.current?i.current={open:zC(i.current,`open`),close:zC(n,`close`)}:i.current=n},[n,o,i,a]),(0,K.jsx)(UC.Provider,{value:I.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function KC(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=I.useContext(UC),[d,f]=I.useState(!1),p=I.useRef(n);return z(()=>{p.current=n},[n]),z(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),z(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:zC(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,kc(Ac))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),z(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,WC(a,s),u.clear()}},[c,i,a,r,s,u]),I.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function qC(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var JC=Math.min,YC=Math.max,XC=Math.round,ZC=Math.floor,QC=e=>({x:e,y:e}),$C={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ew(e,t,n){return YC(e,JC(t,n))}function tw(e,t){return typeof e==`function`?e(t):e}function nw(e){return e.split(`-`)[0]}function rw(e){return e.split(`-`)[1]}function iw(e){return e===`x`?`y`:`x`}function aw(e){return e===`y`?`height`:`width`}function ow(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function sw(e){return iw(ow(e))}function cw(e,t,n){n===void 0&&(n=!1);let r=rw(e),i=sw(e),a=aw(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=_w(o)),[o,_w(o)]}function lw(e){let t=_w(e);return[uw(e),t,uw(t)]}function uw(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var dw=[`left`,`right`],fw=[`right`,`left`],pw=[`top`,`bottom`],mw=[`bottom`,`top`];function hw(e,t,n){switch(e){case`top`:case`bottom`:return n?t?fw:dw:t?dw:fw;case`left`:case`right`:return t?pw:mw;default:return[]}}function gw(e,t,n,r){let i=rw(e),a=hw(nw(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(uw)))),a}function _w(e){let t=nw(e);return $C[t]+e.slice(t.length)}function vw(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function yw(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:vw(e)}function bw(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 xw(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...xw(e,t.id,n)])}function Sw(e){return`data-base-ui-${e}`}var Cw={style:{transition:`none`}},ww={fallbackAxisSide:`end`},Tw=I.createContext(null),Ew=()=>I.useContext(Tw),Dw=Sw(`portal`);function Ow(e={}){let{ref:t,container:n,componentProps:r=Ke,elementProps:i}=e,a=Dc(),o=Ew()?.portalNode,[s,c]=I.useState(null),[l,u]=I.useState(null),d=R(e=>{e!==null&&u(e)}),f=I.useRef(null);z(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(x(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Xe(`div`,r,{ref:[t,d],props:[{id:a,[Dw]:``},i]}),m=s&&p?_l.createPortal(p,s):null;return{node:l,nodeId:I.isValidElement(p)?p.props.id:void 0,subtree:m}}function kw(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Aw=I.createContext(null),jw=I.createContext(null),Mw=()=>I.useContext(Aw)?.id||null,Nw=e=>{let t=I.useContext(jw);return e??t};function Pw(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Fw(e){return e!=null&&e.clientX!=null}function Iw(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=I.useRef(!1),l=I.useRef(null),[u,d]=I.useState(),[f,p]=I.useState([]),m=R(t=>{e.set(`positionReference`,t)}),h=R((t,n,i)=>{c.current||(!s.current.openEvent||Fw(s.current.openEvent))&&e.set(`positionReference`,Pw(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=R(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=pC(u)?a:i;I.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=y(a);function r(t){let n=vC(t);gC(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Fw(s.current.openEvent)?l.current=ll(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),I.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),I.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),I.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=I.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return I.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function Lw(){return!1}function Rw(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function zw(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Lw,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=Nw(c),m=R(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=R(()=>a),{escapeKey:v,outsidePress:y}=Rw(s),b=I.useRef(!1),x=I.useRef(!1),T=I.useRef(!1),E=I.useRef(!1),D=I.useRef(!1),O=I.useRef(``),k=I.useRef(null),A=fl(),j=fl(),M=fl(),N=R(()=>{j.clear(),d.current.insideReactTree=!1}),ee=R(e=>{let t=d.current.floatingContext?.nodeId;return(p?xw(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),te=R(t=>NC(t,e.select(`floatingElement`))||NC(t,e.select(`domReferenceElement`))),re=R(t=>{o()&&e.setOpen(!1,kc(jc,t.nativeEvent))}),ie=R(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=dC(t)?t.nativeEvent:t;if(D.current||i.isComposing||!v&&ee(`__escapeKeyBubbles`))return;let a=kc(Fc,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),ae=R(()=>{d.current.insideReactTree=!0,j.start(0,N)}),oe=R(t=>{if(!l||!n||t.button!==0)return;let r=vC(t.nativeEvent);gC(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),se=R(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});I.useEffect(()=>{function e(e){e.open||(E.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),I.useEffect(()=>N,[N]),I.useEffect(()=>{if(!l||!n)return l||(E.current=!1,D.current=!1,O.current=``,k.current=null),N;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new dl,i=Ae(u);function a(){M.clear(),D.current=!0}function o(){D.current=!0,M.start(lC?5:0,()=>{D.current=!1})}function s(){T.current=!0,t.start(0,()=>{T.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=O.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function j(e){let t=d.current.floatingContext?.nodeId,n=p&&xw(p.nodesRef.current,t).some(t=>NC(e,t.context?.elements.floating));return te(e)||n}function re(n){if(m(n)){n.type!==`click`&&!te(n)&&(t.clear(),T.current=!1),N();return}if(d.current.insideReactTree){N();return}let r=vC(n),i=`[${Sw(`inert`)}]`,a=S(r)?r.getRootNode():null,o=Array.from((w(a)?a:Ae(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>gC(e,r))))return;let c=S(r)?r:null;for(;c&&!P(c);){let e=ne(c);if(P(e)||!S(e))break;c=e}if(!(o.length&&S(r)&&!PC(r)&&!gC(r,e.select(`floatingElement`))&&o.every(e=>!gC(c,e)))){if(C(r)&&!(`touches`in n)){let e=P(r),t=F(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!j(n)){if(f()===`intentional`){if(n.detail!==0&&!fC(n)&&!E.current)return;if(T.current){t.clear(),T.current=!1;return}}typeof h==`function`&&!h(n)||ee(`__outsidePressBubbles`)||(e.setOpen(!1,kc(Pc,n)),N())}}}function ae(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!te(t)&&re(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||te(t))return;let r=t.touches[0];r&&(k.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function oe(e,t){let n=vC(e);if(!n)return;let r=ll(n,e.type,()=>{t(e),r()})}function se(e){O.current=`touch`,oe(e,I)}function L(e){A.clear(),e.type===`pointerdown`&&(e.button===0&&(E.current=!0),O.current=e.pointerType),(e.type!==`mousedown`||!k.current||k.current.dismissOnMouseDown)&&oe(e,e=>{e.type===`pointerdown`?ae(e):re(e)})}function ce(e){if(e.type===`pointercancel`&&(E.current=!1),!b.current)return;let n=x.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():j(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),T.current=!0,N())))}function le(e){if(f()!==`sloppy`||!k.current||te(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(k.current.dismissOnTouchEnd=!0),i>10&&(re(e),A.clear(),k.current=null)}function R(e){oe(e,le)}function ue(e){f()===`sloppy`&&k.current&&!te(e)&&(k.current.dismissOnTouchEnd&&re(e),A.clear(),k.current=null)}function de(e){oe(e,ue)}let z=qC(r&&qC(ll(i,`keydown`,ie),ll(i,`compositionstart`,a),ll(i,`compositionend`,o)),g&&qC(ll(i,`click`,L,!0),ll(i,`pointerdown`,L,!0),ll(i,`pointerup`,ce,!0),ll(i,`pointercancel`,ce,!0),ll(i,`mousedown`,L,!0),ll(i,`mouseup`,ce,!0),ll(i,`touchstart`,se,{capture:!0,passive:!0}),ll(i,`touchmove`,R,{capture:!0,passive:!0}),ll(i,`touchend`,de,{capture:!0,passive:!0})));return()=>{z(),t.clear(),c(),T.current=!1}},[d,u,r,g,h,l,n,v,y,ie,N,_,ee,te,p,e,A,M]);let L=I.useMemo(()=>({onKeyDown:ie,onPointerDown:re,onClick:re}),[ie,re]),ce=I.useMemo(()=>({onKeyDown:ie,onPointerDown:se,onMouseDown:se,onClickCapture:ae,onMouseDownCapture(e){ae(),oe(e)},onPointerDownCapture(e){ae(),oe(e)},onMouseUpCapture:ae,onTouchEndCapture:ae,onTouchMoveCapture:ae}),[ie,ae,oe,se]);return I.useMemo(()=>n?{reference:L,floating:ce,trigger:L}:{},[n,L,ce])}function Bw(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),z(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};S(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Vw(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=R(i),{mounted:c,setMounted:l,transitionStatus:u}=Uc(t,!1,!1,o),d=!t&&r;z(()=>{t&&s(!1)},[t,s]);let f=I.useRef(c),p=I.useRef(!1),m=Cc(),h=()=>{f.current=!1,l(!1),a()};z(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=R(()=>{f.current&&(t?(p.current=!0,m()):h())});return xl({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Hw={tabIndex:-1,[yC]:``};function Uw(e,t=!1){let n=Dc(),r=Mw()!=null,i=L(()=>e(n,r)).current;return Bw({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Ww({handle:e,store:t}){return z(()=>e.attachStore(t),[e,t]),null}function Gw(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Kw(e,t){let n=I.useRef(null);return R(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),Gw(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Gw(t))})}function qw(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function Jw(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Yw(e,t,n,r={}){let i=n.reason,a=i===Mc,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=Jw(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=qw(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?_l.flushSync(l):l()}function Xw(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Kw(e,n),o=R(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=R(e=>{a(e),e&&o(e)});return z(()=>(s(t.current),()=>s(null)),[s,t,n,e]),z(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function Zw(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=I.useRef(null),i=e.useState(`open`);z(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=kc(Ac);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function Qw(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Vw({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return L(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function $w(e,t){e.useSyncedValues(t),z(()=>()=>{e.update({activeTriggerProps:Ke,inactiveTriggerProps:Ke,popupProps:Ke})},[e])}var eT=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},tT=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),nT=o(((e,t)=>{t.exports=tT()})),rT=o((e=>{var t=u(),n=nT();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),iT=o(((e,t)=>{t.exports=rT()})),aT=nT(),oT=iT(),sT=He(19)?uT:dT;function cT(e,t,n,r,i){return sT(e,t,n,r,i)}function lT(e,t,n,r,i){let a=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,aT.useSyncExternalStore)(e.subscribe,a,a)}qS({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,aT.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function uT(e,t,n,r,i){let a=KS();if(!a)return lT(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function dT(e,t,n,r,i){return(0,oT.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var fT=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return cT(this,e,t,n,r)}},pT=class extends fT{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){I.useDebugValue(e);let n=this;z(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;z(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;z(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){I.useDebugValue(e);let n=this,r=t!==void 0;z(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return I.useDebugValue(e),cT(this,this.selectors[e],t,n,r)}useContextCallback(e,t){I.useDebugValue(e);let n=R(t??We);this.context[e]=n}useStateSetter(e){let t=I.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},mT={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},hT=class extends pT{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:kw(),nested:n,triggerElements:i},mT),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&mC(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function gT(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new hT({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ke,inactiveTriggerProps:Ke,popupProps:Ke}}var _T=e=>e.triggerIdProp??e.activeTriggerId,vT=e=>e.openProp??e.open,yT=e=>(e.popupElement?.id??e.floatingId)||void 0;function bT(e,t){return t!==void 0&&vT(e)&&_T(e)===t}function xT(e,t){return bT(e,t)?!0:t!==void 0&&vT(e)&&_T(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var ST={open:vT,mounted:e=>e.mounted,transitionStatus:e=>vT(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:_T,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:yT,isTriggerActive:(e,t)=>t!==void 0&&_T(e)===t,isOpenedByTrigger:(e,t)=>bT(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&_T(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>xT(e,t)?yT(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function CT(e){let t=I.useCallback(t=>e===void 0?We:e.subscribeStore(t),[e]),n=I.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,aT.useSyncExternalStore)(t,n,()=>e?.serverStore)}var wT=cC&&lC;function TT(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=I.useRef(!1),s=I.useRef(null),c=I.useRef(!0),l=fl();I.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=y(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&C(t)&&t===hC(Ae(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return qC(ll(r,`blur`,i),wT&&ll(r,`keydown`,a,!0),wT&&ll(r,`pointerdown`,l,!0))},[e,n]),I.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);S(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=I.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=vC(n.nativeEvent);if(S(a)){if(wT&&!n.relatedTarget){if(!c.current&&!FC(a))return}else if(!LC(a))return}let u=MC(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,kc(Nc,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,kc(Nc,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=S(r)&&r.hasAttribute(Sw(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=hC(Ae(t));!r&&n===t||gC(a.current.floatingContext?.refs.floating.current,n)||gC(t,n)||o||MC(r??n,e.context.triggerElements)||e.setOpen(!1,kc(Nc,i))})}}},[a,r,e,l]);return I.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var ET=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new dl;restTimeout=new dl;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},DT=new WeakMap;function OT(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&DT.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),DT.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function kT(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=DT.get(n);a&&a!==e&&OT(a),OT(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,DT.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function AT(e){let t=e.context.dataRef.current,n=L(()=>t.hoverInteractionState??ET.create()).current;return t.hoverInteractionState||=n,Rc(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function jT(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=Nw(),u=Mw(),d=AT(e),f=fl(),p=R(()=>VC(c.current.openEvent?.type,d.interactedInside)),m=R(()=>HC(c.current.openEvent?.type)),h=R(()=>{OT(d)});z(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),I.useEffect(()=>h,[h]),z(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&S(s)&&o){let e=s,t=o,n=Ae(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??_C(e,`[data-rootownerid]`)??n.body;return kT(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),I.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&xw(l.nodesRef.current,u).length>0)}function a(t){let n=zC(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,kc(Mc,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=vC(e);IC(t)?d.interactedInside=_C(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(MC(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&S(o)&&xw(l.nodesRef.current,r,!1).some(e=>gC(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,kc(Mc,n)),l.events.emit(`floating.closed`,n)})}let y=o;return qC(y&&ll(y,`mouseenter`,g),y&&ll(y,`mouseleave`,_),y&&ll(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var MT={current:null};function NT(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=MT,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=Nw(l),v=AT(e),y=I.useRef(!1),b=pl(i),x=pl(r),C=pl(o),w=pl(n),T=pl(p),E=pl(f),D=R(()=>VC(h.current.openEvent?.type,v.interactedInside)),O=R(()=>T.current?.()!==!1),k=R((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!gC(t,n);if(!S(r))return!1;let a=r;return i.hasMatchingElement(e=>gC(e,a))&&(!t||!gC(t,a))}),A=R(()=>{v.handler&&=(Ae(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),j=R(()=>{OT(v)});return u&&(v.handleCloseOptions=i?.__options),I.useEffect(()=>A,[A]),I.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===Mc,A(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,A]),I.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=zC(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,kc(Mc,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,kc(Mc,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!S(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!pC(v.pointerType))return;let n=BC(C.current),r=zC(x.current,`open`,v.pointerType),i=vC(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(S(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(gC(t,i)){c=t;break}}S(o)&&S(s)&&!e.context.triggerElements.hasElement(o)&&gC(o,s)&&(c=s);let l=c!=null&&k(s,c,i),u=e.select(`open`),d=E.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&S(c)&&S(s)&&gC(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?O()&&e.setOpen(!0,kc(Mc,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&O()&&e.setOpen(!0,kc(Mc,t,c))}):g&&O()&&e.setOpen(!0,kc(Mc,t,c)))}function o(n){if(D()){j();return}A();let r=Ae(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!MC(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){j(),A(),w.current&&!D()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else v.pointerType===`touch`&&gC(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){gC(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?ll(r,`mouseout`,l):void 0;return s?qC(ll(r,`mousemove`,i,{once:!0}),ll(r,`mouseenter`,i),ll(r,`mouseleave`,o),f):qC(ll(r,`mouseenter`,i),ll(r,`mouseleave`,o),f)},[A,j,h,x,e,n,b,v,u,k,D,a,s,C,c,_,w,d,E,O,m]),I.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=k(i,r,t.target);if(a&&!pC(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;kT(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=BC(C.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,D())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&O()&&e.setOpen(!0,kc(Mc,n,r))}v.pointerType===`touch`?_l.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,D,k,a,e,C,O])}var PT=.1,FT=PT*PT,IT=.5;function LT(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function RT(e,t,n,r,i,a,o,s,c,l){let u=!1;return LT(e,t,n,r,i,a)&&(u=!u),LT(e,t,i,a,o,s)&&(u=!u),LT(e,t,o,s,c,l)&&(u=!u),LT(e,t,c,l,n,r)&&(u=!u),u}function zT(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function BT(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function VT(e={}){let{blockPointerEvents:t=!1}=e,n=new dl,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*FT;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=vC(r),g=r.type===`mouseleave`,_=gC(u,h),v=gC(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&S(r.relatedTarget)&&gC(u,r.relatedTarget))return;function y(){return!!(s&&xw(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),C=u.getBoundingClientRect(),w=e>C.right-C.width/2,T=t>C.bottom-C.height/2,E=C.width>x.width,D=C.height>x.height,O=(E?x:C).left,k=(E?x:C).right,A=(D?x:C).top,j=(D?x:C).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let M=!1;switch(c){case`top`:M=BT(d,f,O,x.top+1,k,C.bottom-1);break;case`bottom`:M=BT(d,f,O,C.top+1,k,x.bottom-1);break;case`left`:M=BT(d,f,C.right-1,j,x.left+1,A);break;case`right`:M=BT(d,f,x.right-1,j,C.left+1,A)}if(M)return;if(l&&!zT(d,f,x)||!g&&p(d,f)){b();return}let N=!1;switch(c){case`top`:{let n=E?IT/2:IT*4,r=E||w?e+n:e-n,i=E?e-n:w?e+n:e-n,a=t+IT+1,o=w||E?C.bottom-IT:C.top,s=w?E?C.bottom-IT:C.top:C.bottom-IT;N=RT(d,f,r,a,i,a,C.left,o,C.right,s);break}case`bottom`:{let n=E?IT/2:IT*4,r=E||w?e+n:e-n,i=E?e-n:w?e+n:e-n,a=t-IT,o=w||E?C.top+IT:C.bottom,s=w?E?C.top+IT:C.bottom:C.top+IT;N=RT(d,f,r,a,i,a,C.left,o,C.right,s);break}case`left`:{let n=D?IT/2:IT*4,r=D||T?t+n:t-n,i=D?t-n:T?t+n:t-n,a=e+IT+1,o=T||D?C.right-IT:C.left,s=T?D?C.right-IT:C.left:C.right-IT;N=RT(d,f,o,C.top,s,C.bottom,a,r,a,i);break}case`right`:{let n=D?IT/2:IT*4,r=D||T?t+n:t-n,i=D?t-n:T?t+n:t-n,a=e-IT,o=T||D?C.left+IT:C.right,s=T?D?C.left+IT:C.right:C.left+IT;N=RT(d,f,a,r,a,i,o,C.top,s,C.bottom);break}}N?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function HT(e,t,n){let{reference:r,floating:i}=e,a=ow(t),o=sw(t),s=aw(o),c=nw(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}}let m=rw(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function UT(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}=tw(t,e),p=yw(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=bw(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=bw(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 WT=50,GT=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:UT},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=HT(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<WT&&(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}=HT(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},KT=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}=tw(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=nw(r),_=ow(o),v=nw(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[_w(o)]:lw(o)),x=p!==`none`;!d&&x&&b.push(...gw(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=cw(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`||_===ow(t)||T.every(e=>ow(e.placement)!==_||e.overflows[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=ow(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}if(r!==n)return{reset:{placement:n}}}return{}}}},qT=new Set([`left`,`top`]);async function JT(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nw(n),s=rw(n),c=ow(n)===`y`,l=qT.has(o)?-1:1,u=a&&c?-1:1,d=tw(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 YT=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 JT(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}}}}},XT=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}=tw(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ow(i),p=iw(f),m=u[p],h=u[f],g=(e,t)=>ew(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},ZT=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}=tw(e,t),u={x:n,y:r},d=ow(i),f=iw(d),p=u[f],m=u[d],h=tw(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};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=qT.has(nw(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}}}},QT=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=tw(e,t),c=await i.detectOverflow(t,s),l=nw(n),u=rw(n),d=ow(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=JC(p-c[m],g),y=JC(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*YC(c.left,c.right):S=p-2*YC(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function $T(e){let t=F(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=C(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=XC(n)!==a||XC(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function eE(e){return S(e)?e:e.contextElement}function tE(e){let t=eE(e);if(!C(t))return QC(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$T(t),o=(a?XC(n.width):n.width)/r,s=(a?XC(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var nE=QC(0);function rE(e){let t=y(e);return!ee()||!t.visualViewport?nE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iE(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===y(e)}function aE(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=eE(e),o=QC(1);t&&(r?S(r)&&(o=tE(r)):o=tE(e));let s=iE(a,n,r)?rE(a):QC(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&&r){let e=y(a),t=S(r)?y(r):r,n=e,i=ae(n);for(;i&&t!==n;){let e=tE(i),t=i.getBoundingClientRect(),r=F(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=y(i),i=ae(n)}}return bw({width:u,height:d,x:c,y:l})}function oE(e,t){let n=te(e).scrollLeft;return t?t.left+n:aE(b(e)).left+n}function sE(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-oE(e,n),y:n.top+t.scrollTop}}function cE(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=b(r),s=t?D(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=QC(1),u=QC(0),d=C(r);if((d||!a)&&((v(r)!==`body`||T(o))&&(c=te(r)),d)){let e=aE(r);l=tE(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sE(o,c):QC(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 lE(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function uE(e){let t=te(e),n=e.ownerDocument.body,r=YC(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=YC(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+oE(e),o=-t.scrollTop;return F(n).direction===`rtl`&&(a+=YC(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var dE=25;function fE(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=y(e),a=b(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ee()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(oE(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=dE&&(s-=o)}return{width:s,height:c,x:l,y:u}}function pE(e,t){let n=aE(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=tE(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mE(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=fE(e,n,t);else if(t===`document`)r=uE(b(e));else if(S(t))r=pE(t,n);else{let n=rE(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return bw(r)}function hE(e,t){let n=t.get(e);if(n)return n;let r=ie(e,[],!1).filter(e=>S(e)&&v(e)!==`body`),i=null,a=F(e).position===`fixed`,o=a?ne(e):e;for(;S(o)&&!P(o);){let e=F(o),t=M(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=ne(o)}return t.set(e,r),r}function gE(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?D(t)?[]:hE(t,this._c):[].concat(n),r],o=mE(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=mE(t,a[e],i);s=YC(n.top,s),c=JC(n.right,c),l=JC(n.bottom,l),u=YC(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function _E(e){let{width:t,height:n}=$T(e);return{width:t,height:n}}function vE(e,t,n){let r=C(t),i=b(t),a=n===`fixed`,o=aE(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=QC(0);if((r||!a)&&((v(t)!==`body`||T(i))&&(s=te(t)),r)){let e=aE(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=oE(i));let l=i&&!r&&!a?sE(i,s):QC(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function yE(e){return F(e).position===`static`}function bE(e,t){if(!C(e)||F(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return b(e)===n&&(n=n.ownerDocument.body),n}function xE(e,t){let n=y(e);if(D(e))return n;if(!C(e)){let t=ne(e);for(;t&&!P(t);){if(S(t)&&!yE(t))return t;t=ne(t)}return n}let r=bE(e,t);for(;r&&E(r)&&yE(r);)r=bE(r,t);return r&&P(r)&&yE(r)&&!M(r)?n:r||N(e)||n}var SE=async function(e){let t=this.getOffsetParent||xE,n=this.getDimensions,r=await n(e.floating);return{reference:vE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function CE(e){return F(e).direction===`rtl`}var wE={convertOffsetParentRelativeRectToViewportRelativeRect:cE,getDocumentElement:b,getClippingRect:gE,getOffsetParent:xE,getElementRects:SE,getClientRects:lE,getDimensions:_E,getScale:tE,isElement:S,isRTL:CE};function TE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function EE(e,t,n){let r=null,i,a=b(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ZC(d),h=ZC(a.clientWidth-(u+f)),g=ZC(a.clientHeight-(d+p)),_=ZC(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:YC(0,JC(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!TE(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=y(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function DE(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=eE(e),u=i||a?[...l?ie(l):[],...t?ie(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?EE(l,n,a):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?aE(e):null;c&&g();function g(){let t=aE(e);h&&!TE(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 OE=YT,kE=XT,AE=KT,jE=QT,ME=ZT,NE=(e,t,n)=>{let r=new Map,i=n??{},a={...wE,...i.platform,_c:r};return GT(e,t,{...i,platform:a})},PE=typeof document<`u`?I.useLayoutEffect:function(){};function FE(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(!FE(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)&&!FE(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function IE(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function LE(e,t){let n=IE(e);return Math.round(t*n)/n}function RE(e){let t=I.useRef(e);return PE(()=>{t.current=e}),t}function zE(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]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=I.useState(r);FE(f,r)||p(r);let[m,h]=I.useState(null),[g,_]=I.useState(null),v=I.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=I.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=I.useRef(null),C=I.useRef(null),w=I.useRef(u),T=c!=null,E=RE(c),D=RE(i),O=RE(l),k=I.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),NE(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!FE(w.current,t)&&(w.current=t,_l.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);PE(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=I.useRef(!1);PE(()=>(A.current=!0,()=>{A.current=!1}),[]),PE(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=I.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=I.useMemo(()=>({reference:b,floating:x}),[b,x]),N=I.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=LE(M.floating,u.x),r=LE(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...IE(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return I.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var BE=(e,t)=>{let n=OE(e);return{name:n.name,fn:n.fn,options:[e,t]}},VE=(e,t)=>{let n=kE(e);return{name:n.name,fn:n.fn,options:[e,t]}},HE=(e,t)=>({fn:ME(e).fn,options:[e,t]}),UE=(e,t)=>{let n=AE(e);return{name:n.name,fn:n.fn,options:[e,t]}},WE=(e,t)=>{let n=jE(e);return{name:n.name,fn:n.fn,options:[e,t]}},GE={...ST,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},KE=class extends pT{constructor(e,t,n){let r=new eT;super(qE(e,r,t,n),JE(r),GE)}setOpen=(e,t)=>{Yw(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,kc(jc,e))}};function qE(e,t,n,r=!1){return{...gT(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function JE(e){return{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var YE=JS(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Uw((e,t)=>new KE({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),Zw(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=Qw(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=I.useRef(null);z(()=>{m&&t&&p.setOpen(!1,kc(Ic))},[m,t,p]),z(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),z(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),I.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,kc(Lc))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,K.jsxs)(ZS.Provider,{value:p,children:[l&&(0,K.jsx)(Ww,{handle:l,store:p}),T&&(0,K.jsx)(XE,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function XE({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=zw(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Iw(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=I.useMemo(()=>pe(a.reference,i.reference),[a.reference,i.reference]);return $w(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??Ke}),null}var ZE=I.createContext(void 0);function QE(){return I.useContext(ZE)}var $E=`data-base-ui-tooltip-trigger`;function eD(e){let t=vC(e);return S(t)?t:null}var tD=YS(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=QS(!0),m=CT(a)??p;if(!m)throw Error(Ee(82));let h=Oc(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=I.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=Xw(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=QE(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=KC(v,{open:_}),O=AT(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=pl(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),ee=I.useRef(!1),P=fl(),F=I.useRef(void 0);function te(){return D&&w.current!=null?0:c??C??600}function ne(e){let t=y.current;if(!t||!e)return!1;let n=_C(e,`[${$E}]`);return n!==null&&n!==t&&gC(t,n)}function re(e){let t=ne(e);return ee.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,P.clear()),t}let ie=NT(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?VT():null,restMs:te,delay(){return u==null&&D?{close:zC(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!ee.current}}),ae=TT(v,{enabled:!A}).reference,oe=e=>{let t=ee.current,n=eD(e),r=re(n),i=y.current,a=i&&n&&gC(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,kc(Mc,e));else if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&pC(F.current)){let t=()=>{ee.current||j.current||m.select(`open`)||m.setOpen(!0,kc(Mc,e,i))},n=te();n===0?(P.clear(),t()):P.start(n,t)}},se=m.useState(`appliedTriggerProps`,S||M!==`none`);return Xe(`button`,e,{state:{open:_},ref:[t,x,y],props:[ie,ae,se,{onMouseOver(e){oe(e.nativeEvent)},onFocus(e){ne(eD(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){ee.current=!1,P.clear(),F.current=void 0},onPointerEnter(e){F.current=e.pointerType},onPointerDown(e){F.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[jC]:A?``:void 0,[$E]:A?void 0:``},f],stateAttributesMapping:OC})}),nD=I.createContext(void 0);function rD(){let e=I.useContext(nD);if(e===void 0)throw Error(Ee(70));return e}var iD=I.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ow({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,K.jsxs)(I.Fragment,{children:[l,c&&_l.createPortal(n,c)]})}),aD=I.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return QS().useState(`mounted`)||n?(0,K.jsx)(nD.Provider,{value:n,children:(0,K.jsx)(iD,{ref:t,...r})}):null}),oD=I.createContext(void 0);function sD(){let e=I.useContext(oD);if(e===void 0)throw Error(Ee(71));return e}function cD(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=I.useState(null),d=I.useRef(null),f=Nw(n),p=I.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=zE({...e,elements:{...p,...l&&{reference:l}}}),h=I.useCallback(e=>{let t=S(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=I.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=I.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=I.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return z(()=>{o&&(d.current=o)},[o]),z(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),I.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var lD=I.createContext(void 0);function uD(){return I.useContext(lD)?.direction??`ltr`}var dD=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}=tw(e,t)||{};if(l==null)return{};let d=yw(u),f={x:n,y:r},p=sw(i),m=aw(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=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=ew(D,k,O),j=!c.arrow&&rw(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),fD=(e,t)=>{let{name:n,fn:r}=dD(e);return{name:n,fn:r,options:[e,t]}},pD={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},mD={sideX:`left`,sideY:`top`},hD=`--available-width`,gD=`--available-height`,_D=`--anchor-width`,vD=`--anchor-height`,yD=`--transform-origin`,bD=hD,xD=gD;function SD(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function CD(e,t,n){let{rects:r,placement:i}=e;return{side:SD(t,nw(i),n),align:rw(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function wD(e){return TD(e,cD)}function TD(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,w=_.side||`flip`,T=_.align||`flip`,E=_.fallbackAxisSide||`end`,D=v?.crossAxis??!1,O=v?.rootBoundary,k=typeof n==`function`?n:void 0,A=R(k),j=k?A:n,M=pl(n),N=pl(g),ee=uD()===`rtl`,[P,F]=I.useState(null);!g&&P!==null&&F(null);let te=S===`placement`,ne=P?nw(P):null,re=P&&te?rw(P)||`center`:null,ie=ne||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":ee?`left`:`right`,"inline-start":ee?`right`:`left`}[i],ae=re||o,oe=ae===`center`?ie:`${ie}-${ae}`,se=l;typeof se==`number`?se={top:se,right:se,bottom:se,left:se}:se&&={top:se.top||0,right:se.right||0,bottom:se.bottom||0,left:se.left||0};let L=+(i===`bottom`),ce=+(i===`top`),le=+(i===`right`),ue=+(i===`left`),de={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:se},B=I.useRef(null),fe=pl(a),pe=pl(s),me=typeof a==`function`?0:a,he=typeof s==`function`?0:s,V=[];p&&V.push(p),V.push(BE(e=>{let t=CD(e,i,ee),n=typeof fe.current==`function`?fe.current(t):fe.current,r=typeof pe.current==`function`?pe.current(t):pe.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[me,he,ee,i]));let ge=T===`none`&&w!==`shift`,_e=!ge&&(u||D||w===`shift`),ve=w===`none`?null:UE({...de,padding:{top:se.top+1+L,right:se.right+1+ue,bottom:se.bottom+1+ce,left:se.left+1+le},mainAxis:!D&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),ye=ge?null:VE({...de,rootBoundary:O,mainAxis:T!==`none`,crossAxis:_e,limiter:u||D?void 0:HE(e=>{if(!B.current)return{};let{width:t,height:n}=B.current.getBoundingClientRect(),r=ow(nw(e.placement)),i=r===`y`?t:n,a=r===`y`?se.left+se.right:se.top+se.bottom;return{offset:i/2+a/2}})},[de,u,D,O,se,T]);w===`shift`||T===`shift`||ae===`center`?V.push(ye,ve):V.push(ve,ye),V.push(WE({...de,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(bD,`${t}px`),i.setProperty(xD,`${n}px`);let a=y(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(_D,`${u}px`),i.setProperty(vD,`${d}px`)}}),fD(e=>({element:B.current||Ae(e.elements.floating).createElement(`div`),padding:B.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=nw(r),u=rw(r),d=ow(l)===`y`,f=B.current,p=typeof a==`function`?a(CD(e,i,ee)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return _e&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(yD,d?`${m} ${h}`:`${h} ${m}`),{}}},pD,x),z(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let be=I.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:xe,elements:Se,x:Ce,y:we,middlewareData:Te,update:Ee,placement:De,context:Oe,isPositioned:ke,floatingStyles:je}=t({rootContext:h,open:m?g:void 0,placement:oe,middleware:V,strategy:r,whileElementsMounted:m?void 0:(...e)=>DE(...e,be),nodeId:b,externalTree:C}),{sideX:Me,sideY:Ne}=Te.adaptiveOrigin||mD,Pe=ke?r:`fixed`,Fe=I.useMemo(()=>{let e;return e=ke?x?{position:Pe,[Me]:Ce,[Ne]:we}:{...je,position:Pe}:{position:Pe,top:0,left:0},e[bD]=`100vw`,e[xD]=`100vh`,ke||(e.opacity=0),e},[x,Pe,Me,Ce,Ne,we,je,ke]),Ie=I.useRef(null);z(()=>{if(!g)return;let e=M.current,t=typeof e==`function`?e():e,n=(ED(t)?t.current:t)||null;n!==Ie.current&&(xe.setPositionReference(n),Ie.current=n)},[g,xe,j,M]),I.useEffect(()=>{if(!g)return;let e=M.current;typeof e!=`function`&&ED(e)&&e.current!==Ie.current&&(xe.setPositionReference(e.current),Ie.current=e.current)},[g,xe,j,M]),I.useEffect(()=>{if(m&&g&&Se.reference&&Se.floating)return DE(Se.reference,Se.floating,Ee,be)},[m,g,Se,Ee,be]);let Le=nw(De),Re=SD(i,Le,ee),ze=rw(De)||`center`,Be=!!Te.hide?.referenceHidden;z(()=>{S&&g&&ke&&(Le!==ie||te&&ze!==ae)&&F(De)},[S,te,g,ke,De,Le,ze,ie,ae]);let Ve=I.useMemo(()=>({position:`absolute`,top:Te.arrow?.y,left:Te.arrow?.x}),[Te.arrow]),He=Te.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:Fe,arrowStyles:Ve,arrowRef:B,arrowUncentered:He,side:Re,align:ze,physicalSide:Le,anchorHidden:Be,refs:xe,context:Oe,isPositioned:ke,update:Ee}),[Fe,Ve,B,He,Re,ze,Le,Be,xe,Oe,ke,Ee])}function ED(e){return e!=null&&`current`in e}function DD(e){return e===`starting`?Cw:Ke}function OD(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Xe(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},DD(r),i],stateAttributesMapping:kC})}var kD=I.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=ww,style:g,..._}=e,v=QS(),y=rD(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=wD({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=OD(e,I.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,K.jsx)(oD.Provider,{value:D,children:O})}),AD=I.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=QS(),{side:s,align:c}=sD(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);xl({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),jT(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Xe(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Hw,f,DD(d),a],stateAttributesMapping:AC})}),jD=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=I.useMemo(()=>({open:t,close:n}),[t,n]);return(0,K.jsx)(ZE.Provider,{value:t,children:(0,K.jsx)(GC,{delay:i,timeoutMs:r,children:e.children})})};function MD({run:e,agents:t,now:n}){let r=Ox(e,t,n);return(0,K.jsxs)(`figure`,{className:`panel p-3 sm:p-4`,children:[(0,K.jsx)(`figcaption`,{className:`text-balance text-base font-semibold`,children:`喚醒時間軸`}),r?(0,K.jsxs)(jD,{delay:0,children:[(0,K.jsx)(`div`,{className:`mt-3 space-y-1`,children:r.lanes.map(e=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[5rem_minmax(0,1fr)] items-center gap-2 sm:grid-cols-[7rem_minmax(0,1fr)]`,children:[(0,K.jsx)(`div`,{className:`truncate font-mono text-xs text-ink/80`,title:e.agent,children:e.agent}),(0,K.jsxs)(`div`,{className:`relative h-7`,role:`group`,"aria-label":`${e.agent} 的喚醒`,children:[(0,K.jsx)(`div`,{className:`absolute inset-x-0 top-5 h-px bg-line`}),e.bars.map((e,t)=>(0,K.jsx)(ND,{bar:e},`${e.x}-${t}`))]})]},e.agent))}),(0,K.jsxs)(`div`,{className:`mt-1 grid grid-cols-[5rem_minmax(0,1fr)] text-xs tabular-nums text-ink/60 sm:grid-cols-[7rem_minmax(0,1fr)]`,children:[(0,K.jsx)(`span`,{}),(0,K.jsxs)(`span`,{className:`flex justify-between`,children:[(0,K.jsx)(`span`,{children:Dx(r.start)}),(0,K.jsx)(`span`,{children:Dx(r.end)})]})]}),(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-ink/70`,children:`實心是已結束的喚醒,框線延伸到現在的是還在跑的。紅色是失敗。把游標放在色塊上看該輪的時間、token 與錯誤。`})]}):(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`這個任務還沒有喚醒紀錄。`})]})}function ND({bar:e}){return(0,K.jsxs)(YE,{children:[(0,K.jsx)(tD,{type:`button`,"aria-label":e.title,className:G(`absolute block min-h-0 min-w-0 cursor-pointer rounded-[3px] p-0`,e.live?`top-1.5 h-4 border-2 border-working bg-transparent`:e.ok?`top-2 h-3 border-0 bg-signal/70`:`top-2 h-3 border-0 bg-failed`),style:{left:`${e.x/10}%`,width:`${e.width/10}%`}}),(0,K.jsx)(aD,{children:(0,K.jsx)(kD,{sideOffset:8,className:`z-50`,children:(0,K.jsx)(AD,{className:G(`panel max-h-[min(12rem,var(--available-height,12rem))] max-w-xs overflow-y-auto px-3 py-2 text-sm wrap-break-word text-ink outline-none`,e.ok?`border-line`:`border-failed/40`),children:e.lines.map((e,t)=>(0,K.jsx)(`p`,{className:G(`text-pretty leading-snug`,t>0&&`mt-1`),children:e},t))})})})]})}function PD({run:e}){let t=Mx(e),n=Math.max(1,...t.map(e=>e.output)),r=Cx(e?.cache_read_tokens??0,e?.cache_write_tokens??0);return(0,K.jsxs)(`section`,{className:`panel p-3 sm:p-4`,children:[(0,K.jsx)(`h2`,{className:`text-balance text-base font-semibold`,children:`Token 與快取`}),t.length===0?(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`還沒有 token 紀錄。`}):(0,K.jsx)(`ul`,{className:`mt-3 grid gap-x-8 gap-y-3 lg:grid-cols-2`,children:t.map(e=>(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`div`,{className:`flex justify-between gap-3 text-sm`,children:[(0,K.jsx)(`span`,{className:`truncate`,children:e.agent}),(0,K.jsxs)(`span`,{className:`shrink-0 font-mono text-xs tabular-nums text-ink/70`,children:[mx(e.output),e.cacheRead+e.cacheWrite>0?`,快取讀 ${mx(e.cacheRead)}`:``,e.failed>0?`,失敗 ${e.failed}`:``]})]}),(0,K.jsx)(`div`,{className:`mt-1.5 h-2 overflow-hidden rounded-full bg-wall`,title:`輸出 ${e.output},快取讀 ${e.cacheRead},寫 ${e.cacheWrite}`,children:(0,K.jsx)(`div`,{className:`h-full rounded-full bg-signal`,style:{width:`${e.output/n*100}%`}})})]},e.agent))}),(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm text-ink/70`,children:r||`這個 run 沒有快取紀錄(Codex 與較舊的 run 不會有)。`}),(0,K.jsx)(`p`,{className:`text-pretty text-sm text-ink/70`,children:`長條是輸出 token,相對輸出最多的 agent。`})]})}function FD({project:e,runId:t,locked:n=!1}){let[r,i]=(0,I.useState)(!1),[a,o]=(0,I.useState)(),[s,c]=(0,I.useState)(()=>zS.load(e,t)?.text),l=()=>{i(!0),o(void 0),fetch(`/summary`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({project:e,runId:t})}).then(LD).then(n=>{zS.save(e,t,{text:n,generatedAt:Date.now()}),c(n)}).catch(e=>o(e instanceof Error?e.message:`沒有寫出摘要。`)).finally(()=>i(!1))};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(rt,{type:`button`,disabled:r||n,className:`panel shrink-0 self-stretch px-4 text-sm font-medium hover:bg-wall disabled:cursor-not-allowed disabled:opacity-60`,onClick:()=>{n||l()},children:r?`正在總結`:`總結進度`}),(a||r||s)&&(0,K.jsxs)(`div`,{className:`basis-full`,"aria-live":`polite`,children:[a&&(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm text-failed`,children:a}),r&&(0,K.jsxs)(`div`,{className:`mt-4 space-y-2`,"aria-hidden":`true`,children:[(0,K.jsx)(`div`,{className:`h-3 animate-pulse rounded bg-line`}),(0,K.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-line`})]}),!r&&s&&(0,K.jsx)(`div`,{className:`panel mt-3 px-4 pb-4`,children:ID(s).map((e,t)=>(0,K.jsx)(`p`,{className:`text-pretty mt-4 text-base leading-relaxed`,children:e},`${t}-${e.slice(0,24)}`))})]})]})}function ID(e){return e.trim().split(/\n{2,}/).map(e=>e.replace(/\s*\n\s*/g,` `).trim()).filter(Boolean)}async function LD(e){let t={};try{t=await e.json()}catch{throw Error(`沒有寫出摘要。`)}if(!e.ok||!t.text?.trim())throw Error(t.error||`沒有寫出摘要。`);return t.text.trim()}function RD({name:e,frame:t,runId:n,now:r,onRun:i}){if(t.error)return(0,K.jsxs)(`article`,{className:`enter animate-in fade-in p-6 duration-200`,children:[(0,K.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:e}),(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm text-failed`,children:t.error}),(0,K.jsxs)(`p`,{className:`text-pretty mt-2 text-sm`,children:[`在終端執行 agent-lyceum status -p `,e,` 看這個專案。`]})]});let a=yx(t),o=a.find(e=>e.run?.run_id===n)??bx(t),s=o?.run,c=o?.agents??t.report?.agents??[],l=Ix(c,s);return(0,K.jsxs)(`div`,{className:`enter animate-in fade-in grid w-full gap-4 p-3 duration-200 sm:gap-6 sm:p-4 lg:grid-cols-[minmax(0,1fr)_18rem] lg:p-6 2xl:grid-cols-[minmax(0,1fr)_22rem]`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 sm:gap-6`,children:[(0,K.jsxs)(`header`,{children:[(0,K.jsx)(`p`,{className:`eyebrow`,children:e}),s?(0,K.jsx)(zD,{name:e,run:s,now:r}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`h1`,{className:`text-balance mt-2 text-2xl font-semibold tracking-tight`,children:`還沒有任務`}),(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`註冊的 agent 列在下面。`})]}),(0,K.jsx)(`div`,{className:`mt-4`,children:(0,K.jsx)(US,{project:e,run:s})})]}),s?.ask&&s.ask.unanswered>0&&(0,K.jsxs)(`p`,{className:`text-pretty mt-4 rounded-lg border border-warn/40 bg-warn-soft px-3 py-2 text-sm text-warn`,children:[`等待回答 `,s.ask.unanswered,`/`,s.ask.total,`。檔案在 `,s.ask.path]}),s?.failure&&(0,K.jsxs)(`div`,{className:`mt-4 rounded-lg border border-failed/40 bg-failed-soft px-3 py-2`,children:[(0,K.jsxs)(`p`,{className:`text-sm text-failed`,children:[s.failure.agent,` 連續失敗 `,s.failure.attempts,` 次`]}),s.failure.error&&(0,K.jsx)(`p`,{className:`text-pretty mt-1 text-sm leading-relaxed text-failed`,children:ux(s.failure.error)})]}),l.length>0&&(0,K.jsx)(zx,{agents:c,run:s,now:r}),(0,K.jsx)(MD,{run:s,agents:c,now:r}),l.length===0&&(0,K.jsx)(zx,{agents:c,run:s,now:r}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-4 sm:gap-6`,children:[(0,K.jsx)(PD,{run:s}),s&&(0,K.jsx)(HD,{report:o})]})]}),(0,K.jsx)(VD,{reports:a,currentId:s?.run_id,onRun:i})]})}function zD({name:e,run:t,now:n}){let r=t.task_summary||t.name||t.run_id,i=dc(t),a=Cx(t.cache_read_tokens,t.cache_write_tokens),o=t.live===!1&&t.state===`running`;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`h1`,{className:`mt-1 text-balance text-2xl font-semibold leading-snug tracking-tight wrap-break-word md:text-3xl`,children:[r,i&&(0,K.jsx)(pc,{info:i,className:`ml-2 align-middle`})]}),(0,K.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-stretch gap-3`,children:[(0,K.jsxs)(`dl`,{className:`grid min-w-0 flex-1 grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-5`,children:[(0,K.jsxs)(`div`,{className:`panel px-3 py-2`,children:[(0,K.jsx)(`dt`,{className:`eyebrow`,children:`狀態`}),(0,K.jsxs)(`dd`,{className:G(`mt-1 flex items-center gap-2 font-mono text-lg tabular-nums`,qD(t)),children:[t.state===`running`&&(0,K.jsx)(`span`,{"aria-hidden":!0,className:`pulse-dot size-2 rounded-full bg-signal`}),hx(t)]}),o&&(0,K.jsx)(`p`,{className:`text-pretty mt-1 text-sm text-failed`,children:`程序已不存在`})]}),(0,K.jsx)(BD,{label:`輪次`,value:`第 ${t.rounds} 輪`}),(0,K.jsx)(BD,{label:`token`,value:mx(t.output_tokens)}),(0,K.jsx)(BD,{label:`已經過`,value:Tx(t,n)}),(0,K.jsx)(BD,{label:`進度`,value:_x(t)})]}),(0,K.jsx)(FD,{project:e,runId:t.run_id,locked:fc(t)},`${e}/${t.run_id}`)]}),a&&(0,K.jsx)(`p`,{className:`mt-3 font-mono text-sm tabular-nums text-ink/70`,children:a}),t.current_step&&(0,K.jsxs)(`p`,{className:`text-pretty mt-3 text-sm text-ink/80`,children:[(0,K.jsx)(`span`,{className:`eyebrow mr-2`,children:`目前`}),t.current_step]})]})}function BD({label:e,value:t}){return(0,K.jsxs)(`div`,{className:`panel px-3 py-2`,children:[(0,K.jsx)(`dt`,{className:`eyebrow`,children:e}),(0,K.jsx)(`dd`,{className:`mt-1 font-mono text-lg tabular-nums`,children:t})]})}function VD({reports:e,currentId:t,onRun:n}){return(0,K.jsxs)(`aside`,{className:`panel p-3 lg:sticky lg:top-14 lg:max-h-[calc(100dvh-4.5rem)] lg:self-start lg:overflow-y-auto`,children:[(0,K.jsx)(`h2`,{className:`eyebrow`,children:`較早班次`}),e.length===0?(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`這個專案還沒有任務。`}):(0,K.jsx)(`div`,{className:`mt-3 max-lg:flex max-lg:gap-2 max-lg:overflow-x-auto [&>button]:max-lg:w-64 [&>button]:max-lg:shrink-0`,children:e.map(e=>{let r=e.run;if(!r)return null;let i=r.run_id===t,a=dc(r);return(0,K.jsxs)(rt,{type:`button`,"aria-current":i?`true`:void 0,className:G(`block min-h-11 w-full rounded-lg border px-3 py-2.5 text-left`,i?`border-line bg-wall`:`border-transparent hover:bg-wall/70`),onClick:()=>n(r.run_id),children:[(0,K.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3 font-mono text-xs tabular-nums`,children:[(0,K.jsx)(`span`,{className:`text-ink/70`,children:KD(r.started_at)}),(0,K.jsx)(`span`,{className:qD(r),children:hx(r)})]}),(0,K.jsxs)(`span`,{className:G(`text-pretty mt-1 block text-sm`,i&&`font-medium`),children:[r.task_summary||r.name||r.run_id,a&&(0,K.jsx)(pc,{info:a,className:`ml-2`})]})]},r.run_id)})})]})}function HD({report:e}){let t=e?.run;if(!t)return null;let n=t.steps??[];return(0,K.jsxs)(`section`,{className:`panel p-3 sm:p-4`,children:[(0,K.jsx)(`h2`,{className:`text-balance text-base font-semibold`,children:`這次任務`}),(0,K.jsxs)(`div`,{className:`grid gap-x-8 md:grid-cols-2 2xl:grid-cols-3`,children:[n.length>0&&(0,K.jsx)(`ol`,{className:`mt-3 list-decimal space-y-1 pl-5 text-sm`,children:n.map(e=>(0,K.jsx)(`li`,{className:G(`text-pretty`,e.done&&`text-ink/60 line-through`),children:e.text},e.text))}),(t.queue??[]).length>0&&(0,K.jsxs)(`div`,{className:`mt-6`,children:[(0,K.jsx)(`h3`,{className:`eyebrow text-balance`,children:`佇列`}),(t.queue??[]).map((e,t)=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`mt-4 text-sm text-ink/60`,children:e.agent}),(0,K.jsx)(cx,{mail:e})]},`${t}-${e.agent}-${e.subject}`))]}),(t.blocked_integrations??[]).length>0&&(0,K.jsxs)(`div`,{className:`mt-6`,children:[(0,K.jsx)(`h3`,{className:`eyebrow text-balance`,children:`受阻的整合`}),(t.blocked_integrations??[]).map(e=>(0,K.jsxs)(`div`,{className:`mt-3`,children:[(0,K.jsxs)(`p`,{className:`text-sm`,children:[e.agent,` `,(0,K.jsx)(`span`,{className:`text-ink/60`,children:e.branch})]}),(0,K.jsx)(`p`,{className:`text-pretty mt-1 text-sm leading-relaxed`,children:e.reason})]},`${e.agent}-${e.branch}`))]}),(t.notes??[]).length>0&&(0,K.jsxs)(`div`,{className:`mt-6`,children:[(0,K.jsx)(`h3`,{className:`eyebrow text-balance`,children:`備註`}),(t.notes??[]).map((e,t)=>(0,K.jsx)(UD,{text:e},`${t}-${e.slice(0,24)}`))]}),(e?.memory_advice??[]).length>0&&(0,K.jsxs)(`div`,{className:`mt-6`,children:[(0,K.jsx)(`h3`,{className:`eyebrow text-balance`,children:`記憶建議`}),(e?.memory_advice??[]).map(e=>(0,K.jsx)(WD,{text:e},e))]}),(t.result_head??[]).length>0&&(0,K.jsx)(GD,{lines:t.result_head??[]})]})]})}function UD({text:e}){let{head:t,body:n}=dx(e),r=ux(n),i=n.length>r.length+40;return(0,K.jsxs)(ol,{className:`group mt-3`,children:[t&&(0,K.jsx)(`p`,{className:`text-sm`,children:t}),(0,K.jsx)(`p`,{className:G(`text-pretty text-sm leading-relaxed`,t&&`mt-1`),children:r}),i&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(cl,{className:`mt-1 text-sm text-ink/60`,children:[(0,K.jsx)(`span`,{className:`group-data-[open]:hidden`,children:`展開全文`}),(0,K.jsx)(`span`,{className:`hidden group-data-[open]:inline`,children:`收合全文`})]}),(0,K.jsx)(jl,{children:(0,K.jsx)(`p`,{className:`mt-2 whitespace-pre-wrap text-sm leading-relaxed text-ink/80`,children:n})})]})]})}function WD({text:e}){let t=e.indexOf(`:`);return t===-1?(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-sm leading-relaxed`,children:e}):(0,K.jsxs)(`div`,{className:`mt-3`,children:[(0,K.jsx)(`p`,{className:`text-sm`,children:e.slice(0,t).trim()}),(0,K.jsx)(`p`,{className:`text-pretty mt-0.5 text-sm leading-relaxed text-ink/80`,children:e.slice(t+1).trim()})]})}function GD({lines:e}){return(0,K.jsxs)(`div`,{className:`mt-6`,children:[(0,K.jsx)(`h3`,{className:`eyebrow text-balance`,children:`結果`}),fx(e).map((e,t)=>e.kind===`title`?(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-base font-semibold leading-snug`,children:e.text},t):e.kind===`label`?(0,K.jsx)(`p`,{className:`mt-3 text-sm text-ink/60`,children:e.text},t):e.kind===`fact`?(0,K.jsxs)(`p`,{className:`mt-2 flex gap-3 text-sm`,children:[(0,K.jsx)(`span`,{className:`w-16 shrink-0 sm:w-20 text-ink/60`,children:e.text}),(0,K.jsx)(`span`,{children:e.extra})]},t):(0,K.jsx)(`p`,{className:`text-pretty mt-2 leading-relaxed`,children:e.text},t))]})}function KD(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleString(`zh-Hant`,{month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function qD(e){return e.state===`running`?`text-signal`:e.outcome===`failed`?`text-failed`:`text-ink`}function JD(e){if(e.error)return`讀不到`;let t=bx(e)?.run;if(!t)return`閒置`;let n=Object.keys(t.active),r=t.state===`running`&&n.length>0?` ${n.join(` `)}`:``;return`${hx(t)}${r}`}function YD(e,t){return e===`down`?`正在連上本機狀態…`:t===0?`還沒有已註冊的專案。用 agent-lyceum project add 註冊一個。`:`選一個專案。`}var XD=[{id:`project.add`,blurb:`把一個 repo 註冊成專案。`},{id:`project.remove`,blurb:`取消註冊;預設保留 context。`},{id:`call`,blurb:`不開專案,直接請全域 library 的某位 agent 做一件事。`},{id:`clear.lock`,blurb:`run 當掉後留下的鎖,確認沒人在跑再清。`},{id:`demo`,blurb:`在沙盒裡跑一次完整示範。`},{id:`init`,blurb:`建立 home 與預設的全域 agent library。`}];function ZD({projects:e}){let[t,n]=(0,I.useState)();return(0,K.jsxs)(`article`,{className:`enter animate-in fade-in p-4 duration-200 sm:p-6`,children:[(0,K.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:`工具`}),(0,K.jsx)(`p`,{className:`text-pretty mt-2 text-sm`,children:`專案內的操作(新任務、續跑、回答問題…)在各專案頁面上。這裡放不屬於單一專案的。`}),(0,K.jsx)(`ul`,{className:`mt-6 grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:XD.map(e=>(0,K.jsxs)(`li`,{className:`panel flex flex-col gap-3 p-4`,children:[(0,K.jsx)(`h2`,{className:`font-medium`,children:bS[e.id].label}),(0,K.jsx)(`p`,{className:`text-pretty text-sm text-ink/70`,children:e.blurb}),(0,K.jsxs)(`button`,{type:`button`,className:`mt-auto min-h-11 self-start rounded-lg border border-line bg-paper px-4 text-sm hover:bg-wall focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,onClick:()=>n(e.id),children:[bS[e.id].label,`…`]})]},e.id))}),t&&(0,K.jsx)(AS,{id:t,open:!0,fieldOptions:t===`project.remove`?{name:e}:t===`clear.lock`?{project:e}:void 0,onShortResult:VS,onClose:()=>n(void 0)})]})}function QD(){let[e,t]=(0,I.useState)(()=>new Map),[n,r]=(0,I.useState)(`down`),[i,a]=(0,I.useState)(()=>Date.now()),[o,s]=(0,I.useState)(eO),[c,l]=(0,I.useState)(0),[u,d]=(0,I.useState)(void 0),[f,p]=(0,I.useState)(iO),[m,h]=(0,I.useState)(!1),[g,_]=(0,I.useTransition)(),v=mc(g);(0,I.useEffect)(()=>{let e=new EventSource(`/events`);return e.onopen=()=>r(`up`),e.onerror=()=>r(`down`),e.onmessage=e=>{let n=JSON.parse(e.data);n.type===`quota`?d(n.reports):(n.type===`snapshot`&&n.quota&&d(n.quota),t(e=>tO(e,n)))},()=>e.close()},[c]),(0,I.useEffect)(()=>{let e=window.setInterval(()=>a(Date.now()),1e3);return()=>window.clearInterval(e)},[]),(0,I.useEffect)(()=>{let e=()=>_(()=>s(eO()));return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let y=[...e.keys()].sort((t,n)=>nO(xx(e.get(t)),xx(e.get(n)))||t.localeCompare(n)),b=m?y:y.filter(e=>!f.has(e)),x=y.filter(e=>f.has(e)).length,S=o.project&&e.has(o.project)?o.project:b[0]??y[0],C=e=>p(t=>{let n=new Set(t);return n.delete(e)||n.add(e),aO(n),n}),w=S?e.get(S):void 0,T=n===`down`&&y.length===0&&!o.view;return(0,K.jsxs)(`div`,{className:`grid h-dvh grid-cols-1 grid-rows-[auto_minmax(0,1fr)] bg-wall md:grid-cols-[14rem_minmax(0,1fr)] md:grid-rows-1 xl:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,K.jsxs)(`nav`,{"aria-label":`已註冊專案`,className:`inset-safe z-20 flex items-center gap-2 overflow-x-auto border-b border-line bg-paper p-3 md:sticky md:top-0 md:h-dvh md:flex-col md:items-stretch md:overflow-y-auto md:border-r md:border-b-0`,children:[(0,K.jsx)(`p`,{className:`eyebrow hidden px-2 pt-2 pb-1 md:block`,children:`專案`}),b.length===0?y.length>0?(0,K.jsx)(`p`,{className:`text-pretty px-2 text-sm`,children:`專案都已隱藏。`}):n===`up`?(0,K.jsx)(`p`,{className:`text-pretty px-2 text-sm`,children:`還沒有已註冊的專案。`}):(0,K.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`flex items-center gap-2 px-2 text-sm text-ink/70`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:`pulse-dot size-2 shrink-0 rounded-full bg-signal`}),`正在連上本機狀態…`]}):b.map(t=>{let n=e.get(t),r=!o.view&&t===S,i=n?bx(n)?.run?.state===`running`:!1,a=f.has(t);return(0,K.jsxs)(`div`,{className:G(`group relative shrink-0`,a&&`opacity-60`),children:[(0,K.jsxs)(rt,{type:`button`,className:G(`min-h-11 w-full min-w-36 rounded-lg border px-3 py-2 pr-9 text-left md:min-w-0`,r?`border-line bg-wall`:`border-transparent hover:bg-wall/70`),onClick:()=>$D(t),children:[(0,K.jsxs)(`span`,{className:`flex items-center gap-2 truncate text-sm font-medium`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:G(`size-2 shrink-0 rounded-full`,i?`pulse-dot bg-signal`:n?.error?`bg-failed`:`bg-ink/25`)}),(0,K.jsx)(`span`,{className:`truncate`,children:t})]}),(0,K.jsx)(`span`,{className:G(`mt-0.5 block truncate pl-4 font-mono text-xs tabular-nums`,i?`text-signal`:`text-ink/60`),children:n?JD(n):``})]}),(0,K.jsx)(rt,{type:`button`,"aria-label":a?`顯示 ${t}`:`隱藏 ${t}`,title:a?`取消隱藏`:`隱藏`,className:`absolute top-1 right-1 inline-flex size-7 items-center justify-center rounded-md text-xs text-ink/50 hover:bg-wall hover:text-ink focus-visible:outline-2 focus-visible:outline-signal md:opacity-0 md:group-hover:opacity-100 md:focus-visible:opacity-100`,onClick:()=>C(t),children:(0,K.jsx)(oO,{off:!a})})]},t)}),x>0&&(0,K.jsx)(rt,{type:`button`,className:`min-h-9 shrink-0 rounded-lg px-3 text-left text-xs text-ink/60 underline`,onClick:()=>h(e=>!e),children:m?`收起已隱藏`:`顯示已隱藏 (${x})`}),(0,K.jsx)(`div`,{className:`flex items-center gap-2 md:mt-4 md:flex-col md:items-stretch md:border-t md:border-line md:pt-3`,children:[[`decisions`,`決策`],[`tools`,`工具`],[`jobs`,`任務輸出`]].map(([e,t])=>(0,K.jsx)(`a`,{href:`#!${e}`,"aria-current":o.view===e?`page`:void 0,className:G(`inline-flex min-h-11 min-w-24 shrink-0 items-center rounded-lg border px-3 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,o.view===e?`border-line bg-wall`:`border-transparent hover:bg-wall/70`),children:t},e))}),n===`down`&&(0,K.jsx)(rt,{type:`button`,className:`min-h-11 shrink-0 rounded-lg border border-line px-3 text-sm underline md:hidden`,onClick:()=>l(e=>e+1),children:`重新連線`}),(0,K.jsx)(`div`,{className:`mt-auto hidden px-2 pb-2 md:block`,children:n===`up`?(0,K.jsxs)(`p`,{className:`flex items-center gap-2 text-xs text-ink/60`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-signal`}),`即時更新`]}):(0,K.jsx)(rt,{type:`button`,className:`text-sm underline`,onClick:()=>l(e=>e+1),children:`重新連線`})})]}),(0,K.jsxs)(`main`,{className:`min-h-0 overflow-y-auto bg-wall`,"aria-busy":g||T||void 0,children:[v&&(0,K.jsx)(_c,{label:`正在切換畫面…`}),(n===`up`||u&&u.length>0)&&(0,K.jsx)(Vn,{reports:u??[],onReports:d}),T?(0,K.jsx)(gc,{label:`正在讀取專案狀態…`}):o.view===`decisions`?(0,K.jsx)(es,{}):o.view===`tools`?(0,K.jsx)(ZD,{projects:y}):o.view===`jobs`?(0,K.jsx)(bc,{}):w&&S?(0,K.jsx)(`div`,{className:G(v&&`opacity-70 motion-safe:transition-opacity motion-safe:duration-150`),children:(0,K.jsx)(RD,{name:S,frame:w,runId:o.project===S?o.run:void 0,now:i,onRun:e=>$D(S,e)})},`${S}/${o.project===S?o.run??``:``}`):(0,K.jsxs)(`article`,{className:`enter animate-in fade-in p-4 duration-200 sm:p-6`,children:[(0,K.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:YD(n,y.length)}),n===`up`&&y.length===0&&(0,K.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`在終端執行 agent-lyceum project add 註冊一個專案。`}),n===`down`&&(0,K.jsx)(rt,{type:`button`,className:`mt-4 min-h-11 rounded-md border border-line bg-paper px-4 py-1.5 text-sm hover:bg-wall`,onClick:()=>l(e=>e+1),children:`重新連線`})]})]})]})}function $D(e,t){let n=t?`${encodeURIComponent(e)}/${encodeURIComponent(t)}`:encodeURIComponent(e);location.hash=n}function eO(){try{let e=decodeURIComponent(location.hash.replace(/^#/,``));if(!e)return{};if(e===`!tools`||e===`!jobs`||e===`!decisions`)return{view:e.slice(1)};let t=e.indexOf(`/`);return t===-1?{project:e}:{project:e.slice(0,t),run:e.slice(t+1)}}catch{return{}}}function tO(e,t){if(t.type===`quota`)return e;if(t.type===`snapshot`)return new Map(t.projects.map(e=>[e.name,e.frame]));let n=new Map(e);return t.type===`removed`?n.delete(t.name):n.set(t.name,t.frame),n}function nO(e,t){return e===t?0:e>t?-1:1}var rO=`lyceum.hiddenProjects`;function iO(){try{let e=JSON.parse(localStorage.getItem(rO)??`[]`);return new Set(Array.isArray(e)?e.filter(e=>typeof e==`string`):[])}catch{return new Set}}function aO(e){try{localStorage.setItem(rO,JSON.stringify([...e]))}catch{}}function oO({off:e}){return(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`size-4`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,K.jsx)(`path`,{d:`M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),e&&(0,K.jsx)(`path`,{d:`M4 4l16 16`})]})}var sO=document.getElementById(`root`);sO&&(0,it.createRoot)(sO).render((0,K.jsx)(I.StrictMode,{children:(0,K.jsx)(QD,{})}));
|