@famonfa/mono 0.1.0 → 0.3.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/bin/mono.mjs +4 -3
- package/package.json +1 -1
- package/src/api.mjs +19 -0
- package/src/chats.mjs +33 -6
- package/src/launcher.mjs +75 -11
- package/src/remote.mjs +8 -0
- package/web/apple-touch-icon.png +0 -0
- package/web/assets/{index-Ke-WlOuz.css → index-DGdmgZ2P.css} +1 -1
- package/web/assets/index-TOP7citk.js +55 -0
- package/web/icon-192.png +0 -0
- package/web/icon-512.png +0 -0
- package/web/index.html +4 -2
- package/web/manifest.webmanifest +5 -1
- package/web/assets/index-BMbPwlF6.js +0 -55
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function 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 P(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,P(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,`$&/`)+`/`),P(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+=P(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+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(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 F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(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 ee=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 te(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,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ne(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 te(ne.bind(null,e))}var re={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(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=re,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=ne,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:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=te,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),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`),P=Symbol.for(`react.consumer`),F=Symbol.for(`react.context`),I=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),re=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.legacy_hidden`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.for(`react.view_transition`),ce=Symbol.for(`react.recoverable`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?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 ee:return`Suspense`;case te:return`SuspenseList`;case ie:return`Activity`;case se:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case F:return e.displayName||`Context`;case P:return(e._context.displayName||`Context`)+`.Consumer`;case I:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ne:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,L=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function _e(e){return{current:e}}function ve(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function ye(e,t){ge++,he[ge]=e.current,e.current=t}var be=_e(null),xe=_e(null),Se=_e(null),Ce=_e(null);function we(e,t){switch(ye(Se,t),ye(xe,e),ye(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mp(t),e=hp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(be),ye(be,e)}function Te(){ve(be),ve(xe),ve(Se)}function Ee(e){var t=e.memoizedState;t!==null&&(dh._currentValue=t.memoizedState,ye(Ce,e)),t=be.current;var n=hp(t,e.type);t!==n&&(ye(xe,e),ye(be,n))}function De(e){xe.current===e&&(ve(be),ve(xe)),Ce.current===e&&(ve(Ce),dh._currentValue=me)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!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{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);case 30:return Ae(`ViewTransition`);default:return``}}function Pe(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Fe=Object.prototype.hasOwnProperty,Ie=t.unstable_scheduleCallback,Le=t.unstable_cancelCallback,Re=t.unstable_shouldYield,ze=t.unstable_requestPaint,Be=t.unstable_now,Ve=t.unstable_getCurrentPriorityLevel,He=t.unstable_ImmediatePriority,Ue=t.unstable_UserBlockingPriority,We=t.unstable_NormalPriority,Ge=t.unstable_LowPriority,Ke=t.unstable_IdlePriority,qe=t.log,Je=t.unstable_setDisableYieldValue,Ye=null,Xe=null;function Ze(e){if(typeof qe==`function`&&Je(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Ye,e)}catch{}}var Qe=Math.clz32?Math.clz32:tt,$e=Math.log,et=Math.LN2;function tt(e){return e>>>=0,e===0?32:31-($e(e)/et|0)|0}var nt=256,rt=262144,it=4194304;function at(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 ot(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=at(n))):i=at(o):i=at(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=at(n))):i=at(o)):i=at(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 st(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ct(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-Qe(n),i=1<<r;t|=e[r],n&=~i}return t}function lt(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 ut(){var e=it;return it<<=1,!(it&62914560)&&(it=4194304),e}function dt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ft(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pt(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-Qe(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&&mt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function mt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ht(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function gt(e,t){var n=t&-t;return n=n&42?1:_t(n),(n&(e.suspendedLanes|t))===0?n:0}function _t(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 vt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function yt(){var e=R.p;return e===0?(e=window.event,e===void 0?32:Dh(e.type)):e}function bt(e,t){var n=R.p;try{return R.p=e,t()}finally{R.p=n}}var xt=Math.random().toString(36).slice(2),St=`__reactFiber$`+xt,Ct=`__reactProps$`+xt,wt=`__reactContainer$`+xt,Tt=`__reactEvents$`+xt,Et=`__reactListeners$`+xt,Dt=`__reactHandles$`+xt,Ot=`__reactResources$`+xt,kt=`__reactMarker$`+xt,At=`__reactLoad$`+xt;function jt(e){delete e[St],delete e[Ct],delete e[Et],delete e[Dt]}function Mt(e){var t;if(t=e[St])return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gm(e);e!==null;){if(n=e[St])return n;e=gm(e)}return t}e=n,n=e.parentNode}return null}function Nt(e){if(e=e[St]||e[wt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ft(e){var t=e[Ot];return t||=e[Ot]={hoistableStyles:new Map,hoistableScripts:new Map},t}function It(e){e[kt]=!0}function Lt(e){e[At]=void 0}var Rt=new Set,zt={};function Bt(e,t){Vt(e,t),Vt(e+`Capture`,t)}function Vt(e,t){for(zt[e]=t,e=0;e<t.length;e++)Rt.add(t[e])}var Ht=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]*$`),Ut={},Wt={};function Gt(e){return Fe.call(Wt,e)?!0:Fe.call(Ut,e)?!1:Ht.test(e)?Wt[e]=!0:(Ut[e]=!0,!1)}var z=!1;function Kt(){var e=z;return z=!1,e}function qt(e,t,n){if(Gt(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 Jt(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 Yt(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 Xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Qt(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 $t(e){if(!e._valueTracker){var t=Zt(e)?`checked`:`value`;e._valueTracker=Qt(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var tn=/[\n"\\]/g;function nn(e){return e.replace(tn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function rn(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=``+Xt(t)):e.value!==``+Xt(t)&&(e.value=``+Xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):on(e,Xt(n)):o===`number`&&e.value==t?on(e,Xt(e.value)):on(e,Xt(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=``+Xt(s):e.removeAttribute(`name`)}function an(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)){$t(e);return}n=n==null?``:``+Xt(n),t=t==null?n:``+Xt(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),$t(e)}function on(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function sn(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=``+Xt(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 cn(e,t,n){t!=null&&(t=``+Xt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Xt(n)}function ln(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function un(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dn=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 fn(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||dn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function pn(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]=``,z=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(fn(e,a,r),z=!0)}else for(var o in t)t.hasOwnProperty(o)&&fn(e,o,t[o])}function mn(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 hn=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`]]),gn=/^[\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 _n(e){return gn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function vn(){}var yn=null;function bn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xn=null,Sn=null;function Cn(e){var t=Nt(e);if(t&&(e=t.stateNode)){var n=e[Ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(rn(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="`+nn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ct]||null;if(!a)throw Error(i(90));rn(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&&en(r)}break a;case`textarea`:cn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&sn(e,!!n.multiple,t,!1)}}}var wn=!1;function Tn(e,t,n){if(wn)return e(t,n);wn=!0;try{return e(t)}finally{if(wn=!1,(xn!==null||Sn!==null)&&(Ud(),xn&&(t=xn,e=Sn,Sn=xn=null,Cn(t),e)))for(t=0;t<e.length;t++)Cn(e[t])}}function En(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ct]||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 Dn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,On=!1;if(Dn)try{var kn={};Object.defineProperty(kn,"passive",{get:function(){On=!0}}),window.addEventListener(`test`,kn,kn),window.removeEventListener(`test`,kn,kn)}catch{On=!1}var An=null,jn=null,Mn=null;function Nn(){if(Mn)return Mn;var e,t=jn,n=t.length,r,i=`value`in An?An.value:An.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Mn=i.slice(e,1<r?1-r:void 0)}function Pn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Fn(){return!0}function In(){return!1}function Ln(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)?Fn:In,this.isPropagationStopped=In,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=Fn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Fn)},persist:function(){},isPersistent:Fn}),t}var Rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zn=Ln(Rn),Bn=D({},Rn,{view:0,detail:0}),Vn=Ln(Bn),Hn,Un,Wn,Gn=D({},Bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nr,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!==Wn&&(Wn&&e.type===`mousemove`?(Hn=e.screenX-Wn.screenX,Un=e.screenY-Wn.screenY):Un=Hn=0,Wn=e),Hn)},movementY:function(e){return`movementY`in e?e.movementY:Un}}),Kn=Ln(Gn),qn=Ln(D({},Gn,{dataTransfer:0})),Jn=Ln(D({},Bn,{relatedTarget:0})),Yn=Ln(D({},Rn,{animationName:0,elapsedTime:0,pseudoElement:0})),Xn=Ln(D({},Rn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Zn=Ln(D({},Rn,{data:0})),Qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},$n={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`},er={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function tr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=er[e])?!!t[e]:!1}function nr(){return tr}var B=Ln(D({},Bn,{key:function(e){if(e.key){var t=Qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?$n[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nr,charCode:function(e){return e.type===`keypress`?Pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=Ln(D({},Gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=Ln(D({},Rn,{submitter:0})),ar=Ln(D({},Bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nr})),or=Ln(D({},Rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=Ln(D({},Gn,{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})),cr=Ln(D({},Rn,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],ur=Dn&&`CompositionEvent`in window,dr=null;Dn&&`documentMode`in document&&(dr=document.documentMode);var fr=Dn&&`TextEvent`in window&&!dr,V=Dn&&(!ur||dr&&8<dr&&11>=dr),pr=` `,mr=!1;function hr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var _r=!1;function vr(e,t){switch(e){case`compositionend`:return gr(t);case`keypress`:return t.which===32?(mr=!0,pr):null;case`textInput`:return e=t.data,e===pr&&mr?null:e;default:return null}}function yr(e,t){if(_r)return e===`compositionend`||!ur&&hr(e,t)?(e=Nn(),Mn=jn=An=null,_r=!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 V&&t.locale!==`ko`?null:t.data;default:return null}}var br={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 xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!br[e.type]:t===`textarea`}function Sr(e,t,n,r){xn?Sn?Sn.push(r):Sn=[r]:xn=r,t=Zf(t,`onChange`),0<t.length&&(n=new zn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Cr=null,wr=null;function Tr(e){Wf(e,0)}function Er(e){if(en(Pt(e)))return e}function Dr(e,t){if(e===`change`)return t}var Or=!1;if(Dn){var kr;if(Dn){var Ar=`oninput`in document;if(!Ar){var jr=document.createElement(`div`);jr.setAttribute(`oninput`,`return;`),Ar=typeof jr.oninput==`function`}kr=Ar}else kr=!1;Or=kr&&(!document.documentMode||9<document.documentMode)}function Mr(){Cr&&(Cr.detachEvent(`onpropertychange`,Nr),wr=Cr=null)}function Nr(e){if(e.propertyName===`value`&&Er(wr)){var t=[];Sr(t,wr,e,bn(e)),Tn(Tr,t)}}function Pr(e,t,n){e===`focusin`?(Mr(),Cr=t,wr=n,Cr.attachEvent(`onpropertychange`,Nr)):e===`focusout`&&Mr()}function Fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Er(wr)}function Ir(e,t){if(e===`click`)return Er(t)}function Lr(e,t){if(e===`input`||e===`change`)return Er(t)}function Rr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var zr=typeof Object.is==`function`?Object.is:Rr;function Br(e,t){if(zr(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(!Fe.call(t,i)||!zr(e[i],t[i]))return!1}return!0}function Vr(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 Hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ur(e,t){var n=Hr(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=Hr(n)}}function Wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vr(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=Vr(e.document)}return t}function Kr(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 qr=Dn&&`documentMode`in document&&11>=document.documentMode,Jr=null,Yr=null,Xr=null,Zr=!1;function Qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zr||Jr==null||Jr!==Vr(r)||(r=Jr,`selectionStart`in r&&Kr(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}),Xr&&Br(Xr,r)||(Xr=r,r=Zf(Yr,`onSelect`),0<r.length&&(t=new zn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Jr)))}function $r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ei={animationend:$r(`Animation`,`AnimationEnd`),animationiteration:$r(`Animation`,`AnimationIteration`),animationstart:$r(`Animation`,`AnimationStart`),transitionrun:$r(`Transition`,`TransitionRun`),transitionstart:$r(`Transition`,`TransitionStart`),transitioncancel:$r(`Transition`,`TransitionCancel`),transitionend:$r(`Transition`,`TransitionEnd`)},ti={},ni={};Dn&&(ni=document.createElement(`div`).style,`AnimationEvent`in window||(delete ei.animationend.animation,delete ei.animationiteration.animation,delete ei.animationstart.animation),`TransitionEvent`in window||delete ei.transitionend.transition);function ri(e){if(ti[e])return ti[e];if(!ei[e])return e;var t=ei[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ni)return ti[e]=t[n];return e}var ii=ri(`animationend`),ai=ri(`animationiteration`),oi=ri(`animationstart`),si=ri(`transitionrun`),ci=ri(`transitionstart`),li=ri(`transitioncancel`),ui=ri(`transitionend`),di=new Map,fi=`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(` `);fi.push(`scrollEnd`);function pi(e,t){di.set(e,t),Bt(t,[e])}var mi=0;function hi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=wd.identifierPrefix;var n=mi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function gi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Md;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function _i(e,t){return e=gi(e),t=gi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var vi=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)},yi=[],bi=0,xi=0;function Si(){for(var e=bi,t=xi=bi=0;t<e;){var n=yi[t];yi[t++]=null;var r=yi[t];yi[t++]=null;var i=yi[t];yi[t++]=null;var a=yi[t];if(yi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ei(n,i,a)}}function Ci(e,t,n,r){yi[bi++]=e,yi[bi++]=t,yi[bi++]=n,yi[bi++]=r,xi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function wi(e,t,n,r){return Ci(e,t,n,r),Di(e)}function Ti(e,t){return Ci(e,null,null,t),Di(e)}function Ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Di(e){if(50<Nd)throw Nd=0,Pd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oi={};function ki(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ai(e,t,n,r){return new ki(e,t,n,r)}function ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mi(e,t){var n=e.alternate;return n===null?(n=Ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&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 Ni(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 Pi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)ji(r)&&(s=1);else if(typeof r==`string`)s=Zm(e,n,be.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ie:return e=Ai(31,n,t,a),e.elementType=ie,e.lanes=o,e;case j:return Fi(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Ai(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case ee:return e=Ai(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=Ai(19,n,t,a),e.elementType=te,e.lanes=o,e;case ae:case se:return e=a|32,e=Ai(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 F:s=10;break a;case P:s=9;break a;case I:s=11;break a;case ne:s=14;break a;case re:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Fi(e,t,n,r){return e=Ai(7,e,r,t),e.lanes=n,e}function Ii(e,t,n){return e=Ai(6,e,null,t),e.lanes=n,e}function Li(e){var t=Ai(18,null,null,0);return t.stateNode=e,t}function Ri(e,t,n){return t=Ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zi=new WeakMap;function Bi(e,t){if(typeof e==`object`&&e){var n=zi.get(e);return n===void 0?(t={value:e,source:t,stack:Pe(t)},zi.set(e,t),t):n}return{value:e,source:t,stack:Pe(t)}}var Vi=[],Hi=0,Ui=null,Wi=0,Gi=[],Ki=0,qi=null,Ji=1,Yi=``;function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Ui,Ui=e,Wi=t}function Zi(e,t,n){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,qi=e;var r=Ji;e=Yi;var i=32-Qe(r)-1;r&=~(1<<i),n+=1;var a=32-Qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ji=1<<32-Qe(t)+i|n<<i|r,Yi=a+e}else Ji=1<<a|n<<i|r,Yi=e}function Qi(e){e.return!==null&&(Xi(e,1),Zi(e,1,0))}function $i(e){for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null;for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Yi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null}function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,Ji=t.id,Yi=t.overflow,qi=e}var ta=null,na=null,H=!1,ra=null,ia=!1,aa=Error(i(519));function oa(e){throw fa(Bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[St]=e,t[Ct]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Y(Hf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),an(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),ln(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||rp(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=vn),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ta=e.return;ta;)switch(ta.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ta=ta.return}}function la(e){if(e!==ta)return!1;if(!H)return ca(e),H=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||_p(e.type,e.memoizedProps)),n=!n),n&&na&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));na=hm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));na=hm(e)}else t===27?(t=na,Ep(e.type)?(e=mm,mm=null,na=e):na=t):na=ta?pm(e.stateNode.nextSibling):null;return!0}function ua(){na=ta=null,H=!1}function da(){var e=ra;return e!==null&&(gd===null?gd=e:gd.push.apply(gd,e),ra=null),e}function fa(e){ra===null?ra=[e]:ra.push(e)}var pa=_e(null),ma=null,ha=null;function ga(e,t,n){ye(pa,t._currentValue),t._currentValue=n}function _a(e){e._currentValue=pa.current,ve(pa)}function va(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 ya(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),va(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),va(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),va(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 ba(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;zr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[dh]:e.push(dh))}a=a.return}return e!==null&&ya(t,e,n,r),t.flags|=262144,e!==null}function xa(e){for(e=e.firstContext;e!==null;){if(!zr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ma=e,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ca(e){return Ta(ma,e)}function wa(e,t){return ma===null&&Sa(e),Ta(e,t)}function Ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ha===null){if(e===null)throw Error(i(308));ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ha=ha.next=t;return n}var Ea=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()})}},Da=t.unstable_scheduleCallback,Oa=t.unstable_NormalPriority,ka={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Aa(){return{controller:new Ea,data:new Map,refCount:0}}function ja(e){e.refCount--,e.refCount===0&&Da(Oa,function(){e.controller.abort()})}function Ma(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 Na=null;function Pa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Fa=null,Ia=0,La=0,Ra=null;function za(e,t){if(Fa===null){var n=Fa=[];Ia=0,La=Rf(),Ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ia++,t.then(Ba,Ba),t}function Ba(){if(--Ia===0&&(Na=null,Fa!==null)){Ra!==null&&(Ra.status=`fulfilled`);var e=Fa;Fa=null,La=0,Ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Va(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 Ha=L.S;L.S=function(e,t){if(yd=Be(),typeof t==`object`&&t&&typeof t.then==`function`&&za(e,t),Na!==null)for(var n=wf;n!==null;)Ma(n,Na),n=n.next;if(n=e.types,n!==null){for(var r=wf;r!==null;)Ma(r,n),r=r.next;if(La!==0){r=Na,r===null&&(r=Na=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ha!==null&&Ha(e,t)};var Ua=_e(null);function Wa(){var e=Ua.current;return e===null?nd.pooledCache:e}function Ga(e,t){t===null?ye(Ua,Ua.current):ye(Ua,t.pool)}function Ka(){var e=Wa();return e===null?null:{parent:ka._currentValue,pool:e}}var qa=Error(i(460)),Ja=Error(i(474)),Ya=Error(i(542)),Xa={then:function(){}};function Za(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Qa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(vn,vn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(vn,vn);else{if(e=nd,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,no(e),e}throw eo=t,qa}}function $a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(eo=e,qa):e}}var eo=null;function to(){if(eo===null)throw Error(i(459));var e=eo;return eo=null,e}function no(e){if(e===qa||e===Ya)throw Error(i(483))}var ro=null,io=0;function ao(e){var t=io;return io+=1,ro===null&&(ro=[]),Qa(ro,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(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 co(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=Mi(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=Ii(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),oo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===re&&$a(i)===t.type)?(t=a(t,n.props),oo(t,n),t.return=e,t):(t=Pi(n.type,n.key,n.props,null,e.mode,r),oo(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=Ri(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ii(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Pi(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case A:return t=Ri(t,e.mode,n),t.return=e,t;case re:return t=$a(t),f(e,t,n)}if(pe(t)||ue(t))return t=Fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===F)return f(e,wa(e,t),n);so(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 re:return n=$a(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===F)return p(e,t,wa(e,n),r);so(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 re:return r=$a(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===F)return m(e,t,n,wa(t,r),i);so(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),H&&Xi(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 H&&Xi(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)}),H&&Xi(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),H&&Xi(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 H&&Xi(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)}),H&&Xi(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),oo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&$a(l)===r.type){n(e,r.sibling),c=a(r,o.props),oo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Fi(o.props.children,e.mode,c,o.key),oo(c,o),c.return=e,e=c):(c=Pi(o.type,o.key,o.props,null,e.mode,c),oo(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=Ri(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=$a(o),_(e,r,o,c)}if(pe(o))return h(e,r,o,c);if(ue(o)){if(l=ue(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,ao(o),c);if(o.$$typeof===F)return _(e,r,wa(e,o),c);so(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=Ii(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{io=0;var i=_(e,t,n,r);return ro=null,i}catch(t){if(t===qa||t===Ya)throw t;var a=Ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(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 ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,td&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Di(e),Ei(e,null,n),t}return Ci(e,r,t,n),Di(e)}function _o(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,ht(e,n)}}function vo(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 yo=!1;function bo(){if(yo){var e=Ra;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!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?(K&f)===f:(r&f)===f){f!==0&&f===La&&(yo=!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:fo=!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),ud|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=_e(null),To=_e(0);function Eo(e,t){e=cd,ye(To,e),ye(wo,t),cd=e|t.baseLanes}function Do(){ye(To,cd),ye(wo,wo.current)}function Oo(){cd=To.current,ve(wo),ve(To)}var ko=_e(null),Ao=null;function jo(e){var t=e.alternate;ye(Io,Io.current&1),ye(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){ye(Io,Io.current),ye(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(ye(Io,Io.current),ye(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){ye(Io,Io.current),ye(ko,ko.current)}function Fo(e){ve(ko),Ao===e&&(Ao=null),ve(Io)}var Io=_e(0);function Lo(e,t){ye(ko,ko.current),ye(Io,t)}function Ro(e){ve(Io),ve(ko),Ao===e&&(Ao=null)}function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||um(n)||dm(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 Bo=0,U=null,Vo=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(i(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return Bo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){L.H=mc;var t=Vo!==null&&Vo.next!==null;if(Bo=0,Ho=Vo=U=null,Uo=!1,qo=0,Jo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&xa(e)&&(Nc=!0))}function es(e,t,n,r){U=e;var a=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=a)throw Error(i(301));if(a+=1,Ho=Vo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}L.H=_c,o=t(n,r)}while(Wo);return o}function ts(){var e=L.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(Vo===null?null:Vo.memoizedState)!==e&&(U.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}Bo=0,Ho=Vo=U=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(Vo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=Vo.next;var t=Ho===null?U.memoizedState:Ho.next;if(t!==null)Ho=t,Vo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));Vo=e,e={memoizedState:Vo.memoizedState,baseState:Vo.baseState,baseQueue:Vo.baseQueue,queue:Vo.queue,next:null},Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=Qa(Jo,e,t),t=U,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===ce)return;if(e.$$typeof===F)return Ca(e)}throw Error(i(438,String(e)))}function us(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ss(),U.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=oe;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),Vo,e)}function ps(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?(Bo&f)===f:(K&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===La&&(d=!0);else if((Bo&p)===p){u=u.next,p===La&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,U.lanes|=p,ud|=p;f=u.action,Go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,U.lanes|=f,ud|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!zr(o,e.memoizedState)&&(Nc=!0,d&&(n=Ra,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 ms(e){var t=os(),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);zr(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hs(e,t,n){var r=U,a=os(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!zr((Vo||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Bs(vs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,a,n,t),null),e){if(r.flags|=2048,nd===null)throw Error(i(349));o||Bo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=ss(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zr(e,n)}catch{return!0}}function bs(e){var t=Ti(e,2);t!==null&&Rd(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){Ze(!0);try{n()}finally{Ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,Vo,typeof r==`function`?r:ds)}function Cs(e,t,n,r,a){if(dc(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)}};L.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ws(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=L.T,o={};o.types=a===null?null:a.types,L.T=o;try{var s=n(i,r),c=L.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),L.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(H){var n=nd.formState;if(n!==null){a:{var r=U;if(H){if(na){b:{for(var i=na,a=ia;i.nodeType!==8;)if(!a||(i=pm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){na=pm(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,U,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,U,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),Vo,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===qa?Ya:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=Vo;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=ss(),U.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();U.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;Vo!==null&&r!==null&&Zo(r,Vo.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(U.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=ss(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(td&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(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 Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||Bo&1073741824&&!(K&261930)?e.memoizedState=t:(e.memoizedState=n,e=Id(),U.lanes|=e,ud|=e,n)}function Zs(e,t,n,r){return zr(n,t)?n:wo.current===null?!(Bo&106)||Bo&1073741824&&!(K&261930)?(Nc=!0,e.memoizedState=n):(e=Id(),U.lanes|=e,ud|=e,t):(e=Xs(e,n,r),zr(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=R.p;R.p=a!==0&&8>a?a:8;var o=L.T,s={};s.types=o===null?null:o.types,L.T=s,uc(e,!1,t,n);try{var c=i(),l=L.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Va(c,r),Fd(e)):lc(e,t,r,Fd(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},Fd())}finally{R.p=a,o!==null&&s.types!==null&&(o.types=s.types),L.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=tc(e).queue;Qs(e,a,t,me,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},Fd())}function rc(){return Ca(dh)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Fd();e=ho(n);var r=go(t,e,n);r!==null&&(Rd(r,t,n),_o(r,t,n)),t={cache:Aa()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=Fd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=wi(e,t,n,r),n!==null&&(Rd(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,Fd())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(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,zr(s,o))return Ci(e,t,i,0),nd===null&&Si(),!1}catch{}if(n=wi(e,t,i,r),n!==null)return Rd(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Rf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(i(479))}else t=wi(e,n,r,2),t!==null&&Rd(t,e,2)}function dc(e){var t=e.alternate;return e===U||t!==null&&t===U}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}var mc={readContext:Ca,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:Ca,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:Ca,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){Ze(!0);try{n(t)}finally{Ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=sc.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,U,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=as();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),nd===null)throw Error(i(349));K&127||gs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,zs(vs.bind(null,r,o,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=nd.identifierPrefix;if(H){var n=Yi,r=Ji;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,U)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(td&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),Vo.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return Vo===null?Xs(n,e,t):Zs(n,Vo.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return Vo===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(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 yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Rd(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Rd(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fd(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Rd(t,e,n),_o(t,e,n))}};function bc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Br(n,r)||!Br(i,a):!0}function xc(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&&yc.enqueueReplaceState(t,t.state,null)}function Sc(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 Cc(e){vi(e)}function wc(e){console.error(e)}function Tc(e){vi(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(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 Oc(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=ho(e),e.tag=3,e}function Ac(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(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(Sd===null?Sd=new Set([this]):Sd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ba(t,n,a,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Xd():n.alternate===null&&ld===0&&(ld=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),vf(e,r,a)),!1;case 22:return n.flags|=65536,r===Xa?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)),vf(e,r,a)),!1}throw Error(i(435,n.tag))}return vf(e,r,a),Xd(),!1}if(H)return t=ko.current,t===null?(r!==aa&&(t=Error(i(423),{cause:r}),fa(Bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Bi(r,n),a=Oc(e.stateNode,r,a),vo(e,a),ld!==4&&(ld=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==aa&&(e=Error(i(422),{cause:r}),fa(Bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Bi(o,n),hd===null?hd=[o]:hd.push(o),ld!==4&&(ld=2),t===null)return!0;r=Bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),vo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(Sd===null||!Sd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Fc(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 Sa(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(H&&s&&Qi(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ji(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Br:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=Mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Br(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(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 Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ga(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ga(t,null),Do(),Po()):(Ga(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Wa();return a=a===null?null:{parent:ka._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ga(t,null),Do(),No(t),e!==null&&ba(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return lo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Fo(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(Mo(t),(e=na)?(e=lm(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Mo(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||ba(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(wo.current===null){if(r=nd,r!==null&&(s=gt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ti(e,s),Rd(r,e,s),Mc;Xd()}t=Hc(e,t,n)}else e=o.treeContext,na=pm(s.nextSibling),ta=t,H=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=Mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(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 Gc(e,t,n,r,i){return Sa(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(H&&r&&Qi(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Sa(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(H&&r&&Qi(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Sa(t),t.stateNode===null){var a=Oi,o=n.contextType;typeof o==`object`&&o&&(a=Ca(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?Ca(o):Oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(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&&yc.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),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=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Oi,typeof u==`object`&&u&&(o=Ca(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)&&xc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=fo||bc(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,mo(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Oi,typeof l==`object`&&l&&(c=Ca(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)&&xc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&xa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=fo||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&xa(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,Wc(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=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return ua(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Ka()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=pd),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Io.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(H){if(i?jo(t):Po(),(e=na)?(e=lm(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=dm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Fi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(jo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Mi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Fi(i,a,n,null),i.flags|=2):i=Mi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=Ka():(s=ka._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=Mi(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 $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=Ai(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return lo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Po(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Fi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,lo(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),dm(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,fa({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||ba(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(wo.current!==null)return tl(e,t,c);if(r=nd,r!==null&&(a=gt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ti(e,a),Rd(r,e,a),Mc;return um(o)||Xd(),tl(e,t,c)}return um(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,na=pm(o.nextSibling),ta=t,H=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&zo(n)===null&&(t=e),e=e.sibling}return t}function al(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 ol(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 sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Io.current;if(t.flags&128)return Lo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Lo(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=H?Wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(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=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(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&&zo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return ga(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ud|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ba(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=Mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&xa(e)))}function dl(e,t,n){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),ga(t,ka,e.memoizedState.cache),ua();break;case 27:case 5:Ee(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=ba(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(jo(t),e=ll(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ba(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Lo(t,Io.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:ga(t,ka,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,H&&t.flags&1048576&&Zi(t,Wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=$a(t.elementType),t.type=e,typeof e==`function`)ji(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===I){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===ne){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Sc(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ga(t,ka,r),r!==o.cache&&ya(t,[ka],n,!0),bo(),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=Jc(e,t,r,n);break a}if(r!==a){a=Bi(Error(i(424)),t),fa(a),t=Jc(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(na=pm(e.firstChild),ta=t,H=!0,ra=null,ia=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Lm(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(t.stateNode=gp(t.type,t.pendingProps,Se.current,t)):t.memoizedState=Lm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&H&&(r=t.stateNode=ym(t.type,t.pendingProps,Se.current),ta=t,ia=!0,a=na,Ep(t.type)?(mm=a,na=pm(r.firstChild)):na=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=na)&&(r=sm(r,t.type,t.pendingProps,ia),r===null?a=!1:(t.stateNode=r,ta=t,na=pm(r.firstChild),ia=!1,a=!0)),a||oa(t)),Ee(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,_p(a,o)?r=null:s!==null&&_p(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Qo(e,t,ts,null,null,n),dh._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=na)&&(n=cm(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ta=t,na=null,e=!0)),e||oa(t)),null;case 13:return Qc(e,t,n);case 4:return we(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Sa(t),a=Ca(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Sa(t),r=Ca(ka),e===null?(a=Wa(),a===null&&(a=nd,o=Aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},po(t),ga(t,ka,a)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ga(t,ka,r),r!==a.cache&&ya(t,[ka],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ga(t,ka,r))),Pc(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:H&&Qi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Qm(t,r):Qm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(qd())e.flags|=8192;else throw eo=Xa,Ja}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$m(t)){if(qd())e.flags|=8192;else throw eo=Xa,Ja}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ut(),e.lanes|=t,md|=t)}function _l(e,t){if(!H)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 vl(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 yl(e,t,n){var r=t.pendingProps;switch($i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_a(ka),Te(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,da())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(De(t),n=Se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=be.current,la(t)?sa(t,e):(e=ym(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(De(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=be.current,la(t))sa(t,o);else{var s=pp(Se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[St]=t,o[Ct]=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(op(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&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Se.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ta,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||oa(t,!0)}else e=pp(e).createTextNode(r),e[St]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(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[St]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Fo(t),t):(Fo(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(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[St]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Fo(t),t):(Fo(t),null)}return Fo(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),gl(t,t.updateQueue),vl(t),null);case 4:return Te(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return _a(t.type),vl(t),null;case 19:if(Ro(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(ld!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=zo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ni(n,e),n=n.sibling;return Lo(t,Io.current&1|2),H&&Xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Be()>bd&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=zo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!H)return vl(t),null}else 2*Be()-r.renderingStartTime>bd&&n!==536870912&&(t.flags|=128,a=!0,_l(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=Be(),e.sibling=null,o=Io.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||H?Lo(t,o):(n=o,ye(ko,t),ye(Io,n),Ao===null&&(Ao=t)),H&&Xi(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Fo(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(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&&ve(Ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_a(ka),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch($i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(ka),Te(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(Fo(t),t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ro(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 Te(),null;case 10:return _a(t.type),null;case 22:case 23:return Fo(t),Oo(),e!==null&&ve(Ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(ka),null;case 25:return null;default:return null}}function xl(e,t){switch($i(t),t.tag){case 3:_a(ka),Te();break;case 26:case 27:case 5:De(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&Fo(t);break;case 13:Fo(t);break;case 19:Ro(t);break;case 10:_a(t.type);break;case 22:case 23:Fo(t),Oo(),e!==null&&ve(Ua);break;case 24:_a(ka)}}function Sl(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){q(t,t.return,e)}}function Cl(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){q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){q(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){q(e,e.return,t)}}}function Tl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){q(e,t,n)}}function El(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=hi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Rp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new zp(e);m(e.child,!1,nm,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){q(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){q(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){q(e,t,n)}else n.current=null}}function Ol(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++)im(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&im(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&am(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(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){q(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;cp(r,e.type,n,t),r[Ct]=t}catch(t){q(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ep(e.type)||e.tag===4}function Il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(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&&Ep(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 Ll(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=vn)),Ol(e,r),z=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Ep(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),z=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Ep(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);op(t,r,n),t[St]=e,t[Ct]=n}catch(t){q(e,e.return,t)}}var Bl=!1,Vl=null;function Hl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Bl=!0)}var Ul=null;function Wl(){var e=Ul;return Ul=null,e}var Gl=0;function Kl(e,t,n,r,i){return Gl=0,ql(e.child,t,n,r,i)}function ql(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Mp(o);r.push(s),s.view&&(a=!0)}else a||Mp(o).view&&(a=!0);Bl=!0,kp(o,Gl===0?t:t+`_`+Gl,n),Gl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||ql(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Jl(e,t){for(;e!==null;)e.tag===5?Ap(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Jl(e.child,t),e=e.sibling}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Yl(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=_i(t.default,t.share),t!==`none`&&(Kl(e,n,t,null,!1)||Jl(e.child,!1))}e=e.sibling}}function W(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=hi(r,n),a=_i(r.default,n.paired?r.share:r.enter);a===`none`?Yl(e):Kl(e,i,a,null,!1)?(Yl(e),n.paired||t||Ld(e,r.onEnter)):Jl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)W(e,t),e=e.sibling;else Yl(e)}function Xl(e){if(Vl!==null&&Vl.size!==0){var t=Vl;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=_i(n.default,n.share);if(a!==`none`&&(Kl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Ld(e,n.onShare)):Jl(e.child,!1)),t.delete(r),t.size===0)break}}}Xl(e)}e=e.sibling}}}function Zl(e){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode),r=Vl===null?void 0:Vl.get(n),i=_i(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Kl(e,n,i,null,!1)?r===void 0?Ld(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Vl.delete(n),Ld(e,t.onShare)):Jl(e.child,!1)),Vl!==null&&Xl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Vl!==null&&Xl(e)}function Ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode);t=_i(t.default,t.update),e.flags&=-5,t!==`none`&&Kl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Ql(e);e=e.sibling}}function $l(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,Jl(e.child,!1))}$l(e)}e=e.sibling}}function eu(e){if(e.tag===30)e.stateNode.paired=null,Jl(e.child,!1),$l(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else $l(e)}function tu(e){for(e=e.child;e!==null;)e.tag===30?Jl(e.child,!1):e.subtreeFlags&33554432&&tu(e),e=e.sibling}function nu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Gl<a.length){var l=a[Gl],u=Mp(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&&kp(c,Gl===0?n:n+`_`+Gl,i),s&&e.flags&4||(Ul===null&&(Ul=[]),Ul.push(c,Gl===0?r:r+`_`+Gl,t.memoizedProps)),Gl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:nu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ru(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=hi(n,r),a=_i(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Np)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Gl=0,i=nu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Ld(e,n.onUpdate))}else e.subtreeFlags&33554432&&ru(e,t);e=e.sibling}}var iu=!1,au=!1,ou=!1,su=!1,cu=typeof WeakSet==`function`?WeakSet:Set,lu=null,uu=!1,du=!1,fu=!1,pu=!1;function mu(e,t,n){if(e=e.containerInfo,dp=bh,e=Gr(e),Kr(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(fp={focusedElem:e,selectionRange:r},bh=!1,n=(n&335544064)===n,lu=t,t=n?9270:1024;lu!==null;){if(e=lu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Zl(r[a]);if(e.alternate===null&&e.flags&2)n&&Hl(e),hu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Zl(r),hu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Hl(e),hu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,lu=r):(n&&Ql(e),hu(n))}}Vl=null}function hu(e){for(;lu!==null;){var t=lu,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=Sc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){q(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)om(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:om(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=hi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=_i(a.default,a.update),a!==`none`&&Kl(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,lu=r;break}lu=t.return}}function gu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Iu(e,n),r&4&&Sl(5,n);break;case 1:if(Iu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){q(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){q(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Iu(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{Co(e,t)}catch(e){q(n,n.return,e)}}break;case 27:t===null&&r&4&&zl(n);case 26:case 5:Iu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Iu(e,n);break;case 31:Iu(e,n),r&4&&Tu(e,n);break;case 13:Iu(e,n),r&4&&Eu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=xf.bind(null,n),fm(e,n))));break;case 22:if(r=n.memoizedState!==null||iu,!r){var a=t!==null&&t.memoizedState!==null||au;t=iu,i=au,iu=r,(au=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Ru(e,n,r)):Iu(e,n),iu=t,au=i}break;case 30:Iu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Iu(e,n)}}function _u(e,t){for(e=e.child;e!==null;)vu(e,t),e=e.sibling}function vu(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){q(e,e.return,t)}yu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,z=!0}catch(t){q(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Op(s,!0):Op(e.stateNode,!1)}catch(t){q(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&_u(e,t);break;default:_u(e,t)}}function yu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:vu(n,r);break a;case 22:n.memoizedState===null&&yu(n,r);break a;default:yu(n,r)}}e=e.sibling}}function bu(e){var t=e.alternate;t!==null&&(e.alternate=null,bu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jt(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 xu=null,Su=!1;function Cu(e,t,n){for(n=n.child;n!==null;)wu(e,t,n),n=n.sibling}function wu(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount==`function`)try{Xe.onCommitFiberUnmount(Ye,n)}catch{}switch(n.tag){case 26:au||Dl(n,t),Cu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!au&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:au||Dl(n,t),Al(n);var r=xu,i=Su;Ep(n.type)&&(xu=n.stateNode,Su=!1),Cu(e,t,n),bm(n.stateNode,n.type,n.memoizedProps),xu=r,Su=i;break;case 5:au||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(n),r=xu,i=Su,xu=null,Cu(e,t,n),xu=r,Su=i,xu!==null){if(Su)try{(xu.nodeType===9?xu.body:xu.nodeName===`HTML`?xu.ownerDocument.body:xu).removeChild(n.stateNode),z=!0}catch(e){q(n,t,e)}else try{xu.removeChild(n.stateNode),z=!0}catch(e){q(n,t,e)}}break;case 18:xu!==null&&(Su?(e=xu,Dp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kh(e)):Dp(xu,n.stateNode));break;case 4:r=xu,i=Su,xu=n.stateNode.containerInfo,Su=!0,Cu(e,t,n),xu=r,Su=i;break;case 0:case 11:case 14:case 15:Cl(2,n,t),au||Cl(4,n,t),Cu(e,t,n);break;case 1:au||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(n,t,r)),Cu(e,t,n);break;case 21:Cu(e,t,n);break;case 22:au=(r=au)||n.memoizedState!==null,Cu(e,t,n),au=r;break;case 30:Dl(n,t),Cu(e,t,n);break;case 7:au||Dl(n,t),Cu(e,t,n);break;default:Cu(e,t,n)}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kh(e)}catch(e){q(t,t.return,e)}}}function Eu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kh(e)}catch(e){q(t,t.return,e)}}function Du(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cu),t;default:throw Error(i(435,e.tag))}}function Ou(e,t){var n=Du(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Sf.bind(null,e,t);t.then(r,r)}})}function ku(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(Ep(l.type)){xu=l.stateNode,Su=!1;break a}break;case 5:xu=l.stateNode,Su=!1;break a;case 3:case 4:xu=l.stateNode.containerInfo,Su=!0;break a}l=l.return}if(xu===null)throw Error(i(160));wu(s,c,o),xu=null,Su=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ju(t,e,n),t=t.sibling}var Au=null;function ju(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}ku(t,e,n),Mu(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:ku(t,e,n),Mu(e),a&512&&(au||r===null||Dl(r,r.return)),a&64&&iu&&(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=Au,ku(t,e,n),Mu(e),a&512&&(au||r===null||Dl(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(iu)e.stateNode=gp(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[kt]||r[St]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),op(r,t,n),r[St]=e,It(r),t=r;break a;case`link`:if(o=Ym(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Ym(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[St]=e,It(r),t=r}e.stateNode=t}}else iu||Xm(o,e.type,e.stateNode)}else e.stateNode=Wm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||au||t.parentNode.removeChild(t)):a.count--,n===null?iu||Xm(o,e.type,e.stateNode):Wm(o,n,e.memoizedProps))}break;case 27:ku(t,e,n),Mu(e),a&512&&(au||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ou,ou=!1,ku(t,e,n),ou=o,Mu(e),a&512&&(au||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{un(t,``),z=!0}catch(t){q(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(su=!0);break;case 6:if(ku(t,e,n),Mu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,z=!0}catch(t){q(e,e.return,t)}}break;case 3:if(z=!1,Jm=null,o=Au,Au=wm(t.containerInfo),ku(t,e,n),Au=o,Mu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Kh(t.containerInfo)}catch(t){q(e,e.return,t)}su&&(su=!1,Nu(e)),z=!1;break;case 4:a=ou,ou=iu,r=Kt(),o=Au,Au=wm(e.stateNode.containerInfo),ku(t,e,n),Mu(e),Au=o,z&&du&&(fu=!0),z=r,ou=a;break;case 12:ku(t,e,n),Mu(e);break;case 31:ku(t,e,n),Mu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 13:ku(t,e,n),Mu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(vd=Be()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=iu,l=au,u=ou;iu=c||o,ou=u||o,au=l||s,ku(t,e,n),au=l,ou=u,iu=c,Mu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||iu||au||(t=s||au,n=iu,r=au,iu=o||iu,au=t,Lu(e,2),iu=n,au=r),!o&&ou||_u(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Ou(e,n))));break;case 19:ku(t,e,n),Mu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 30:a&512&&(au||r===null||Dl(r,r.return)),a=Kt(),o=du,s=(n&335544064)===n,c=e.memoizedProps,du=s&&_i(c.default,c.update)!==`none`,ku(t,e,n),Mu(e),s&&r!==null&&z&&(e.flags|=4),du=o,z=a;break;case 21:break;case 7:a&512&&(au||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:ku(t,e,n),Mu(e)}}function Mu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Rl(e,Il(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(un(l,``),n.flags&=-33),Rl(e,Il(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ll(e,Il(e),u,s);break;default:throw Error(i(161))}}catch(t){q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,bh=!0,t.reset(),bh=!1),e=e.sibling}}function Pu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Fu(t,e),t=t.sibling;else ru(t,!1)}function Fu(e,t){var n=e.alternate;if(n===null)W(e,!1);else switch(e.tag){case 3:if(pu=uu=!1,Wl(),Pu(t,e),!uu&&!fu){if(e=Ul,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ap(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`})),pu=!0}Ul=null;break;case 5:Pu(t,e);break;case 4:r=uu,uu=!1,Pu(t,e),uu&&(fu=!0),uu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Pu(t,e):W(e,!1));break;case 30:r=uu,i=Wl(),uu=!1,Pu(t,e),uu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=hi(a,o),o=hi(n.memoizedProps,o);var s=_i(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Gl=0,t=nu(e,n,t,o,s,a,!0),Gl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Ld(e,e.memoizedProps.onUpdate),Ul=i):i!==null&&(i.push.apply(i,Ul),Ul=i),uu=e.flags&32?!0:r;break;default:Pu(t,e)}}function Iu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gu(e,t.alternate,t),t=t.sibling}function Lu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Lu(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Lu(n,r);break;case 27:r&2&&bm(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Lu(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||au||i.parentNode.removeChild(i),Lu(n,r);break;case 22:n.memoizedState===null&&Lu(n,r);break;case 30:Dl(n,n.return),Lu(n,r);break;case 7:Dl(n,n.return);default:Lu(n,r)}e=e.sibling}}function Ru(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:Ru(i,a,n),Sl(4,a);break;case 1:if(Ru(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){q(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++)So(l[i],c)}catch(e){q(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&zl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),Ru(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||iu||Xm(wm(c.ownerDocument),a.type,c),Ru(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:Ru(i,a,n);break;case 31:Ru(i,a,n),s&&o&4&&Tu(i,a);break;case 13:Ru(i,a,n),s&&o&4&&Eu(i,a);break;case 22:a.memoizedState===null&&Ru(i,a,n),El(a,a.return);break;case 30:Ru(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:Ru(i,a,n)}t=t.sibling}}function zu(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&&ja(n))}function Bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ja(e))}function Vu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Hu(e,t,n,r),t=t.sibling;else i&&tu(t)}function Hu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&eu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Vu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:Vu(e,t,n,r);break;case 3:Vu(e,t,n,r),i&&pu&&(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&&ja(a)));break;case 12:if(a&2048){Vu(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){q(t,t.return,e)}}else Vu(e,t,n,r);break;case 31:Vu(e,t,n,r);break;case 13:Vu(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&&eu(t),o._visibility&2?Vu(e,t,n,r):(o._visibility|=2,Uu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&eu(s),o._visibility&2?Vu(e,t,n,r):Wu(e,t)),a&2048&&zu(s,t);break;case 24:Vu(e,t,n,r),a&2048&&Bu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Jl(a.child,!0),Jl(t.child,!0))),Vu(e,t,n,r);break;default:Vu(e,t,n,r)}}function Uu(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:Uu(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Uu(a,o,s,c,i)):u._visibility&2?Uu(a,o,s,c,i):Wu(a,o),i&&l&2048&&zu(o.alternate,o);break;case 24:Uu(a,o,s,c,i),i&&l&2048&&Bu(o.alternate,o);break;default:Uu(a,o,s,c,i)}t=t.sibling}}function Wu(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:Wu(n,r),i&2048&&zu(r.alternate,r);break;case 24:Wu(n,r),i&2048&&Bu(r.alternate,r);break;default:Wu(n,r)}t=t.sibling}}var Gu=8192;function Ku(e,t,n){if(e.subtreeFlags&Gu)for(e=e.child;e!==null;)qu(e,t,n),e=e.sibling}function qu(e,t,n){switch(e.tag){case 26:Ku(e,t,n),e.flags&Gu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&th(n,e)):nh(n,Au,e.memoizedState,e.memoizedProps));break;case 5:Ku(e,t,n),e.flags&Gu&&(e=e.stateNode,(t&335544128)===t&&th(n,e));break;case 3:case 4:var r=Au;Au=wm(e.stateNode.containerInfo),Ku(e,t,n),Au=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Gu,Gu=16777216,Ku(e,t,n),Gu=r):Ku(e,t,n));break;case 30:if((e.flags&Gu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Vl===null&&(Vl=new Map),Vl.set(r,i)}Ku(e,t,n);break;default:Ku(e,t,n)}}function Ju(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 Yu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Qu(r,e)}Ju(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xu(e),e=e.sibling}function Xu(e){switch(e.tag){case 0:case 11:case 15:Yu(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Yu(e);break;case 12:Yu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zu(e)):Yu(e);break;default:Yu(e)}}function Zu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Qu(r,e)}Ju(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),Zu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zu(t));break;default:Zu(t)}e=e.sibling}}function Qu(e,t){for(;lu!==null;){var n=lu;switch(n.tag){case 0:case 11:case 15:Cl(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:ja(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,lu=r;else a:for(n=e;lu!==null;){r=lu;var i=r.sibling,a=r.return;if(bu(r),r===n){lu=null;break a}if(i!==null){i.return=a,lu=i;break a}lu=a}}}var $u={getCacheForType:function(e){var t=Ca(ka),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ca(ka).controller.signal}},ed=typeof WeakMap==`function`?WeakMap:Map,td=0,nd=null,G=null,K=0,rd=0,id=null,ad=!1,od=!1,sd=!1,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=null,gd=null,_d=!1,vd=0,yd=0,bd=1/0,xd=null,Sd=null,Cd=0,wd=null,Td=null,Ed=0,Dd=0,Od=null,kd=null,Ad=null,jd=null,Md=null,Nd=0,Pd=null;function Fd(){return td&2&&K!==0?K&-K:L.T===null?yt():Rf()}function Id(){if(pd===0){if(!(K&536870912)||H){var e=rt;rt<<=1,!(rt&3932160)&&(rt=262144),pd=e}else pd=536870912}return e=ko.current,e!==null&&(e.flags|=32),pd}function Ld(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Rp(hi(e.memoizedProps,n))),jd===null&&(jd=[]),jd.push(t.bind(null,r))}}function Rd(e,t,n){(e===nd&&(rd===2||rd===9)||e.cancelPendingCommit!==null)&&(Gd(e,0),Hd(e,K,pd,!1)),ft(e,n),td&2&&e===nd||(e===nd&&(!(td&2)&&(dd|=n),ld===4&&Hd(e,K,pd,!1)),Af(e))}function zd(e,t,n){if(td&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||st(e,t),a=r?$d(e,t):Zd(e,t,!0),o=r;do{if(a===0){od&&!r&&Hd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Vd(n))a=Zd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=hd;var l=c.current.memoizedState.isDehydrated;if(l&&(Gd(c,s).flags|=256),s=Zd(c,s,!1),s!==2&&s!==6){if(sd&&!l){c.errorRecoveryDisabledLanes|=o,dd|=o,a=4;break a}o=gd,gd=a,o!==null&&(gd===null?gd=o:gd.push.apply(gd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Gd(e,0),Hd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Hd(r,t,pd,!ad);break a;case 2:gd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=vd+300-Be(),10<a)){if(Hd(r,t,pd,!ad),ot(r,0,!0)!==0)break a;Ed=t,r.timeoutHandle=bp(Bd.bind(null,r,n,gd,xd,_d,t,pd,dd,md,ad,o,`Throttled`,-0,0),a);break a}Bd(r,n,gd,xd,_d,t,pd,dd,md,ad,o,null,-0,0)}break}}while(1);Af(e)}function Bd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vn},Vl=null,qu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=oh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?vd-Be():(a&4194048)===a?yd-Be():0,m=ih(d,m),m!==null)?(Ed=a,e.cancelPendingCommit=m(sf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Hd(e,a,o,!l)):sf(e,t,a,n,r,i,o,s,c,l,u,d)}function Vd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!zr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Hd(e,t,n,r){t=ct(e,t),t&=~fd,t&=~dd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&mt(e,n,t)}function Ud(){return td&6?!0:(jf(0,!1),!1)}function Wd(){if(G!==null){if(rd===0)var e=G.return;else e=G,ha=ma=null,is(e),ro=null,io=0,e=G;for(;e!==null;)xl(e.alternate,e),e=e.return;G=null}}function Gd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,xp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ed=0,Wd(),nd=e,G=n=Mi(e.current,null),K=t,rd=0,id=null,ad=!1,od=st(e,t),sd=!1,md=pd=fd=dd=ud=ld=0,gd=hd=null,_d=!1,cd=ct(e,t),Si(),n}function Kd(e,t){U=null,L.H=mc,t===qa||t===Ya?(t=to(),rd=3):t===Ja?(t=to(),rd=4):rd=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,id=t,G===null&&(ld=1,Ec(e,Bi(t,e.current)))}function qd(){var e=ko.current;return e===null?!0:(K&4194048)===K?Ao===null:(K&62914560)===K||K&536870912?e===Ao:!1}function Jd(){var e=L.H;return L.H=mc,e===null?mc:e}function Yd(){var e=L.A;return L.A=$u,e}function Xd(){ld=4,ad||(K&4194048)!==K&&ko.current!==null||(od=!0),!(ud&134217727)&&!(dd&134217727)||nd===null||Hd(nd,K,pd,!1)}function Zd(e,t,n){var r=td;td|=2;var i=Jd(),a=Yd();(nd!==e||K!==t)&&(xd=null,Gd(e,t)),t=!1;var o=ld;a:do try{if(rd!==0&&G!==null){var s=G,c=id;switch(rd){case 8:Wd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=rd;if(rd=0,id=null,rf(e,s,c,l),n&&od){o=0;break a}break;default:l=rd,rd=0,id=null,rf(e,s,c,l)}}Qd(),o=ld;break}catch(t){Kd(e,t)}while(1);return t&&e.shellSuspendCounter++,ha=ma=null,td=r,L.H=i,L.A=a,G===null&&(nd=null,K=0,Si()),o}function Qd(){for(;G!==null;)tf(G)}function $d(e,t){var n=td;td|=2;var r=Jd(),a=Yd();nd!==e||K!==t?(xd=null,bd=Be()+500,Gd(e,t)):od=st(e,t);a:do try{if(rd!==0&&G!==null){t=G;var o=id;b:switch(rd){case 1:rd=0,id=null,rf(e,t,o,1);break;case 2:case 9:if(Za(o)){rd=0,id=null,nf(t);break}t=function(){rd!==2&&rd!==9||nd!==e||(rd=7),Af(e)},o.then(t,t);break a;case 3:rd=7;break a;case 4:rd=5;break a;case 7:Za(o)?(rd=0,id=null,nf(t)):(rd=0,id=null,rf(e,t,o,7));break;case 5:var s=null;switch(G.tag){case 26:s=G.memoizedState;case 5:case 27:var c=G;if(s?$m(s):c.stateNode.complete){rd=0,id=null;var l=c.sibling;if(l!==null)G=l;else{var u=c.return;u===null?G=null:(G=u,af(u))}break b}}rd=0,id=null,rf(e,t,o,5);break;case 6:rd=0,id=null,rf(e,t,o,6);break;case 8:Wd(),ld=6;break a;default:throw Error(i(462))}}ef();break}catch(t){Kd(e,t)}while(1);return ha=ma=null,L.H=r,L.A=a,td=n,G===null?(nd=null,K=0,Si(),ld):0}function ef(){for(;G!==null&&!Re();)tf(G)}function tf(e){var t=fl(e.alternate,e,cd);e.memoizedProps=e.pendingProps,t===null?af(e):G=t}function nf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,K);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,K);break;case 5:is(t);var r=t;r===ta&&(H?(ca(r),r.tag===5&&r.stateNode!=null&&(na=r.stateNode)):(ca(r),H=!0));default:xl(n,t),t=G=Ni(t,cd),t=fl(n,t,cd)}e.memoizedProps=e.pendingProps,t===null?af(e):G=t}function rf(e,t,n,r){ha=ma=null,is(t),ro=null,io=0;var i=t.return;try{if(jc(e,i,t,n,K)){ld=1,Ec(e,Bi(n,e.current)),G=null;return}}catch(t){if(i!==null)throw G=i,t;ld=1,Ec(e,Bi(n,e.current)),G=null;return}t.flags&32768?(H||r===1?e=!0:od||K&536870912?e=!1:(ad=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),of(t,e)):af(t)}function af(e){var t=e;do{if(t.flags&32768){of(t,ad);return}e=t.return;var n=yl(t.alternate,t,cd);if(n!==null){G=n;return}if(t=t.sibling,t!==null){G=t;return}G=t=e}while(t!==null);ld===0&&(ld=5)}function of(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,G=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){G=e;return}G=e=n}while(e!==null);ld=6,G=null}function sf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do hf();while(Cd!==0);if(td&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===nd&&(G=nd=null,K=0),Td=t,wd=e,Ed=n,Od=a,kd=r,cf(e,t,n,s,c,l,f)}}function cf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Dd=s,s|=xi,pt(e,n,s,r,i,a),jd=null,(n&335544064)===n?(Md=Pa(e),r=10262):(Md=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Cf(We,function(){return gf(),null})):(e.callbackNode=null,e.callbackPriority=0),Bl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=L.T,L.T=null,i=R.p,R.p=2,a=td,td|=4;try{mu(e,t,n)}finally{td=a,R.p=i,L.T=r}}Cd=1,Bl?Ad=Ip(o,e.containerInfo,Md,df,ff,uf,pf,gf,lf,null,null):(df(),ff(),pf())}function lf(e){if(Cd!==0){var t=wd.onRecoverableError;t(e,{componentStack:null})}}function uf(){Cd===3&&(Cd=0,Fu(Td,wd),Cd=4)}function df(){if(Cd===1){Cd=0;var e=wd,t=Td,n=Ed,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=L.T,L.T=null;var i=R.p;R.p=2;var a=td;td|=4;try{du=fu=!1,ju(t,e,n),n=fp;var o=Gr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Wr(s.ownerDocument.documentElement,s)){if(c!==null&&Kr(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 _=Ur(s,h),v=Ur(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}}bh=!!dp,fp=dp=null}finally{td=a,R.p=i,L.T=r}}e.current=t,Cd=2}}function ff(){if(Cd===2){Cd=0;var e=wd,t=Td,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=L.T,L.T=null;var r=R.p;R.p=2;var i=td;td|=4;try{gu(e,t.alternate,t)}finally{td=i,R.p=r,L.T=n}}Cd=3}}function pf(){if(Cd===4||Cd===3){Cd=0;var e=Ad;Ad=null,ze();var t=wd,n=Td,r=Ed,i=kd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Cd=5:(Cd=0,Td=wd=null,mf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Sd=null),vt(r),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Ye,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=L.T,a=R.p,R.p=2,L.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{L.T=n,R.p=a}}if(i=jd,o=Md,Md=null,i!==null&&(jd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Ed&3&&hf(),Af(t),a=t.pendingLanes,r&261930&&a&42?t===Pd?Nd++:(Nd=0,Pd=t):(Nd=0,Pd=null),jf(0,!1)}}function mf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ja(t)))}function hf(){return Ad!==null&&(Ad.skipTransition(),Ad=null),df(),ff(),pf(),gf()}function gf(){if(Cd!==5)return!1;var e=wd,t=Dd;Dd=0;var n=vt(Ed),r=L.T,a=R.p;try{R.p=32>n?32:n,L.T=null,n=Od,Od=null;var o=wd,s=Ed;if(Cd=0,Td=wd=null,Ed=0,td&6)throw Error(i(331));var c=td;if(td|=4,Xu(o.current),Hu(o,o.current,s,n),td=c,jf(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Ye,o)}catch{}return!0}finally{R.p=a,L.T=r,mf(e,t)}}function _f(e,t,n){t=Bi(n,t),t=Oc(e.stateNode,t,2),e=go(e,t,2),e!==null&&(ft(e,2),Af(e))}function q(e,t,n){if(e.tag===3)_f(e,e,n);else for(;t!==null;){if(t.tag===3){_f(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Sd===null||!Sd.has(r))){e=Bi(n,e),n=kc(2),r=go(t,n,2),r!==null&&(Ac(n,r,t,e),ft(r,2),Af(r));break}}t=t.return}}function vf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ed;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)||(sd=!0,i.add(n),e=yf.bind(null,e,t,n),t.then(e,e))}function yf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,nd===e&&(K&n)===n&&(ld===4||ld===3&&(K&62914560)===K&&300>Be()-vd?td&2?fd|=n:Gd(e,0):fd|=n,md===K&&(md=0)),Af(e)}function bf(e,t){t===0&&(t=ut()),e=Ti(e,t),e!==null&&(ft(e,t),Af(e))}function xf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bf(e,n)}function Sf(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),bf(e,n)}function Cf(e,t){return Ie(e,t)}var wf=null,Tf=null,Ef=!1,Df=!1,Of=!1,kf=0;function Af(e){e!==Tf&&e.next===null&&(Tf===null?wf=Tf=e:Tf=Tf.next=e),Df=!0,Ef||(Ef=!0,Lf())}function jf(e,t){if(!Of&&Df){Of=!0;do for(var n=!1,r=wf;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-Qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,If(r,a))}else a=K,a=ot(r,r===nd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||st(r,a)||(n=!0,If(r,a))}r=r.next}while(n);Of=!1}}function Mf(){Nf()}function Nf(){Df=Ef=!1;var e=0;kf!==0&&yp()&&(e=kf);for(var t=Be(),n=null,r=wf;r!==null;){var i=r.next,a=Pf(r,t);a===0?(r.next=null,n===null?wf=i:n.next=i,i===null&&(Tf=n)):(n=r,(e!==0||a&3)&&(Df=!0)),r=i}Cd!==0&&Cd!==5||jf(e,!1),kf!==0&&(kf=0)}function Pf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=lt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=nd,n=K,n=ot(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(rd===2||rd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Le(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||st(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Le(r),vt(n)){case 2:case 8:n=Ue;break;case 32:n=We;break;case 268435456:n=Ke;break;default:n=We}return r=Ff.bind(null,e),n=Ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Le(r),e.callbackPriority=2,e.callbackNode=null,2}function Ff(e,t){if(Cd!==0&&Cd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(hf()&&e.callbackNode!==n)return null;var r=K;return r=ot(e,e===nd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(zd(e,r,t),Pf(e,Be()),e.callbackNode!=null&&e.callbackNode===n?Ff.bind(null,e):null)}function If(e,t){if(hf())return null;zd(e,t,!0)}function Lf(){wp(function(){td&6?Ie(He,Mf):Nf()})}function Rf(){if(kf===0){var e=La;e===0&&(e=nt,nt<<=1,!(nt&261888)&&(nt=256)),kf=e}return kf}function zf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:_n(e)}function Bf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=zf((i[Ct]||null).action),o=r.submitter;o&&(t=(t=o[Ct]||null)?zf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new zn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(kf!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Vf=0;Vf<fi.length;Vf++){var J=fi[Vf];pi(J.toLowerCase(),`on`+(J[0].toUpperCase()+J.slice(1)))}pi(ii,`onAnimationEnd`),pi(ai,`onAnimationIteration`),pi(oi,`onAnimationStart`),pi(`dblclick`,`onDoubleClick`),pi(`focusin`,`onFocus`),pi(`focusout`,`onBlur`),pi(si,`onTransitionRun`),pi(ci,`onTransitionStart`),pi(li,`onTransitionCancel`),pi(ui,`onTransitionEnd`),Vt(`onMouseEnter`,[`mouseout`,`mouseover`]),Vt(`onMouseLeave`,[`mouseout`,`mouseover`]),Vt(`onPointerEnter`,[`pointerout`,`pointerover`]),Vt(`onPointerLeave`,[`pointerout`,`pointerover`]),Bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`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(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(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){vi(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){vi(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[Tt];n===void 0&&(n=t[Tt]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Rt.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Dh(t)){case 2:var i=xh;break;case 8:i=Sh;break;default:i=Ch}n=i.bind(null,t,n,e),i=void 0,!On||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 Yf(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=Mt(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}Tn(function(){var r=a,i=bn(n),s=[];a:{var c=di.get(e);if(c!==void 0){var l=zn,u=e;switch(e){case`keypress`:if(Pn(n)===0)break a;case`keydown`:case`keyup`:l=B;break;case`focusin`:u=`focus`,l=Jn;break;case`focusout`:u=`blur`,l=Jn;break;case`beforeblur`:case`afterblur`:l=Jn;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=Kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=qn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ii:case ai:case oi:l=Yn;break;case ui:l=or;break;case`scroll`:case`scrollend`:l=Vn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Xn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}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=En(m,p),g!=null&&d.push(Xf(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!==yn&&(u=n.relatedTarget||n.fromElement)&&(Mt(u)||u[wt]))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?Mt(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=Kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Pt(c),h=l==null?u:Pt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Mt(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,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?Pt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Dr;else if(xr(c)){if(Or)_=Lr;else{_=Fr;var v=Pr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&mn(r.elementType)&&(_=Dr):_=Ir;if(_&&=_(e,r)){Sr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Pt(r):window,e){case`focusin`:(xr(v)||v.contentEditable===`true`)&&(Jr=v,Yr=r,Xr=null);break;case`focusout`:Xr=Yr=Jr=null;break;case`mousedown`:Zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Zr=!1,Qr(s,n,i);break;case`selectionchange`:if(qr)break;case`keydown`:case`keyup`:Qr(s,n,i)}var y;if(ur)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 _r?hr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(V&&n.locale!==`ko`&&(_r||b!==`onCompositionStart`?b===`onCompositionEnd`&&_r&&(y=Nn()):(An=i,jn=`value`in An?An.value:An.textContent,_r=!0)),v=Zf(r,b),0<v.length&&(b=new Zn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=gr(n),y!==null&&(b.data=y)))),(y=fr?vr(e,n):yr(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new Zn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Bf(s,e,r,n,i)}Wf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(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=En(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=En(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(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=En(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=En(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
|
|
9
|
+
`).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function ip(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||un(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&un(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:pn(e,r,o);return;case`data`:if(t!==`object`){Jt(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=_n(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`&&ip(e,t,`name`,a.name,a,null),ip(e,t,`formEncType`,a.formEncType,a,null),ip(e,t,`formMethod`,a.formMethod,a,null),ip(e,t,`formTarget`,a.formTarget,a,null)):(ip(e,t,`encType`,a.encType,a,null),ip(e,t,`method`,a.method,a,null),ip(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=_n(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=vn);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`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=_n(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`:Y(`beforetoggle`,e),Y(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(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=hn.get(n)||n,qt(e,n,r);else return}z=!0}function ap(e,t,n,r,a,o){switch(n){case`style`:pn(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`)un(e,r);else if(typeof r==`number`||typeof r==`bigint`)un(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=vn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!zt.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[Ct]||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}z=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}z=!0}function op(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`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:ip(e,t,o,s,n,null)}}a&&ip(e,t,`srcSet`,n.srcSet,n,null),r&&ip(e,t,`src`,n.src,n,null);return;case`input`:Y(`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:ip(e,t,r,d,n,null)}}an(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`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:ip(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&sn(e,!!r,n,!0):sn(e,!!r,t,!1);return;case`textarea`:for(s in Y(`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:ip(e,t,s,c,n,null)}ln(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:ip(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Y(Hf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`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:ip(e,t,u,r,n,null)}return;default:if(mn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ap(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ip(e,t,c,r,n,null))}var sp={};function cp(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)||ip(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&&(z=!0),o=m;break;case`name`:m!==f&&(z=!0),a=m;break;case`checked`:m!==f&&(z=!0),u=m;break;case`defaultChecked`:m!==f&&(z=!0),d=m;break;case`value`:m!==f&&(z=!0),s=m;break;case`defaultValue`:m!==f&&(z=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ip(e,t,p,m,r,f)}}rn(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)||ip(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&&(z=!0),p=o;break;case`defaultValue`:o!==l&&(z=!0),c=o;break;case`multiple`:o!==l&&(z=!0),s=o;default:o!==l&&ip(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?sn(e,!!n,n?[]:``,!1):sn(e,!!n,t,!0)):sn(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:ip(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&&(z=!0),p=a;break;case`defaultValue`:a!==o&&(z=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ip(e,t,s,a,r,o)}cn(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:ip(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&&(z=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ip(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)&&ip(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:ip(e,t,u,p,r,m)}return;default:if(mn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ap(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||ap(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ip(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||ip(e,t,f,p,r,m)}function lp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function up(){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&&lp(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&&lp(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 dp=null,fp=null;function pp(e){return e.nodeType===9?e:e.ownerDocument}function mp(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 hp(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 gp(e,t,n,r){return n=pp(n).createElement(e),n[St]=r,n[Ct]=t,op(n,e,t),It(n),n}function _p(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 vp=null;function yp(){var e=window.event;return e&&e.type===`popstate`?e!==vp&&(vp=e,!0):(vp=null,!1)}var bp=typeof setTimeout==`function`?setTimeout:void 0,xp=typeof clearTimeout==`function`?clearTimeout:void 0,Sp=typeof Promise==`function`?Promise:void 0,Cp=typeof requestAnimationFrame==`function`?requestAnimationFrame:bp,wp=typeof queueMicrotask==`function`?queueMicrotask:Sp===void 0?bp:function(e){return Sp.resolve(null).then(e).catch(Tp)};function Tp(e){setTimeout(function(){throw e})}function Ep(e){return e===`head`}function Dp(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),Kh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)xm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,xm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[kt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&xm(e.ownerDocument.body)}n=i}while(n);Kh(t)}function Op(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 kp(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 Ap(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 jp(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 Mp(e){return jp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Np(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return jp(t,n,e)}function Pp(e){return e.documentElement.clientHeight}function Fp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Ip(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`&&(Pp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=eh(f),u>rh){s.length=o;break}f=new Promise(Fp.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 Lp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Lp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Lp.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},Lp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Rp(e){return{name:e,group:new Lp(`group`,e),imagePair:new Lp(`image-pair`,e),old:new Lp(`old`,e),new:new Lp(`new`,e)}}function zp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}zp.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(Wp(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=Hp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Bp,e,s,r)}this._eventListeners=a}};function Bp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}zp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Wp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Hp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Vp,e,n,i),r.splice(t,1),a!==null&&a()}};function Vp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Hp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Up(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Wp(e,t,n,r){if(e.length===0)return-1;r=Up(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Up(a.optionsOrUseCapture)===r)return i}return-1}zp.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,Hp(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,Hp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},zp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag!==6&&(e=b(e),_m(e,t))}zp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Kp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Gp(t[n],e);n--);};function Kp(e,t){return t.push(e),!1}zp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=pp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,qp,e,void 0,void 0))};function qp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}zp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Jp,e,void 0,void 0)};function Jp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}zp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Yp,e,void 0,void 0);for(var n=t=0;n<Xp.length;n++){var r=Xp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Xp[t++]=r}Xp.length=t}};function Yp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Xp=[],Zp=!1;function Qp(e,t,n){Xp.push({fragmentInstance:e,observer:t,instance:n}),Zp||(Zp=!0,vm(function(){Zp=!1;var e=Xp;Xp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}zp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,$p,e,void 0,void 0),e};function $p(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}zp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},zp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Kp,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||em(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function em(e,t,n,r,i){var a=Mt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function tm(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)}zp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Kp,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),tm(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),tm(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function nm(e,t){return e=b(e),rm(e,t),!1}function rm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function im(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,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Xp.length;i++){var a=Xp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Xp[r++]=a)}Xp.length=r,n.observe(e)}),rm(e,t))}function am(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,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Qp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function om(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`:om(n),jt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sm(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[kt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pm(e.nextSibling),e===null)break}return null}function cm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pm(e.nextSibling),e===null))return null;return e}function lm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pm(e.nextSibling),e===null))return null;return e}function um(e){return e.data===`$?`||e.data===`$~`}function dm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function fm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mm=null;function hm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _m(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function vm(e){Cp(function(){Cp(function(t){return e(t)})})}function ym(e,t,n){switch(t=pp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function bm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ip(e,t,r,null,sp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===vn&&(e.onclick=null),jt(e)}function xm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jt(e)}var Sm=new Map,Cm=new Set;function wm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Tm=R.d;R.d={f:Em,r:Dm,D:Am,C:jm,L:Mm,m:Nm,X:Fm,S:Pm,M:Im};function Em(){var e=Tm.f(),t=Ud();return e||t}function Dm(e){var t=Nt(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):Tm.r(e)}var Om=typeof document>`u`?null:document;function km(e,t,n){var r=Om;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cm.has(i)||(Cm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),op(t,`link`,e),It(t),r.head.appendChild(t)))}}function Am(e){Tm.D(e),km(`dns-prefetch`,e,null)}function jm(e,t){Tm.C(e,t),km(`preconnect`,e,t)}function Mm(e,t,n){Tm.L(e,t,n);var r=Om;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Rm(e);break;case`script`:a=Hm(e)}if(!(Sm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(zm(a))||t===`script`&&r.querySelector(Um(a))))){var o=r.createElement(`link`);op(o,`link`,e),t===`style`&&(o[At]=!0,o.onload=o.onerror=function(){Lt(o)}),It(o),r.head.appendChild(o)}}}function Nm(e,t){Tm.m(e,t);var n=Om;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Hm(e)}if(!Sm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Sm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Um(a)))return}r=n.createElement(`link`),op(r,`link`,e),It(r),n.head.appendChild(r)}}}function Pm(e,t,n){Tm.S(e,t,n);var r=Om;if(r&&e){var i=Ft(r).hoistableStyles,a=Rm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(zm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sm.get(a))&&Km(e,n);var c=o=r.createElement(`link`);It(c),op(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Gm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Fm(e,t){Tm.X(e,t);var n=Om;if(n&&e){var r=Ft(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=D({src:e,async:!0},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),It(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t){Tm.M(e,t);var n=Om;if(n&&e){var r=Ft(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),It(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t,n,r){var a=(a=Se.current)?wm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Rm(n.href),t=Ft(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Rm(n.href);var o=Ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(zm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Sm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sm.set(e,o)),Vm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Hm(n),t=Ft(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rm(e){return`href="`+nn(e)+`"`}function zm(e){return`link[rel="stylesheet"][`+e+`]`}function Bm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Vm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[At]){r.loading=1;return}}else t=e.createElement(`link`),t[At]=!0,t.onload=t.onerror=Lt.bind(null,t),op(t,`link`,n),It(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Hm(e){return`[src="`+nn(e)+`"]`}function Um(e){return`script[async]`+e}function Wm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,It(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`),It(r),op(r,`style`,a),Gm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Rm(n.href);var o=e.querySelector(zm(a));if(o)return t.state.loading|=4,t.instance=o,It(o),o;r=Bm(n),(a=Sm.get(a))&&Km(r,a),o=(e.ownerDocument||e).createElement(`link`),It(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),op(o,`link`,r),t.state.loading|=4,Gm(o,n.precedence,e),t.instance=o;case`script`:return o=Hm(n.src),(a=e.querySelector(Um(o)))?(t.instance=a,It(a),a):(r=n,(a=Sm.get(o))&&(r=D({},n),qm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),It(a),op(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Gm(r,n.precedence,e));return t.instance}function Gm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Jm=null;function Ym(e,t,n){if(Jm===null){var r=new Map,i=Jm=new Map;i.set(n,r)}else i=Jm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[kt]||a[St]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Xm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Zm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Qm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function $m(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function eh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function th(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=eh(t),e.suspenseyImages.push(t)),e=sh.bind(e),t.decode().then(e,e))}function nh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Rm(r.href),a=t.querySelector(zm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,It(a);return}a=t.ownerDocument||t,r=Bm(r),(i=Sm.get(i))&&Km(r,i),a=a.createElement(`link`),It(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),op(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=oh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rh=0;function ih(e,t){return e.stylesheets&&e.count===0&&lh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rh===0&&(rh=62500*up());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ah(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)lh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function oh(){this.count--,ah(this)}function sh(){this.imgCount--,ah(this)}var ch=null;function lh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ch=new Map,t.forEach(uh,e),ch=null,oh.call(e))}function uh(e,t){if(!(t.state.loading&4)){var n=ch.get(e);if(n)var r=n.get(null);else{n=new Map,ch.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=oh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var dh={$$typeof:F,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function fh(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=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(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 ph(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ai(3,null,null,t),e.current=a,a.stateNode=e,t=Aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function mh(e){return e?(e=Oi,e):Oi}function hh(e,t,n,r,i,a){i=mh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Rd(n,e,t),_o(n,e,t))}function gh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _h(e,t){gh(e,t),(e=e.alternate)&&gh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=Ti(e,67108864);t!==null&&Rd(t,e,67108864),_h(e,67108864)}}function yh(e){if(e.tag===13||e.tag===31){var t=Fd();t=_t(t);var n=Ti(e,t);n!==null&&Rd(n,e,t),_h(e,t)}}var bh=!0;function xh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=2,Ch(e,t,n,r)}finally{R.p=a,L.T=i}}function Sh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=8,Ch(e,t,n,r)}finally{R.p=a,L.T=i}}function Ch(e,t,n,r){if(bh){var i=wh(r);if(i===null)Yf(e,t,r,Th,n),Ih(e,r);else if(Rh(i,e,t,n,r))r.stopPropagation();else if(Ih(e,r),t&4&&-1<Fh.indexOf(e)){for(;i!==null;){var a=Nt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=at(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Qe(o);s.entanglements[1]|=c,o&=~c}Af(a),!(td&6)&&(bd=Be()+500,jf(0,!1))}}break;case 31:case 13:s=Ti(a,2),s!==null&&Rd(s,a,2),Ud(),_h(a,2)}if(a=wh(r),a===null&&Yf(e,t,r,Th,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function wh(e){return e=bn(e),Eh(e)}var Th=null;function Eh(e){if(Th=null,e=Mt(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 Th=e,null}function Dh(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(Ve()){case He:return 2;case Ue:return 8;case We:case Ge:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var Oh=!1,kh=null,Ah=null,jh=null,Mh=new Map,Nh=new Map,Ph=[],Fh=`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 Ih(e,t){switch(e){case`focusin`:case`focusout`:kh=null;break;case`dragenter`:case`dragleave`:Ah=null;break;case`mouseover`:case`mouseout`:jh=null;break;case`pointerover`:case`pointerout`:Mh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Nh.delete(t.pointerId)}}function Lh(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=Nt(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rh(e,t,n,r,i){switch(t){case`focusin`:return kh=Lh(kh,e,t,n,r,i),!0;case`dragenter`:return Ah=Lh(Ah,e,t,n,r,i),!0;case`mouseover`:return jh=Lh(jh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mh.set(a,Lh(Mh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Nh.set(a,Lh(Nh.get(a)||null,e,t,n,r,i)),!0}return!1}function zh(e){var t=Mt(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,bt(e.priority,function(){yh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,bt(e.priority,function(){yh(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 Bh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yn=r,n.target.dispatchEvent(r),yn=null}else return t=Nt(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Vh(e,t,n){Bh(e)&&n.delete(t)}function Hh(){Oh=!1,kh!==null&&Bh(kh)&&(kh=null),Ah!==null&&Bh(Ah)&&(Ah=null),jh!==null&&Bh(jh)&&(jh=null),Mh.forEach(Vh),Nh.forEach(Vh)}function Uh(e,n){e.blockedOn===n&&(e.blockedOn=null,Oh||(Oh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hh)))}var Wh=null;function Gh(e){Wh!==e&&(Wh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wh===e&&(Wh=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(Eh(r||n)===null)continue;break}var a=Nt(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kh(e){function t(t){return Uh(t,e)}kh!==null&&Uh(kh,e),Ah!==null&&Uh(Ah,e),jh!==null&&Uh(jh,e),Mh.forEach(t),Nh.forEach(t);for(var n=0;n<Ph.length;n++){var r=Ph[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ph.length&&(n=Ph[0],n.blockedOn===null);)zh(n),n.blockedOn===null&&Ph.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[Ct]||null;if(typeof a==`function`)o||Gh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ct]||null)s=o.formAction;else if(Eh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gh(n)}}}function qh(){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 Jh(e){this._internalRoot=e}Yh.prototype.render=Jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hh(n,Fd(),e,t,null,null)},Yh.prototype.unmount=Jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hh(e.current,2,null,e,null,null),Ud(),t[wt]=null}};function Yh(e){this._internalRoot=e}Yh.prototype.unstable_scheduleHydration=function(e){if(e){var t=yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ph.length&&t!==0&&t<Ph[n].priority;n++);Ph.splice(n,0,e),n===0&&zh(e)}};var Xh=n.version;if(Xh!==`19.3.1`)throw Error(i(527,Xh,`19.3.1`));R.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Zh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:L,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qh.isDisabled&&Qh.supportsFiber)try{Ye=Qh.inject(Zh),Xe=Qh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;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=ph(e,1,!1,null,null,n,r,null,o,s,c,qh),e[wt]=t.current,qf(e),new Jh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function x(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:b(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var S=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},C=e=>{let t=S(e);return t.charAt(0).toUpperCase()+t.slice(1)},w=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),T={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function E(e){return e!=null}function D(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??T.width,a=e.size??e.height??T.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?w(...c):w(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??T[`stroke-width`])*Number(e.size??e.width??T.width)/Number(t.size??t.width??T.width):t.strokeWidth??T[`stroke-width`];return[`svg`,{...Object.entries(T).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&E(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&E(t.width)&&{[r(`width`)]:t.width},...`height`in t&&E(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function O(e,t={}){return D(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var k=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},A=(0,v.createContext)({}),j=()=>(0,v.useContext)(A),M=(0,v.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:y=``}=j()??{},b=!!c||k(d),[x,S,C=[]]=O(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:w(y,s),hasA11yProp:b,attributes:d});return(0,v.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function N(e,t=[],n=[]){let r=typeof e==`string`?x(e,t,n):e,i=(0,v.forwardRef)(({className:e,...t},n)=>(0,v.createElement)(M,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=C(r.name)),i}var P={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};P.node;var F=N(P),I={name:`arrow-left-right`,size:24,node:[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]};I.node;var ee=N(I),te={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};te.node;var ne=N(te),re={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};re.node;var ie=N(re),ae={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};ae.node;var oe=N(ae),se={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};se.node;var ce=N(se),le={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};le.node;var ue=N(le),de={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};de.node;var fe=N(de),pe={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};pe.node;var L=N(pe),R={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};R.node;var me=N(R),he={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};he.node;var ge=N(he),_e={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};_e.node;var ve=N(_e),ye={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};ye.node;var be=N(ye),xe={name:`clipboard-list`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]};xe.node;var Se=N(xe),Ce={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Ce.node;var we=N(Ce),Te={name:`corner-down-left`,size:24,node:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]};Te.node;var Ee=N(Te),De={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};De.node;var Oe=N(De),ke={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};ke.node;var Ae=N(ke),je={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};je.node;var Me=N(je),Ne={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};Ne.node;var Pe=N(Ne),Fe={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Fe.node;var Ie=N(Fe),Le={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};Le.node;var Re=N(Le),ze={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};ze.node;var Be=N(ze),Ve={name:`folder-git-2`,size:24,node:[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]};Ve.node;var He=N(Ve),Ue={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Ue.node;var We=N(Ue),Ge={name:`gauge`,size:24,node:[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]};Ge.node;var Ke=N(Ge),qe={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};qe.node;var Je=N(qe),Ye={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};Ye.node;var Xe=N(Ye),Ze={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Ze.node;var Qe=N(Ze),$e={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};$e.node;var et=N($e),tt={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};tt.node;var nt=N(tt),rt={name:`kanban`,size:24,node:[[`path`,{d:`M5 3v14`,key:`9nsxs2`}],[`path`,{d:`M12 3v8`,key:`1h2ygw`}],[`path`,{d:`M19 3v18`,key:`1sk56x`}]]};rt.node;var it=N(rt),at={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};at.node;var ot=N(at),st={name:`layout-dashboard`,size:24,node:[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]};st.node;var ct=N(st),lt={name:`layout-grid`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]};lt.node;var ut=N(lt),dt={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};dt.node;var ft=N(dt),pt={name:`list-todo`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]};pt.node;var mt=N(pt),ht={name:`list`,size:24,node:[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]};ht.node;var gt=N(ht),_t={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};_t.node;var vt=N(_t),yt={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};yt.node;var bt=N(yt),xt={name:`map`,size:24,node:[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]};xt.node;var St=N(xt),Ct={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};Ct.node;var wt=N(Ct),Tt={name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]};Tt.node;var Et=N(Tt),Dt={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};Dt.node;var Ot=N(Dt),kt={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};kt.node;var At=N(kt),jt={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};jt.node;var Mt=N(jt),Nt={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Nt.node;var Pt=N(Nt),Ft={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};Ft.node;var It=N(Ft),Lt={name:`mouse-pointer-2`,size:24,node:[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]};Lt.node;var Rt=N(Lt),zt={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};zt.node;var Bt=N(zt),Vt={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Vt.node;var Ht=N(Vt),Ut={name:`pen-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]],aliases:[`edit-3`]};Ut.node;var Wt=N(Ut),Gt={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Gt.node;var z=N(Gt),Kt={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Kt.node;var qt=N(Kt),Jt={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Jt.node;var Yt=N(Jt),Xt={name:`rows-3`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]],aliases:[`panels-top-bottom`]};Xt.node;var Zt=N(Xt),Qt={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Qt.node;var $t=N(Qt),en={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};en.node;var tn=N(en),nn={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};nn.node;var rn=N(nn),an={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};an.node;var on=N(an),sn={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};sn.node;var cn=N(sn),ln={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};ln.node;var un=N(ln),dn={name:`square-stack`,size:24,node:[[`path`,{d:`M4 10c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h4c1.1 0 2 .9 2 2`,key:`4i38lg`}],[`path`,{d:`M10 16c-1.1 0-2-.9-2-2v-4c0-1.1.9-2 2-2h4c1.1 0 2 .9 2 2`,key:`mlte4a`}],[`rect`,{width:`8`,height:`8`,x:`14`,y:`14`,rx:`2`,key:`1fa9i4`}]]};dn.node;var fn=N(dn),pn={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};pn.node;var mn=N(pn),hn={name:`sticky-note`,size:24,node:[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]};hn.node;var gn=N(hn),_n={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};_n.node;var vn=N(_n),yn={name:`target`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};yn.node;var bn=N(yn),xn={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};xn.node;var Sn=N(xn),Cn={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Cn.node;var wn=N(Cn),Tn={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};Tn.node;var En=N(Tn),Dn={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};Dn.node;var On=N(Dn),kn={name:`user-plus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};kn.node;var An=N(kn),jn={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};jn.node;var Mn=N(jn),Nn={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};Nn.node;var Pn=N(Nn),Fn={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Fn.node;var In=N(Fn),Ln={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Ln.node;var Rn=N(Ln),zn={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};zn.node;var Bn=N(zn),Vn=new Map,Hn=null;function Un(){if(!Hn){Hn=new EventSource(`/api/events`);for(let e of Vn.keys())Wn(e)}}function Wn(e){Hn?.addEventListener(e,t=>{let n=JSON.parse(t.data);for(let t of Vn.get(e)??[])t(n)})}function Gn(e,t){return Vn.has(e)||(Vn.set(e,new Set),Wn(e)),Vn.get(e).add(t),Un(),()=>void Vn.get(e).delete(t)}async function Kn(e,t){let n=await fetch(e,{...t,headers:{"Content-Type":`application/json`,...t?.headers}}),r=await n.json();if(!n.ok)throw Error(r?.error??n.statusText);return r}var qn=encodeURIComponent,Jn={listTasks:()=>Kn(`/api/tasks`),listProjects:()=>Kn(`/api/projects`),saveProject:(e,t)=>Kn(`/api/projects/${qn(e)}`,{method:`PUT`,body:JSON.stringify(t)}),getTask:e=>Kn(`/api/tasks/${qn(e)}`),createTask:e=>Kn(`/api/tasks`,{method:`POST`,body:JSON.stringify(e)}),saveTask:(e,t)=>Kn(`/api/tasks/${qn(e)}`,{method:`PUT`,body:JSON.stringify(t)}),trashTask:e=>Kn(`/api/tasks/${qn(e)}`,{method:`DELETE`}),getBoard:(e,t)=>Kn(`/api/tasks/${qn(e)}/boards/${qn(t)}`),saveBoard:(e,t)=>Kn(`/api/tasks/${qn(e)}/boards/${qn(t.id)}`,{method:`PUT`,body:JSON.stringify(t)}),undoBoard:(e,t)=>Kn(`/api/tasks/${qn(e)}/boards/${qn(t)}/undo`,{method:`POST`,body:`{}`}),deleteBoard:(e,t)=>Kn(`/api/tasks/${qn(e)}/boards/${qn(t)}`,{method:`DELETE`}),getDoc:(e,t)=>Kn(`/api/tasks/${qn(e)}/docs/${qn(t)}`),saveDoc:(e,t,n)=>Kn(`/api/tasks/${qn(e)}/docs/${qn(t)}`,{method:`PUT`,body:JSON.stringify({content:n})})};function Yn(e,t){return/^(https?:|data:|\/)/.test(t)?t:`/files/${qn(e)}/${t.replace(/^\.?\//,``)}`}function Xn(e,t,n){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),s=(0,v.useCallback)(()=>{e().then(e=>{i(e),o(null)},e=>o(e.message))},t);return(0,v.useEffect)(s,[s]),(0,v.useEffect)(()=>Qn(e=>(!n||e.includes(n))&&s()),[s,n]),{data:r,error:a,reload:s,setData:i}}var Zn=new Set;function Qn(e){return Zn.add(e),()=>void Zn.delete(e)}function $n(e){for(let t of Zn)t(e)}Gn(`ws:data`,e=>$n(e.tasks));var er=(0,v.createContext)(null),tr=()=>(0,v.useContext)(er),nr=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})),B=o(((e,t)=>{t.exports=nr()}))(),rr=[`en-review`,`en-curso`,`planificado`,`bloqueado`,`hecho`],ir=[`planificado`,`en-curso`,`en-review`,`hecho`,`bloqueado`],ar={planificado:{label:`Planificado`,color:`var(--text-3)`,key:`1`},"en-curso":{label:`En curso`,color:`#f2c94c`,key:`2`},"en-review":{label:`En review`,color:`#4cb782`,key:`3`},hecho:{label:`Hecho`,color:`#5e6ad2`,key:`4`},bloqueado:{label:`Bloqueado`,color:`#eb5757`,key:`5`}};function or({status:e,size:t=14}){let n=ar[e]?.color??`var(--text-3)`,r=2*Math.PI*3,i={width:t,height:t,viewBox:`0 0 14 14`,className:`status-icon`};switch(e){case`planificado`:return(0,B.jsx)(`svg`,{...i,children:(0,B.jsx)(`circle`,{cx:`7`,cy:`7`,r:6,fill:`none`,stroke:n,strokeWidth:`1.5`,strokeDasharray:`2.2 1.8`})});case`en-curso`:case`en-review`:{let t=e===`en-curso`?.5:.75;return(0,B.jsxs)(`svg`,{...i,children:[(0,B.jsx)(`circle`,{cx:`7`,cy:`7`,r:6,fill:`none`,stroke:n,strokeWidth:`1.5`}),(0,B.jsx)(`circle`,{cx:`7`,cy:`7`,r:`3`,fill:`none`,stroke:n,strokeWidth:`6`,strokeDasharray:`${r*t} ${r}`,transform:`rotate(-90 7 7)`})]})}case`hecho`:return(0,B.jsxs)(`svg`,{...i,children:[(0,B.jsx)(`circle`,{cx:`7`,cy:`7`,r:`7`,fill:n}),(0,B.jsx)(`path`,{d:`M4.2 7.2 6.1 9 9.8 5.2`,fill:`none`,stroke:`var(--bg-panel)`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`})]});case`bloqueado`:return(0,B.jsxs)(`svg`,{...i,children:[(0,B.jsx)(`circle`,{cx:`7`,cy:`7`,r:`7`,fill:n}),(0,B.jsx)(`path`,{d:`M4.8 4.8 9.2 9.2M9.2 4.8 4.8 9.2`,stroke:`var(--bg-panel)`,strokeWidth:`1.6`,strokeLinecap:`round`})]});default:return(0,B.jsx)(`svg`,{...i,children:(0,B.jsx)(`circle`,{cx:`7`,cy:`7`,r:6,fill:`none`,stroke:n,strokeWidth:`1.5`})})}}var sr={bajo:{label:`Riesgo bajo`},medio:{label:`Riesgo medio`},alto:{label:`Riesgo alto`}};function cr({risk:e,size:t=14}){if(e===`alto`)return(0,B.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,className:`risk-icon`,children:[(0,B.jsx)(`rect`,{x:`0.5`,y:`0.5`,width:`13`,height:`13`,rx:`3`,fill:`#f2994a`}),(0,B.jsx)(`path`,{d:`M7 3.5v4.2`,stroke:`var(--bg-panel)`,strokeWidth:`1.8`,strokeLinecap:`round`}),(0,B.jsx)(`circle`,{cx:`7`,cy:`10.2`,r:`1`,fill:`var(--bg-panel)`})]});let n=e===`medio`?2:+(e===`bajo`);return(0,B.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,className:`risk-icon`,children:[0,1,2].map(e=>(0,B.jsx)(`rect`,{x:1.5+e*4,y:9-e*3,width:`3`,height:4+e*3,rx:`1`,fill:e<n?`var(--text-2)`:`var(--text-4)`},e))})}var lr={storymap:St,flow:Pn,tests:Be,tech:ce,ui:nt,free:Wt};function ur({kind:e,...t}){let n=lr[e]??Wt;return(0,B.jsx)(n,{size:14,strokeWidth:1.8,...t})}function dr(e){return(0,B.jsx)(Ie,{size:14,strokeWidth:1.8,...e})}function fr(e){let[t,n,r,i]=e.replace(/^#\/?/,``).split(`/`).map(decodeURIComponent);return t===`activas`||t===`hechas`?{view:`home`,filter:t}:t===`nueva-sesion`?{view:`newSession`}:t===`g`&&n?{view:`group`,groupId:n}:t===`agentes`?n?{view:`session`,sessionId:n,agentId:r||void 0}:{view:`agents`}:t!==`t`||!n?{view:`home`,filter:`todas`}:r===`b`&&i?{view:`board`,taskId:n,boardId:i}:r===`d`&&i?{view:`doc`,taskId:n,doc:i}:r===`s`?{view:`sessions`,taskId:n,sessionId:i||void 0}:{view:`task`,taskId:n}}var V={home:(e=`todas`)=>e===`todas`?`#/`:`#/${e}`,task:e=>`#/t/${encodeURIComponent(e)}`,agents:()=>`#/agentes`,newSession:()=>`#/nueva-sesion`,session:(e,t)=>`#/agentes/${encodeURIComponent(e)}${t?`/${encodeURIComponent(t)}`:``}`,group:e=>`#/g/${encodeURIComponent(e)}`,board:(e,t)=>`#/t/${encodeURIComponent(e)}/b/${encodeURIComponent(t)}`,doc:(e,t)=>`#/t/${encodeURIComponent(e)}/d/${encodeURIComponent(t)}`,taskSession:(e,t)=>`#/t/${encodeURIComponent(e)}/s${t?`/${encodeURIComponent(t)}`:``}`};function pr(e){window.location.hash=e}function mr(){let[e,t]=(0,v.useState)(()=>fr(window.location.hash));return(0,v.useEffect)(()=>{let e=()=>t(fr(window.location.hash));return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),e}async function hr(e,t){let n=await fetch(e,t===void 0?void 0:{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json();if(!n.ok)throw Error(r?.error??n.statusText);return r}var gr=encodeURIComponent,_r={start:e=>hr(`/api/chats`,e),send:(e,t,n={})=>hr(`/api/chats/${gr(e)}/messages`,{text:t,...n}),configure:(e,t)=>hr(`/api/chats/${gr(e)}/config`,t),models:()=>hr(`/api/models`),commands:e=>hr(`/api/commands${e?`?cwd=${gr(e)}`:``}`),upload:async e=>{let t=await new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).split(`,`)[1]??``),r.onerror=()=>n(r.error),r.readAsDataURL(e)});return hr(`/api/uploads`,{name:e.name||`pegado.png`,type:e.type,data:t})},interrupt:e=>hr(`/api/chats/${gr(e)}/interrupt`,{}),answer:(e,t,n)=>hr(`/api/chats/${gr(e)}/permissions/${gr(t)}`,n),state:e=>hr(`/api/chats/${gr(e)}`),worktrees:e=>hr(`/api/tasks/${gr(e)}/worktrees`),projectWorktrees:e=>hr(`/api/projects/${gr(e)}/worktrees`)};function vr(e){let[t,n]=(0,v.useState)(null);return(0,v.useEffect)(()=>{let t=!1;_r.state(e).then(e=>!t&&n(e),()=>{});let r=Gn(`ws:chat`,t=>{t.sessionId===e&&n(t.state)});return()=>{t=!0,r()}},[e]),[t,n]}var yr=e=>`/api/uploads/file?path=${encodeURIComponent(e)}`,br=`ws-chat-model`,xr=`ws-chat-effort`,Sr=`ws-chat-mode`,Cr=[{id:`bypassPermissions`,label:`Full access`,description:`No pide permisos`},{id:`acceptEdits`,label:`Aceptar ediciones`,description:`Edita solo; pregunta antes de comandos`},{id:`default`,label:`Pedir permiso`,description:`Pregunta antes de editar o ejecutar`},{id:`plan`,label:`Solo planear`,description:`Analiza y propone, no cambia nada`}];function wr(){let[e,t]=(0,v.useState)([]);return(0,v.useEffect)(()=>{_r.models().then(t,()=>{})},[]),{models:e,stored:{model:localStorage.getItem(br)??void 0,effort:localStorage.getItem(xr)??void 0,permissionMode:localStorage.getItem(Sr)??`bypassPermissions`},remember:e=>{e.model&&localStorage.setItem(br,e.model),e.effort&&localStorage.setItem(xr,e.effort),e.permissionMode&&localStorage.setItem(Sr,e.permissionMode)}}}async function Tr(e){let t=await fetch(e);if(!t.ok)throw Error((await t.json().catch(()=>null))?.error??t.statusText);return t.json()}var Er={list:(e=3)=>Tr(`/api/sessions?days=${e}`),detail:(e,t={})=>{let n=new URLSearchParams;return t.since!==void 0&&n.set(`since`,String(t.since)),t.agent&&n.set(`agent`,t.agent),Tr(`/api/sessions/${encodeURIComponent(e)}?${n}`)},refreshStatus:e=>Tr(`/api/tasks/${encodeURIComponent(e)}/refresh`),startRefresh:async e=>{let t=await fetch(`/api/tasks/${encodeURIComponent(e)}/refresh`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`});if(!t.ok)throw Error((await t.json())?.error??t.statusText);return await t.json()}},Dr=new Set;function Or(e){return Dr.add(e),()=>void Dr.delete(e)}Gn(`ws:sessions`,e=>{for(let t of Dr)t(e.ids)});function kr(e=3){let[t,n]=(0,v.useState)([]),r=(0,v.useRef)(0),i=(0,v.useRef)(void 0),a=(0,v.useCallback)(()=>{r.current=Date.now(),Er.list(e).then(n,()=>{})},[e]);return(0,v.useEffect)(()=>{a();let e=setInterval(a,3e4),t=Or(()=>{clearTimeout(i.current);let e=Math.max(0,2e3-(Date.now()-r.current));i.current=setTimeout(a,e)});return()=>{clearInterval(e),t(),clearTimeout(i.current)}},[a]),t}function Ar(e,t){let[n,r]=(0,v.useState)({events:[],truncated:!1});return(0,v.useEffect)(()=>{let n=!1,i,a=!1,o=!1;r({events:[],truncated:!1});let s=async()=>{if(a)o=!0;else{a=!0;try{let a=i,o=await Er.detail(e,{since:a,agent:t});if(n)return;i=o.cursor,r(e=>({session:o.session,events:a===void 0?o.events:[...e.events,...o.events],truncated:a===void 0?o.truncated:e.truncated}))}catch(e){n||r(t=>({...t,error:e.message}))}finally{a=!1,o&&!n&&(o=!1,s())}}};s();let c=Or(t=>t.includes(e)&&void s()),l=setInterval(s,2e4);return()=>{n=!0,c(),clearInterval(l)}},[e,t]),n}var jr=e=>e?`ws-last-session-${e}`:`ws-last-session`;function Mr(e,t){localStorage.setItem(jr(),e),t&&localStorage.setItem(jr(t),e)}var Nr=e=>localStorage.getItem(jr(e)),Pr=h();function Fr(e){let t=e.target;return!!(t&&(t.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(t.tagName)))}function Ir(e,t,n={}){let r=(0,v.useRef)(t);r.current=t,(0,v.useEffect)(()=>{if(n.enabled===!1)return;let t=t=>{(n.meta?!(t.metaKey||t.ctrlKey):t.metaKey||t.ctrlKey||t.altKey)||(n.meta||!Fr(t))&&t.key.toLowerCase()===e.toLowerCase()&&(t.preventDefault(),r.current(t))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,n.meta,n.enabled])}function Lr(){let[e,t]=(0,v.useState)(()=>localStorage.getItem(`ws-theme`)??`dark`);return(0,v.useEffect)(()=>{document.documentElement.dataset.theme=e,localStorage.setItem(`ws-theme`,e)},[e]),{theme:e,toggleTheme:()=>t(e=>e===`dark`?`light`:`dark`)}}function Rr({value:e,options:t,onChange:n,children:r,placeholder:i=`Filtrar…`,className:a=``,custom:o}){let[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(0),p=(0,v.useRef)(null),m=(0,v.useRef)(null),[h,g]=(0,v.useState)({top:0,left:0,visibility:`hidden`}),_=o?.(l.trim()),y=[...t.filter(e=>e.label.toLowerCase().includes(l.toLowerCase())),..._&&!t.some(e=>e.value===_.value)?[_]:[]];(0,v.useLayoutEffect)(()=>{if(!s||!p.current||!m.current)return;let e=p.current.getBoundingClientRect(),t=m.current.offsetHeight,n=m.current.offsetWidth,r=e.bottom+4+t<=window.innerHeight-8?e.bottom+4:Math.max(8,e.top-4-t);g({top:r,left:Math.max(8,Math.min(e.left,window.innerWidth-n-8))})},[s,y.length]);let b=e=>{n(e),c(!1),u(``)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{ref:p,className:`menu-trigger ${a}`,onClick:n=>{n.stopPropagation(),g(e=>({...e,visibility:`hidden`})),c(e=>!e),f(Math.max(0,t.findIndex(t=>t.value===e)))},children:r}),s&&(0,Pr.createPortal)((0,B.jsx)(`div`,{className:`menu-backdrop`,onMouseDown:()=>c(!1),children:(0,B.jsxs)(`div`,{className:`menu`,ref:m,style:h,onMouseDown:e=>e.stopPropagation(),children:[(0,B.jsx)(`input`,{className:`menu-filter`,autoFocus:!0,placeholder:i,value:l,onChange:e=>{u(e.target.value),f(0)},onKeyDown:e=>{e.key===`Escape`&&c(!1),e.key===`ArrowDown`&&f(e=>Math.min(y.length-1,e+1)),e.key===`ArrowUp`&&f(e=>Math.max(0,e-1)),e.key===`Enter`&&y[d]&&b(y[d].value);let n=t.find(t=>t.hint===e.key);!l&&n&&(e.preventDefault(),b(n.value))}}),(0,B.jsxs)(`div`,{className:`menu-items`,children:[y.map((t,n)=>(0,B.jsxs)(`button`,{className:`menu-item ${n===d?`active`:``}`,onMouseEnter:()=>f(n),onClick:()=>b(t.value),children:[(0,B.jsx)(`span`,{className:`menu-item-icon`,children:t.icon}),(0,B.jsx)(`span`,{className:`menu-item-label`,children:t.label}),t.value===e&&(0,B.jsx)(ue,{size:14,className:`menu-check`}),t.hint&&(0,B.jsx)(`span`,{className:`menu-hint`,children:t.hint})]},t.value)),!y.length&&(0,B.jsx)(`div`,{className:`menu-empty`,children:`Sin resultados`})]})]})}),document.body)]})}function zr({request:e,onClose:t}){let[n,r]=(0,v.useState)(()=>Object.fromEntries(e.fields.map(e=>[e.name,e.defaultValue??e.options?.[0]?.value??``]))),[i,a]=(0,v.useState)(null),o=async()=>{try{await e.onSubmit(n),t()}catch(e){a(e.message)}};return(0,Pr.createPortal)((0,B.jsx)(`div`,{className:`overlay`,onMouseDown:t,children:(0,B.jsxs)(`form`,{className:`dialog`,onMouseDown:e=>e.stopPropagation(),onSubmit:e=>{e.preventDefault(),o()},onKeyDown:e=>{e.key===`Escape`&&t(),e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&o()},children:[(0,B.jsx)(`div`,{className:`dialog-title`,children:e.title}),e.fields.map((e,t)=>e.options?(0,B.jsx)(`div`,{className:`segmented`,children:e.options.map(t=>(0,B.jsxs)(`button`,{type:`button`,className:n[e.name]===t.value?`active`:``,onClick:()=>r(n=>({...n,[e.name]:t.value})),children:[t.icon,` `,t.label]},t.value))},e.name):e.multiline?(0,B.jsx)(`textarea`,{className:`dialog-textarea`,readOnly:e.readOnly,value:n[e.name],onChange:t=>r(n=>({...n,[e.name]:t.target.value}))},e.name):(0,B.jsx)(`input`,{className:`dialog-input ${t===0?`big`:``} ${e.mono?`mono`:``}`,placeholder:e.placeholder??e.label,value:n[e.name],autoFocus:t===0,onChange:t=>r(n=>({...n,[e.name]:t.target.value}))},e.name)),i&&(0,B.jsx)(`div`,{className:`dialog-error`,children:i}),(0,B.jsxs)(`div`,{className:`dialog-actions`,children:[(0,B.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:t,children:`Cancelar`}),(0,B.jsxs)(`button`,{type:`submit`,className:`btn primary`,children:[e.submitLabel??`Crear`,` `,(0,B.jsx)(`kbd`,{className:`kbd on-primary`,children:`⌘↵`})]})]})]})}),document.body)}function Br(e){if(!e)return``;let t=new Date(e),n=Math.round((Date.now()-t.getTime())/6e4);if(n<1)return`ahora`;if(n<60)return`${n} min`;let r=Math.round(n/60);return r<24?`${r} h`:t.toLocaleDateString(`es-AR`,{day:`numeric`,month:`short`})}function Vr(e){return e.toLowerCase().normalize(`NFD`).replace(/[̀-ͯ]/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``)}var Hr=`ws-seen`,Ur=`ws-seen-since`,Wr=12096e5;function Gr(){let e=new Date().toISOString();return localStorage.setItem(Ur,e),e}var Kr=localStorage.getItem(Ur)??Gr(),qr=()=>{try{return JSON.parse(localStorage.getItem(Hr)??`{}`)}catch{return{}}},Jr=qr(),Yr=new Set,Xr=()=>Yr.forEach(e=>e());window.addEventListener(`storage`,e=>{e.key===Hr&&(Jr=qr(),Xr())});function Zr(e){let t=new Date(Date.now()-Wr).toISOString();Jr=Object.fromEntries(Object.entries(e).filter(([,e])=>e>=t)),localStorage.setItem(Hr,JSON.stringify(Jr)),Xr()}function Qr(e){let t=e.filter(e=>e.lastTs&&e.lastTs>(Jr[e.id]??``));t.length&&Zr({...Jr,...Object.fromEntries(t.map(e=>[e.id,e.lastTs]))})}var $r=e=>e.project.startsWith(`Refresco IA`);function ei(e,t=Jr){return e.status===`working`||!e.lastTs||$r(e)?!1:e.lastTs>(t[e.id]??Kr)}function ti(e){return Yr.add(e),()=>void Yr.delete(e)}function ni(){let e=(0,v.useSyncExternalStore)(ti,()=>Jr);return t=>!!(t&&ei(t,e))}function ri(e){let t=e?.id,n=e?.lastTs;(0,v.useEffect)(()=>{if(!t||!n)return;let e=()=>document.visibilityState===`visible`&&Qr([{id:t,lastTs:n}]);return e(),document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[t,n])}function ii(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=ii(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var ai={value:()=>{}};function oi(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new si(n)}function si(e){this._=e}function ci(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}si.prototype=oi.prototype={constructor:si,on:function(e,t){var n=this._,r=ci(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=li(n[i],e.name)))return i}else{if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=ui(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ui(n[i],e.name,null);return this}},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new si(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function li(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ui(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ai,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var di={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function fi(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),di.hasOwnProperty(t)?{space:di[t],local:e}:e}function pi(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function mi(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function hi(e){var t=fi(e);return(t.local?mi:pi)(t)}function gi(){}function _i(e){return e==null?gi:function(){return this.querySelector(e)}}function vi(e){typeof e!=`function`&&(e=_i(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new ao(r,this._parents)}function yi(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function bi(){return[]}function xi(e){return e==null?bi:function(){return this.querySelectorAll(e)}}function Si(e){return function(){return yi(e.apply(this,arguments))}}function Ci(e){e=typeof e==`function`?Si(e):xi(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new ao(r,i)}function wi(e){return function(){return this.matches(e)}}function Ti(e){return function(t){return t.matches(e)}}var Ei=Array.prototype.find;function Di(e){return function(){return Ei.call(this.children,e)}}function Oi(){return this.firstElementChild}function ki(e){return this.select(e==null?Oi:Di(typeof e==`function`?e:Ti(e)))}var Ai=Array.prototype.filter;function ji(){return Array.from(this.children)}function Mi(e){return function(){return Ai.call(this.children,e)}}function Ni(e){return this.selectAll(e==null?ji:Mi(typeof e==`function`?e:Ti(e)))}function Pi(e){typeof e!=`function`&&(e=wi(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ao(r,this._parents)}function Fi(e){return Array(e.length)}function Ii(){return new ao(this._enter||this._groups.map(Fi),this._parents)}function Li(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Li.prototype={constructor:Li,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ri(e){return function(){return e}}function zi(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Li(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Bi(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Li(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Vi(e){return e.__data__}function Hi(e,t){if(!arguments.length)return Array.from(this,Vi);var n=t?Bi:zi,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Ri(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Ui(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new ao(o,r),o._enter=s,o._exit=c,o}function Ui(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Wi(){return new ao(this._exit||this._groups.map(Fi),this._parents)}function Gi(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ki(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new ao(s,this._parents)}function qi(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ji(e){e||=Yi;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new ao(i,this._parents).order()}function Yi(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Xi(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Zi(){return Array.from(this)}function Qi(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function $i(){let e=0;for(let t of this)++e;return e}function ea(){return!this.node()}function ta(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function na(e){return function(){this.removeAttribute(e)}}function H(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ra(e,t){return function(){this.setAttribute(e,t)}}function ia(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function aa(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function oa(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function sa(e,t){var n=fi(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?H:na:typeof t==`function`?n.local?oa:aa:n.local?ia:ra)(n,t))}function ca(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function la(e){return function(){this.style.removeProperty(e)}}function ua(e,t,n){return function(){this.style.setProperty(e,t,n)}}function da(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function fa(e,t,n){return arguments.length>1?this.each((t==null?la:typeof t==`function`?da:ua)(e,t,n??``)):pa(this.node(),e)}function pa(e,t){return e.style.getPropertyValue(t)||ca(e).getComputedStyle(e,null).getPropertyValue(t)}function ma(e){return function(){delete this[e]}}function ha(e,t){return function(){this[e]=t}}function ga(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function _a(e,t){return arguments.length>1?this.each((t==null?ma:typeof t==`function`?ga:ha)(e,t)):this.node()[e]}function va(e){return e.trim().split(/^|\s+/)}function ya(e){return e.classList||new ba(e)}function ba(e){this._node=e,this._names=va(e.getAttribute(`class`)||``)}ba.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function xa(e,t){for(var n=ya(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Sa(e,t){for(var n=ya(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ca(e){return function(){xa(this,e)}}function wa(e){return function(){Sa(this,e)}}function Ta(e,t){return function(){(t.apply(this,arguments)?xa:Sa)(this,e)}}function Ea(e,t){var n=va(e+``);if(arguments.length<2){for(var r=ya(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Ta:t?Ca:wa)(n,t))}function Da(){this.textContent=``}function Oa(e){return function(){this.textContent=e}}function ka(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function Aa(e){return arguments.length?this.each(e==null?Da:(typeof e==`function`?ka:Oa)(e)):this.node().textContent}function ja(){this.innerHTML=``}function Ma(e){return function(){this.innerHTML=e}}function Na(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Pa(e){return arguments.length?this.each(e==null?ja:(typeof e==`function`?Na:Ma)(e)):this.node().innerHTML}function Fa(){this.nextSibling&&this.parentNode.appendChild(this)}function Ia(){return this.each(Fa)}function La(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ra(){return this.each(La)}function za(e){var t=typeof e==`function`?e:hi(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ba(){return null}function Va(e,t){var n=typeof e==`function`?e:hi(e),r=t==null?Ba:typeof t==`function`?t:_i(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ha(){var e=this.parentNode;e&&e.removeChild(this)}function Ua(){return this.each(Ha)}function Wa(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ga(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ka(e){return this.select(e?Ga:Wa)}function qa(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Ja(e){return function(t){e.call(this,t,this.__data__)}}function Ya(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Xa(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Za(e,t,n){return function(){var r=this.__on,i,a=Ja(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Qa(e,t,n){var r=Ya(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}}else{for(s=t?Za:Xa,i=0;i<a;++i)this.each(s(r[i],t,n));return this}}function $a(e,t,n){var r=ca(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function eo(e,t){return function(){return $a(this,e,t)}}function to(e,t){return function(){return $a(this,e,t.apply(this,arguments))}}function no(e,t){return this.each((typeof t==`function`?to:eo)(e,t))}function*ro(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var io=[null];function ao(e,t){this._groups=e,this._parents=t}function oo(){return new ao([[document.documentElement]],io)}function so(){return this}ao.prototype=oo.prototype={constructor:ao,select:vi,selectAll:Ci,selectChild:ki,selectChildren:Ni,filter:Pi,data:Hi,enter:Ii,exit:Wi,join:Gi,merge:Ki,selection:so,order:qi,sort:Ji,call:Xi,nodes:Zi,node:Qi,size:$i,empty:ea,each:ta,attr:sa,style:fa,property:_a,classed:Ea,text:Aa,html:Pa,raise:Ia,lower:Ra,append:za,insert:Va,remove:Ua,clone:Ka,datum:qa,on:Qa,dispatch:no,[Symbol.iterator]:ro};function co(e){return typeof e==`string`?new ao([[document.querySelector(e)]],[document.documentElement]):new ao([[e]],io)}function lo(e){let t;for(;t=e.sourceEvent;)e=t;return e}function uo(e,t){if(e=lo(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var fo={passive:!1},po={capture:!0,passive:!1};function mo(e){e.stopImmediatePropagation()}function ho(e){e.preventDefault(),e.stopImmediatePropagation()}function go(e){var t=e.document.documentElement,n=co(e).on(`dragstart.drag`,ho,po);`onselectstart`in t?n.on(`selectstart.drag`,ho,po):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function _o(e,t){var n=e.document.documentElement,r=co(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,ho,po),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var vo=e=>()=>e;function yo(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}yo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function bo(e){return!e.ctrlKey&&!e.button}function xo(){return this.parentNode}function So(e,t){return t??{x:e.x,y:e.y}}function Co(){return navigator.maxTouchPoints||`ontouchstart`in this}function wo(){var e=bo,t=xo,n=So,r=Co,i={},a=oi(`start`,`drag`,`end`),o=0,s,c,l,u,d=0;function f(e){e.on(`mousedown.drag`,p).filter(r).on(`touchstart.drag`,g).on(`touchmove.drag`,_,fo).on(`touchend.drag touchcancel.drag`,v).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function p(n,r){if(!u&&e.call(this,n,r)){var i=y(this,t.call(this,n,r),n,r,`mouse`);i&&(co(n.view).on(`mousemove.drag`,m,po).on(`mouseup.drag`,h,po),go(n.view),mo(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function m(e){if(ho(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>d}i.mouse(`drag`,e)}function h(e){co(e.view).on(`mousemove.drag mouseup.drag`,null),_o(e.view,l),ho(e),i.mouse(`end`,e)}function g(n,r){if(e.call(this,n,r))for(var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s=0,c;s<o;++s)(c=y(this,a,n,r,i[s].identifier,i[s]))&&(mo(n),c(`start`,n,i[s]))}function _(e){for(var t=e.changedTouches,n=t.length,r=0,a;r<n;++r)(a=i[t[r].identifier])&&(ho(e),a(`drag`,e,t[r]))}function v(e){var t=e.changedTouches,n=t.length,r,a;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(mo(e),a(`end`,e,t[r]))}function y(e,t,r,s,c,l){var u=a.copy(),d=uo(l||r,t),p,m,h;if((h=n.call(e,new yo(`beforestart`,{sourceEvent:r,target:f,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return p=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=uo(l||a,t),_=o}u.call(r,e,new yo(r,{sourceEvent:a,subject:h,target:f,identifier:c,active:_,x:d[0]+p,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return f.filter=function(t){return arguments.length?(e=typeof t==`function`?t:vo(!!t),f):e},f.container=function(e){return arguments.length?(t=typeof e==`function`?e:vo(e),f):t},f.subject=function(e){return arguments.length?(n=typeof e==`function`?e:vo(e),f):n},f.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:vo(!!e),f):r},f.on=function(){var e=a.on.apply(a,arguments);return e===a?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}function To(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Eo(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Do(){}var Oo=.7,ko=1/Oo,Ao=`\\s*([+-]?\\d+)\\s*`,jo=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Mo=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,No=/^#([0-9a-f]{3,8})$/,Po=RegExp(`^rgb\\(${Ao},${Ao},${Ao}\\)$`),Fo=RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),Io=RegExp(`^rgba\\(${Ao},${Ao},${Ao},${jo}\\)$`),Lo=RegExp(`^rgba\\(${Mo},${Mo},${Mo},${jo}\\)$`),Ro=RegExp(`^hsl\\(${jo},${Mo},${Mo}\\)$`),zo=RegExp(`^hsla\\(${jo},${Mo},${Mo},${jo}\\)$`),Bo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};To(Do,Wo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:U,formatHex:U,formatHex8:Vo,formatHsl:Ho,formatRgb:Uo,toString:Uo});function U(){return this.rgb().formatHex()}function Vo(){return this.rgb().formatHex8()}function Ho(){return rs(this).formatHsl()}function Uo(){return this.rgb().formatRgb()}function Wo(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=No.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Go(t):n===3?new Yo(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ko(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ko(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Po.exec(e))?new Yo(t[1],t[2],t[3],1):(t=Fo.exec(e))?new Yo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Io.exec(e))?Ko(t[1],t[2],t[3],t[4]):(t=Lo.exec(e))?Ko(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ro.exec(e))?ns(t[1],t[2]/100,t[3]/100,1):(t=zo.exec(e))?ns(t[1],t[2]/100,t[3]/100,t[4]):Bo.hasOwnProperty(e)?Go(Bo[e]):e===`transparent`?new Yo(NaN,NaN,NaN,0):null}function Go(e){return new Yo(e>>16&255,e>>8&255,e&255,1)}function Ko(e,t,n,r){return r<=0&&(e=t=n=NaN),new Yo(e,t,n,r)}function qo(e){return e instanceof Do||(e=Wo(e)),e?(e=e.rgb(),new Yo(e.r,e.g,e.b,e.opacity)):new Yo}function Jo(e,t,n,r){return arguments.length===1?qo(e):new Yo(e,t,n,r??1)}function Yo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}To(Yo,Jo,Eo(Do,{brighter(e){return e=e==null?ko:ko**+e,new Yo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Oo:Oo**+e,new Yo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yo(es(this.r),es(this.g),es(this.b),$o(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xo,formatHex:Xo,formatHex8:Zo,formatRgb:Qo,toString:Qo}));function Xo(){return`#${ts(this.r)}${ts(this.g)}${ts(this.b)}`}function Zo(){return`#${ts(this.r)}${ts(this.g)}${ts(this.b)}${ts((isNaN(this.opacity)?1:this.opacity)*255)}`}function Qo(){let e=$o(this.opacity);return`${e===1?`rgb(`:`rgba(`}${es(this.r)}, ${es(this.g)}, ${es(this.b)}${e===1?`)`:`, ${e})`}`}function $o(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function es(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ts(e){return e=es(e),(e<16?`0`:``)+e.toString(16)}function ns(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new as(e,t,n,r)}function rs(e){if(e instanceof as)return new as(e.h,e.s,e.l,e.opacity);if(e instanceof Do||(e=Wo(e)),!e)return new as;if(e instanceof as)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new as(o,s,c,e.opacity)}function is(e,t,n,r){return arguments.length===1?rs(e):new as(e,t,n,r??1)}function as(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}To(as,is,Eo(Do,{brighter(e){return e=e==null?ko:ko**+e,new as(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Oo:Oo**+e,new as(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Yo(cs(e>=240?e-240:e+120,i,r),cs(e,i,r),cs(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new as(os(this.h),ss(this.s),ss(this.l),$o(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=$o(this.opacity);return`${e===1?`hsl(`:`hsla(`}${os(this.h)}, ${ss(this.s)*100}%, ${ss(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function os(e){return e=(e||0)%360,e<0?e+360:e}function ss(e){return Math.max(0,Math.min(1,e||0))}function cs(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var ls=e=>()=>e;function us(e,t){return function(n){return e+n*t}}function ds(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function fs(e){return(e=+e)==1?ps:function(t,n){return n-t?ds(t,n,e):ls(isNaN(t)?n:t)}}function ps(e,t){var n=t-e;return n?us(e,n):ls(isNaN(e)?t:e)}var ms=(function e(t){var n=fs(t);function r(e,t){var r=n((e=Jo(e)).r,(t=Jo(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=ps(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function hs(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function gs(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _s(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o<r;++o)i[o]=Es(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function vs(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ys(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function bs(e,t){var n={},r={},i;for(i in typeof e==`object`&&e||(e={}),typeof t==`object`&&t||(t={}),t)i in e?n[i]=Es(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var xs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ss=new RegExp(xs.source,`g`);function Cs(e){return function(){return e}}function ws(e){return function(t){return e(t)+``}}function Ts(e,t){var n=xs.lastIndex=Ss.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=xs.exec(e))&&(i=Ss.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:ys(r,i)})),n=Ss.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?ws(c[0].x):Cs(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Es(e,t){var n=typeof t,r;return t==null||n===`boolean`?ls(t):(n===`number`?ys:n===`string`?(r=Wo(t))?(t=r,ms):Ts:t instanceof Wo?ms:t instanceof Date?vs:gs(t)?hs:Array.isArray(t)?_s:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?bs:ys)(e,t)}var Ds=180/Math.PI,Os={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ks(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Ds,skewX:Math.atan(c)*Ds,scaleX:o,scaleY:s}}var As;function js(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Os:ks(t.a,t.b,t.c,t.d,t.e,t.f)}function Ms(e){return e==null||(As||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),As.setAttribute(`transform`,e),!(e=As.transform.baseVal.consolidate()))?Os:(e=e.matrix,ks(e.a,e.b,e.c,e.d,e.e,e.f))}function Ns(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:ys(e,i)},{i:c-2,x:ys(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:ys(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:ys(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:ys(e,n)},{i:s-2,x:ys(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Ps=Ns(js,`px, `,`px)`,`deg)`),Fs=Ns(Ms,`, `,`)`,`)`),Is=1e-12;function Ls(e){return((e=Math.exp(e))+1/e)/2}function Rs(e){return((e=Math.exp(e))-1/e)/2}function zs(e){return((e=Math.exp(2*e))-1)/(e+1)}var Bs=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<Is)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=Ls(y),c=s/(n*g)*(i*zs(t*r+y)-Rs(y));return[a+c*d,o+c*f,s*i/Ls(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),Vs=0,Hs=0,Us=0,Ws=1e3,Gs,Ks,qs=0,Js=0,Ys=0,Xs=typeof performance==`object`&&performance.now?performance:Date,Zs=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qs(){return Js||=(Zs($s),Xs.now()+Ys)}function $s(){Js=0}function ec(){this._call=this._time=this._next=null}ec.prototype=tc.prototype={constructor:ec,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Qs():+n)+(t==null?0:+t),!this._next&&Ks!==this&&(Ks?Ks._next=this:Gs=this,Ks=this),this._call=e,this._time=n,oc()},stop:function(){this._call&&(this._call=null,this._time=1/0,oc())}};function tc(e,t,n){var r=new ec;return r.restart(e,t,n),r}function nc(){Qs(),++Vs;for(var e=Gs,t;e;)(t=Js-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Vs}function rc(){Js=(qs=Xs.now())+Ys,Vs=Hs=0;try{nc()}finally{Vs=0,ac(),Js=0}}function ic(){var e=Xs.now(),t=e-qs;t>Ws&&(Ys-=t,qs=e)}function ac(){for(var e,t=Gs,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Gs=n);Ks=e,oc(r)}function oc(e){Vs||(Hs&&=clearTimeout(Hs),e-Js>24?(e<1/0&&(Hs=setTimeout(rc,e-Xs.now()-Ys)),Us&&=clearInterval(Us)):(Us||=(qs=Xs.now(),setInterval(ic,Ws)),Vs=1,Zs(rc)))}function sc(e,t,n){var r=new ec;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var cc=oi(`start`,`end`,`cancel`,`interrupt`),lc=[];function uc(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;mc(e,n,{name:t,index:r,group:i,on:cc,tween:lc,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function dc(e,t){var n=pc(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function fc(e,t){var n=pc(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function pc(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function mc(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=tc(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return sc(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(sc(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function hc(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n)(r=n[o]).name===t?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]):a=!1;a&&delete e.__transition}}function gc(e){return this.each(function(){hc(this,e)})}function _c(e,t){var n,r;return function(){var i=fc(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function vc(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=fc(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function yc(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=pc(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?_c:vc)(n,e,t))}function bc(e,t,n){var r=e._id;return e.each(function(){var e=fc(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return pc(e,r).value[t]}}function xc(e,t){var n;return(typeof t==`number`?ys:t instanceof Wo?ms:(n=Wo(t))?(t=n,ms):Ts)(e,t)}function Sc(e){return function(){this.removeAttribute(e)}}function Cc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wc(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Tc(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Ec(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Dc(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Oc(e,t){var n=fi(e),r=n===`transform`?Fs:xc;return this.attrTween(e,typeof t==`function`?(n.local?Dc:Ec)(n,r,bc(this,`attr.`+e,t)):t==null?(n.local?Cc:Sc)(n):(n.local?Tc:wc)(n,r,t))}function kc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Ac(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function jc(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Ac(e,i)),n}return i._value=t,i}function Mc(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&kc(e,i)),n}return i._value=t,i}function Nc(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=fi(e);return this.tween(n,(r.local?jc:Mc)(r,t))}function Pc(e,t){return function(){dc(this,e).delay=+t.apply(this,arguments)}}function Fc(e,t){return t=+t,function(){dc(this,e).delay=t}}function Ic(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Pc:Fc)(t,e)):pc(this.node(),t).delay}function Lc(e,t){return function(){fc(this,e).duration=+t.apply(this,arguments)}}function Rc(e,t){return t=+t,function(){fc(this,e).duration=t}}function zc(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Lc:Rc)(t,e)):pc(this.node(),t).duration}function Bc(e,t){if(typeof t!=`function`)throw Error();return function(){fc(this,e).ease=t}}function Vc(e){var t=this._id;return arguments.length?this.each(Bc(t,e)):pc(this.node(),t).ease}function Hc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();fc(this,e).ease=n}}function Uc(e){if(typeof e!=`function`)throw Error();return this.each(Hc(this._id,e))}function Wc(e){typeof e!=`function`&&(e=wi(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new yl(r,this._parents,this._name,this._id)}function Gc(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new yl(o,this._parents,this._name,this._id)}function Kc(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function qc(e,t,n){var r,i,a=Kc(t)?dc:fc;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Jc(e,t){var n=this._id;return arguments.length<2?pc(this.node(),n).on.on(e):this.each(qc(n,e,t))}function Yc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Xc(){return this.on(`end.remove`,Yc(this._id))}function Zc(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=_i(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,uc(l[f],t,n,f,l,pc(u,n)));return new yl(a,this._parents,t,n)}function Qc(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=xi(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=pc(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&uc(p,t,n,h,f,m);a.push(f),o.push(u)}return new yl(a,o,t,n)}var $c=oo.prototype.constructor;function el(){return new $c(this._groups,this._parents)}function tl(e,t){var n,r,i;return function(){var a=pa(this,e),o=(this.style.removeProperty(e),pa(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function nl(e){return function(){this.style.removeProperty(e)}}function rl(e,t,n){var r,i=n+``,a;return function(){var o=pa(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function il(e,t,n){var r,i,a;return function(){var o=pa(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),pa(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function al(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=fc(this,e),l=c.on,u=c.value[a]==null?s||=nl(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function ol(e,t,n){var r=(e+=``)==`transform`?Ps:xc;return t==null?this.styleTween(e,tl(e,r)).on(`end.style.`+e,nl(e)):typeof t==`function`?this.styleTween(e,il(e,r,bc(this,`style.`+e,t))).each(al(this._id,e)):this.styleTween(e,rl(e,r,t),n).on(`end.style.`+e,null)}function sl(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function cl(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&sl(e,a,n)),r}return a._value=t,a}function ll(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,cl(e,t,n??``))}function ul(e){return function(){this.textContent=e}}function dl(e){return function(){var t=e(this);this.textContent=t??``}}function fl(e){return this.tween(`text`,typeof e==`function`?dl(bc(this,`text`,e)):ul(e==null?``:e+``))}function pl(e){return function(t){this.textContent=e.call(this,t)}}function ml(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&pl(r)),t}return r._value=e,r}function hl(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,ml(e))}function gl(){for(var e=this._name,t=this._id,n=bl(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=pc(c,t);uc(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new yl(r,this._parents,e,n)}function _l(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=fc(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var vl=0;function yl(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function bl(){return++vl}var xl=oo.prototype;yl.prototype={constructor:yl,select:Zc,selectAll:Qc,selectChild:xl.selectChild,selectChildren:xl.selectChildren,filter:Wc,merge:Gc,selection:el,transition:gl,call:xl.call,nodes:xl.nodes,node:xl.node,size:xl.size,empty:xl.empty,each:xl.each,on:Jc,attr:Oc,attrTween:Nc,style:ol,styleTween:ll,text:fl,textTween:hl,remove:Xc,tween:yc,delay:Ic,duration:zc,ease:Vc,easeVarying:Uc,end:_l,[Symbol.iterator]:xl[Symbol.iterator]};function Sl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Cl={time:null,delay:0,duration:250,ease:Sl};function wl(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Tl(e){var t,n;e instanceof yl?(t=e._id,e=e._name):(t=bl(),(n=Cl).time=Qs(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&uc(c,e,t,l,o,n||wl(c,t));return new yl(r,this._parents,e,t)}oo.prototype.interrupt=gc,oo.prototype.transition=Tl;var El=e=>()=>e;function Dl(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ol(e,t,n){this.k=e,this.x=t,this.y=n}Ol.prototype={constructor:Ol,scale:function(e){return e===1?this:new Ol(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ol(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var kl=new Ol(1,0,0);Al.prototype=Ol.prototype;function Al(e){for(;!e.__zoom;)if(!(e=e.parentNode))return kl;return e.__zoom}function jl(e){e.stopImmediatePropagation()}function Ml(e){e.preventDefault(),e.stopImmediatePropagation()}function Nl(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function Pl(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Fl(){return this.__zoom||kl}function Il(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ll(){return navigator.maxTouchPoints||`ontouchstart`in this}function Rl(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function zl(){var e=Nl,t=Pl,n=Rl,r=Il,i=Ll,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=Bs,l=oi(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,Fl).on(`wheel.zoom`,w,{passive:!1}).on(`mousedown.zoom`,T).on(`dblclick.zoom`,E).filter(i).on(`touchstart.zoom`,D).on(`touchmove.zoom`,O).on(`touchend.zoom touchcancel.zoom`,k).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,Fl),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):x(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(kl.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new Ol(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new Ol(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,n,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new Ol(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=co(this.that).datum();l.call(e,this.that,new Dl(e,{sourceEvent:this.sourceEvent,target:_,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function w(t,...i){if(!e.apply(this,arguments))return;var s=S(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=uo(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],hc(this),s.start();Ml(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function T(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,r,!0).event(t),s=co(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=uo(t,i),l=t.clientX,u=t.clientY;go(t.view),jl(t),a.mouse=[c,this.__zoom.invert(c)],hc(this),a.start();function d(e){if(Ml(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=uo(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),_o(e.view,a.moved),Ml(e),a.event(e).end()}}function E(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=uo(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);Ml(r),s>0?co(this).transition().duration(s).call(x,d,c,r):co(this).call(_.transform,d,c,r)}}function D(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(jl(t),s=0;s<i;++s)c=r[s],l=uo(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),hc(this),a.start())}}function O(e,...t){if(this.__zooming){var r=S(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(Ml(e),s=0;s<a;++s)c=i[s],l=uo(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function k(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(jl(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=uo(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=co(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:El(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:El(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:El(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:El([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}var Bl={error001:(e=`react`)=>`Seems like you have not used ${e===`svelte`?`SvelteFlowProvider`:`ReactFlowProvider`} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>`It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.`,error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>`The parent container needs a width and a height to render the graph.`,error005:()=>`Only child nodes can use a parent extent.`,error006:()=>`Can't create edge. An edge needs a source and a target.`,error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", edge id: ${t}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e=`react`)=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>`useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.`,error015:()=>`It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.`,error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Vl=[[-1/0,-1/0],[1/0,1/0]],Hl=[`Enter`,` `,`Escape`],Ul={"node.a11yDescription.default":`Press enter or space to select a node. Press delete to remove it and escape to cancel.`,"node.a11yDescription.keyboardDisabled":`Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.`,"node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`,"controls.ariaLabel":`Control Panel`,"controls.zoomIn.ariaLabel":`Zoom In`,"controls.zoomOut.ariaLabel":`Zoom Out`,"controls.fitView.ariaLabel":`Fit View`,"controls.interactive.ariaLabel":`Toggle Interactivity`,"minimap.ariaLabel":`Mini Map`,"handle.ariaLabel":`Handle`},Wl;(function(e){e.Strict=`strict`,e.Loose=`loose`})(Wl||={});var Gl;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(Gl||={});var Kl;(function(e){e.Partial=`partial`,e.Full=`full`})(Kl||={});var ql={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},Jl;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(Jl||={});var Yl;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(Yl||={});var W;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})(W||={});var Xl={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top},Zl=e=>!!e&&typeof e==`object`&&`id`in e&&`source`in e&&`target`in e,Ql=e=>!!e&&typeof e==`object`&&`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),$l=e=>!!e&&typeof e==`object`&&`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),eu=(e,t=[0,0])=>{let{width:n,height:r}=Pu(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},tu=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1,r=e.reduce((e,r)=>{let i=typeof r==`string`,a=!t.nodeLookup&&!i?r:void 0;return t.nodeLookup&&(a=i?t.nodeLookup.get(r):$l(r)?r:t.nodeLookup.get(r.id)),a?(n=!0,mu(e,vu(a,t.nodeOrigin))):e},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?gu(r):{x:0,y:0,width:0,height:0}},nu=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=mu(n,vu(e)),r=!0)}),r?gu(n):{x:0,y:0,width:0,height:0}},ru=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s=(t.x-n)/i,c=(t.y-r)/i,l=t.width/i,u=t.height/i,d=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??0,f=e.height??t.height??t.initialHeight??0,{x:p,y:m}=t.internals.positionAbsolute,h=bu(s,c,l,u,p,m,i,f),g=i*f,_=a&&h>0;(!t.internals.handleBounds||_||h>=g||t.dragging)&&d.push(t)}return d},iu=(e,t)=>{let n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))};function au(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{let i;if(t?.includeHiddenNodes){let{width:t,height:n}=Pu(e);i=t>0&&n>0}else i=!!(e.measured.width&&e.measured.height&&!e.hidden);i&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function ou({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return!0;let s=ju(nu(au(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),!0}function su({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent){if(!s)a?.(`005`,Bl.error005());else{let{width:e,height:t}=Pu(s);e&&t&&(d=[[c,l],[c+e,l+t]])}}else s&&Nu(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=Nu(d)?uu(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,Bl.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function cu({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=[];for(let e of n){if(e.deletable===!1)continue;let t=a.has(e.id),n=!t&&e.parentId&&o.find(t=>t.id===e.parentId);(t||n)&&o.push(e)}let s=new Set(t.map(e=>e.id)),c=r.filter(e=>e.deletable!==!1),l=iu(o,c);for(let e of c)s.has(e.id)&&!l.find(t=>t.id===e.id)&&l.push(e);if(!i)return{edges:l,nodes:o};let u=await i({nodes:o,edges:l});return typeof u==`boolean`?u?{edges:l,nodes:o}:{edges:[],nodes:[]}:u}var lu=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),uu=(e={x:0,y:0},t,n)=>({x:lu(e.x,t[0][0],t[1][0]-(n?.width??0)),y:lu(e.y,t[0][1],t[1][1]-(n?.height??0))});function du(e,t,n){let{width:r,height:i}=Pu(n),{x:a,y:o}=n.internals.positionAbsolute;return uu(e,[[a,o],[a+r,o+i]],t)}var fu=(e,t,n)=>e<t?lu(Math.abs(e-t),1,t)/t:e>n?-lu(Math.abs(e-n),1,t)/t:0,pu=(e,t,n=15,r=40)=>[fu(e.x,r,t.width-r)*n,fu(e.y,r,t.height-r)*n],mu=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),hu=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),gu=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),_u=(e,t=[0,0])=>{let{x:n,y:r}=$l(e)?e.internals.positionAbsolute:eu(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},vu=(e,t=[0,0])=>{let{x:n,y:r}=$l(e)?e.internals.positionAbsolute:eu(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},yu=(e,t)=>gu(mu(hu(e),hu(t))),bu=(e,t,n,r,i,a,o,s)=>{let c=Math.max(0,Math.min(e+n,i+o)-Math.max(e,i)),l=Math.max(0,Math.min(t+r,a+s)-Math.max(t,a));return Math.ceil(c*l)},xu=(e,t)=>bu(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),Su=e=>Cu(e.width)&&Cu(e.height)&&Cu(e.x)&&Cu(e.y),Cu=e=>!isNaN(e)&&isFinite(e),wu=(e,t)=>(e,t)=>{},Tu=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Eu=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?Tu(s,o):s},Du=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Ou(e,t){if(typeof e==`number`)return Math.floor((t-t/(1+e))*.5);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function ku(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=Ou(e,n),i=Ou(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=Ou(e.top??e.y??0,n),i=Ou(e.bottom??e.y??0,n),a=Ou(e.left??e.x??0,t),o=Ou(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Au(e,t,n,r,i,a){let{x:o,y:s}=Du(e,[t,n,r]),{x:c,y:l}=Du({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var ju=(e,t,n,r,i,a)=>{let o=ku(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=lu(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=Au(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},Mu=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function Nu(e){return e!=null&&e!==`parent`}function Pu(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Fu(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Iu(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function Lu(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ru(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function zu(e){return{...Ul,...e||{}}}function Bu(e){return e===null?null:e?`valid`:`invalid`}function Vu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=qu(e),s=Eu({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?Tu(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var Hu=e=>({width:e.offsetWidth,height:e.offsetHeight}),Uu=e=>e?.getRootNode?.()||window?.document,Wu=[`INPUT`,`SELECT`,`TEXTAREA`];function Gu(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?Wu.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var Ku=e=>`clientX`in e,qu=(e,t)=>{let n=Ku(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},Ju=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...Hu(t)}})};function Yu({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function Xu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Zu({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case W.Left:return[t-Xu(t-r,a),n];case W.Right:return[t+Xu(r-t,a),n];case W.Top:return[t,n-Xu(n-i,a)];case W.Bottom:return[t,n+Xu(i-n,a)]}}function Qu({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:r,targetY:i,targetPosition:a=W.Top,curvature:o=.25}){let[s,c]=Zu({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=Zu({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=Yu({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function $u({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function ed({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function td({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=mu(vu(e),vu(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),xu({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},gu(a))>0}var nd=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,G=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),K=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.(`006`,Bl.error006()),t;let r=n.getEdgeId||nd,i;return i=Zl(e)?{...e}:{...e,id:r(e)},G(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function rd({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=$u({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var id={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},ad=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},od=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function sd({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:r=W.Top,center:i,offset:a,stepPosition:o}){let s=id[t],c=id[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=ad({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m=[],h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=$u({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y};return[[e,...x.x!==m[0].x||x.y!==m[0].y?[x]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],h,g,y,b]}function cd(e,t,n,r){let i=Math.min(od(e,t)/2,od(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function ld({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:r,targetY:i,targetPosition:a=W.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=sd({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=cd(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function ud(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function dd(e){let{sourceNode:t,targetNode:n}=e;if(!ud(t)||!ud(n))return null;let r=t.internals.handleBounds||fd(t.handles),i=n.internals.handleBounds||fd(n.handles),a=md(r?.source??[],e.sourceHandle),o=md(e.connectionMode===Wl.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,Bl.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||W.Bottom,c=o?.position||W.Top,l=pd(t,a,s),u=pd(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function fd(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type===`source`?t.push(r):r.type===`target`&&n.push(r);return{source:t,target:n}}function pd(e,t,n=W.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??Pu(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case W.Top:return{x:i+o/2,y:a};case W.Right:return{x:i+o,y:a+s/2};case W.Bottom:return{x:i+o/2,y:a+s};case W.Left:return{x:i,y:a+s/2}}}function md(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function hd(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function gd(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=hd(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var _d=1e3,vd=10,yd={nodeOrigin:[0,0],nodeExtent:Vl,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},bd={...yd,checkEquality:!0};function xd(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function Sd(e,t,n){let r=xd(yd,n);for(let n of e.values())if(n.parentId)Dd(n,e,t,r);else{let e=uu(eu(n,r.nodeOrigin),Nu(n.extent)?n.extent:r.nodeExtent,Pu(n));n.internals.positionAbsolute=e}}function Cd(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function wd(e){return e===`manual`}function Td(e,t,n,r={}){let i=xd(bd,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!wd(i.zIndexMode)?_d:0,c=e.length>0,l=!1;t.clear(),n.clear();for(let u of e){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=uu(eu(u,i.nodeOrigin),Nu(u.extent)?u.extent:i.nodeExtent,Pu(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:Cd(u,e),z:Od(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}e.measured!==void 0&&e.measured.width!==void 0&&e.measured.height!==void 0||e.hidden||(c=!1),u.parentId&&Dd(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function Ed(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Dd(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=xd(yd,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Ed(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c===`auto`&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*vd),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=kd(e,u,o,s,a&&!wd(c)?_d:0,c),{positionAbsolute:m}=e.internals,h=d!==m.x||f!==m.y;(h||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:f}:m,z:p}})}function Od(e,t,n){let r=Cu(e.zIndex)?e.zIndex:0;return wd(n)?r:r+(e.selected?t:0)}function kd(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=Pu(e),l=eu(e,n),u=Nu(e.extent)?uu(l,e.extent,c):l,d=uu({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=du(d,c,t));let f=Od(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function Ad(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=yu(a.get(n.parentId)?.expandedRect??_u(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=Pu(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push({id:o,type:`position`,position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:`position`,position:{x:t.position.x+u,y:t.position.y+d}})})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function jd(e,t,n,r,i,a,o){let s=r?.querySelector(`.xyflow__viewport`),c=!1;if(!s)return{changes:[],updatedInternals:c};let l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),c=!0;continue}let s=Hu(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){let p=r.nodeElement.getBoundingClientRect(),m=Nu(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;if(e.parentId&&e.extent===`parent`){let n=t.get(e.parentId);n&&(h=du(h,s,n))}else m&&(h=uu(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:Ju(`source`,r.nodeElement,p,d,e.id),target:Ju(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&Dd(g,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,u&&(l.push({id:e.id,type:`dimensions`,dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:_u(g,i)}))}}if(f.length>0){let e=Ad(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function Md({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return!1;let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r);return!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2])}function Nd(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function Pd(e,t,n){e.clear(),t.clear();for(let r of n){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},c=`${n}-${a}--${i}-${o}`;Nd(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),Nd(`target`,s,c,e,i,o),t.set(r.id,r)}}function Fd(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Fd(n,t):!1}function Id(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function Ld(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!Fd(o,e))&&(o.draggable||t&&o.draggable===void 0)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}function Rd({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function zd({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=Tu(a,t);return{x:o.x-a.x,y:o.y-a.y}}function Bd({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,p=!1,m=!1,h=null;function g({noDragClassName:g,handleSelector:_,domNode:v,isSelectable:y,nodeId:b,nodeClickDistance:x=0}){f=co(v);function S({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let _=!1,v=s.size>1,y=v&&o?hu(nu(s)):null,x=v&&l?zd({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=x?{x:Math.round(a.x+x.x),y:Math.round(a.y+x.y)}:Tu(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=su({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});_=_||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(m||=_,_&&(g(s,!0),h&&(r||d||!b&&f))){let[e,t]=Rd({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),d?.(h,e,t),b||f?.(h,t)}}async function C(){if(!u)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,d]=pu(l,u,r);(s!==0||d!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&S(a)),o=requestAnimationFrame(C)}function w(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();d=!0,m&&y||o||!b||i.get(b)?.selected||_(),y&&m&&b&&e?.(b);let v=Vu(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=v,s=Ld(i,c,v,b),s.size>0&&(n||h||!b&&g)){let[e,t]=Rd({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}let T=wo().clickDistance(x).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,r===0&&w(e),a=Vu(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=qu(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),g=Vu(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:u});if(h=e.sourceEvent,(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1||b&&!m.has(b))&&(p=!0),!p){if(!c&&n&&d&&(c=!0,C()),!d){let t=qu(e.sourceEvent,u),n=t.x-l.x,r=t.y-l.y;Math.sqrt(n*n+r*r)>f&&w(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&d&&(l=qu(e.sourceEvent,u),S(g))}}).on(`end`,e=>{if(!d||p)p&&s.size>0&&t().updateNodePositions(s,!1);else if(c=!1,d=!1,cancelAnimationFrame(o),s.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(m&&=(r(s,!1),!1),i||a||!b&&o){let[t,r]=Rd({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!Id(t,`.${g}`,v))&&(!_||Id(t,_,v))});f.call(T)}function _(){f?.on(`.drag`,null)}return{update:g,destroy:_}}function Vd(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())xu(i,_u(e))>0&&r.push(e);return r}var Hd=250;function Ud(e,t,n,r){let i=[],a=1/0,o=Vd(e,n,t+Hd);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=pd(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function Wd(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...pd(o,c,c.position,!0)}:c}function Gd(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function Kd(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var qd=()=>!0;function Jd(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=qd,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=Uu(e.target),E=0,D,{x:O,y:k}=qu(e),A=Gd(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let N=Wd(i,A,r,c,t);if(!N)return;let P=qu(e,j),F=!1,I=null,ee=!1,te=null;function ne(){if(!u||!j)return;let[e,t]=pu(P,j,S);f({x:e,y:t}),E=requestAnimationFrame(ne)}let re={...N,nodeId:i,type:A,position:N.position},ie=c.get(i),ae={inProgress:!0,isValid:null,from:pd(ie,re,W.Left,!0),fromHandle:re,fromPosition:re.position,fromNode:ie,to:P,toHandle:null,toPosition:Xl[re.position],toNode:null,pointer:P};function oe(){M=!0,y(ae),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&oe();function se(e){if(!M){let{x:t,y:n}=qu(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;oe()}if(!x()||!re){ce(e);return}let a=b();P=qu(e,j),D=Ud(Eu(P,a,!1,[1,1]),n,c,re),F||=(ne(),!0);let s=Yd(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});te=s.handleDomNode,I=s.connection,ee=Kd(!!D,s.isValid);let u=c.get(i),f=u?pd(u,re,W.Left,!0):ae.from,p={...ae,from:f,isValid:ee,to:s.toHandle&&ee?Du({x:s.toHandle.x,y:s.toHandle.y},a):P,toHandle:s.toHandle,toPosition:ee&&s.toHandle?s.toHandle.position:Xl[re.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:P};y(p),ae=p}function ce(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||te)&&I&&ee&&h?.(I);let{inProgress:t,...n}=ae,r={...n,toPosition:ae.toHandle?ae.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),F=!1,ee=!1,I=null,te=null,T.removeEventListener(`mousemove`,se),T.removeEventListener(`mouseup`,ce),T.removeEventListener(`touchmove`,se),T.removeEventListener(`touchend`,ce)}}T.addEventListener(`mousemove`,se),T.addEventListener(`mouseup`,ce),T.addEventListener(`touchmove`,se),T.addEventListener(`touchend`,ce)}function Yd(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=qd,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=qu(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=Gd(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===Wl.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=Wd(t,e,a,u,n,!0)}return _}var Xd={onPointerDown:Jd,isValid:Yd};function Zd({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=co(e);function a({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{if(e.sourceEvent.type!==`wheel`||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&Mu()?10:1,a=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*2**(a*i);t.scaleTo(o)},f=[0,0],p=zl().on(`start`,e=>{(e.sourceEvent.type===`mousedown`||e.sourceEvent.type===`touchstart`)&&(f=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on(`zoom`,c?i=>{let s=n();if(i.sourceEvent.type!==`mousemove`&&i.sourceEvent.type!==`touchmove`||!t)return;let c=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[c[0]-f[0],c[1]-f[1]];f=c;let d=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),p={x:s[0]-l[0]*d,y:s[1]-l[1]*d},m=[[0,0],[a,o]];t.setViewportConstrained({x:p.x,y:p.y,zoom:s[2]},m,e)}:null).on(`zoom.wheel`,l?d:null);i.call(p,{})}function o(){i.on(`zoom`,null)}return{update:a,destroy:o,pointer:uo}}var Qd=e=>({x:e.x,y:e.y,zoom:e.k}),$d=({x:e,y:t,zoom:n})=>kl.translate(e,t).scale(n),ef=(e,t)=>e.target.closest(`.${t}`),tf=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),nf=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,rf=(e,t=0,n=nf,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},af=e=>{let t=e.ctrlKey&&Mu()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function of({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(ef(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();let d=n.property(`__zoom`).k||1;if(u.ctrlKey&&o){let e=uo(u),t=d*2**af(u);r.scaleTo(n,t,e,u);return}let f=u.deltaMode===1?20:1,p=i===Gl.Vertical?0:u.deltaX*f,m=i===Gl.Horizontal?0:u.deltaY*f;!Mu()&&u.shiftKey&&i!==Gl.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-(p/d)*a,-(m/d)*a,{internal:!0});let h=Qd(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?c?.(u,h):(e.isPanScrolling=!0,s?.(u,h)),e.panScrollTimeout=setTimeout(()=>{l?.(u,h),e.isPanScrolling=!1},150)}}function sf({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=ef(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function cf({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=Qd(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type===`mousedown`&&t(!0),n&&n?.(r.sourceEvent,i)}}function lf({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&tf(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Qd(a.transform))}}function uf({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&tf(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=Qd(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function df({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:i,panOnScroll:a,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:c,noPanClassName:l,lib:u,connectionInProgress:d}){return f=>{let p=t||n,m=r&&f.ctrlKey,h=f.type===`wheel`;if(f.button===1&&f.type===`mousedown`&&(ef(f,`${u}-flow__node`)||ef(f,`${u}-flow__edge`)||ef(f,`${u}-flow__selection`)||ef(f,`${u}-flow__nodesselection`)))return!0;if(!i&&!p&&!a&&!o&&!r||s||d&&!h||ef(f,c)&&h||ef(f,l)&&(!h||a&&h&&!t)||!r&&f.ctrlKey&&h)return!1;if(!r&&f.type===`touchstart`&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!a&&!m&&h||!i&&(f.type===`mousedown`||f.type===`touchstart`)||Array.isArray(i)&&!i.includes(f.button)&&f.type===`mousedown`)return!1;let g=Array.isArray(i)&&i.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||h||e)&&g}}function ff({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=[[0,0],[u.width,u.height]];(typeof ResizeObserver<`u`?new ResizeObserver(e=>{let t=e[0];t&&(d=[[0,0],[t.contentRect.width,t.contentRect.height]])}):null)?.observe(e);let f=zl().extent(()=>d).scaleExtent([t,n]).translateExtent(r),p=co(e).call(f);y({x:i.x,y:i.y,zoom:lu(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);let m=p.on(`wheel.zoom`),h=p.on(`dblclick.zoom`);f.wheelDelta(af);async function g(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?Es:Bs).transform(rf(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function _({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:d,panOnScrollSpeed:g,preventScrolling:_,zoomOnPinch:y,zoomOnScroll:b,zoomOnDoubleClick:x,panActivationKeyPressed:S=!1,zoomActivationKeyPressed:C,lib:w,onTransformChange:T,connectionInProgress:E,paneClickDistance:D,selectionOnDrag:O}){r&&!l.isZoomingOrPanning&&v();let k=i&&!C&&!r;f.clickDistance(O?1/0:!Cu(D)||D<0?0:D);let A=k?of({zoomPanValues:l,noWheelClassName:e,d3Selection:p,d3Zoom:f,panOnScrollMode:d,panOnScrollSpeed:g,zoomOnPinch:y,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):sf({noWheelClassName:e,preventScrolling:_,d3ZoomHandler:m});p.on(`wheel.zoom`,A,{passive:!1});let j=cf({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});f.on(`start`,j);let M=lf({zoomPanValues:l,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:T});f.on(`zoom`,M);let N=uf({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});f.on(`end`,N);let P=df({panActivationKeyPressed:S,zoomActivationKeyPressed:C,panOnDrag:u,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:x,zoomOnPinch:y,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:w,connectionInProgress:E});f.filter(P),x?p.on(`dblclick.zoom`,h):p.on(`dblclick.zoom`,null)}function v(){f.on(`zoom`,null)}async function y(e,t,n){let r=$d(e),i=f?.constrain()(r,t,n);return i&&await g(i),i}async function b(e,t){let n=$d(e);return await g(n,t),n}function x(e){if(p){let t=$d(e),n=p.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&f?.transform(p,t,null,{sync:!0})}}function S(){let e=p?Al(p.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}async function C(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?Es:Bs).scaleTo(rf(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}async function w(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?Es:Bs).scaleBy(rf(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function T(e){f?.scaleExtent(e)}function E(e){f?.translateExtent(e)}function D(e){let t=!Cu(e)||e<0?0:e;f?.clickDistance(t)}return{update:_,destroy:v,setViewport:b,setViewportConstrained:y,getViewport:S,scaleTo:C,scaleBy:w,setScaleExtent:T,setTranslateExtent:E,syncViewport:x,setClickDistance:D}}var pf;(function(e){e.Line=`line`,e.Handle=`handle`})(pf||={});var mf=[`top-left`,`top-right`,`bottom-left`,`bottom-right`],hf=[`top`,`right`,`bottom`,`left`];function gf({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function _f(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function q(e,t){return Math.max(0,t-e)}function vf(e,t){return Math.max(0,e-t)}function yf(e,t,n){return Math.max(0,t-e,e-n)}function bf(e,t){return e?!t:t}function xf(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),O=-a[0]*x,k=-a[1]*S,A=yf(E,h,g),j=yf(D,_,v);if(o){let e=0,t=0;c&&w<0?e=q(y+w+O,o[0][0]):!c&&w>0&&(e=vf(y+E+O,o[1][0])),l&&T<0?t=q(b+T+k,o[0][1]):!l&&T>0&&(t=vf(b+D+k,o[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(s){let e=0,t=0;c&&w>0?e=vf(y+w,s[0][0]):!c&&w<0&&(e=q(y+E,s[1][0])),l&&T>0?t=vf(b+T,s[0][1]):!l&&T<0&&(t=q(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=yf(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||c&&!l&&f?vf(b+k+E/C,o[1][1])*C:q(b+k+(c?w:-w)/C,o[0][1])*C,A=Math.max(A,e)}if(s){let e=0;e=!c&&!l||c&&!l&&f?q(b+E/C,s[1][1])*C:vf(b+(c?w:-w)/C,s[0][1])*C,A=Math.max(A,e)}}if(d){let e=yf(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=0;e=!c&&!l||l&&!c&&f?vf(y+D*C+O,o[1][0])/C:q(y+(l?T:-T)*C+O,o[0][0])/C,j=Math.max(j,e)}if(s){let e=0;e=!c&&!l||l&&!c&&f?q(y+D*C,s[1][0])/C:vf(y+(l?T:-T)*C,s[0][0])/C,j=Math.max(j,e)}}}T+=T<0?j:-j,w+=w<0?A:-A,i&&(f?E>D*C?T=(bf(c,l)?-w:w)/C:w=(bf(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let M=c?y+w:y,N=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+M,y:a[1]*T*(l?-1:1)+N}}var Sf={width:0,height:0,x:0,y:0},Cf={...Sf,pointerX:0,pointerY:0,aspectRatio:1};function wf(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function Tf({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=co(e),o={controlDirection:_f(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...Sf},h={...Cf};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:_f(e)};let g,_=null,v=[],y,b,x,S=wo().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=Vu(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,b=Nu(g.extent)?g.extent:void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId)),y&&g.extent===`parent`&&(b=[[0,0],[y.measured.width,y.measured.height]]),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=wf(n,g,n.origin??s);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=Vu(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:S,height:C}=m,w={},T=g.origin??s,{width:E,height:D,x:O,y:k}=xf(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,T,b,x),A=E!==S,j=D!==C,M=O!==u&&A,N=k!==f&&j;if(!M&&!N&&!A&&!j)return;let P={prevValues:{...m},startX:h.x,startY:h.y,childNodes:v.map(e=>({...e,position:{...e.position}}))};if((M||N||T[0]===1||T[1]===1)&&(w.x=M?O:m.x,w.y=N?k:m.y,m.x=w.x,m.y=w.y,v.length>0)){let e=O-u,t=k-f;for(let n of v)n.position={x:n.position.x-e+T[0]*(E-S),y:n.position.y-t+T[1]*(D-C)},l.push(n)}if((A||j)&&(w.width=A&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?E:m.width,w.height=j&&(!o.resizeDirection||o.resizeDirection===`vertical`)?D:m.height,m.width=w.width,m.height=w.height),y&&g.expandParent){let e=T[0]*(w.width??0);w.x&&w.x<e&&(m.x=e,h.x-=w.x-e);let t=T[1]*(w.height??0);w.y&&w.y<t&&(m.y=t,h.y-=w.y-t)}let F=gf({width:m.width,prevWidth:S,height:m.height,prevHeight:C,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),I={...m,direction:F};p?.(e,I)===!1?(m=P.prevValues,h.x=P.startX,h.y=P.startY,v.forEach((e,t)=>{e.position=P.childNodes[t].position})):(d?.(e,I),r(w,l))}).on(`end`,e=>{f?.(e,{...m}),i?.({...m})});a.call(S)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var Ef=o((e=>{var t=d();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 u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Df=o(((e,t)=>{t.exports=Ef()})),Of=o((e=>{var t=d(),n=Df();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}})),kf=l(o(((e,t)=>{t.exports=Of()}))(),1),Af=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},jf=e=>e?Af(e):Af,{useDebugValue:Mf}=v.default,{useSyncExternalStoreWithSelector:Nf}=kf.default,Pf=e=>e;function Ff(e,t=Pf,n){let r=Nf(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Mf(r),r}var If=(e,t)=>{let n=jf(e),r=(e,r=t)=>Ff(n,e,r);return Object.assign(r,n),r},Lf=(e,t)=>e?If(e,t):If;function Rf(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var zf=(0,v.createContext)(null),Bf=zf.Provider,Vf=Bl.error001(`react`);function J(e,t){let n=(0,v.useContext)(zf);if(n===null)throw Error(Vf);return Ff(n,e,t)}function Hf(){let e=(0,v.useContext)(zf);if(e===null)throw Error(Vf);return(0,v.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Uf={display:`none`},Wf={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},Y=`react-flow__node-desc`,Gf=`react-flow__edge-desc`,Kf=`react-flow__aria-live`,qf=e=>e.ariaLiveMessage,Jf=e=>e.ariaLabelConfig;function Yf({rfId:e}){let t=J(qf);return(0,B.jsx)(`div`,{id:`${Kf}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:Wf,children:t})}function Xf({rfId:e,disableKeyboardA11y:t}){let n=J(Jf);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{id:`${Y}-${e}`,style:Uf,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,B.jsx)(`div`,{id:`${Gf}-${e}`,style:Uf,children:n[`edge.a11yDescription.default`]}),!t&&(0,B.jsx)(Yf,{rfId:e})]})}var Zf=(0,v.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>{let o=`${e}`.split(`-`);return(0,B.jsx)(`div`,{className:ii([`react-flow__panel`,n,...o]),style:r,ref:a,...i,children:t})});Zf.displayName=`Panel`;var Qf=`https://reactflow.dev?utm_source=attribution`;function $f({proOptions:e,position:t=`bottom-right`}){return(0,v.useEffect)(()=>{},[]),e?.hideAttribution?null:(0,B.jsx)(Zf,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${Qf}`,children:(0,B.jsx)(`a`,{href:Qf,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var ep=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},tp=e=>e.id;function np(e,t){return Rf(e.selectedNodes.map(tp),t.selectedNodes.map(tp))&&Rf(e.selectedEdges.map(tp),t.selectedEdges.map(tp))}function rp({onSelectionChange:e}){let t=Hf(),{selectedNodes:n,selectedEdges:r}=J(ep,np);return(0,v.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var ip=e=>!!e.onSelectionChangeHandlers;function ap({onSelectionChange:e}){let t=J(ip);return e||t?(0,B.jsx)(rp,{onSelectionChange:e}):null}var op=[0,0],sp={x:0,y:0,zoom:1},cp=[...`nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode`.split(`.`),`rfId`],lp=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),up={translateExtent:Vl,nodeOrigin:op,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function dp(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:c}=J(lp,Rf),l=Hf();(0,v.useEffect)(()=>(c(e.defaultNodes,e.defaultEdges),()=>{u.current=up,s()}),[]);let u=(0,v.useRef)(up);return(0,v.useEffect)(()=>{for(let s of cp){let c=e[s];c!==u.current[s]&&e[s]!==void 0&&(s===`nodes`?t(c):s===`edges`?n(c):s===`minZoom`?r(c):s===`maxZoom`?i(c):s===`translateExtent`?a(c):s===`nodeExtent`?o(c):s===`ariaLabelConfig`?l.setState({ariaLabelConfig:zu(c)}):s===`fitView`?l.setState({fitViewQueued:c}):s===`fitViewOptions`?l.setState({fitViewOptions:c}):l.setState({[s]:c}))}u.current=e},cp.map(t=>e[t])),null}function fp(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function pp(e){let[t,n]=(0,v.useState)(e===`system`?null:e);return(0,v.useEffect)(()=>{if(e!==`system`){n(e);return}let t=fp(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?fp()?.matches?`dark`:`light`:t}var mp=typeof document<`u`?document:null;function hp(e=null,t={target:mp,actInsideInputWithModifier:!0}){let[n,r]=(0,v.useState)(!1),i=(0,v.useRef)(!1),a=(0,v.useRef)(new Set([])),[o,s]=(0,v.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(/\+/g,`
|
|
10
|
+
`).replace(`
|
|
11
|
+
|
|
12
|
+
`,`
|
|
13
|
+
+`).split(`
|
|
14
|
+
`));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,v.useEffect)(()=>{let n=t?.target??mp,c=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!c)&&Gu(e))return!1;let n=_p(e.code,s);if(a.current.add(e[n]),gp(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=_p(e.code,s);gp(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function gp(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function _p(e,t){return t.includes(e)?`code`:`key`}var vp=()=>{let e=Hf();return(0,v.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=ju(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return Eu(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=Du(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function yp(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)bp(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function bp(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing)}}function xp(e,t){return yp(e,t)}function Sp(e,t){return yp(e,t)}function Cp(e,t){return{id:e,type:`select`,selected:t}}function wp(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);(a.selected!==void 0||e)&&a.selected!==e&&(n&&(a.selected=e),r.push(Cp(a.id,e)))}return r}function Tp({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function Ep(e){return{id:e.id,type:`remove`}}var Dp=wu(`React Flow`,`https://reactflow.dev/`);function Op(e,t,n={}){return K(e,t,{...n,onError:n.onError??Dp})}var kp=e=>Ql(e),Ap=e=>Zl(e);function jp(e){return(0,v.forwardRef)(e)}var Mp=typeof window<`u`?v.useLayoutEffect:v.useEffect;function Np(e){let[t,n]=(0,v.useState)(BigInt(0)),[r]=(0,v.useState)(()=>Pp(()=>n(e=>e+BigInt(1))));return Mp(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function Pp(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var Fp=(0,v.createContext)(null);function Ip({children:e}){let t=Hf(),n=Np((0,v.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=Tp({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=Np((0,v.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(Tp({items:s,lookup:o}))},[])),i=(0,v.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,B.jsx)(Fp.Provider,{value:i,children:e})}function Lp(){let e=(0,v.useContext)(Fp);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var Rp=e=>!!e.panZoom;function zp(){let e=vp(),t=Hf(),n=Lp(),r=J(Rp),i=(0,v.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=kp(e)?e:n.get(e.id),a=i.parentId?Iu(i.position,i.measured,i.parentId,n,r):i.position;return _u({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&kp(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&Ap(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await cu({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(Ep);o?.(f),c(e)}if(m){let e=d.map(Ep);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=Su(e),o=i?e:a(e),s=r!==void 0;return o?(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let c=_u(s?r:a),l=xu(c,o);return n&&l>0||l>=c.width*c.height||l>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=Su(e)?e:a(e);if(!r)return!1;let i=xu(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return tu(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??Ru();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,v.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var Bp=e=>e.selected,Vp=typeof window<`u`?window:void 0;function Hp({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Hf(),{deleteElements:r}=zp(),i=hp(e,{actInsideInputWithModifier:!1}),a=hp(t,{target:Vp});(0,v.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(Bp),edges:e.filter(Bp)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,v.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function Up(e){let t=Hf();(0,v.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=Hu(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,Bl.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t&&e.current&&t.unobserve(e.current)}}},[])}var Wp={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},Gp=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Kp({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:i,panOnScrollSpeed:a=.5,panOnScrollMode:o=Gl.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:h,noWheelClassName:g,noPanClassName:_,onViewportChange:y,isControlledViewport:b,paneClickDistance:x,selectionOnDrag:S}){let C=Hf(),w=(0,v.useRef)(null),{userSelectionActive:T,lib:E,connectionInProgress:D}=J(Gp,Rf),O=hp(p),k=(0,v.useRef)();Up(w);let A=(0,v.useCallback)(e=>{y?.({x:e[0],y:e[1],zoom:e[2]}),b||C.setState({transform:e})},[y,b]);return(0,v.useEffect)(()=>{if(w.current){k.current=ff({domNode:w.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:e=>C.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=C.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=C.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=C.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=k.current.getViewport();return C.setState({panZoom:k.current,transform:[e,t,n],domNode:w.current.closest(`.react-flow`)}),()=>{k.current?.destroy()}}},[]),(0,v.useEffect)(()=>{k.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:i,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:O,preventScrolling:m,noPanClassName:_,userSelectionActive:T,noWheelClassName:g,lib:E,onTransformChange:A,connectionInProgress:D,selectionOnDrag:S,paneClickDistance:x})},[e,t,n,r,i,a,o,s,c,O,m,_,T,g,E,A,D,S,x]),(0,B.jsx)(`div`,{className:`react-flow__renderer`,ref:w,style:Wp,children:h})}var qp=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Jp(){let{userSelectionActive:e,userSelectionRect:t}=J(qp,Rf);return e&&t?(0,B.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Yp=(e,t)=>n=>{n.target===t.current&&e?.(n)},Xp=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Zp({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Kl.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:c,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){let g=(0,v.useRef)(0),_=Hf(),{userSelectionActive:y,elementsSelectable:b,dragging:x,panBy:S,autoPanSpeed:C}=J(Xp,Rf),w=b&&(e||y),T=(0,v.useRef)(null),E=(0,v.useRef)(),D=(0,v.useRef)(new Set),O=(0,v.useRef)(new Set),k=(0,v.useRef)(!1),A=(0,v.useRef)(!1),j=(0,v.useRef)({x:0,y:0}),M=(0,v.useRef)(!1),N=e=>{A.current||k.current||_.getState().connection.inProgress?(A.current=!1,k.current=!1):(l?.(e),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1}))},P=e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():u?.(e)},F=d?e=>d(e):void 0,I=e=>{A.current&&=(e.stopPropagation(),!1)},ee=n=>{if(n.pointerType===`touch`&&r!==!1&&!t)return;let{domNode:i,transform:a}=_.getState();if(E.current=i?.getBoundingClientRect(),!E.current)return;let s=n.target===T.current;if(!s&&n.target.closest(`.nokey`)||!e||!(o&&s||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),A.current=!1;let{x:c,y:l}=qu(n.nativeEvent,E.current),u=Eu({x:c,y:l},a);_.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:c,y:l}}),s||(n.stopPropagation(),n.preventDefault())};function te(e,t){let{userSelectionRect:r}=_.getState();if(!r)return;let{transform:i,nodeLookup:a,edgeLookup:o,connectionLookup:s,triggerNodeChanges:c,triggerEdgeChanges:l,defaultEdgeOptions:u}=_.getState(),d={x:r.startX,y:r.startY},{x:f,y:p}=Du(d,i),m={startX:d.x,startY:d.y,x:e<f?e:f,y:t<p?t:p,width:Math.abs(e-f),height:Math.abs(t-p)},h=D.current,g=O.current;D.current=new Set(ru(a,m,i,n===Kl.Partial,!0).map(e=>e.id)),O.current=new Set;let v=u?.selectable??!0;for(let e of D.current){let t=s.get(e);if(t)for(let{edgeId:e}of t.values()){let t=o.get(e);t&&(t.selectable??v)&&O.current.add(e)}}Lu(h,D.current)||c(wp(a,D.current,!0)),Lu(g,O.current)||l(wp(o,O.current)),_.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}function ne(){if(!i||!E.current)return;let[e,t]=pu(j.current,E.current,C);S({x:e,y:t}).then(e=>{if(!A.current||!e){g.current=requestAnimationFrame(ne);return}let{x:t,y:n}=j.current;te(t,n),g.current=requestAnimationFrame(ne)})}let re=()=>{cancelAnimationFrame(g.current),g.current=0,M.current=!1};(0,v.useEffect)(()=>()=>re(),[]);let ie=e=>{let{userSelectionRect:n,transform:r,resetSelectedElements:i}=_.getState();if(!E.current||!n)return;let{x:o,y:c}=qu(e.nativeEvent,E.current);j.current={x:o,y:c};let l=Du({x:n.startX,y:n.startY},r);if(!A.current){let n=t?0:a;if(Math.hypot(o-l.x,c-l.y)<=n)return;i(),s?.(e)}A.current=!0,M.current||=(ne(),!0),te(o,c)},ae=e=>{w?e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!y&&e.target===T.current&&_.getState().userSelectionRect&&N?.(e),_.setState({userSelectionActive:!1,userSelectionRect:null}),A.current&&(c?.(e),_.setState({nodesSelectionActive:D.current.size>0})),re()):e.target===T.current&&_.getState().connection.inProgress&&(k.current=!0)},oe=e=>{e.target?.releasePointerCapture?.(e.pointerId),re()},se=r===!0||Array.isArray(r)&&r.includes(0);return(0,B.jsxs)(`div`,{className:ii([`react-flow__pane`,{draggable:se,dragging:x,selection:e}]),onClick:w?void 0:Yp(N,T),onContextMenu:Yp(P,T),onWheel:Yp(F,T),onPointerEnter:w?void 0:f,onPointerMove:w?ie:p,onPointerUp:ae,onPointerCancel:w?oe:void 0,onPointerDownCapture:w?ee:void 0,onClickCapture:w?I:void 0,onPointerLeave:m,ref:T,style:Wp,children:[h,(0,B.jsx)(Jp,{})]})}function Qp({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);l?(t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])):c?.(`012`,Bl.error012(e))}function $p({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=Hf(),[c,l]=(0,v.useState)(!1),u=(0,v.useRef)();return(0,v.useEffect)(()=>{if(!t)return u.current=Bd({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{Qp({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}}),()=>{u.current?.destroy(),u.current=void 0}},[t,s,e]),(0,v.useEffect)(()=>{!t&&e.current&&u.current&&u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o})},[n,r,t,a,e,i,o]),c}var em=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function tm(){let e=Hf();return(0,v.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=em(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=Tu(t,i));let{position:a,positionAbsolute:s}=su({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var nm=(0,v.createContext)(null),rm=nm.Provider;nm.Consumer;var im=()=>(0,v.useContext)(nm),am=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),om=(0,v.createContext)(null);function sm({children:e}){let t=J(am,Rf);return(0,B.jsx)(om.Provider,{value:t,children:e})}function cm(){let e=(0,v.useContext)(om);if(!e)throw Error(`useHandleConfig must be used within a HandleConfigProvider`);return e}var lm={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},um=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o;if(!s&&!i)return lm;let u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===Wl.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function dm({type:e=`source`,position:t=W.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p){let m=o||null,h=e===`target`,g=Hf(),_=im(),{connectOnClick:v,noPanClassName:y,rfId:b}=cm(),{connectingFrom:x,connectingTo:S,clickConnecting:C,isPossibleEndHandle:w,connectionInProcess:T,clickConnectionInProcess:E,valid:D}=J(um(_,m,e),Rf);_||g.getState().onError?.(`010`,Bl.error010());let O=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t,onError:n}=g.getState();t(Op(i,e,{onError:n}))}n?.(i),s?.(i)},k=e=>{if(!_)return;let t=Ku(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();Xd.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:_,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:O,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,B.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${b}-${_}-${m}-${e}`,className:ii([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,y,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,clickconnecting:C,connectingfrom:x,connectingto:S,valid:D,connectionindicator:r&&(!T||w)&&(T||E?a:i)}]),onMouseDown:k,onTouchStart:k,onClick:v?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!_||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:_,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:_,type:e,id:m}});return}let p=Uu(t.target),h=n||c,{connection:v,isValid:y}=Xd.isValid(t.nativeEvent,{handle:{nodeId:_,id:m,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:h,flowId:u,doc:p,lib:l,nodeLookup:d});y&&v&&O(v);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:c})}var fm=(0,v.memo)(jp(dm));function pm({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[e?.label,(0,B.jsx)(fm,{type:`source`,position:n,isConnectable:t})]})}function mm({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:r=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(fm,{type:`target`,position:n,isConnectable:t}),e?.label,(0,B.jsx)(fm,{type:`source`,position:r,isConnectable:t})]})}function hm(){return null}function gm({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(fm,{type:`target`,position:n,isConnectable:t}),e?.label]})}var _m={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},vm={input:pm,default:mm,output:gm,group:hm};function ym(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var bm=e=>{let{width:t,height:n,x:r,y:i}=nu(e.nodeLookup,{filter:e=>!!e.selected});return{width:Cu(t)?t:null,height:Cu(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function xm({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=Hf(),{width:i,height:a,transformString:o,userSelectionActive:s}=J(bm,Rf),c=tm(),l=(0,v.useRef)(null);(0,v.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if($p({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,B.jsx)(`div`,{className:ii([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,B.jsx)(`div`,{ref:l,className:`react-flow__nodesselection-rect`,onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(_m,e.key)&&(e.preventDefault(),c({direction:_m[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var Sm=typeof window<`u`?window:void 0,Cm=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function wm({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:b,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:w,autoPanOnSelection:T,defaultViewport:E,translateExtent:D,minZoom:O,maxZoom:k,preventScrolling:A,onSelectionContextMenu:j,noWheelClassName:M,noPanClassName:N,disableKeyboardA11y:P,onViewportChange:F,isControlledViewport:I}){let{nodesSelectionActive:ee,userSelectionActive:te}=J(Cm,Rf),ne=hp(l,{target:Sm}),re=hp(h,{target:Sm}),ie=re||w,ae=re||b,oe=u&&ie!==!0,se=ne||te||oe;return Hp({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,B.jsx)(Kp,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:ae,panActivationKeyPressed:re,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:!ne&&ie,defaultViewport:E,translateExtent:D,minZoom:O,maxZoom:k,zoomActivationKeyCode:g,preventScrolling:A,noWheelClassName:M,noPanClassName:N,onViewportChange:F,isControlledViewport:I,paneClickDistance:s,selectionOnDrag:oe,children:(0,B.jsxs)(Zp,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:ie,autoPanOnSelection:T,isSelecting:!!se,selectionMode:d,selectionKeyPressed:ne,paneClickDistance:s,selectionOnDrag:oe,children:[e,ee&&(0,B.jsx)(xm,{onSelectionContextMenu:j,noPanClassName:N,disableKeyboardA11y:P})]})})}wm.displayName=`FlowRenderer`;var Tm=(0,v.memo)(wm),Em=e=>t=>e?ru(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function Dm(e){return J((0,v.useCallback)(Em(e),[e]),Rf)}var Om=e=>e.updateNodeInternals;function km(){let e=J(Om),[t]=(0,v.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,v.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function Am({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=Hf(),a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=(0,v.useRef)(e.sourcePosition),c=(0,v.useRef)(e.targetPosition),l=(0,v.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,v.useEffect)(()=>{!a.current||e.hidden||u&&o.current===a.current||(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[u,e.hidden]),(0,v.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,v.useEffect)(()=>{if(a.current){let n=l.current!==t,r=s.current!==e.sourcePosition,o=c.current!==e.targetPosition;(n||r||o)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function jm({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:_,onError:v}){let{node:y,internals:b,isParent:x}=J(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},Rf),S=y.type||`default`,C=g?.[S]||vm[S];C===void 0&&(v?.(`003`,Bl.error003(S)),S=`default`,C=g?.default||vm.default);let w=!!(y.draggable||s&&y.draggable===void 0),T=!!(y.selectable||c&&y.selectable===void 0),E=!!(y.connectable||l&&y.connectable===void 0),D=!!(y.focusable||u&&y.focusable===void 0),O=Hf(),k=Fu(y),A=Am({node:y,nodeType:S,hasDimensions:k,resizeObserver:d}),j=$p({nodeRef:A,disabled:y.hidden||!w,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:_}),M=tm();if(y.hidden)return null;let N=Pu(y),P=ym(y),F=T||w||t||n||r||i,I=n?e=>n(e,{...b.userNode}):void 0,ee=r?e=>r(e,{...b.userNode}):void 0,te=i?e=>i(e,{...b.userNode}):void 0,ne=a?e=>a(e,{...b.userNode}):void 0,re=o?e=>o(e,{...b.userNode}):void 0,ie=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=O.getState();T&&(!r||!w||i>0)&&Qp({id:e,store:O,nodeRef:A}),t&&t(n,{...b.userNode})},ae=t=>{if(!(Gu(t.nativeEvent)||m)){if(Hl.includes(t.key)&&T){let n=t.key===`Escape`;Qp({id:e,store:O,unselect:n,nodeRef:A})}else if(w&&y.selected&&Object.prototype.hasOwnProperty.call(_m,t.key)){t.preventDefault();let{ariaLabelConfig:e}=O.getState();O.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),M({direction:_m[t.key],factor:t.shiftKey?4:1})}}},oe=()=>{if(m||!A.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=O.getState();i&&(ru(new Map([[e,y]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(y.position.x+N.width/2,y.position.y+N.height/2,{zoom:t[2]}))};return(0,B.jsx)(`div`,{className:ii([`react-flow__node`,`react-flow__node-${S}`,{[p]:w},y.className,{selected:y.selected,selectable:T,parent:x,draggable:w,dragging:j}]),ref:A,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:F?`all`:`none`,visibility:k?`visible`:`hidden`,...y.style,...P},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:ee,onMouseLeave:te,onContextMenu:ne,onClick:ie,onDoubleClick:re,onKeyDown:D?ae:void 0,tabIndex:D?0:void 0,onFocus:D?oe:void 0,role:y.ariaRole??(D?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${Y}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,B.jsx)(rm,{value:e,children:(0,B.jsx)(C,{id:e,data:y.data,type:S,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:y.selected??!1,selectable:T,draggable:w,deletable:y.deletable??!0,isConnectable:E,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:j,dragHandle:y.dragHandle,zIndex:b.z,parentId:y.parentId,...N})})})}var Mm=(0,v.memo)(jm),Nm=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Pm(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:i}=J(Nm,Rf),a=Dm(e.onlyRenderVisibleElements),o=km();return(0,B.jsx)(`div`,{className:`react-flow__nodes`,style:Wp,children:a.map(a=>(0,B.jsx)(Mm,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}Pm.displayName=`NodeRenderer`;var Fm=(0,v.memo)(Pm);function Im(e){return J((0,v.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&td({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),Rf)}var Lm=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,B.jsx)(`polyline`,{className:`arrow`,style:n,strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`})},Rm=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,B.jsx)(`polyline`,{className:`arrowclosed`,style:n,strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`})},zm={[Yl.Arrow]:Lm,[Yl.ArrowClosed]:Rm};function Bm(e){let t=Hf();return(0,v.useMemo)(()=>Object.prototype.hasOwnProperty.call(zm,e)?zm[e]:(t.getState().onError?.(`009`,Bl.error009(e)),null),[e])}var Vm=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=Bm(t);return c?(0,B.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`,children:(0,B.jsx)(c,{color:n,strokeWidth:o})}):null},Hm=({defaultColor:e,rfId:t})=>{let n=J(e=>e.edges),r=J(e=>e.defaultEdgeOptions),i=(0,v.useMemo)(()=>gd(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,B.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,B.jsx)(`defs`,{children:i.map(e=>(0,B.jsx)(Vm,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};Hm.displayName=`MarkerDefinitions`;var Um=(0,v.memo)(Hm);function Wm({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){let[d,f]=(0,v.useState)({x:1,y:0,width:0,height:0}),p=ii([`react-flow__edge-textwrapper`,l]),m=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(m.current){let e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,B.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,B.jsx)(`rect`,{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),(0,B.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}Wm.displayName=`EdgeText`;var Gm=(0,v.memo)(Wm);function Km({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{...u,d:e,fill:`none`,className:ii([`react-flow__edge-path`,u.className])}),l?(0,B.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&Cu(t)&&Cu(n)?(0,B.jsx)(Gm,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function qm({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===W.Left||e===W.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Jm({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:r,targetY:i,targetPosition:a=W.Top}){let[o,s]=qm({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=qm({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=Yu({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function Ym(e){return(0,v.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})=>{let[v,y,b]=Jm({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),x=e.isInternal?void 0:t;return(0,B.jsx)(Km,{id:x,path:v,labelX:y,labelY:b,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})})}var Xm=Ym({isInternal:!1}),Zm=Ym({isInternal:!0});Xm.displayName=`SimpleBezierEdge`,Zm.displayName=`SimpleBezierEdgeInternal`;function Qm(e){return(0,v.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=W.Bottom,targetPosition:m=W.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=ld({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition}),S=e.isInternal?void 0:t;return(0,B.jsx)(Km,{id:S,path:y,labelX:b,labelY:x,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:v})})}var $m=Qm({isInternal:!1}),eh=Qm({isInternal:!0});$m.displayName=`SmoothStepEdge`,eh.displayName=`SmoothStepEdgeInternal`;function th(e){return(0,v.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,B.jsx)($m,{...n,id:r,pathOptions:(0,v.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var nh=th({isInternal:!1}),rh=th({isInternal:!0});nh.displayName=`StepEdge`,rh.displayName=`StepEdgeInternal`;function ih(e){return(0,v.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=rd({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,B.jsx)(Km,{id:y,path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}var ah=ih({isInternal:!1}),oh=ih({isInternal:!0});ah.displayName=`StraightEdge`,oh.displayName=`StraightEdgeInternal`;function sh(e){return(0,v.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=W.Bottom,targetPosition:s=W.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=Qu({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature}),S=e.isInternal?void 0:t;return(0,B.jsx)(Km,{id:S,path:y,labelX:b,labelY:x,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}var ch=sh({isInternal:!1}),lh=sh({isInternal:!0});ch.displayName=`BezierEdge`,lh.displayName=`BezierEdgeInternal`;var uh={default:lh,straight:oh,step:rh,smoothstep:eh,simplebezier:Zm},dh={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},fh=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,ph=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,mh=`react-flow__edgeupdater`;function hh({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,B.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:ii([mh,`${mh}-${s}`]),cx:fh(t,r,e),cy:ph(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function gh({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let m=Hf(),h=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:p,nodeLookup:h,rfId:g,panBy:_,updateConnection:v}=m.getState(),y=t.type===`target`;Xd.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:_,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>l?.(n,e),onConnectStart:(r,i)=>{f(!0),u?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),_=e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),v=()=>p(!0),y=()=>p(!1);return(0,B.jsxs)(B.Fragment,{children:[(e===!0||e===`source`)&&(0,B.jsx)(hh,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,B.jsx)(hh,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function _h({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:_,disableKeyboardA11y:y}){let b=J(t=>t.edgeLookup.get(e)),x=J(e=>e.defaultEdgeOptions);b=x?{...x,...b}:b;let S=b.type||`default`,C=h?.[S]||uh[S];C===void 0&&(_?.(`011`,Bl.error011(S)),S=`default`,C=h?.default||uh.default);let w=!!(b.focusable||t&&b.focusable===void 0),T=d!==void 0&&(b.reconnectable||n&&b.reconnectable===void 0),E=!!(b.selectable||r&&b.selectable===void 0),D=(0,v.useRef)(null),[O,k]=(0,v.useState)(!1),[A,j]=(0,v.useState)(!1),M=Hf(),{zIndex:N=b.zIndex,sourceX:P,sourceY:F,targetX:I,targetY:ee,sourcePosition:te,targetPosition:ne}=J((0,v.useCallback)(t=>{let n=t.nodeLookup.get(b.source),r=t.nodeLookup.get(b.target);if(!n||!r)return dh;let i=dd({id:e,sourceNode:n,targetNode:r,sourceHandle:b.sourceHandle||null,targetHandle:b.targetHandle||null,connectionMode:t.connectionMode,onError:_}),a=ed({selected:b.selected,zIndex:b.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode});return{...i||dh,zIndex:a}},[b.source,b.target,b.sourceHandle,b.targetHandle,b.selected,b.zIndex,_]),Rf),re=(0,v.useMemo)(()=>b.markerStart?`url('#${hd(b.markerStart,m)}')`:void 0,[b.markerStart,m]),ie=(0,v.useMemo)(()=>b.markerEnd?`url('#${hd(b.markerEnd,m)}')`:void 0,[b.markerEnd,m]);if(b.hidden||P===null||F===null||I===null||ee===null)return null;let ae=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=M.getState();E&&(M.setState({nodesSelectionActive:!1}),b.selected&&a?(r({nodes:[],edges:[b]}),D.current?.blur()):n([e])),i&&i(t,b)},oe=a?e=>{a(e,{...b})}:void 0,se=o?e=>{o(e,{...b})}:void 0,ce=s?e=>{s(e,{...b})}:void 0,le=c?e=>{c(e,{...b})}:void 0,ue=l?e=>{l(e,{...b})}:void 0;return(0,B.jsx)(`svg`,{style:{zIndex:N},children:(0,B.jsxs)(`g`,{className:ii([`react-flow__edge`,`react-flow__edge-${S}`,b.className,g,{selected:b.selected,animated:b.animated,inactive:!E&&!i,updating:O,selectable:E}]),onClick:ae,onDoubleClick:oe,onContextMenu:se,onMouseEnter:ce,onMouseMove:le,onMouseLeave:ue,onKeyDown:w?t=>{if(!y&&Hl.includes(t.key)&&E){let{unselectNodesAndEdges:n,addSelectedEdges:r}=M.getState();t.key===`Escape`?(D.current?.blur(),n({edges:[b]})):r([e])}}:void 0,tabIndex:w?0:void 0,role:b.ariaRole??(w?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":b.ariaLabel===null?void 0:b.ariaLabel||`Edge from ${b.source} to ${b.target}`,"aria-describedby":w?`${Gf}-${m}`:void 0,ref:D,...b.domAttributes,children:[!A&&(0,B.jsx)(C,{id:e,source:b.source,target:b.target,type:b.type,selected:b.selected,animated:b.animated,selectable:E,deletable:b.deletable??!0,label:b.label,labelStyle:b.labelStyle,labelShowBg:b.labelShowBg,labelBgStyle:b.labelBgStyle,labelBgPadding:b.labelBgPadding,labelBgBorderRadius:b.labelBgBorderRadius,sourceX:P,sourceY:F,targetX:I,targetY:ee,sourcePosition:te,targetPosition:ne,data:b.data,style:b.style,sourceHandleId:b.sourceHandle,targetHandleId:b.targetHandle,markerStart:re,markerEnd:ie,pathOptions:`pathOptions`in b?b.pathOptions:void 0,interactionWidth:b.interactionWidth}),T&&(0,B.jsx)(gh,{edge:b,isReconnectable:T,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:P,sourceY:F,targetX:I,targetY:ee,sourcePosition:te,targetPosition:ne,setUpdateHover:k,setReconnecting:j})]})})}var vh=(0,v.memo)(_h),yh=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function bh({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,onError:y}=J(yh,Rf),b=Im(t);return(0,B.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,B.jsx)(Um,{defaultColor:e,rfId:n}),b.map(e=>(0,B.jsx)(vh,{id:e,edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}bh.displayName=`EdgeRenderer`;var xh=(0,v.memo)(bh),Sh=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function Ch({children:e}){let t=Hf(),n=(0,v.useRef)(null),[r]=(0,v.useState)(()=>t.getState().transform);return Mp(()=>{let e=null,r=()=>{let r=t.getState().transform;e&&r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]||(e=r,n.current&&(n.current.style.transform=Sh(r)))};return r(),t.subscribe(r)},[t]),(0,B.jsx)(`div`,{ref:n,className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:Sh(r)},children:e})}function wh(e){let t=zp(),n=(0,v.useRef)(!1);(0,v.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var Th=e=>e.panZoom?.syncViewport;function Eh(e){let t=J(Th),n=Hf();return(0,v.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Dh(e){return e.connection.inProgress?{...e.connection,to:Eu(e.connection.to,e.transform)}:{...e.connection}}function Oh(e){return e?t=>e(Dh(t)):Dh}function kh(e){return J(Oh(e),Rf)}var Ah=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function jh({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=J(Ah,Rf);return a&&i&&c?(0,B.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,B.jsx)(`g`,{className:ii([`react-flow__connection`,Bu(s)]),children:(0,B.jsx)(Mh,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var Mh=({style:e,type:t=Jl.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:p}=kh();if(!i)return;if(n)return(0,B.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:Bu(r),toNode:u,toHandle:d,pointer:p});let m=``,h={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case Jl.Bezier:[m]=Qu(h);break;case Jl.SimpleBezier:[m]=Jm(h);break;case Jl.Step:[m]=ld({...h,borderRadius:0});break;case Jl.SmoothStep:[m]=ld(h);break;default:[m]=rd(h)}return(0,B.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};Mh.displayName=`ConnectionLine`;var Nh={};function Ph(e=Nh){(0,v.useRef)(e),Hf(),(0,v.useEffect)(()=>{},[e])}function Fh(){Hf(),(0,v.useRef)(!1),(0,v.useEffect)(()=>{},[])}function Ih({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:_,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:C,deleteKeyCode:w,onlyRenderVisibleElements:T,elementsSelectable:E,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,preventScrolling:j,defaultMarkerColor:M,zoomOnScroll:N,zoomOnPinch:P,panOnScroll:F,panOnScrollSpeed:I,panOnScrollMode:ee,zoomOnDoubleClick:te,panOnDrag:ne,autoPanOnSelection:re,onPaneClick:ie,onPaneMouseEnter:ae,onPaneMouseMove:oe,onPaneMouseLeave:se,onPaneScroll:ce,onPaneContextMenu:le,paneClickDistance:ue,nodeClickDistance:de,onEdgeContextMenu:fe,onEdgeMouseEnter:pe,onEdgeMouseMove:L,onEdgeMouseLeave:R,reconnectRadius:me,onReconnect:he,onReconnectStart:ge,onReconnectEnd:_e,noDragClassName:ve,noWheelClassName:ye,noPanClassName:be,disableKeyboardA11y:xe,nodeExtent:Se,rfId:Ce,viewport:we,onViewportChange:Te,nodesDraggable:Ee}){return Ph(e),Ph(t),Fh(),wh(n),Eh(we),(0,B.jsx)(Tm,{onPaneClick:ie,onPaneMouseEnter:ae,onPaneMouseMove:oe,onPaneMouseLeave:se,onPaneContextMenu:le,onPaneScroll:ce,paneClickDistance:ue,deleteKeyCode:w,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:C,elementsSelectable:E,zoomOnScroll:N,zoomOnPinch:P,zoomOnDoubleClick:te,panOnScroll:F,panOnScrollSpeed:I,panOnScrollMode:ee,panOnDrag:ne,autoPanOnSelection:re,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,onSelectionContextMenu:d,preventScrolling:j,noDragClassName:ve,noWheelClassName:ye,noPanClassName:be,disableKeyboardA11y:xe,onViewportChange:Te,isControlledViewport:!!we,children:(0,B.jsxs)(Ch,{children:[(0,B.jsx)(xh,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:he,onReconnectStart:ge,onReconnectEnd:_e,onlyRenderVisibleElements:T,onEdgeContextMenu:fe,onEdgeMouseEnter:pe,onEdgeMouseMove:L,onEdgeMouseLeave:R,reconnectRadius:me,defaultMarkerColor:M,noPanClassName:be,disableKeyboardA11y:xe,rfId:Ce}),(0,B.jsx)(jh,{style:h,type:m,component:g,containerStyle:_}),(0,B.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,B.jsx)(Fm,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:de,onlyRenderVisibleElements:T,noPanClassName:be,noDragClassName:ve,disableKeyboardA11y:xe,nodeExtent:Se,rfId:Ce,nodesDraggable:Ee}),(0,B.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}Ih.displayName=`GraphView`;var Lh=(0,v.memo)(Ih),Rh=wu(`React Flow`,`https://reactflow.dev/`),zh=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??Vl;Pd(h,g,_);let{nodesInitialized:x}=Td(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=ju(nu(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:Vl,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Wl.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...ql},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Rh,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:Ul,zIndexMode:f,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},Bh=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>Lf((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await ou({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...zh({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,fitViewQueued:o,zIndexMode:s,nodesSelectionActive:c}=m(),{nodesInitialized:l,hasSelectedNodes:u}=Td(e,t,n,{nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,checkEquality:!0,zIndexMode:s}),d=c&&u;o&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:d})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:d})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();Pd(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=jd(e,n,r,i,a,o,l);d&&(Sd(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=pd(e,o.fromHandle,W.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=Ad(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(xp(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(Sp(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();t?i(e.map(e=>Cp(e,!0))):(i(wp(r,new Set([...e]),!0)),a(wp(n)))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();t?a(e.map(e=>Cp(e,!0))):(a(wp(n,new Set([...e]))),i(wp(r,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s){if(!e.selected)continue;let t=i.get(e.id);t&&(t.selected=!1),l.push(Cp(e.id,!1))}let u=[];for(let e of c)e.selected&&u.push(Cp(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,Cp(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,Cp(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(Td(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return Md({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return!1;let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{p({connection:{...ql}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...zh()})}},Object.is);function Vh({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){let[m]=(0,v.useState)(()=>Bh({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,B.jsx)(Bf,{value:m,children:(0,B.jsx)(Ip,{children:(0,B.jsx)(sm,{children:p})})})}function Hh({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,v.useContext)(zf)?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsx)(Vh,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var Uh={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function Wh({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,onNodeMouseEnter:y,onNodeMouseMove:b,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:C,onNodeDragStart:w,onNodeDrag:T,onNodeDragStop:E,onNodesDelete:D,onEdgesDelete:O,onDelete:k,onSelectionChange:A,onSelectionDragStart:j,onSelectionDrag:M,onSelectionDragStop:N,onSelectionContextMenu:P,onSelectionStart:F,onSelectionEnd:I,onBeforeDelete:ee,connectionMode:te,connectionLineType:ne=Jl.Bezier,connectionLineStyle:re,connectionLineComponent:ie,connectionLineContainerStyle:ae,deleteKeyCode:oe=`Backspace`,selectionKeyCode:se=`Shift`,selectionOnDrag:ce=!1,selectionMode:le=Kl.Full,panActivationKeyCode:ue=`Space`,multiSelectionKeyCode:de=Mu()?`Meta`:`Control`,zoomActivationKeyCode:fe=Mu()?`Meta`:`Control`,snapToGrid:pe,snapGrid:L,onlyRenderVisibleElements:R=!1,selectNodesOnDrag:me,nodesDraggable:he,autoPanOnNodeFocus:ge,nodesConnectable:_e,nodesFocusable:ve,nodeOrigin:ye=op,edgesFocusable:be,edgesReconnectable:xe,elementsSelectable:Se=!0,defaultViewport:Ce=sp,minZoom:we=.5,maxZoom:Te=2,translateExtent:Ee=Vl,preventScrolling:De=!0,nodeExtent:Oe,defaultMarkerColor:ke=`#b1b1b7`,zoomOnScroll:Ae=!0,zoomOnPinch:je=!0,panOnScroll:Me=!1,panOnScrollSpeed:Ne=.5,panOnScrollMode:Pe=Gl.Free,zoomOnDoubleClick:Fe=!0,panOnDrag:Ie=!0,onPaneClick:Le,onPaneMouseEnter:Re,onPaneMouseMove:ze,onPaneMouseLeave:Be,onPaneScroll:Ve,onPaneContextMenu:He,paneClickDistance:Ue=1,nodeClickDistance:We=0,children:Ge,onReconnect:Ke,onReconnectStart:qe,onReconnectEnd:Je,onEdgeContextMenu:Ye,onEdgeDoubleClick:Xe,onEdgeMouseEnter:Ze,onEdgeMouseMove:Qe,onEdgeMouseLeave:$e,reconnectRadius:et=10,onNodesChange:tt,onEdgesChange:nt,noDragClassName:rt=`nodrag`,noWheelClassName:it=`nowheel`,noPanClassName:at=`nopan`,fitView:ot,fitViewOptions:st,connectOnClick:ct,attributionPosition:lt,proOptions:ut,defaultEdgeOptions:dt,elevateNodesOnSelect:ft=!0,elevateEdgesOnSelect:pt=!1,disableKeyboardA11y:mt=!1,autoPanOnConnect:ht,autoPanOnNodeDrag:gt,autoPanOnSelection:_t=!0,autoPanSpeed:vt,connectionRadius:yt,isValidConnection:bt,onError:xt,style:St,id:Ct,nodeDragThreshold:wt,connectionDragThreshold:Tt,viewport:Et,onViewportChange:Dt,width:Ot,height:kt,colorMode:At=`light`,debug:jt,onScroll:Mt,ariaLabelConfig:Nt,zIndexMode:Pt=`basic`,...Ft},It){let Lt=Ct||`1`,Rt=pp(At),zt=(0,v.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Mt?.(e)},[Mt]);return(0,B.jsx)(`div`,{"data-testid":`rf__wrapper`,...Ft,onScroll:zt,style:{...St,...Uh},ref:It,className:ii([`react-flow`,i,Rt]),id:Ct,role:`application`,children:(0,B.jsxs)(Hh,{nodes:e,edges:t,width:Ot,height:kt,fitView:ot,fitViewOptions:st,minZoom:we,maxZoom:Te,nodeOrigin:ye,nodeExtent:Oe,zIndexMode:Pt,children:[(0,B.jsx)(dp,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,nodesDraggable:he,autoPanOnNodeFocus:ge,nodesConnectable:_e,nodesFocusable:ve,edgesFocusable:be,edgesReconnectable:xe,elementsSelectable:Se,elevateNodesOnSelect:ft,elevateEdgesOnSelect:pt,minZoom:we,maxZoom:Te,nodeExtent:Oe,onNodesChange:tt,onEdgesChange:nt,snapToGrid:pe,snapGrid:L,connectionMode:te,translateExtent:Ee,connectOnClick:ct,defaultEdgeOptions:dt,fitView:ot,fitViewOptions:st,onNodesDelete:D,onEdgesDelete:O,onDelete:k,onNodeDragStart:w,onNodeDrag:T,onNodeDragStop:E,onSelectionDrag:M,onSelectionDragStart:j,onSelectionDragStop:N,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:at,nodeOrigin:ye,rfId:Lt,autoPanOnConnect:ht,autoPanOnNodeDrag:gt,autoPanSpeed:vt,onError:xt,connectionRadius:yt,isValidConnection:bt,selectNodesOnDrag:me,nodeDragThreshold:wt,connectionDragThreshold:Tt,onBeforeDelete:ee,debug:jt,ariaLabelConfig:Nt,zIndexMode:Pt}),(0,B.jsx)(Lh,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:b,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:C,nodeTypes:a,edgeTypes:o,connectionLineType:ne,connectionLineStyle:re,connectionLineComponent:ie,connectionLineContainerStyle:ae,selectionKeyCode:se,selectionOnDrag:ce,selectionMode:le,deleteKeyCode:oe,multiSelectionKeyCode:de,panActivationKeyCode:ue,zoomActivationKeyCode:fe,onlyRenderVisibleElements:R,defaultViewport:Ce,translateExtent:Ee,minZoom:we,maxZoom:Te,preventScrolling:De,zoomOnScroll:Ae,zoomOnPinch:je,zoomOnDoubleClick:Fe,panOnScroll:Me,panOnScrollSpeed:Ne,panOnScrollMode:Pe,panOnDrag:Ie,autoPanOnSelection:_t,onPaneClick:Le,onPaneMouseEnter:Re,onPaneMouseMove:ze,onPaneMouseLeave:Be,onPaneScroll:Ve,onPaneContextMenu:He,paneClickDistance:Ue,nodeClickDistance:We,onSelectionContextMenu:P,onSelectionStart:F,onSelectionEnd:I,onReconnect:Ke,onReconnectStart:qe,onReconnectEnd:Je,onEdgeContextMenu:Ye,onEdgeDoubleClick:Xe,onEdgeMouseEnter:Ze,onEdgeMouseMove:Qe,onEdgeMouseLeave:$e,reconnectRadius:et,defaultMarkerColor:ke,noDragClassName:rt,noWheelClassName:it,noPanClassName:at,rfId:Lt,disableKeyboardA11y:mt,nodeExtent:Oe,viewport:Et,onViewportChange:Dt,nodesDraggable:he}),(0,B.jsx)(ap,{onSelectionChange:A}),Ge,(0,B.jsx)($f,{proOptions:ut,position:lt}),(0,B.jsx)(Xf,{rfId:Lt,disableKeyboardA11y:mt})]})})}var Gh=jp(Wh);function Kh(e){let[t,n]=(0,v.useState)(e);return[t,n,(0,v.useCallback)(e=>n(t=>xp(e,t)),[])]}function qh(e){let[t,n]=(0,v.useState)(e);return[t,n,(0,v.useCallback)(e=>n(t=>Sp(e,t)),[])]}Bl.error014();function Jh({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,B.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ii([`react-flow__background-pattern`,n,r])})}function Yh({radius:e,className:t}){return(0,B.jsx)(`circle`,{cx:e,cy:e,r:e,className:ii([`react-flow__background-pattern`,`dots`,t])})}var Xh;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(Xh||={});var Zh={[Xh.Dots]:1,[Xh.Lines]:1,[Xh.Cross]:6},Qh=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function $h({id:e,variant:t=Xh.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){let d=(0,v.useRef)(null),{transform:f,patternId:p}=J(Qh,Rf),m=r||Zh[t],h=t===Xh.Dots,g=t===Xh.Cross,_=Array.isArray(n)?n:[n,n],y=[_[0]*f[2]||1,_[1]*f[2]||1],b=m*f[2],x=Array.isArray(a)?a:[a,a],S=g?[b,b]:y,C=[x[0]*f[2]+S[0]/2,x[1]*f[2]+S[1]/2],w=`${p}${e||``}`;return(0,B.jsxs)(`svg`,{className:ii([`react-flow__background`,l]),style:{...c,...Wp,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,B.jsx)(`pattern`,{id:w,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${C[0]},-${C[1]})`,children:h?(0,B.jsx)(Yh,{radius:b/2,className:u}):(0,B.jsx)(Jh,{dimensions:S,lineWidth:i,variant:t,className:u})}),(0,B.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${w})`})]})}$h.displayName=`Background`;var eg=(0,v.memo)($h);function tg(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,B.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function ng(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,B.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function rg(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,B.jsx)(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`})})}function ig(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,B.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`})})}function ag(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,B.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z`})})}function og({children:e,className:t,...n}){return(0,B.jsx)(`button`,{type:`button`,className:ii([`react-flow__controls-button`,t]),...n,children:e})}var sg=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function cg({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`,orientation:f=`vertical`,"aria-label":p}){let m=Hf(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=J(sg,Rf),{zoomIn:y,zoomOut:b,fitView:x}=zp();return(0,B.jsxs)(Zf,{className:ii([`react-flow__controls`,f===`horizontal`?`horizontal`:`vertical`,l]),position:d,style:e,"data-testid":`rf__controls`,"aria-label":p??v[`controls.ariaLabel`],children:[t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(og,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,B.jsx)(tg,{})}),(0,B.jsx)(og,{onClick:()=>{b(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,B.jsx)(ng,{})})]}),n&&(0,B.jsx)(og,{className:`react-flow__controls-fitview`,onClick:()=>{x(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,B.jsx)(rg,{})}),r&&(0,B.jsx)(og,{className:`react-flow__controls-interactive`,onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},title:v[`controls.interactive.ariaLabel`],"aria-label":v[`controls.interactive.ariaLabel`],children:h?(0,B.jsx)(ag,{}):(0,B.jsx)(ig,{})}),u]})}cg.displayName=`Controls`;var lg=(0,v.memo)(cg);function ug({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){let{background:m,backgroundColor:h}=a||{},g=o||m||h;return(0,B.jsx)(`rect`,{className:ii([`react-flow__minimap-node`,{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:g,stroke:s,strokeWidth:c},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}var dg=(0,v.memo)(ug),fg=e=>e.nodes.map(e=>e.id),pg=e=>e instanceof Function?e:()=>e;function mg({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=dg,onClick:o}){let s=J(fg,Rf),c=pg(t),l=pg(e),u=pg(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,B.jsx)(B.Fragment,{children:s.map(e=>(0,B.jsx)(gg,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function hg({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){let{node:l,x:u,y:d,width:f,height:p}=J(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=Pu(r);return{node:r,x:i,y:a,width:o,height:s}},Rf);return!l||l.hidden||!Fu(l)?null:(0,B.jsx)(s,{x:u,y:d,width:f,height:p,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}var gg=(0,v.memo)(hg),_g=(0,v.memo)(mg),vg=200,yg=150,bg=e=>!e.hidden,xg=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let t of e.nodeLookup.values())if(!t.hidden){n=!0;break}return{viewBB:t,boundingRect:n?yu(nu(e.nodeLookup,{filter:bg}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Sg=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,Cg=(e,t)=>Sg(e.viewBB,t.viewBB)&&Sg(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,wg=`react-flow__minimap-desc`;function Tg({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f=`bottom-right`,onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:_,inversePan:y,zoomStep:b=1,offsetScale:x=5}){let S=Hf(),C=(0,v.useRef)(null),{boundingRect:w,panZoom:T,viewBB:E,rfId:D,translateExtent:O,flowWidth:k,flowHeight:A,ariaLabelConfig:j}=J(xg,Cg),M=e?.width??vg,N=e?.height??yg,P=w.width/M,F=w.height/N,I=Math.max(P,F),ee=I*M,te=I*N,ne=x*I,re=w.x-(ee-w.width)/2-ne,ie=w.y-(te-w.height)/2-ne,ae=ee+ne*2,oe=te+ne*2,se=`${wg}-${D}`,ce=(0,v.useRef)(0),le=(0,v.useRef)();ce.current=I,(0,v.useEffect)(()=>{let e=S.getState().panZoom;if(C.current&&e)return le.current=Zd({domNode:C.current,panZoom:e,getTransform:()=>S.getState().transform,getViewScale:()=>ce.current}),()=>{le.current?.destroy()}},[T]),(0,v.useEffect)(()=>{le.current?.update({translateExtent:O,width:k,height:A,inversePan:y,pannable:h,zoomStep:b,zoomable:g})},[h,g,y,b,O,k,A]);let ue=p?e=>{let[t,n]=le.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,de=(0,v.useCallback)((e,t)=>{let n=S.getState().nodeLookup.get(t).internals.userNode;m?.(e,n)},[m]),fe=m?de:void 0,pe=_??j[`minimap.ariaLabel`];return(0,B.jsx)(Zf,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c==`string`?c:void 0,"--xy-minimap-mask-background-color-props":typeof l==`string`?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u==`string`?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d==`number`?d*I:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o==`number`?o:void 0},className:ii([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,B.jsxs)(`svg`,{width:M,height:N,viewBox:`${re} ${ie} ${ae} ${oe}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":se,ref:C,onClick:ue,children:[pe&&(0,B.jsx)(`title`,{id:se,children:pe}),(0,B.jsx)(_g,{onClick:fe,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,B.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${re-ne},${ie-ne}h${ae+ne*2}v${oe+ne*2}h${-ae-ne*2}z
|
|
15
|
+
M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}Tg.displayName=`MiniMap`;var Eg=(0,v.memo)(Tg),Dg=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Og={[pf.Line]:`right`,[pf.Handle]:`bottom-right`};function kg({nodeId:e,position:t,variant:n=pf.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:_}){let y=im(),b=typeof e==`string`?e:y,x=Hf(),S=(0,v.useRef)(null),C=n===pf.Handle,w=J((0,v.useCallback)(Dg(C&&p),[C,p]),Rf),T=(0,v.useRef)(null),E=t??Og[n];(0,v.useEffect)(()=>{if(S.current&&b)return T.current||=Tf({domNode:S.current,nodeId:b,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=x.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=x.getState(),o=[],s={x:e.x,y:e.y},c=r.get(b);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=Ad([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...Iu({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:b,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:b,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:b,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};x.getState().triggerNodeChanges([n])}}),T.current.update({controlPosition:E,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:_,shouldResize:m}),()=>{T.current?.destroy()}},[E,s,c,l,u,d,h,g,_,m]);let D=E.split(`-`);return(0,B.jsx)(`div`,{className:ii([`react-flow__resize-control`,`nodrag`,...D,n,r]),ref:S,style:{...i,scale:w,...o&&{[C?`backgroundColor`:`borderColor`]:o}},children:a})}var Ag=(0,v.memo)(kg);function jg({nodeId:e,isVisible:t=!0,handleClassName:n,handleStyle:r,lineClassName:i,lineStyle:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,autoScale:f=!0,shouldResize:p,onResizeStart:m,onResize:h,onResizeEnd:g}){return t?(0,B.jsxs)(B.Fragment,{children:[hf.map(t=>(0,B.jsx)(Ag,{className:i,style:a,nodeId:e,position:t,variant:pf.Line,color:o,minWidth:s,minHeight:c,maxWidth:l,maxHeight:u,onResizeStart:m,keepAspectRatio:d,autoScale:f,shouldResize:p,onResize:h,onResizeEnd:g},t)),mf.map(t=>(0,B.jsx)(Ag,{className:n,style:r,nodeId:e,position:t,color:o,minWidth:s,minHeight:c,maxWidth:l,maxHeight:u,onResizeStart:m,keepAspectRatio:d,autoScale:f,shouldResize:p,onResize:h,onResizeEnd:g},t))]}):null}async function Mg(e,t){let n=await fetch(e,{...t,headers:{"Content-Type":`application/json`,...t?.headers}}),r=await n.json();if(!n.ok)throw Error(r?.error??n.statusText);return r}var Ng=encodeURIComponent,Pg={list:()=>Mg(`/api/groups`),create:(e,t=[])=>Mg(`/api/groups`,{method:`POST`,body:JSON.stringify({name:e,sessions:t})}),update:(e,t)=>Mg(`/api/groups/${Ng(e)}`,{method:`PUT`,body:JSON.stringify(t)}),remove:e=>Mg(`/api/groups/${Ng(e)}`,{method:`DELETE`}),addSession:(e,t,n)=>Mg(`/api/groups/${Ng(e)}/sessions`,{method:`POST`,body:JSON.stringify({sessionId:t,title:n})}),removeSession:(e,t)=>Mg(`/api/groups/${Ng(e)}/sessions/${Ng(t)}`,{method:`DELETE`})},Fg=null,Ig=new Set;function Lg(){Pg.list().then(e=>{Fg=e;for(let e of Ig)e()},()=>{})}function Rg(e){return Ig.add(e),Fg===null&&Ig.size===1&&Lg(),()=>void Ig.delete(e)}Gn(`ws:groups`,Lg);function zg(){return(0,v.useSyncExternalStore)(Rg,()=>Fg)??[]}var Bg=(0,v.createContext)(null),Vg=48,Hg=e=>`ws-group-viewport-${e}`;function Ug(e){return{id:e.sessionId,type:`pane`,position:{x:e.x,y:e.y},width:e.w,height:e.h,dragHandle:`.group-pane-head`,data:{sessionId:e.sessionId,title:e.title}}}function Wg(e){return e.map(e=>({sessionId:e.data.sessionId,title:e.data.title,x:e.position.x,y:e.position.y,w:e.width??e.measured?.width??0,h:e.height??e.measured?.height??0}))}var Gg=e=>JSON.stringify(e.map(e=>[e.sessionId,Math.round(e.x),Math.round(e.y),Math.round(e.w),Math.round(e.h)]));function Kg({id:e,data:t}){let{sessions:n,tasks:r}=tr(),{remove:i,focus:a}=(0,v.useContext)(Bg),o=n.find(e=>e.id===t.sessionId),s=o?.status??`inactive`,c=ni()(o);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(jg,{isVisible:!0,minWidth:340,minHeight:280,lineClassName:`group-pane-resize`,handleClassName:`group-pane-handle`}),(0,B.jsxs)(`div`,{className:`group-pane ${s} ${c?`unread`:``}`,onPointerDownCapture:()=>c&&o&&Qr([o]),children:[(0,B.jsxs)(`header`,{className:`group-pane-head`,onDoubleClick:()=>a(e),title:`Arrastrá para mover · doble click para acercar`,children:[(0,B.jsx)(fD,{status:c?`unread`:s,size:7}),(0,B.jsx)(`span`,{className:`group-pane-title`,children:o?.title??t.title??`Sesión`}),o?.taskIds?.map(e=>{let t=r.find(t=>t.id===e);return(0,B.jsxs)(`a`,{className:`task-chip nodrag`,href:V.task(e),children:[t&&(0,B.jsx)(or,{status:t.status,size:11}),e]},e)}),(0,B.jsx)(`span`,{className:`spacer`}),o&&(0,B.jsx)(`span`,{className:`group-pane-date`,children:Br(o.lastTs)}),(0,B.jsx)(`a`,{className:`icon-btn tiny nodrag`,href:V.session(t.sessionId),title:`Abrir la sesión`,children:(0,B.jsx)(Me,{size:13})}),(0,B.jsx)(`button`,{className:`icon-btn tiny nodrag`,onClick:()=>i(t.sessionId),title:`Quitar del grupo`,children:(0,B.jsx)(Rn,{size:13})})]}),(0,B.jsx)(`div`,{className:`group-pane-body nodrag nowheel nopan`,children:(0,B.jsx)(__,{sessionId:t.sessionId,summary:o})})]})]})}var qg={pane:Kg};function Jg({groupId:e}){let t=zg(),n=t.find(t=>t.id===e);return n?(0,B.jsx)(Vh,{children:(0,B.jsx)(Yg,{group:n},n.id)}):(0,B.jsx)(`div`,{className:`empty`,children:t.length?`No existe este grupo.`:null})}function Yg({group:e}){let{sessions:t,openDialog:n,theme:r}=tr(),i=zp(),[a,o,s]=Kh(e.panes.map(Ug)),c=(0,v.useRef)(Gg(e.panes)),l=(0,v.useRef)(void 0),u=(0,v.useRef)(void 0),d=(0,v.useMemo)(()=>{try{return JSON.parse(localStorage.getItem(Hg(e.id))??`null`)??void 0}catch{return}},[e.id]);(0,v.useEffect)(()=>{let t=Gg(e.panes);t!==c.current&&(c.current=t,o(t=>e.panes.map(e=>({...Ug(e),selected:t.find(t=>t.id===e.sessionId)?.selected}))))},[e.panes,o]),(0,v.useEffect)(()=>(document.title=`${e.name} · Grupos`,()=>void(document.title=`Mono`)),[e.name]);let f=(0,v.useCallback)(()=>{clearTimeout(l.current),l.current=setTimeout(()=>{let t=Wg(i.getNodes()),n=Gg(t);n!==c.current&&(c.current=n,Pg.update(e.id,{panes:t}))},250)},[i,e.id]);(0,v.useEffect)(()=>()=>clearTimeout(l.current),[]);let p=(0,v.useCallback)(e=>{s(e),e.some(e=>e.type===`dimensions`&&e.resizing===!1)&&f()},[s,f]),m=(0,v.useCallback)(e=>void i.fitView({nodes:[{id:e}],padding:.08,maxZoom:1.2,duration:300}),[i]),h=(0,v.useCallback)(()=>void i.fitView({padding:.08,maxZoom:1,duration:300}),[i]),g=(0,v.useCallback)(async t=>{o(e=>e.filter(e=>e.id!==t)),c.current=Gg(Wg(i.getNodes().filter(e=>e.id!==t))),await Pg.removeSession(e.id,t)},[i,e.id,o]),_=()=>{let e=[...i.getNodes()].sort((e,t)=>e.position.y-t.position.y||e.position.x-t.position.x),t=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(e.length*1.5)))),n=[];e.forEach((e,r)=>{let i=Math.floor(r/t);n[i]=Math.max(n[i]??0,e.height??0)});let r=0,a=e.map((e,i)=>{let a=Math.floor(i/t);i%t===0&&(r=0);let o=n.slice(0,a).reduce((e,t)=>e+t+Vg,0),s={x:r,y:o};return r+=(e.width??0)+Vg,{...e,position:s}});o(a),f(),setTimeout(h,50)},y=()=>n({title:`Renombrar grupo`,submitLabel:`Guardar`,fields:[{name:`name`,label:`Nombre`,defaultValue:e.name}],onSubmit:async({name:t})=>{if(!t.trim())throw Error(`Poné un nombre`);await Pg.update(e.id,{name:t.trim()})}}),b=async()=>{window.confirm(`¿Borrar el grupo "${e.name}"? Las sesiones no se tocan.`)&&(await Pg.remove(e.id),localStorage.removeItem(Hg(e.id)),Lg(),pr(V.agents()))},x=new Set(a.map(e=>e.id)),S=t.filter(e=>!x.has(e.id)),C=async n=>{let r=t.find(e=>e.id===n),i=(await Pg.addSession(e.id,n,r?.title)).panes.find(e=>e.sessionId===n);i&&setTimeout(()=>m(i.sessionId),120)},w=a.map(e=>t.find(t=>t.id===e.id)).filter(e=>!!e),T=new Set(w.filter(e=>e.status===`working`).map(e=>e.id)).size,E=ni(),D=new Set(w.filter(e=>E(e)).map(e=>e.id)),O=w.filter(e=>e.status===`idle`&&!D.has(e.id)).length;return Ir(`!`,h),(0,B.jsx)(Bg.Provider,{value:{remove:g,focus:m},children:(0,B.jsxs)(`div`,{className:`task-shell group-shell`,children:[(0,B.jsxs)(`header`,{className:`topbar task-topbar`,children:[(0,B.jsxs)(`nav`,{className:`breadcrumb`,children:[(0,B.jsx)(`span`,{children:`Grupos`}),(0,B.jsx)(L,{size:13}),(0,B.jsxs)(`button`,{className:`crumb-task group-rename`,onClick:y,title:`Renombrar`,children:[(0,B.jsx)(`span`,{className:`crumb-title`,children:e.name}),(0,B.jsx)(z,{size:11})]})]}),(0,B.jsxs)(`span`,{className:`group-stats`,children:[T>0&&(0,B.jsxs)(`span`,{className:`status-pill-live working`,children:[(0,B.jsx)(fD,{status:`working`,size:7}),` `,T,` trabajando`]}),D.size>0&&(0,B.jsxs)(`span`,{className:`status-pill-live unread`,children:[(0,B.jsx)(fD,{status:`unread`,size:7}),` `,D.size,` sin ver`]}),O>0&&(0,B.jsxs)(`span`,{className:`status-pill-live idle`,children:[(0,B.jsx)(fD,{status:`idle`,size:7}),` `,O,` en pausa`]})]}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsxs)(Rr,{placeholder:`Buscar sesión…`,options:S.map(e=>({value:e.id,label:`${e.title} · ${e.project}`,icon:(0,B.jsx)(fD,{status:e.status,size:7})})),onChange:e=>void C(e),className:`btn ghost`,children:[(0,B.jsx)(qt,{size:14}),` Agregar sesión`]}),(0,B.jsx)(`button`,{className:`icon-btn`,onClick:_,title:`Ordenar en grilla`,disabled:!a.length,children:(0,B.jsx)(ut,{size:15})}),(0,B.jsx)(`button`,{className:`icon-btn`,onClick:h,title:`Ver todo (⇧1)`,disabled:!a.length,children:(0,B.jsx)(Et,{size:15})}),(0,B.jsx)(`button`,{className:`icon-btn`,onClick:()=>void b(),title:`Borrar grupo`,children:(0,B.jsx)(wn,{size:15})})]}),(0,B.jsxs)(`div`,{className:`group-canvas`,children:[(0,B.jsxs)(Gh,{nodes:a,onNodesChange:p,nodeTypes:qg,onNodeDragStop:f,onSelectionDragStop:f,onMoveEnd:(t,n)=>{clearTimeout(u.current),u.current=setTimeout(()=>localStorage.setItem(Hg(e.id),JSON.stringify(n)),200)},defaultViewport:d,fitView:!d&&a.length>0,fitViewOptions:{padding:.08,maxZoom:1},minZoom:.1,maxZoom:2,panOnScroll:!0,panOnDrag:[1],selectionOnDrag:!0,deleteKeyCode:null,colorMode:r,proOptions:{hideAttribution:!0},children:[(0,B.jsx)(eg,{variant:Xh.Dots,gap:24,size:1}),(0,B.jsx)(lg,{showInteractive:!1}),(0,B.jsx)(Eg,{pannable:!0,zoomable:!0,nodeBorderRadius:10,nodeStrokeWidth:6,nodeClassName:e=>D.has(e.id)?`unread`:t.find(t=>t.id===e.id)?.status??`inactive`})]}),!a.length&&(0,B.jsxs)(`div`,{className:`group-empty`,children:[(0,B.jsx)(`p`,{children:`Este grupo está vacío.`}),(0,B.jsxs)(`p`,{className:`hint`,children:[`Agregá sesiones con `,(0,B.jsx)(`b`,{children:`Agregar sesión`}),`, o desde cualquier sesión con `,(0,B.jsx)(`b`,{children:`Enviar a grupo`}),`.`]})]})]})]})})}function Xg({sessionId:e,title:t,className:n=`btn ghost`}){let{openDialog:r}=tr(),i=zg(),a=i.filter(t=>t.panes.some(t=>t.sessionId===e)),o=`__new__`,s=async n=>{if(n===o)r({title:`Nuevo grupo`,submitLabel:`Crear y enviar`,fields:[{name:`name`,label:`Nombre del grupo`}],onSubmit:async({name:n})=>{await Pg.create(n,[{sessionId:e,title:t}]),Lg()}});else{if(a.some(e=>e.id===n))return pr(V.group(n));await Pg.addSession(n,e,t),Lg()}};return(0,B.jsxs)(Rr,{placeholder:`Elegí un grupo…`,options:[...i.map(e=>({value:e.id,label:a.some(t=>t.id===e.id)?`${e.name} · ya está (abrir)`:`${e.name} · ${e.panes.length} sesiones`,icon:(0,B.jsx)(ut,{size:13})})),{value:o,label:`Nuevo grupo…`,icon:(0,B.jsx)(qt,{size:13})}],onChange:e=>void s(e),className:n,children:[(0,B.jsx)(ut,{size:14}),` `,a.length?`En ${a.length===1?a[0].name:`${a.length} grupos`}`:`Enviar a grupo`]})}var Zg=[`#eb5757`,`#f2994a`,`#d9a23b`,`#4cb782`,`#26b5ce`,`#5e6ad2`,`#bb87fc`,`#e15a97`];function Qg({project:e,size:t=18}){return e?e.hasIcon?(0,B.jsx)(`img`,{className:`project-icon img`,src:`/api/projects/${encodeURIComponent(e.id)}/icon`,alt:``,style:{width:t,height:t}}):(0,B.jsx)(`span`,{className:`project-icon`,style:{width:t,height:t,color:e.color,background:`${e.color}26`,fontSize:Math.round(t*.48)},children:e.initials}):(0,B.jsx)(`span`,{className:`project-icon all`,style:{width:t,height:t},children:(0,B.jsx)(We,{size:t-5})})}function $g(e,t){if(e===`all`)return null;let n=new Set([e]),r=!0;for(;r;){r=!1;for(let e of t)e.parentId&&n.has(e.parentId)&&!n.has(e.id)&&(n.add(e.id),r=!0)}return n}function e_(e,t){return!e||!!t?.some(t=>t&&e.has(t))}function t_(e){let t=[],n=(r,i)=>{for(let a of e.filter(e=>(e.parentId??null)===r))t.push({project:a,depth:i}),n(a.id,i+1)};return n(null,0),t}function n_(e,t,n){return!e||t.projectId&&e.has(t.projectId)?!0:(t.taskIds??[]).some(t=>e_(e,n.find(e=>e.id===t)?.projectIds))}function r_(){let{projects:e,project:t,setProject:n,openDialog:r,reloadProjects:i}=tr(),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(0),d=(0,v.useRef)(null),[f,p]=(0,v.useState)({top:0,left:0}),m=e.find(e=>e.id===t),h=t_(e),g=e=>e?h.find(t=>t.project.id===e.id)?.depth??0:0,_=[null,...h.map(e=>e.project)].filter(e=>!s||(e?.title??`All projects`).toLowerCase().includes(s.toLowerCase()));(0,v.useLayoutEffect)(()=>{if(!a||!d.current)return;let e=d.current.getBoundingClientRect();p({top:e.bottom+6,left:e.left})},[a]);let y=e=>{n(e?.id??`all`),o(!1),c(``)},b=e=>{o(!1),r({title:`Proyecto · ${e.root}`,submitLabel:`Guardar`,fields:[{name:`title`,label:`Nombre`,defaultValue:e.title},{name:`color`,label:`Color`,defaultValue:e.hasIcon?``:e.color,options:[{value:``,label:`Ícono del repo`},...Zg.map(e=>({value:e,label:``,icon:(0,B.jsx)(`i`,{className:`dot`,style:{background:e,width:12,height:12}})}))]}],onSubmit:async({title:t,color:n})=>{await Jn.saveProject(e.id,{title:t.trim()||void 0,color:n||void 0}),i()}})};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`button`,{ref:d,className:`project-switch`,onClick:()=>{o(e=>!e),u(Math.max(0,[null,...t_(e).map(e=>e.project)].findIndex(e=>(e?.id??`all`)===t)))},title:`Cambiar de proyecto`,children:[(0,B.jsx)(Qg,{project:m,size:20}),(0,B.jsx)(`span`,{className:`project-switch-name`,children:m?.title??`All projects`}),(0,B.jsx)(fe,{size:13,className:`project-switch-chevron`})]}),a&&(0,Pr.createPortal)((0,B.jsx)(`div`,{className:`menu-backdrop`,onMouseDown:()=>o(!1),children:(0,B.jsxs)(`div`,{className:`project-menu`,style:f,onMouseDown:e=>e.stopPropagation(),children:[(0,B.jsxs)(`div`,{className:`project-search`,children:[(0,B.jsx)($t,{size:14}),(0,B.jsx)(`input`,{autoFocus:!0,placeholder:`Search projects...`,value:s,onChange:e=>{c(e.target.value),u(0)},onKeyDown:e=>{e.key===`Escape`&&o(!1),e.key===`ArrowDown`&&(e.preventDefault(),u(e=>Math.min(_.length-1,e+1))),e.key===`ArrowUp`&&(e.preventDefault(),u(e=>Math.max(0,e-1))),e.key===`Enter`&&_[l]!==void 0&&y(_[l])}})]}),(0,B.jsxs)(`div`,{className:`project-items`,children:[_.map((e,n)=>(0,B.jsxs)(`div`,{className:`project-item ${n===l?`active`:``} ${(e?.id??`all`)===t?`current`:``} ${!s&&g(e)?`nested`:``}`,style:!s&&g(e)?{paddingLeft:10+g(e)*22}:void 0,onMouseEnter:()=>u(n),onClick:()=>y(e),title:e?.root,children:[(0,B.jsx)(Qg,{project:e??void 0,size:20}),(0,B.jsx)(`span`,{className:`project-item-name`,children:e?.title??`All projects`}),e&&(0,B.jsx)(`button`,{className:`icon-btn tiny project-gear`,onClick:t=>{t.stopPropagation(),b(e)},title:`Configurar proyecto`,children:(0,B.jsx)(tn,{size:13})})]},e?.id??`all`)),!_.length&&(0,B.jsx)(`div`,{className:`menu-empty`,children:`Ningún proyecto coincide`})]})]})}),document.body)]})}function i_({value:e,onChange:t}){let n=Cr.find(t=>t.id===e)??Cr[0],r=e=>e===`bypassPermissions`?(0,B.jsx)(Bn,{size:13}):e===`plan`?(0,B.jsx)(Se,{size:13}):(0,B.jsx)(rn,{size:13});return(0,B.jsxs)(Rr,{value:n.id,options:Cr.map(e=>({value:e.id,label:`${e.label} — ${e.description}`,icon:r(e.id)})),onChange:t,className:`mode-trigger ${n.id===`bypassPermissions`?`full`:``}`,children:[r(n.id),` `,n.label]})}var a_=e=>e.replace(/^Claude /,``);function o_({models:e,model:t,effort:n,onChange:r}){let i=e.find(e=>e.id===t)??e[0];if(!i)return null;let a=i.efforts,o=a.find(e=>e.id===n)??a.find(e=>e.isDefault)??a[0];return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(Rr,{value:i.id,placeholder:`Buscar modelo…`,options:e.map(e=>({value:e.id,label:a_(e.name),icon:(0,B.jsx)(Oe,{size:13})})),onChange:t=>{let n=e.find(e=>e.id===t);r({model:t,effort:(n.efforts.find(e=>e.id===o?.id)??n.efforts.find(e=>e.isDefault)??n.efforts[0])?.id??``})},className:`mode-trigger`,children:[(0,B.jsx)(Oe,{size:12}),` `,a_(i.name)]}),o&&(0,B.jsxs)(Rr,{value:o.id,options:a.map(e=>({value:e.id,label:e.label,icon:(0,B.jsx)(Ke,{size:13})})),onChange:e=>r({model:i.id,effort:e}),className:`mode-trigger ${o.id===`ultracode`?`ultra`:``}`,children:[(0,B.jsx)(Ke,{size:12}),` `,o.label]})]})}var s_=new Map,c_=e=>{let t=e??``;return s_.has(t)||s_.set(t,_r.commands(e).catch(()=>[])),s_.get(t)},l_={project:`proyecto`,user:`personal`,plugin:`plugin`,builtin:`Claude Code`};function u_({query:e,commands:t,active:n,onPick:r,onHover:i}){let a=(0,v.useRef)(null);return(0,v.useEffect)(()=>{a.current?.querySelector(`.slash-item.active`)?.scrollIntoView({block:`nearest`})},[n]),(0,B.jsx)(`div`,{className:`slash-menu`,ref:a,onMouseDown:e=>e.preventDefault(),children:t.length?t.map((e,t)=>(0,B.jsxs)(`button`,{className:`slash-item ${t===n?`active`:``}`,onMouseEnter:()=>i(t),onClick:()=>r(e),children:[(0,B.jsxs)(`span`,{className:`slash-name`,children:[`/`,e.name]}),(0,B.jsx)(`span`,{className:`slash-desc`,children:e.description}),(0,B.jsx)(`span`,{className:`slash-source`,children:l_[e.source]})]},e.name)):(0,B.jsxs)(`div`,{className:`menu-empty`,children:[`Ningún comando empieza con “/`,e,`”`]})})}function d_(e,t){let n=t.toLowerCase(),r=e.filter(e=>e.name.toLowerCase().startsWith(n)),i=e.filter(e=>!e.name.toLowerCase().startsWith(n)&&(e.name.toLowerCase().includes(n)||e.description.toLowerCase().includes(n)));return[...r,...i].slice(0,60)}function f_({placeholder:e,disabled:t,disabledReason:n,running:r,onSend:i,onStop:a,footer:o,autoFocus:s,commandsCwd:c,draftKey:l}){let[u,d]=(0,v.useState)(()=>l?localStorage.getItem(`ws-draft-${l}`)??``:``);(0,v.useEffect)(()=>{l&&(u?localStorage.setItem(`ws-draft-${l}`,u):localStorage.removeItem(`ws-draft-${l}`))},[l,u]);let[f,p]=(0,v.useState)([]),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(null),x=(0,v.useRef)(null),S=(0,v.useRef)(null),[C,w]=(0,v.useState)([]),[T,E]=(0,v.useState)(0),[D,O]=(0,v.useState)(!1),k=u.match(/^\/(\S*)$/)?.[1],A=k!==void 0&&!D&&!t,j=(0,v.useMemo)(()=>k===void 0?[]:d_(C,k),[C,k]);(0,v.useEffect)(()=>{k!==void 0&&c_(c).then(w)},[k!==void 0,c]),(0,v.useEffect)(()=>{E(0),k===void 0&&O(!1)},[k]);let M=e=>{d(`/${e.name} `),x.current?.focus()};(0,v.useEffect)(()=>{let e=x.current;e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,260)}px`)},[u]);let N=e=>{for(let t of e){let e=`${t.name}-${t.size}-${Math.random()}`,n=t.type.startsWith(`image/`)?URL.createObjectURL(t):void 0;p(r=>[...r,{key:e,file:t,preview:n}]),_r.upload(t).then(t=>p(n=>n.map(n=>n.key===e?{...n,uploaded:t}:n)),t=>p(n=>n.map(n=>n.key===e?{...n,error:t.message}:n)))}},P=f.some(e=>!e.uploaded&&!e.error),F=f.filter(e=>e.uploaded).map(e=>e.uploaded),I=async()=>{let e=u.trim();if(!(!e&&!F.length||g||t||P)){_(!0),b(null);try{await i(e||`Mirá los archivos adjuntos.`,F),l&&localStorage.removeItem(`ws-draft-${l}`),d(``),f.forEach(e=>e.preview&&URL.revokeObjectURL(e.preview)),p([])}catch(e){b(e.message)}finally{_(!1),x.current?.focus()}}};return(0,B.jsxs)(`div`,{className:`composer ${t?`disabled`:``} ${m?`dragging`:``}`,onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),h(!0))},onDragLeave:()=>h(!1),onDrop:e=>{e.preventDefault(),h(!1),N([...e.dataTransfer.files])},children:[n&&(0,B.jsx)(`div`,{className:`composer-notice`,children:n}),y&&(0,B.jsx)(`div`,{className:`composer-error`,children:y}),A&&(0,B.jsx)(u_,{query:k,commands:j,active:T,onPick:M,onHover:E}),f.length>0&&(0,B.jsx)(`div`,{className:`attachments`,children:f.map(e=>(0,B.jsxs)(`span`,{className:`attachment ${e.error?`error`:``}`,title:e.error??e.file.name,children:[e.preview?(0,B.jsx)(`img`,{src:e.preview,alt:``}):(0,B.jsx)(Re,{size:14}),(0,B.jsx)(`span`,{className:`attachment-name`,children:e.file.name||`imagen pegada`}),!e.uploaded&&!e.error&&(0,B.jsx)(vt,{size:12,className:`spin`}),(0,B.jsx)(`button`,{onClick:()=>p(t=>t.filter(t=>t.key!==e.key)),title:`Quitar`,children:(0,B.jsx)(Rn,{size:12})})]},e.key))}),(0,B.jsx)(`textarea`,{ref:x,rows:1,autoFocus:s,placeholder:e,value:u,disabled:t,onChange:e=>d(e.target.value),onPaste:e=>{let t=[...e.clipboardData.files];t.length&&(e.preventDefault(),N(t))},onKeyDown:e=>{if(A&&j.length){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),E(t=>(t+(e.key===`ArrowDown`?1:-1)+j.length)%j.length);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){e.preventDefault(),M(j[T]);return}}A&&e.key===`Escape`?(e.preventDefault(),O(!0)):(e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),I()),e.key===`Escape`&&r&&a&&a())}}),(0,B.jsxs)(`div`,{className:`composer-bar`,children:[(0,B.jsx)(`input`,{ref:S,type:`file`,multiple:!0,hidden:!0,onChange:e=>(N([...e.target.files??[]]),e.target.value=``)}),(0,B.jsx)(`button`,{className:`icon-btn tiny`,onClick:()=>S.current?.click(),title:`Adjuntar archivos (también podés pegar o arrastrar)`,disabled:t,children:(0,B.jsx)(Ht,{size:14})}),o,(0,B.jsx)(`span`,{className:`spacer`}),r&&a&&(0,B.jsx)(`button`,{className:`composer-stop`,onClick:a,title:`Interrumpir (Esc)`,children:(0,B.jsx)(mn,{size:11,fill:`currentColor`})}),(0,B.jsx)(`button`,{className:`composer-send`,onClick:I,disabled:!u.trim()&&!F.length||g||t||P,title:`Enviar (Enter)`,children:g?(0,B.jsx)(vt,{size:14,className:`spin`}):(0,B.jsx)(ie,{size:15})})]})]})}function p_(e){let t=e.input;return{title:t.description??t.file_path??t.url??t.pattern??e.toolName,detail:t.command??(t.file_path&&(t.new_string??t.content)?`${t.file_path}\n\n${t.new_string??t.content}`:JSON.stringify(e.input,null,2))}}function m_({sessionId:e,request:t,onAnswered:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),{title:s,detail:c}=p_(t),l=async(r,o=!1)=>{i(!0);try{n(await _r.answer(e,t.id,{allow:r,always:o,message:a||void 0}))}finally{i(!1)}};return(0,B.jsxs)(`div`,{className:`permission-card`,children:[(0,B.jsxs)(`div`,{className:`permission-head`,children:[(0,B.jsx)(rn,{size:14}),(0,B.jsx)(`span`,{children:`Claude quiere usar`}),(0,B.jsxs)(`span`,{className:`permission-tool`,children:[(0,B.jsx)(pD,{name:t.toolName}),` `,t.toolName]})]}),(0,B.jsx)(`div`,{className:`permission-title`,children:s}),t.decisionReason&&(0,B.jsx)(`div`,{className:`permission-reason`,children:t.decisionReason}),(0,B.jsx)(`pre`,{className:`code`,children:c}),(0,B.jsx)(`input`,{className:`permission-input`,placeholder:`Motivo si lo rechazás (opcional)…`,value:a,onChange:e=>o(e.target.value)}),(0,B.jsxs)(`div`,{className:`permission-actions`,children:[(0,B.jsx)(`button`,{className:`btn ghost`,disabled:r,onClick:()=>l(!1),children:`Rechazar`}),(0,B.jsx)(`span`,{className:`spacer`}),t.canAlwaysAllow&&(0,B.jsx)(`button`,{className:`btn ghost`,disabled:r,onClick:()=>l(!0,!0),children:`Permitir siempre`}),(0,B.jsx)(`button`,{className:`btn primary`,disabled:r,onClick:()=>l(!0),autoFocus:!0,children:`Permitir`})]})]})}var h_=/\s*\((recommended|recomendad[ao])\)\s*$/i;function g_({sessionId:e,request:t,onAnswered:n}){let r=(t.input.questions??[]).filter(e=>e?.question&&Array.isArray(e.options)),[i,a]=(0,v.useState)(0),[o,s]=(0,v.useState)({}),[c,l]=(0,v.useState)({}),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null),m=e=>[...o[e.question]??[],...c[e.question]?.trim()?[c[e.question].trim()]:[]].join(`, `),h=r.every(e=>m(e)),g=r[i],_=async i=>{d(!0),p(null);try{let a=Object.fromEntries(r.map(e=>[e.question,m(e)]));n(await _r.answer(e,t.id,i?{allow:i,answers:a}:{allow:i,message:`El usuario prefirió no responder estas preguntas`}))}catch(e){p(e.message),d(!1)}},y=e=>{g.multiSelect?s(t=>{let n=t[g.question]??[];return{...t,[g.question]:n.includes(e)?n.filter(t=>t!==e):[...n,e]}}):(s(t=>({...t,[g.question]:[e]})),l(e=>({...e,[g.question]:``})),i<r.length-1&&a(i+1))};if(!g)return(0,B.jsx)(m_,{sessionId:e,request:t,onAnswered:n});let b=o[g.question]??[],x=i===r.length-1;return(0,B.jsxs)(`div`,{className:`question-card`,children:[(0,B.jsxs)(`div`,{className:`question-head`,children:[(0,B.jsx)(be,{size:14}),(0,B.jsx)(`span`,{children:`Claude te pregunta`}),r.length>1&&(0,B.jsx)(`span`,{className:`question-steps`,children:r.map((e,t)=>(0,B.jsxs)(`button`,{className:`question-step ${t===i?`active`:``} ${m(e)?`done`:``}`,onClick:()=>a(t),title:e.question,children:[m(e)&&(0,B.jsx)(ue,{size:11}),e.header||`${t+1}`]},e.question))})]}),(0,B.jsx)(`div`,{className:`question-text`,children:g.question}),g.multiSelect&&(0,B.jsx)(`div`,{className:`question-hint`,children:`Podés elegir varias`}),(0,B.jsxs)(`div`,{className:`question-options`,children:[g.options.map((e,t)=>{let n=b.includes(e.label);return(0,B.jsxs)(`button`,{className:`question-option ${n?`on`:``}`,disabled:u,onClick:()=>y(e.label),children:[(0,B.jsx)(`span`,{className:`question-mark ${g.multiSelect?`multi`:``}`,children:n?(0,B.jsx)(ue,{size:11}):t+1}),(0,B.jsxs)(`span`,{className:`question-option-body`,children:[(0,B.jsxs)(`span`,{className:`question-option-label`,children:[e.label.replace(h_,``),h_.test(e.label)&&(0,B.jsx)(`span`,{className:`question-badge`,children:`Recomendada`})]}),e.description&&(0,B.jsx)(`span`,{className:`question-option-desc`,children:e.description})]})]},e.label)}),(0,B.jsx)(`input`,{className:`question-other`,placeholder:`Otra respuesta…`,value:c[g.question]??``,disabled:u,onChange:e=>{let t=e.target.value;l(e=>({...e,[g.question]:t})),!g.multiSelect&&t&&s(e=>({...e,[g.question]:[]}))},onKeyDown:e=>{e.key===`Enter`&&m(g)&&(x?h&&_(!0):a(i+1))}})]}),f&&(0,B.jsx)(`div`,{className:`composer-error`,children:f}),(0,B.jsxs)(`div`,{className:`permission-actions`,children:[(0,B.jsx)(`button`,{className:`btn ghost`,disabled:u,onClick:()=>_(!1),children:`No responder`}),(0,B.jsx)(`span`,{className:`spacer`}),!x&&(0,B.jsx)(`button`,{className:`btn ghost`,disabled:u||!m(g),onClick:()=>a(i+1),children:`Siguiente`}),(x||h)&&(0,B.jsx)(`button`,{className:`btn primary`,disabled:u||!h,onClick:()=>_(!0),children:u?(0,B.jsx)(vt,{size:13,className:`spin`}):`Responder`})]})]})}function __({sessionId:e,summary:t}){let n=Ar(e),[r,i]=vr(e),[a,o]=(0,v.useState)(null),{models:s,stored:c,remember:l}=wr(),[u,d]=(0,v.useState)(c);(0,v.useEffect)(()=>{r?.live&&d(e=>({model:r.model??e.model,effort:r.effort??e.effort,permissionMode:r.permissionMode??e.permissionMode}))},[r?.live,r?.model,r?.effort,r?.permissionMode]);let f=async t=>{d(e=>({...e,...t})),l(t),r?.live&&i(await _r.configure(e,t))},p=n.events.filter(e=>e.kind===`prompt`).length,m=(0,v.useRef)(p);(0,v.useEffect)(()=>{a&&p>m.current&&o(null)},[p,a]);let h=!!r?.live,g=h?r.state!==`idle`:t?.status===`working`,_=!h&&t?.status===`working`;return(0,B.jsxs)(`div`,{className:`session-chat`,children:[n.truncated&&(0,B.jsx)(`div`,{className:`msg-notice top`,children:`Mostrando la parte más reciente de la sesión`}),(0,B.jsx)(TD,{events:n.events,sessionId:e,live:g,isSubagent:!1,pendingText:a}),(0,B.jsxs)(`div`,{className:`chat-dock`,children:[r?.pending.map(t=>t.toolName===`AskUserQuestion`?(0,B.jsx)(g_,{sessionId:e,request:t,onAnswered:i},t.id):(0,B.jsx)(m_,{sessionId:e,request:t,onAnswered:i},t.id)),r?.error&&(0,B.jsxs)(`div`,{className:`composer-error`,children:[`La sesión terminó con un error: `,r.error]}),(0,B.jsx)(f_,{draftKey:`session-${e}`,placeholder:g?`Mandale otro mensaje (se encola)…`:`Escribile a esta sesión…`,disabled:_,disabledReason:_?`Esta sesión está trabajando en otra app. Cuando quede en pausa, podés seguirla desde acá.`:void 0,running:g&&h,commandsCwd:r?.cwd??t?.focusCwd??t?.firstCwd??t?.cwd??void 0,onSend:async(t,n)=>{m.current=p,o(t);try{i(await _r.send(e,t,{...u,attachments:n}))}catch(e){throw o(null),e}},onStop:()=>void _r.interrupt(e).then(i),footer:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o_,{models:s,model:u.model,effort:u.effort,onChange:f}),(0,B.jsx)(i_,{value:u.permissionMode??`bypassPermissions`,onChange:e=>f({permissionMode:e})}),r?.cwd&&(0,B.jsxs)(`span`,{className:`composer-cwd`,title:r.cwd,children:[(0,B.jsx)(He,{size:12}),` `,r.cwd.split(`/`).slice(-2).join(`/`)]}),!h&&(0,B.jsx)(`span`,{className:`composer-hint`,children:t?`Se retoma al enviar`:``})]})})]})]})}var v_=e=>e.root?`${e.repo} (raíz)`:`${e.repo} · ${e.branch}`;function y_({task:e}){let{projects:t,project:n}=tr(),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(``),{models:l,stored:u,remember:d}=wr(),[f,p]=(0,v.useState)(u),m=e=>{p(t=>({...t,...e})),d(e)};(0,v.useEffect)(()=>{e||r||!t.length||i(t.some(e=>e.id===n)?n:t[0].id)},[e,r,t,n]),(0,v.useEffect)(()=>{(e?_r.worktrees(e.id):r?_r.projectWorktrees(r):null)?.then(e=>{o(e),c(e[0]?.path??``)})},[e,r]);let h=a.find(e=>e.path===s),g=t.find(e=>e.id===r);return(0,B.jsx)(`div`,{className:`new-session`,children:(0,B.jsxs)(`div`,{className:`new-session-inner`,children:[(0,B.jsx)(`div`,{className:`new-session-icon`,children:(0,B.jsx)(oe,{size:22})}),(0,B.jsx)(`h2`,{children:e?`Nueva sesión en ${e.id}`:`Nueva sesión`}),(0,B.jsx)(`p`,{children:e?`Claude arranca con el contexto de la tarea (resumen, PRs y boards) y trabaja en la carpeta que elijas. Va a aparecer en vivo en esta pestaña y en Agentes.`:`Una sesión suelta, sin tarea. Elegí el proyecto y la carpeta; si después querés, la vinculás a una tarea desde la propia sesión.`}),(0,B.jsx)(f_,{autoFocus:!0,draftKey:`new-${e?.id??`free`}`,commandsCwd:s||void 0,placeholder:e?`¿Qué hacemos? Ej: revisá los 3 must-fix del board de testeo y arreglalos…`:`¿Qué hacemos?`,onSend:async(t,n)=>{let r=await _r.start({taskId:e?.id,cwd:s,prompt:t,...f,attachments:n});pr(e?V.taskSession(e.id,r.sessionId):V.session(r.sessionId))},footer:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o_,{models:l,model:f.model,effort:f.effort,onChange:m}),(0,B.jsx)(i_,{value:f.permissionMode??`bypassPermissions`,onChange:e=>m({permissionMode:e})}),!e&&(0,B.jsxs)(Rr,{value:r,placeholder:`Buscar proyecto…`,options:t.map(e=>({value:e.id,label:e.title,icon:(0,B.jsx)(Qg,{project:e,size:14})})),onChange:i,className:`mode-trigger`,children:[(0,B.jsx)(Qg,{project:g,size:14}),` `,g?.title??`…`]}),(0,B.jsxs)(Rr,{value:s,placeholder:`Buscar carpeta o rama, o escribí una ruta (/… o ~/…)`,options:a.map(e=>({value:e.path,label:v_(e),icon:(0,B.jsx)(He,{size:13})})),custom:e=>/^[/~]/.test(e)?{value:e,label:`Usar carpeta ${e}`,icon:(0,B.jsx)(We,{size:13})}:null,onChange:c,className:`mode-trigger`,children:[(0,B.jsx)(He,{size:12}),` `,h?v_(h):s?s.split(`/`).slice(-2).join(`/`):`…`]})]})})]})})}function b_({task:e,sessionId:t}){let{sessions:n}=tr(),r=(0,v.useMemo)(()=>n.filter(t=>t.taskIds?.includes(e.id)),[n,e.id]),i=r.find(e=>e.id===t)??n.find(e=>e.id===t);(0,v.useEffect)(()=>{t&&Mr(t,e.id)},[t,e.id]),ri(i);let a=ni();return(0,B.jsxs)(`div`,{className:`task-sessions`,children:[(0,B.jsxs)(`aside`,{className:`session-list`,children:[(0,B.jsxs)(`a`,{className:`session-new ${t?``:`active`}`,href:V.taskSession(e.id),children:[(0,B.jsx)(qt,{size:14}),` Nueva sesión`]}),(0,B.jsxs)(`div`,{className:`prop-title session-list-title`,children:[`Sesiones · `,r.length]}),r.map(n=>(0,B.jsxs)(`a`,{className:`session-item ${n.id===t?`active`:``} ${a(n)?`unread`:``}`,href:V.taskSession(e.id,n.id),children:[(0,B.jsx)(fD,{status:a(n)?`unread`:n.status,size:7}),(0,B.jsxs)(`span`,{className:`session-item-body`,children:[(0,B.jsx)(`span`,{className:`session-item-title`,children:n.title}),(0,B.jsxs)(`span`,{className:`session-item-meta`,children:[n.ownedByWorkspace?`workspace`:n.project,` · `,Br(n.lastTs),n.subagents.length>0&&` · ${n.subagents.length} subagentes`]})]})]},n.id)),!r.length&&(0,B.jsx)(`p`,{className:`hint session-empty`,children:`Todavía no hay sesiones vinculadas a esta tarea.`})]}),(0,B.jsx)(`section`,{className:`session-pane`,children:t?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`header`,{className:`session-pane-head`,children:[(0,B.jsx)(fD,{status:i?.status??`inactive`,size:7}),(0,B.jsx)(`span`,{className:`session-pane-title`,children:i?.title??`Sesión`}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(Xg,{sessionId:t,title:i?.title,className:`link-btn`}),(0,B.jsx)(`a`,{className:`link-btn`,href:V.session(t),children:`Ver en Agentes`})]}),(0,B.jsx)(__,{sessionId:t,summary:i},t)]}):(0,B.jsx)(y_,{task:e})})]})}function x_(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var S_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,C_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w_={};function T_(e,t){return((t||w_).jsx?C_:S_).test(e)}var E_=/[ \t\n\f\r]/g;function D_(e){return typeof e==`object`?e.type===`text`&&O_(e.value):O_(e)}function O_(e){return e.replace(E_,``)===``}var k_=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};k_.prototype.normal={},k_.prototype.property={},k_.prototype.space=void 0;function A_(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new k_(n,r,t)}function j_(e){return e.toLowerCase()}var M_=class{constructor(e,t){this.attribute=t,this.property=e}};M_.prototype.attribute=``,M_.prototype.booleanish=!1,M_.prototype.boolean=!1,M_.prototype.commaOrSpaceSeparated=!1,M_.prototype.commaSeparated=!1,M_.prototype.defined=!1,M_.prototype.mustUseProperty=!1,M_.prototype.number=!1,M_.prototype.overloadedBoolean=!1,M_.prototype.property=``,M_.prototype.spaceSeparated=!1,M_.prototype.space=void 0;var N_=s({boolean:()=>X,booleanish:()=>F_,commaOrSpaceSeparated:()=>z_,commaSeparated:()=>R_,number:()=>Z,overloadedBoolean:()=>I_,spaceSeparated:()=>L_}),P_=0,X=B_(),F_=B_(),I_=B_(),Z=B_(),L_=B_(),R_=B_(),z_=B_();function B_(){return 2**++P_}var V_=Object.keys(N_),H_=class extends M_{constructor(e,t,n,r){let i=-1;if(super(e,t),U_(this,`space`,r),typeof n==`number`)for(;++i<V_.length;){let e=V_[i];U_(this,V_[i],(n&N_[e])===N_[e])}}};H_.prototype.defined=!0;function U_(e,t,n){n&&(e[t]=n)}function W_(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new H_(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[j_(r)]=r,n[j_(a.attribute)]=r}return new k_(t,n,e.space)}var G_=W_({properties:{ariaActiveDescendant:null,ariaAtomic:F_,ariaAutoComplete:null,ariaBusy:F_,ariaChecked:F_,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:L_,ariaCurrent:null,ariaDescribedBy:L_,ariaDetails:null,ariaDisabled:F_,ariaDropEffect:L_,ariaErrorMessage:null,ariaExpanded:F_,ariaFlowTo:L_,ariaGrabbed:F_,ariaHasPopup:null,ariaHidden:F_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:L_,ariaLevel:Z,ariaLive:null,ariaModal:F_,ariaMultiLine:F_,ariaMultiSelectable:F_,ariaOrientation:null,ariaOwns:L_,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:F_,ariaReadOnly:F_,ariaRelevant:null,ariaRequired:F_,ariaRoleDescription:L_,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:F_,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function K_(e,t){return t in e?e[t]:t}function q_(e,t){return K_(e,t.toLowerCase())}var J_=W_({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:R_,acceptCharset:L_,accessKey:L_,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alpha:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:L_,autoFocus:X,autoPlay:X,blocking:L_,capture:null,charSet:null,checked:X,cite:null,className:L_,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:F_,controls:X,controlsList:L_,coords:Z|R_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:I_,draggable:F_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:L_,height:Z,hidden:I_,high:Z,href:null,hrefLang:null,htmlFor:L_,httpEquiv:L_,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:L_,itemRef:L_,itemScope:X,itemType:L_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:X,optimum:Z,pattern:null,ping:L_,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:L_,required:X,reversed:X,rows:Z,rowSpan:Z,sandbox:L_,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootCustomElementRegistry:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shadowRootSerializable:X,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:F_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:F_,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:L_,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:F_,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:X,disablePictureInPicture:X,disableRemotePlayback:X,exportParts:R_,part:L_,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:q_}),Y_=W_({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:z_,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:L_,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:R_,g2:R_,glyphName:R_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:z_,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:L_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:z_,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:z_,rev:z_,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:z_,requiredFeatures:z_,requiredFonts:z_,requiredFormats:z_,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:z_,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:z_,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:z_,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:K_}),X_=W_({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Z_=W_({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:q_}),Q_=W_({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),$_={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ev=/[A-Z]/g,tv=/-[a-z]/g,nv=/^data[-\w.:]+$/i;function rv(e,t){let n=j_(t),r=t,i=M_;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&nv.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(tv,av);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!tv.test(e)){let n=e.replace(ev,iv);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=H_}return new i(r,t)}function iv(e){return`-`+e.toLowerCase()}function av(e){return e.charAt(1).toUpperCase()}var ov=A_([G_,J_,X_,Z_,Q_],`html`),sv=A_([G_,Y_,X_,Z_,Q_],`svg`);function cv(e){return e.join(` `).trim()}var lv=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
16
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),uv=o(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(lv());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),dv=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),fv=o(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(uv()),i=dv();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),pv=hv(`end`),mv=hv(`start`);function hv(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function gv(e){let t=mv(e),n=pv(e);if(t&&n)return{start:t,end:n}}function _v(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?yv(e.position):`start`in e||`end`in e?yv(e):`line`in e||`column`in e?vv(e):``}function vv(e){return bv(e&&e.line)+`:`+bv(e&&e.column)}function yv(e){return vv(e&&e.start)+`-`+vv(e&&e.end)}function bv(e){return e&&typeof e==`number`?e:1}var xv=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=_v(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};xv.prototype.file=``,xv.prototype.name=``,xv.prototype.reason=``,xv.prototype.message=``,xv.prototype.stack=``,xv.prototype.column=void 0,xv.prototype.line=void 0,xv.prototype.ancestors=void 0,xv.prototype.cause=void 0,xv.prototype.fatal=void 0,xv.prototype.place=void 0,xv.prototype.ruleId=void 0,xv.prototype.source=void 0;var Sv=l(fv(),1),Cv={}.hasOwnProperty,wv=new Map,Tv=/[A-Z]/g,Ev=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Dv=new Set([`td`,`th`]),Ov=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function kv(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Bv(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=zv(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?sv:ov,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Av(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Av(e,t,n){if(t.type===`element`)return jv(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Mv(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Pv(e,t,n);if(t.type===`mdxjsEsm`)return Nv(e,t);if(t.type===`root`)return Fv(e,t,n);if(t.type===`text`)return Iv(e,t)}function jv(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=sv,e.schema=i),e.ancestors.push(t);let a=Kv(e,t.tagName,!1),o=Vv(e,t),s=Uv(e,t);return Ev.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!D_(e)})),Lv(e,o,a,t),Rv(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Mv(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}qv(e,t.position)}function Nv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qv(e,t.position)}function Pv(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=sv,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Kv(e,t.name,!0),o=Hv(e,t),s=Uv(e,t);return Lv(e,o,a,t),Rv(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Fv(e,t,n){let r={};return Rv(r,Uv(e,t)),e.create(t,e.Fragment,r,n)}function Iv(e,t){return t.value}function Lv(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Rv(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function zv(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Bv(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=mv(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Vv(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Cv.call(t.properties,i)){let a=Wv(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Dv.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Hv(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else qv(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else qv(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Uv(e,t){let n=[],r=-1,i=e.passKeys?new Map:wv;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Av(e,a,o);s!==void 0&&n.push(s)}return n}function Wv(e,t,n){let r=rv(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?x_(n):cv(n)),r.property===`style`){let t=typeof n==`object`?n:Gv(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Jv(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?$_[r.property]||r.property:r.attribute,n]}}function Gv(e,t){try{return(0,Sv.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new xv("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Ov+`#cannot-parse-style-attribute`,r}}function Kv(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=T_(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=T_(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Cv.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);qv(e)}function qv(e,t){let n=new xv("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Ov+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Jv(e){let t={},n;for(n in e)Cv.call(e,n)&&(t[Yv(n)]=e[n]);return t}function Yv(e){let t=e.replace(Tv,Xv);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Xv(e){return`-`+e.toLowerCase()}var Zv={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Qv={};function $v(e,t){let n=t||Qv;return ey(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function ey(e,t,n){if(ny(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return ty(e.children,t,n)}return Array.isArray(e)?ty(e,t,n):``}function ty(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ey(e[i],t,n);return r.join(``)}function ny(e){return!!(e&&typeof e==`object`)}var ry=document.createElement(`i`);function iy(e){let t=`&`+e+`;`;ry.innerHTML=t;let n=ry.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function ay(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function oy(e,t){return e.length>0?(ay(e,e.length,0,t),e):t}var sy={}.hasOwnProperty;function cy(e){let t={},n=-1;for(;++n<e.length;)ly(t,e[n]);return t}function ly(e,t){let n;for(n in t){let r=(sy.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){sy.call(r,a)||(r[a]=[]);let e=i[a];uy(r[a],Array.isArray(e)?e:e?[e]:[])}}}function uy(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ay(e,0,0,r)}function dy(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function fy(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var py=Cy(/[A-Za-z]/),my=Cy(/[\dA-Za-z]/),hy=Cy(/[#-'*+\--9=?A-Z^-~]/);function gy(e){return e!==null&&(e<32||e===127)}var _y=Cy(/\d/),vy=Cy(/[\dA-Fa-f]/),yy=Cy(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function by(e){return e!==null&&(e<0||e===32)}function $(e){return e===-2||e===-1||e===32}var xy=Cy(/\p{P}|\p{S}/u),Sy=Cy(/\s/);function Cy(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function wy(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&my(e.charCodeAt(n+1))&&my(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Ty(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $(r)?(e.enter(n),s(r)):t(r)}function s(r){return $(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Ey(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&$(t)?(e.enter(r),c(t)):l(t)}function c(t){return $(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Dy={tokenize:Oy};function Oy(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Ty(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var ky=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Ay(this,e,t,n,!1)}addBefore(e,t,n){Ay(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Ay(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var jy={tokenize:Ny},My={tokenize:Py};function Ny(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new ky;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(My,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(My,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return Q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new ky;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Py(e,t,n){return Ty(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Fy(e){if(e===null||by(e)||Sy(e))return 1;if(xy(e))return 2}function Iy(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Ly={name:`attention`,resolveAll:Ry,tokenize:zy};function Ry(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};By(o,-a),By(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=oy(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=oy(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=oy(r,Iy(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=oy(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=oy(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),ay(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function zy(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fy(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Fy(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function By(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Vy={name:`autolink`,tokenize:Hy};function Hy(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return py(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||my(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||my(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||gy(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):hy(t)?(e.consume(t),l):n(t)}function u(e){return my(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||my(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Uy={partial:!0,tokenize:Wy};function Wy(e,t,n){return r;function r(t){return $(t)?Ty(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var Gy={continuation:{tokenize:qy},exit:Jy,name:`blockQuote`,tokenize:Ky};function Ky(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return $(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function qy(e,t,n){let r=this;return i;function i(t){return $(t)?Ty(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Gy,t,n)(r)}}function Jy(e){e.exit(`blockQuote`)}var Yy={name:`characterEscape`,tokenize:Xy};function Xy(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return yy(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Zy={name:`characterReference`,tokenize:Qy};function Qy(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=my,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=vy,u):(e.enter(`characterReferenceValue`),a=7,o=_y,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===my&&!iy(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var $y={partial:!0,tokenize:eb};function eb(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var tb={concrete:!0,name:`codeFenced`,tokenize:nb};function nb(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),$(t)?Ty(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check($y,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Ty(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&$(t)?Ty(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check($y,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$(t)?Ty(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$(t)?Ty(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var rb={name:`codeIndented`,tokenize:ab},ib={partial:!0,tokenize:ob};function ab(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Ey(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Q(t)?e.attempt(ib,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function ob(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Q(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Ey(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Q(e)?i(e):n(e)}}var sb={name:`codeText`,previous:lb,resolve:cb,tokenize:ub};function cb(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function lb(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ub(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var db=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&fb(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),fb(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),fb(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);fb(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);fb(this.left,t.reverse())}}}};function fb(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function pb(e){let t={},n=-1,r,i,a,o,s,c,l,u=new db(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,mb(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ay(e,0,1/0,u.slice(0)),!l}function mb(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var hb={resolve:_b,tokenize:vb},gb={partial:!0,tokenize:yb};function _b(e){return pb(e),e}function vb(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Q(t)?e.check(gb,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function yb(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ty(e,a,`linePrefix`)}function a(i){if(i===null||Q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function bb(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||gy(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||by(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||gy(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function xb(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Sb(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ty(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Cb(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$(i)?Ty(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var wb={name:`definition`,tokenize:Eb},Tb={partial:!0,tokenize:Db};function Eb(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return xb.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=fy(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return by(t)?Cb(e,l)(t):l(t)}function l(t){return bb(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Tb,d,d)(t)}function d(t){return $(t)?Ty(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Db(e,t,n){return r;function r(t){return by(t)?Cb(e,i)(t):n(t)}function i(t){return Sb(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $(t)?Ty(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var Ob={name:`hardBreakEscape`,tokenize:kb};function kb(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Ab={name:`headingAtx`,resolve:jb,tokenize:Mb};function jb(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};ay(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Mb(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||by(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):$(n)?Ty(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||by(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Nb=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Pb=[`pre`,`script`,`style`,`textarea`],Fb={concrete:!0,name:`htmlFlow`,resolveTo:Lb,tokenize:Rb},Ib={partial:!0,tokenize:zb};function Lb(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Rb(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):py(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):py(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return py(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||by(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Pb.includes(l)?(i=1,r.interrupt?t(s):O(s)):Nb.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||my(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||py(t)?(e.consume(t),b):$(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||my(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||by(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Q(t)?O(t):$(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ee):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ib,te,k)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check($y,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Q(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Pb.includes(n)?(e.consume(t),ee):O(t)}return py(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),ee):t===45&&i===2?(e.consume(t),I):O(t)}function ee(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),ee)}function te(n){return e.exit(`htmlFlow`),t(n)}}function zb(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Uy,t,n)}}var Bb={name:`htmlText`,tokenize:Vb};function Vb(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):py(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):py(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Q(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Q(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Q(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return py(t)?(e.consume(t),S):n(t)}function S(t){return t===45||my(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,N(t)):$(t)?(e.consume(t),C):M(t)}function w(t){return t===45||my(t)?(e.consume(t),w):t===47||t===62||by(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||py(t)?(e.consume(t),E):Q(t)?(o=T,N(t)):$(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||my(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,N(t)):$(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Q(t)?(o=O,N(t)):$(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Q(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||by(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||by(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return $(t)?Ty(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Hb={name:`labelEnd`,resolveAll:Kb,resolveTo:qb,tokenize:Jb},Ub={tokenize:Yb},Wb={tokenize:Xb},Gb={tokenize:Zb};function Kb(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ay(e,0,e.length,n),e}function qb(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=oy(o,e.slice(i+1,i+r+3)),o=oy(o,[[`enter`,l,t]]),o=oy(o,Iy(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=oy(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=oy(o,e.slice(a+1)),o=oy(o,[[`exit`,s,t]]),ay(e,i,e.length,o),e}function Jb(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(fy(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Ub,u,o?u:d)(t):t===91?e.attempt(Wb,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Gb,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Yb(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return by(t)?Cb(e,a)(t):a(t)}function a(t){return t===41?u(t):bb(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return by(t)?Cb(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Sb(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return by(t)?Cb(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Xb(e,t,n){let r=this;return i;function i(t){return xb.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(fy(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Zb(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Qb={name:`labelStartImage`,resolveAll:Hb.resolveAll,tokenize:$b};function $b(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var ex={name:`labelStartLink`,resolveAll:Hb.resolveAll,tokenize:tx};function tx(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var nx={name:`lineEnding`,tokenize:rx};function rx(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Ty(e,t,`linePrefix`)}}var ix={name:`thematicBreak`,tokenize:ax};function ax(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$(t)?Ty(e,s,`whitespace`)(t):s(t))}}var ox={continuation:{tokenize:ux},exit:fx,name:`list`,tokenize:lx},sx={partial:!0,tokenize:px},cx={partial:!0,tokenize:dx};function lx(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:_y(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(ix,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return _y(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Uy,r.interrupt?n:u,e.attempt(sx,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ux(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Uy,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ty(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(cx,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ty(e,e.attempt(ox,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function dx(e,t,n){let r=this;return Ty(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function fx(e){e.exit(this.containerState.type)}function px(e,t,n){let r=this;return Ty(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var mx={name:`setextUnderline`,resolveTo:hx,tokenize:gx};function hx(e,t){let n=new ky,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function gx(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$(t)?Ty(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var _x={tokenize:vx};function vx(e){let t=this,n=e.attempt(Uy,r,e.attempt(this.parser.constructs.flowInitial,i,Ty(e,e.attempt(this.parser.constructs.flow,i,e.attempt(hb,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var yx={resolveAll:Cx()},bx=Sx(`string`),xx=Sx(`text`);function Sx(e){return{resolveAll:Cx(e===`text`?wx:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Cx(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function wx(e,t){let n=new ky,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Tx=s({attentionMarkers:()=>Nx,contentInitial:()=>Dx,disable:()=>Px,document:()=>Ex,flow:()=>kx,flowInitial:()=>Ox,insideSpan:()=>Mx,string:()=>Ax,text:()=>jx}),Ex={42:ox,43:ox,45:ox,48:ox,49:ox,50:ox,51:ox,52:ox,53:ox,54:ox,55:ox,56:ox,57:ox,62:Gy},Dx={91:wb},Ox={[-2]:rb,[-1]:rb,32:rb},kx={35:Ab,42:ix,45:[mx,ix],60:Fb,61:mx,95:ix,96:tb,126:tb},Ax={38:Zy,92:Yy},jx={[-5]:nx,[-4]:nx,[-3]:nx,33:Qb,38:Zy,42:Ly,60:[Vy,Bb],91:ex,92:[Ob,Yy],93:Hb,95:Ly,96:sb},Mx={null:[Ly,yx]},Nx={null:[42,95]},Px={null:[]};function Fx(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=oy(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Iy(a,l.events,l),l.events):[]}function f(e,t){return Lx(p(e),t)}function p(e){return Ix(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ay(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ix(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Lx(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
17
|
+
`;break;case-3:o=`\r
|
|
18
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Rx(e){let t={constructs:cy([Tx,...(e||{}).extensions||[]]),content:n(Dy),defined:[],document:n(jy),flow:n(_x),lazy:{},string:n(bx),text:n(xx)};return t;function n(e){return n;function n(n){return Fx(t,e,n)}}}function zx(e){for(;!pb(e););return e}var Bx=/[\0\t\n\r]/g;function Vx(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){Bx.lastIndex=c;let n=Bx.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Hx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ux(e){return e.replace(Hx,Wx)}function Wx(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return dy(n.slice(t?2:1),t?16:10)}return iy(n)||e}var Gx={}.hasOwnProperty;function Kx(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),qx(n)(zx(Rx(n).document().write(Vx()(e,t,!0))))}function qx(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(_e),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(R),blockQuote:o(ue),characterEscape:E,characterReference:E,codeFenced:o(de),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(de,s),codeText:o(fe,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(pe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(L),hardBreakEscape:o(me),hardBreakTrailing:o(me),htmlFlow:o(he,s),htmlFlowData:E,htmlText:o(he,s),htmlTextData:E,image:o(ge),label:s,link:o(_e),listItem:o(ye),listItemValue:p,listOrdered:o(ve,f),listUnordered:o(ve),paragraph:o(be),reference:re,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(R),strong:o(xe),thematicBreak:o(Ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:ee,resourceTitleString:te,resource:ne,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Yx(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),Gx.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Zx).call(o,void 0,e[0])}for(r.position={start:Jx(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Jx(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Jx(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+_v({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Zx).call(this,e,r[0])),n.position.end=Jx(e.end)}function d(){return $v(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=fy(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Se(),n.position={start:Jx(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Jx(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Jx(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Ux(t),n.identifier=fy(t).toLowerCase()}function I(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=fy(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=dy(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=iy(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=Jx(e.end)}function ce(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[],position:void 0}}function de(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function fe(){return{type:`inlineCode`,value:``,position:void 0}}function pe(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function L(){return{type:`emphasis`,children:[],position:void 0}}function R(){return{type:`heading`,depth:0,children:[],position:void 0}}function me(){return{type:`break`,position:void 0}}function he(){return{type:`html`,value:``,position:void 0}}function ge(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function _e(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function be(){return{type:`paragraph`,children:[],position:void 0}}function xe(){return{type:`strong`,children:[],position:void 0}}function Se(){return{type:`text`,value:``,position:void 0}}function Ce(){return{type:`thematicBreak`,position:void 0}}}function Jx(e){return{line:e.line,column:e.column,offset:e.offset}}function Yx(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Yx(e,r):Xx(e,r)}}function Xx(e,t){let n;for(n in t)if(Gx.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Zx(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+_v({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_v({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+_v({start:t.start,end:t.end})+`) is still open`)}function Qx(e){let t=this;t.parser=n;function n(n){return Kx(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function $x(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function eS(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
19
|
+
`}]}function tS(e,t){let n=t.value?t.value+`
|
|
20
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function nS(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rS(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iS(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=wy(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function aS(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oS(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function sS(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function cS(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sS(e,t);let i={src:wy(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function lS(e,t){let n={src:wy(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function uS(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function dS(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sS(e,t);let i={href:wy(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function fS(e,t){let n={href:wy(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pS(e,t,n){let r=e.all(t),i=n?mS(n):hS(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
21
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
22
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function mS(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=hS(n[r])}return t}function hS(e){return e.spread??e.children.length>1}function gS(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function _S(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vS(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function yS(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bS(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=mv(t.children[1]),o=pv(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function xS(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function SS(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var CS=9,wS=32;function TS(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(ES(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ES(t.slice(i),i>0,!1)),a.join(``)}function ES(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===CS||t===wS;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===CS||t===wS;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function DS(e,t){let n={type:`text`,value:TS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function OS(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var kS={blockquote:$x,break:eS,code:tS,delete:nS,emphasis:rS,footnoteReference:iS,heading:aS,html:oS,imageReference:cS,image:lS,inlineCode:uS,linkReference:dS,link:fS,listItem:pS,list:gS,paragraph:_S,root:vS,strong:yS,table:bS,tableCell:SS,tableRow:xS,text:DS,thematicBreak:OS,toml:AS,yaml:AS,definition:AS,footnoteDefinition:AS};function AS(){}var{defineProperty:jS}=Object,MS=typeof self==`object`?self:globalThis,NS=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new MS[e](t)},PS=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?jS(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof MS[e]==`function`?NS(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(NS(a,o),i)};return r},FS=e=>PS(new Map,e)(0),IS=``,{toString:LS}={},{keys:RS,is:zS}=Object,BS=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=LS.call(e).slice(8,-1);switch(n){case`Array`:return[1,IS];case`Object`:return[2,IS];case`Date`:return[3,IS];case`RegExp`:return[4,IS];case`Map`:return[5,IS];case`Set`:return[6,IS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},VS=([e,t])=>e===0&&(t===`function`||t===`symbol`),HS=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=BS(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&zS(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of RS(o))(e||!VS(BS(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?IS:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(VS(BS(n))||VS(BS(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!VS(BS(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},US=(e,{json:t,lossy:n}={})=>{let r=[];return HS(!(t||n),!!t,new Map,r)(e),r},WS=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?FS(US(e,t)):structuredClone(e):(e,t)=>FS(US(e,t));function GS(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function KS(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function qS(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||GS,r=e.options.footnoteBackLabel||KS,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=wy(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...WS(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
23
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
24
|
+
`}]}}var JS=(function(e){if(e==null)return $S;if(typeof e==`function`)return QS(e);if(typeof e==`object`)return Array.isArray(e)?YS(e):XS(e);if(typeof e==`string`)return ZS(e);throw Error(`Expected function, string, or object as test`)});function YS(e){let t=[],n=-1;for(;++n<e.length;)t[n]=JS(e[n]);return QS(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function XS(e){let t=e;return QS(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ZS(e){return QS(t);function t(t){return t&&t.type===e}}function QS(e){return t;function t(t,n,r){return!!(eC(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function $S(){return!0}function eC(e){return typeof e==`object`&&!!e&&`type`in e}function tC(e){return e}var nC=[];function rC(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=JS(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+tC(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=nC,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=iC(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function iC(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?nC:[e]}function aC(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),rC(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var oC={}.hasOwnProperty,sC={};function cC(e,t){let n=t||sC,r=new Map,i=new Map,a={all:s,applyData:uC,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...kS,...n.handlers},one:o,options:n,patch:lC,wrap:fC};return aC(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(oC.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=WS(n);return r.children=a.all(e),r}return WS(e)}return(a.options.unknownHandler||dC)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=pC(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=pC(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function lC(e,t){e.position&&(t.position=gv(e))}function uC(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,WS(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function dC(e,t){let n=t.data||{},r=`value`in t&&!(oC.call(n,`hProperties`)||oC.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fC(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
25
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
26
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
27
|
+
`}),n}function pC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function mC(e,t){let n=cC(e,t),r=n.one(e,void 0),i=qS(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
28
|
+
`},i)),a}function hC(e,t){return e&&`run`in e?async function(n,r){let i=mC(n,{file:r,...t});await e.run(i,r)}:function(n,r){return mC(n,{file:r,...e||t})}}function gC(e){if(e)throw e}var _C=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function vC(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yC(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?bC(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function bC(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var xC={basename:SC,dirname:CC,extname:wC,join:TC,sep:`/`};function SC(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);OC(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function CC(e){if(OC(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function wC(e){OC(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function TC(...e){let t=-1,n;for(;++t<e.length;)OC(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:EC(n)}function EC(e){OC(e);let t=e.codePointAt(0)===47,n=DC(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function DC(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function OC(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var kC={cwd:AC};function AC(){return`/`}function jC(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function MC(e){if(typeof e==`string`)e=new URL(e);else if(!jC(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return NC(e)}function NC(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var PC=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],FC=class{constructor(e){let t;t=e?jC(e)?{path:e}:typeof e==`string`||zC(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:kC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<PC.length;){let e=PC[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)PC.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?xC.basename(this.path):void 0}set basename(e){LC(e,`basename`),IC(e,`basename`),this.path=xC.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?xC.dirname(this.path):void 0}set dirname(e){RC(this.basename,`dirname`),this.path=xC.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?xC.extname(this.path):void 0}set extname(e){if(IC(e,`extname`),RC(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=xC.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){jC(e)&&(e=MC(e)),LC(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?xC.basename(this.path,this.extname):void 0}set stem(e){LC(e,`stem`),IC(e,`stem`),this.path=xC.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new xv(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function IC(e,t){if(e&&e.includes(xC.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+xC.sep+"`")}function LC(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function RC(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function zC(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var BC=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),VC=l(_C(),1),HC={}.hasOwnProperty,UC=new class e extends BC{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=yC()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,VC.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(KC(`data`,this.frozen),this.namespace[e]=t,this):HC.call(this.namespace,e)&&this.namespace[e]||void 0:e?(KC(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=YC(e),n=this.parser||this.Parser;return WC(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),WC(`process`,this.parser||this.Parser),GC(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=YC(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);ZC(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),WC(`processSync`,this.parser||this.Parser),GC(`processSync`,this.compiler||this.Compiler),this.process(e,r),JC(`processSync`,`process`,t),n;function r(e,r){t=!0,gC(e),n=r}}run(e,t,n){qC(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=YC(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),JC(`runSync`,`run`,n),r;function i(e,t){gC(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=YC(t),r=this.compiler||this.Compiler;return GC(`stringify`,r),qC(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(KC(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,VC.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];vC(o)&&vC(r)&&(r=(0,VC.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function WC(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function GC(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function KC(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function qC(e){if(!vC(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function JC(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function YC(e){return XC(e)?e:new FC(e)}function XC(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function ZC(e){return typeof e==`string`||QC(e)}function QC(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var $C=[],ew={allowDangerousHtml:!0},tw=/^(https?|ircs?|mailto|xmpp)$/i,nw=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function rw(e){let t=iw(e),n=aw(e);return ow(t.runSync(t.parse(n),n),e)}function iw(e){let t=e.rehypePlugins||$C,n=e.remarkPlugins||$C,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ew}:ew;return UC().use(Qx).use(n).use(hC,r).use(t)}function aw(e){let t=e.children||``,n=new FC;return typeof t==`string`?n.value=t:``+t,n}function ow(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||sw;for(let e of nw)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return aC(e,l),kv(e,{Fragment:B.Fragment,components:i,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Zv)if(Object.hasOwn(Zv,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Zv[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function sw(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||tw.test(e.slice(0,t))?e:``}function cw(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function lw(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function uw(e,t,n){let r=JS((n||{}).ignore||[]),i=dw(t),a=-1;for(;++a<i.length;)rC(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1)r.lastIndex=n+1;else{if(s!==n&&f({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a))for(let e of a)f(e);else a&&f(a);s=n+d[0].length,l=!0}if(!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&f({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function dw(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([fw(e[0]),pw(e[1])])}return t}function fw(e){return typeof e==`string`?new RegExp(lw(e),`g`):e}function pw(e){return typeof e==`function`?e:function(){return e}}var mw=`phrasing`,hw=[`autolink`,`link`,`image`,`label`];function gw(){return{transforms:[ww],enter:{literalAutolink:vw,literalAutolinkEmail:yw,literalAutolinkHttp:yw,literalAutolinkWww:yw},exit:{literalAutolink:Cw,literalAutolinkEmail:Sw,literalAutolinkHttp:bw,literalAutolinkWww:xw}}}function _w(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:mw,notInConstruct:hw},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:mw,notInConstruct:hw},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:mw,notInConstruct:hw}]}}function vw(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function yw(e){this.config.enter.autolinkProtocol.call(this,e)}function bw(e){this.config.exit.autolinkProtocol.call(this,e)}function xw(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Sw(e){this.config.exit.autolinkEmail.call(this,e)}function Cw(e){this.exit(e)}function ww(e){uw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Tw],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ew]],{ignore:[`link`,`linkReference`]})}function Tw(e,t,n,r,i){let a=``;if(!kw(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Dw(n)))return!1;let o=Ow(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Ew(e,t,n,r){return!kw(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Dw(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Ow(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=cw(e,`(`),a=cw(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function kw(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Sy(n)||xy(n))&&(!t||n!==47)}zw.peek=Rw;function Aw(){this.buffer()}function jw(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Mw(){this.buffer()}function Nw(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Pw(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fy(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Fw(e){this.exit(e)}function Iw(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fy(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Lw(e){this.exit(e)}function Rw(){return`[`}function zw(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Bw(){return{enter:{gfmFootnoteCallString:Aw,gfmFootnoteCall:jw,gfmFootnoteDefinitionLabelString:Mw,gfmFootnoteDefinition:Nw},exit:{gfmFootnoteCallString:Pw,gfmFootnoteCall:Fw,gfmFootnoteDefinitionLabelString:Iw,gfmFootnoteDefinition:Lw}}}function Vw(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:zw},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
29
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Uw:Hw))),s(),o}}function Hw(e,t,n){return t===0?e:Uw(e,t,n)}function Uw(e,t,n){return(n?``:` `)+e}var Ww=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Yw.attention=Xw,Yw.peek=Zw;function Gw(){return{canContainEols:[`delete`],enter:{strikethrough:qw},exit:{strikethrough:Jw}}}function Kw(){return{handlers:{delete:Yw},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Ww}]}}function qw(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Jw(e){this.exit(e)}function Yw(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Xw(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Zw(){return`~`}function Qw(e){return e.length}function $w(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Qw,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=eT(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=tT(r[d]);else{let e=tT(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
30
|
+
`)}function eT(e){return e==null?``:String(e)}function tT(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var nT=JS([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function rT(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),iT);return i(),o}function iT(e,t,n){return`>`+(n?``:` `)+e}function aT(e,t){return oT(e,t.inConstruct,!0)&&!oT(e,t.notInConstruct,!1)}function oT(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function sT(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
31
|
+
`&&!e.before&&!e.after&&aT(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
32
|
+
`}function cT(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function lT(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function uT(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function dT(e,t,n,r){let i=uT(n),a=e.value||``;if(lT(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,fT);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(cT(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
33
|
+
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
34
|
+
`),a&&(u+=o.move(a+`
|
|
35
|
+
`)),u+=o.move(s),c(),u}function fT(e,t,n){return(n?``:` `)+e}function pT(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function mT(e,t,n,r){let i=pT(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
36
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function hT(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}gT.attention=_T,gT.peek=vT;function gT(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function _T(e,t){return{construct:`emphasis`,markers:hT(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function vT(e,t,n){return n.options.emphasis||`*`}function yT(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function bT(e,t){let n=!1;return aC(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&$v(e)&&(t.options.setext||n))}function xT(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(bT(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
37
|
+
`,after:`
|
|
38
|
+
`});return r(),t(),o+`
|
|
39
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
40
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
41
|
+
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=yT(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}ST.peek=CT;function ST(e){return e.value||``}function CT(){return`<`}wT.peek=TT;function wT(e,t,n,r){let i=pT(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function TT(){return`!`}ET.peek=DT;function ET(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function DT(){return`!`}OT.peek=kT;function OT(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function kT(){return"`"}function AT(e,t){let n=$v(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}jT.peek=MT;function jT(e,t,n,r){let i=pT(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(AT(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function MT(e,t,n){return AT(e,n)?`<`:`[`}NT.peek=PT;function NT(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function PT(){return`[`}function FT(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function IT(e){let t=FT(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function LT(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function RT(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function zT(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?LT(n):FT(n),s=e.ordered?o===`.`?`)`:`.`:IT(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),RT(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function BT(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function VT(e,t,n,r){let i=BT(n),a=n.bulletCurrent||FT(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function HT(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function UT(e,t,n,r){if(!e.children.some(function(e){return nT(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function WT(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}GT.attention=KT,GT.peek=qT;function GT(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function KT(e,t){return{construct:`strong`,markers:WT(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function qT(e,t,n){return n.options.strong||`*`}function JT(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function YT(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function XT(e,t,n){let r=(RT(n)+(n.options.ruleSpaces?` `:``)).repeat(YT(n));return n.options.ruleSpaces?r.slice(0,-1):r}var ZT={blockquote:rT,break:sT,code:dT,definition:mT,emphasis:gT,hardBreak:sT,heading:xT,html:ST,image:wT,imageReference:ET,inlineCode:OT,link:jT,linkReference:NT,list:zT,listItem:VT,paragraph:HT,root:UT,strong:GT,text:JT,thematicBreak:XT};function QT(){return{enter:{table:$T,tableData:rE,tableHeader:rE,tableRow:tE},exit:{codeText:iE,table:eE,tableData:nE,tableHeader:nE,tableRow:nE}}}function $T(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function eE(e){this.exit(e),this.data.inTable=void 0}function tE(e){this.enter({type:`tableRow`,children:[]},e)}function nE(e){this.exit(e)}function rE(e){this.enter({type:`tableCell`,children:[]},e)}function iE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,aE));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function aE(e,t){return t===`|`?t:e}function oE(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
42
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
43
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return $w(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=ZT.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function sE(){return{exit:{taskListCheckValueChecked:lE,taskListCheckValueUnchecked:lE,paragraph:uE}}}function cE(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:dE}}}function lE(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function uE(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function dE(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=ZT.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function fE(){return[gw(),Bw(),Gw(),QT(),sE()]}function pE(e){return{extensions:[_w(),Vw(e),Kw(),oE(e),cE()]}}var mE={tokenize:OE,partial:!0},hE={tokenize:kE,partial:!0},gE={tokenize:AE,partial:!0},_E={tokenize:jE,partial:!0},vE={tokenize:ME,partial:!0},yE={name:`wwwAutolink`,tokenize:EE,previous:NE},bE={name:`protocolAutolink`,tokenize:DE,previous:PE},xE={name:`emailAutolink`,tokenize:TE,previous:FE},SE={};function CE(){return{text:SE}}for(var wE=48;wE<123;)SE[wE]=xE,wE++,wE===58?wE=65:wE===91&&(wE=97);SE[43]=xE,SE[45]=xE,SE[46]=xE,SE[95]=xE,SE[72]=[xE,bE],SE[104]=[xE,bE],SE[87]=[xE,yE],SE[119]=[xE,yE];function TE(e,t,n){let r=this,i,a;return o;function o(t){return!IE(t)||!FE.call(r,r.previous)||LE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return IE(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(vE,u,l)(t):t===45||t===95||my(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&py(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function EE(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!NE.call(r,r.previous)||LE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(mE,e.attempt(hE,e.attempt(gE,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function DE(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&PE.call(r,r.previous)&&!LE(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(py(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||gy(t)||by(t)||Sy(t)||xy(t)?n(t):e.attempt(hE,e.attempt(gE,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function OE(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function kE(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(_E,c,s)(t):t===null||by(t)||Sy(t)||t!==45&&xy(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function AE(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(_E,t,a)(o):o===null||by(o)||Sy(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function jE(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||by(o)||Sy(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||by(e)||Sy(e)?t(e):r(e)}function a(e){return py(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):py(t)?(e.consume(t),o):n(t)}}function ME(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return my(e)?n(e):t(e)}}function NE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||by(e)}function PE(e){return!py(e)}function FE(e){return!(e===47||IE(e))}function IE(e){return e===43||e===45||e===46||e===95||my(e)}function LE(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var RE={tokenize:KE,partial:!0};function zE(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:UE,continuation:{tokenize:WE},exit:GE}},text:{91:{name:`gfmFootnoteCall`,tokenize:HE},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:BE,resolveTo:VE}}}}function BE(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=fy(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function VE(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function HE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||by(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(fy(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return by(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function UE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||by(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=fy(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return by(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Ty(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function WE(e,t,n){return e.check(Uy,t,e.attempt(RE,t,n))}function GE(e){e.exit(`gfmFootnoteDefinition`)}function KE(e,t,n){let r=this;return Ty(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function qE(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ay(o,o.length,0,Iy(s,e.slice(r+1,n),t)),ay(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ay(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Fy(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Fy(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var JE=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){YE(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function YE(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function XE(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ZE(){return{flow:{null:{name:`table`,tokenize:QE,resolveAll:$E}}}}function QE(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$(t)?Ty(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||by(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$(t)?Ty(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $(t)?Ty(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $(t)?Ty(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):$(n)?Ty(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||by(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function $E(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new JE;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(tD(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=eD(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=eD(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=eD(f,t,o,i,n,d)):(o[0]=o[1],d=eD(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&tD(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=XE(t.events,n))}return e}function eD(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},nD(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=nD(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=nD(t.events,n[2]),a=nD(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},nD(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function tD(e,t,n,r,i){let a=[],o=nD(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function nD(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var rD={name:`tasklistCheck`,tokenize:aD};function iD(){return{text:{91:rD}}}function aD(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return by(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):$(r)?e.check({tokenize:oD},t,n)(r):n(r)}}function oD(e,t,n){return Ty(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function sD(e){return cy([CE(),zE(),qE(e),ZE(),iD()])}var cD={};function lD(e){let t=this,n=e||cD,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(sD(n)),a.push(fE()),o.push(pE(n))}function uD({taskId:e,children:t}){return(0,B.jsx)(`div`,{className:`markdown`,children:(0,B.jsx)(rw,{remarkPlugins:[lD],urlTransform:(t,n)=>n===`src`?Yn(e,t.replace(/^\.\.\//,``)):sw(t),components:{a:({node:e,...t})=>(0,B.jsx)(`a`,{...t,target:`_blank`,rel:`noreferrer`})},children:t})})}var dD={working:`Trabajando`,idle:`En pausa`,inactive:`Inactiva`};function fD({status:e,size:t=8}){return(0,B.jsx)(`span`,{className:`live-dot ${e}`,style:{width:t,height:t}})}function pD({name:e,size:t=13}){let n={size:t,strokeWidth:1.9};return e?e===`Bash`||e===`BashOutput`?(0,B.jsx)(Sn,{...n}):e===`Read`?(0,B.jsx)(Ie,{...n}):[`Edit`,`Write`,`MultiEdit`,`NotebookEdit`].includes(e)?(0,B.jsx)(Pe,{...n}):[`Grep`,`Glob`,`ToolSearch`].includes(e)?(0,B.jsx)($t,{...n}):[`Agent`,`Task`,`SendMessage`].includes(e)?(0,B.jsx)(oe,{...n}):e.startsWith(`Web`)||e.includes(`preview`)||e.includes(`browser`)?(0,B.jsx)(Qe,{...n}):e===`Skill`?(0,B.jsx)(cn,{...n}):e.startsWith(`Task`)||e===`TodoWrite`?(0,B.jsx)(mt,{...n}):(0,B.jsx)(In,{...n}):(0,B.jsx)(In,{...n})}var mD=e=>e?.startsWith(`mcp__`)?e.split(`__`).slice(1).join(` · `):e,hD=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:`${Math.round(e/1e3)}k`;function gD({session:e,label:t=!1}){let n=e.contextTokens??0,r=e.contextWindow??2e5;if(!n)return null;let i=Math.min(100,Math.round(n/r*100));return(0,B.jsxs)(`span`,{className:`ctx-meter ${i>=90?`full`:i>=70?`high`:`ok`}`,title:`Contexto: ${n.toLocaleString()} de ~${hD(r)} tokens (${i}%)${i>=90?` — casi lleno, conviene /compact`:``}`,children:[(0,B.jsx)(`span`,{className:`ctx-bar`,children:(0,B.jsx)(`span`,{style:{width:`${i}%`}})}),t?`${hD(n)} / ${hD(r)} · ${i}%`:`${i}%`]})}function _D({session:e,compact:t=!1}){let{tasks:n}=tr(),r=ni()(e),i=e.subagents.filter(e=>e.status===`working`).length;return(0,B.jsxs)(`a`,{className:`agent-row ${t?`compact`:``} ${r?`unread`:``}`,href:V.session(e.id),title:r?`Terminó y todavía no la viste`:void 0,children:[(0,B.jsx)(fD,{status:r?`unread`:e.status}),(0,B.jsx)(`span`,{className:`agent-title`,children:e.title}),!t&&(0,B.jsx)(`span`,{className:`agent-project`,children:e.project}),(0,B.jsx)(`span`,{className:`agent-action`,children:e.lastAction&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(pD,{name:e.lastAction.tool}),(0,B.jsx)(`span`,{children:e.lastAction.title||mD(e.lastAction.tool)})]})}),(0,B.jsxs)(`span`,{className:`agent-meta`,children:[!t&&(0,B.jsx)(gD,{session:e}),!t&&e.taskIds?.map(e=>{let t=n.find(t=>t.id===e);return(0,B.jsxs)(`span`,{className:`task-chip`,onClick:t=>(t.preventDefault(),pr(V.task(e))),children:[t&&(0,B.jsx)(or,{status:t.status,size:11}),e]},e)}),e.subagents.length>0&&(0,B.jsxs)(`span`,{className:`meta-repos ${i?`active`:``}`,title:`Subagentes activos / total`,children:[(0,B.jsx)(oe,{size:12}),i?`${i}/`:``,e.subagents.length]})]}),(0,B.jsx)(`span`,{className:`row-date`,children:Br(e.lastTs)})]})}function vD({sessions:e}){let t=ni(),n=[{status:`unread`,label:`Terminaron · sin ver`,items:e.filter(e=>t(e))},{status:`working`,label:`Trabajando ahora`,items:e.filter(e=>e.status===`working`)},{status:`idle`,label:`En pausa (últimas 2 h)`,items:e.filter(e=>e.status===`idle`&&!t(e))},{status:`inactive`,label:`Anteriores`,items:e.filter(e=>e.status===`inactive`&&!t(e))}];return(0,B.jsxs)(`div`,{className:`home`,children:[(0,B.jsxs)(`header`,{className:`topbar`,children:[(0,B.jsx)(`div`,{className:`topbar-title`,children:`Agentes`}),(0,B.jsx)(`span`,{className:`topbar-sub`,children:`Sesiones de Claude Code de los últimos 3 días · en vivo`}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsxs)(`a`,{className:`btn primary`,href:V.newSession(),children:[(0,B.jsx)(qt,{size:14}),` Nueva sesión `,(0,B.jsx)(`kbd`,{className:`kbd on-primary`,children:`S`})]})]}),(0,B.jsxs)(`div`,{className:`list`,children:[n.map(({status:e,label:t,items:n})=>n.length?(0,B.jsxs)(`section`,{children:[(0,B.jsxs)(`div`,{className:`group-header`,children:[(0,B.jsx)(fD,{status:e}),(0,B.jsx)(`span`,{className:`group-label`,children:t}),(0,B.jsx)(`span`,{className:`group-count`,children:n.length}),e===`unread`&&(0,B.jsx)(`button`,{className:`link-btn group-header-action`,onClick:()=>Qr(n),children:`Marcar como vistas`})]}),n.map(e=>(0,B.jsx)(_D,{session:e},e.id))]},e):null),!e.length&&(0,B.jsx)(`div`,{className:`empty`,children:`No hay sesiones recientes.`})]})]})}function yD(e){let t=new Map(e.filter(e=>e.kind===`result`).map(e=>[e.toolUseId,e])),n=[];for(let r of e)if(r.kind!==`result`){if(r.kind===`tool`){let e={...r,result:t.get(r.id)},i=n[n.length-1];i?.type===`tools`?i.calls.push(e):n.push({type:`tools`,calls:[e]})}else n.push({type:`event`,event:r})}return n}var bD=`
|
|
44
|
+
|
|
45
|
+
Archivos adjuntos:
|
|
46
|
+
`,xD=/\.(png|jpe?g|gif|webp)$/i;function SD({text:e,images:t}){let[n,r]=e.includes(bD)?e.split(bD):[e,``],i=r.split(`
|
|
47
|
+
`).map(e=>e.replace(/^- /,``).trim()).filter(Boolean);return(0,B.jsxs)(`div`,{className:`msg-body plain`,children:[(0,B.jsx)(CD,{text:n}),i.length>0&&(0,B.jsx)(`div`,{className:`attachments in-feed`,children:i.map(e=>(0,B.jsxs)(`a`,{className:`attachment`,href:yr(e),target:`_blank`,rel:`noreferrer`,title:e,children:[xD.test(e)?(0,B.jsx)(`img`,{src:yr(e),alt:``}):(0,B.jsx)(Ie,{size:14}),(0,B.jsx)(`span`,{className:`attachment-name`,children:e.split(`/`).pop()})]},e))}),!i.length&&t>0&&(0,B.jsxs)(`div`,{className:`attachments in-feed`,children:[`🖼 `,t,` imagen`,t>1?`es`:``]})]})}function CD({text:e,limit:t=700}){let[n,r]=(0,v.useState)(!1);return e.length<=t?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsxs)(B.Fragment,{children:[n?e:`${e.slice(0,t)}…`,(0,B.jsx)(`button`,{className:`link-btn`,onClick:()=>r(e=>!e),children:n?`Ver menos`:`Ver todo`})]})}function wD({call:e,sessionId:t,live:n}){let[r,i]=(0,v.useState)(!1),a=!e.result&&n;return(0,B.jsxs)(`div`,{className:`tool-call ${r?`open`:``} ${e.result?.isError?`error`:``}`,children:[(0,B.jsxs)(`button`,{className:`tool-call-head`,onClick:()=>i(e=>!e),children:[(0,B.jsx)(`span`,{className:`tool-call-icon`,children:(0,B.jsx)(pD,{name:e.name})}),(0,B.jsx)(`span`,{className:`tool-call-name`,children:mD(e.name)}),(0,B.jsx)(`span`,{className:`tool-call-title${a?` live-tool-shine`:``}`,children:e.title}),(0,B.jsx)(`span`,{className:`spacer`}),e.agentId&&(0,B.jsxs)(`span`,{className:`task-chip`,onClick:n=>{n.stopPropagation(),pr(V.session(t,e.agentId))},children:[(0,B.jsx)(oe,{size:11}),` Ver subagente`]}),a?(0,B.jsx)(vt,{size:13,className:`spin`}):e.result?.isError?(0,B.jsx)(Rn,{size:13,className:`err`}):e.result?(0,B.jsx)(ue,{size:13,className:`ok`}):null,(0,B.jsx)(L,{size:13,className:`tool-call-chevron`})]}),r&&(0,B.jsxs)(`div`,{className:`tool-call-body`,children:[e.detail&&(0,B.jsx)(`pre`,{className:`code`,children:e.detail}),e.result&&(0,B.jsx)(`pre`,{className:`code output ${e.result.isError?`error`:``}`,children:e.result.text||`(sin salida)`})]})]})}function TD({events:e,sessionId:t,live:n,isSubagent:r,pendingText:i}){let a=(0,v.useMemo)(()=>yD(e),[e]),o=(0,v.useRef)(null),s=(0,v.useRef)(null),[c,l]=(0,v.useState)(!0),u=(0,v.useRef)(!0);u.current=c;let[d,f]=(0,v.useState)(0),p=(0,v.useRef)(0),m=(0,v.useRef)(null);m.current===null&&a.length&&(m.current=a.length),(0,v.useLayoutEffect)(()=>{let t=o.current;if(!t)return;let n=e.length-p.current,r=p.current===0;p.current=e.length,c?t.scrollTo({top:t.scrollHeight,behavior:r?`auto`:`smooth`}):n>0&&f(e=>e+n)},[e,c,i]),(0,v.useEffect)(()=>{if(!s.current)return;let e=new ResizeObserver(()=>{let e=o.current;e&&u.current&&(e.scrollTop=e.scrollHeight)});return e.observe(s.current),()=>e.disconnect()},[]);let h=e=>m.current!==null&&e>=m.current?` feed-enter`:``;return(0,B.jsxs)(`div`,{className:`feed-wrap`,children:[(0,B.jsx)(`div`,{className:`feed`,ref:o,onScroll:()=>{let e=o.current,t=e.scrollHeight-e.scrollTop-e.clientHeight<80;l(t),t&&f(0)},children:(0,B.jsxs)(`div`,{className:`feed-inner`,ref:s,children:[a.map((e,i)=>e.type===`tools`?(0,B.jsx)(`div`,{className:`tool-group-feed${h(i)}`,children:e.calls.map(e=>(0,B.jsx)(wD,{call:e,sessionId:t,live:n},e.id))},i):e.event.kind===`prompt`?(0,B.jsxs)(`div`,{className:`msg prompt${h(i)}`,children:[(0,B.jsxs)(`div`,{className:`msg-author`,children:[(0,B.jsx)(At,{size:12}),` `,r&&i===0?`Instrucciones del orquestador`:`Vos`,` `,(0,B.jsx)(`span`,{className:`msg-time`,children:Br(e.event.ts)})]}),(0,B.jsx)(SD,{text:e.event.text??``,images:e.event.images??0})]},i):e.event.kind===`command`?(0,B.jsxs)(`div`,{className:`command-call${h(i)}`,children:[(0,B.jsxs)(`div`,{className:`msg-author`,children:[(0,B.jsx)(At,{size:12}),` Vos `,(0,B.jsx)(`span`,{className:`msg-time`,children:Br(e.event.ts)})]}),(0,B.jsx)(`div`,{className:`tool-group-feed`,children:(0,B.jsxs)(`div`,{className:`tool-call-head static`,children:[(0,B.jsx)(`span`,{className:`tool-call-icon`,children:(0,B.jsx)(cn,{size:13})}),(0,B.jsx)(`span`,{className:`tool-call-name`,children:`Skill`}),(0,B.jsxs)(`span`,{className:`command-name`,children:[`/`,e.event.name]}),e.event.text&&(0,B.jsx)(`span`,{className:`tool-call-title`,children:e.event.text})]})})]},i):e.event.kind===`text`?(0,B.jsxs)(`div`,{className:`msg assistant${h(i)}`,children:[(0,B.jsxs)(`div`,{className:`msg-author`,children:[(0,B.jsx)(cn,{size:12}),` Claude `,(0,B.jsx)(`span`,{className:`msg-time`,children:Br(e.event.ts)})]}),(0,B.jsx)(`div`,{className:`msg-body`,children:(0,B.jsx)(uD,{taskId:``,children:e.event.text??``})})]},i):(0,B.jsx)(`div`,{className:`msg-notice${h(i)}`,children:e.event.text},i)),i&&(0,B.jsxs)(`div`,{className:`msg prompt pending feed-enter`,children:[(0,B.jsxs)(`div`,{className:`msg-author`,children:[(0,B.jsx)(At,{size:12}),` Vos `,(0,B.jsx)(`span`,{className:`msg-time`,children:`enviando…`})]}),(0,B.jsx)(`div`,{className:`msg-body plain`,children:i})]}),n&&(0,B.jsxs)(`div`,{className:`typing feed-enter`,children:[(0,B.jsx)(cn,{size:12,className:`typing-icon`}),(0,B.jsx)(`span`,{className:`live-tool-shine`,children:`Trabajando…`})]})]})}),!c&&(0,B.jsxs)(`button`,{className:`follow-btn`,onClick:()=>{o.current.scrollTo({top:o.current.scrollHeight,behavior:`smooth`}),l(!0),f(0)},children:[(0,B.jsx)(F,{size:13}),` `,d?`${d} nuevos`:`Seguir en vivo`]})]})}function ED({label:e,children:t}){return(0,B.jsxs)(`div`,{className:`prop`,children:[(0,B.jsx)(`span`,{className:`prop-label`,children:e}),(0,B.jsx)(`span`,{className:`prop-static`,children:t})]})}function DD({sessionId:e,agent:t,active:n}){return(0,B.jsxs)(`a`,{className:`sub-agent ${n?`active`:``}`,href:V.session(e,t.id),children:[(0,B.jsx)(fD,{status:t.status,size:7}),(0,B.jsxs)(`span`,{className:`sub-agent-body`,children:[(0,B.jsx)(`span`,{className:`sub-agent-title`,children:t.description}),t.lastAction&&(0,B.jsxs)(`span`,{className:`sub-agent-action`,children:[(0,B.jsx)(pD,{name:t.lastAction.tool,size:11}),` `,t.lastAction.title||mD(t.lastAction.tool)]})]})]})}function OD({sessionId:e,agentId:t,sessions:n}){let{tasks:r,updateTask:i}=tr(),a=Ar(e,t),o=n.find(t=>t.id===e)??a.session,s=o?.subagents.find(e=>e.id===t),c=t?s?.status??`inactive`:o?.status??`inactive`;return(0,v.useEffect)(()=>Mr(e),[e]),ri(o),(0,v.useEffect)(()=>(o&&(document.title=`${o.title} · Agentes`),()=>void(document.title=`Mono`)),[o]),a.error?(0,B.jsxs)(`div`,{className:`empty`,children:[`No se pudo abrir la sesión: `,a.error]}):(0,B.jsxs)(`div`,{className:`task-shell`,children:[(0,B.jsxs)(`header`,{className:`topbar task-topbar`,children:[(0,B.jsxs)(`nav`,{className:`breadcrumb`,children:[(0,B.jsx)(`a`,{href:V.agents(),children:`Agentes`}),(0,B.jsx)(L,{size:13}),(0,B.jsxs)(`a`,{href:V.session(e),className:`crumb-task`,children:[(0,B.jsx)(fD,{status:o?.status??`inactive`,size:7}),(0,B.jsx)(`span`,{className:`crumb-title`,children:o?.title??`…`})]}),s&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(L,{size:13}),(0,B.jsxs)(`span`,{className:`crumb-task`,children:[(0,B.jsx)(oe,{size:13}),` `,(0,B.jsx)(`span`,{className:`crumb-title`,children:s.description})]})]})]}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(Xg,{sessionId:e,title:o?.title}),(0,B.jsxs)(`span`,{className:`status-pill-live ${c}`,children:[(0,B.jsx)(fD,{status:c,size:7}),` `,dD[c]]})]}),(0,B.jsx)(`div`,{className:`task-content`,children:(0,B.jsxs)(`div`,{className:`issue`,children:[(0,B.jsxs)(`div`,{className:`issue-main session-main`,children:[t&&a.truncated&&(0,B.jsx)(`div`,{className:`msg-notice top`,children:`Mostrando la parte más reciente de la sesión`}),t?(0,B.jsx)(TD,{events:a.events,sessionId:e,live:c===`working`,isSubagent:!0}):(0,B.jsx)(__,{sessionId:e,summary:o})]}),(0,B.jsxs)(`aside`,{className:`properties`,children:[o&&(0,B.jsxs)(`div`,{className:`prop-group`,children:[(0,B.jsx)(`div`,{className:`prop-title`,children:`Sesión`}),(0,B.jsxs)(ED,{label:`Estado`,children:[(0,B.jsx)(fD,{status:o.status,size:7}),` `,dD[o.status]]}),(0,B.jsx)(ED,{label:`Contexto`,children:(0,B.jsx)(gD,{session:o,label:!0})}),(0,B.jsxs)(ED,{label:`Proyecto`,children:[(0,B.jsx)(We,{size:12}),` `,o.project]}),o.focusCwd&&(0,B.jsxs)(ED,{label:`Trabaja en`,children:[(0,B.jsx)(He,{size:12}),` `,(0,B.jsx)(`span`,{className:`mono`,title:o.focusCwd,children:o.focusCwd.split(`/`).slice(-2).join(`/`)})]}),o.gitBranch&&(0,B.jsxs)(ED,{label:`Rama`,children:[(0,B.jsx)(Je,{size:12}),` `,(0,B.jsx)(`span`,{className:`mono`,children:o.gitBranch})]}),o.model&&(0,B.jsx)(ED,{label:`Modelo`,children:o.model}),(0,B.jsx)(ED,{label:`Empezó`,children:Br(o.firstTs)}),(0,B.jsx)(ED,{label:`Última`,children:Br(o.lastTs)})]}),o&&(0,B.jsxs)(`div`,{className:`prop-group`,children:[(0,B.jsxs)(`div`,{className:`prop-title prop-title-row`,children:[`Tareas`,(0,B.jsx)(Rr,{placeholder:`Vincular a una tarea…`,options:r.map(e=>({value:e.id,label:`${e.id} · ${e.title}`,icon:(0,B.jsx)(or,{status:e.status})})),onChange:t=>{let n=r.find(e=>e.id===t);n&&i(t,{sessionIds:[...new Set([...n.sessionIds??[],e])]})},className:`icon-btn tiny`,children:(0,B.jsx)(qt,{size:13})})]}),!o.taskIds?.length&&(0,B.jsx)(`span`,{className:`hint`,children:`Sin tarea. Vinculala con +.`}),o.taskIds?.map(e=>{let t=r.find(t=>t.id===e);return(0,B.jsxs)(`a`,{className:`pr-row`,href:V.task(e),children:[t&&(0,B.jsx)(or,{status:t.status}),(0,B.jsx)(`span`,{className:`pr-repo`,children:t?.title??e})]},e)})]}),!!o?.prLinks.length&&(0,B.jsxs)(`div`,{className:`prop-group`,children:[(0,B.jsx)(`div`,{className:`prop-title`,children:`PRs`}),o.prLinks.map(e=>(0,B.jsxs)(`a`,{className:`pr-row`,href:e,target:`_blank`,rel:`noreferrer`,children:[(0,B.jsx)(Xe,{size:14}),(0,B.jsx)(`span`,{className:`pr-repo`,children:e.split(`/`).slice(-3,-2)[0]}),(0,B.jsxs)(`span`,{className:`pr-number`,children:[`#`,e.split(`/`).pop()]})]},e))]}),!!o?.subagents.length&&(0,B.jsxs)(`div`,{className:`prop-group`,children:[(0,B.jsxs)(`div`,{className:`prop-title`,children:[`Subagentes · `,o.subagents.filter(e=>e.status===`working`).length,` activos de `,o.subagents.length]}),(0,B.jsxs)(`a`,{className:`sub-agent ${t?``:`active`}`,href:V.session(e),children:[(0,B.jsx)(cn,{size:12}),(0,B.jsx)(`span`,{className:`sub-agent-body`,children:(0,B.jsx)(`span`,{className:`sub-agent-title`,children:`Sesión principal`})})]}),o.subagents.map(n=>(0,B.jsx)(DD,{sessionId:e,agent:n,active:n.id===t},n.id))]})]})]})})]})}function kD(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let n=document.implementation.createHTMLDocument(),r=n.createElement(`base`),i=n.createElement(`a`);return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}var AD=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function jD(e){let t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}var MD=null;function ND(e={}){return MD||(e.includeStyleProperties?(MD=e.includeStyleProperties,MD):(MD=jD(window.getComputedStyle(document.documentElement)),MD))}function PD(e,t){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace(`px`,``)):0}function FD(e){let t=PD(e,`border-left-width`),n=PD(e,`border-right-width`);return e.clientWidth+t+n}function ID(e){let t=PD(e,`border-top-width`),n=PD(e,`border-bottom-width`);return e.clientHeight+t+n}function LD(e,t={}){return{width:t.width||FD(e),height:t.height||ID(e)}}function RD(){let e,t;try{t=process}catch{}let n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var zD=16384;function BD(e){(e.width>zD||e.height>zD)&&(e.width>zD&&e.height>zD?e.width>e.height?(e.height*=zD/e.width,e.width=zD):(e.width*=zD/e.height,e.height=zD):e.width>zD?(e.height*=zD/e.width,e.width=zD):(e.width*=zD/e.height,e.height=zD))}function VD(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin=`anonymous`,r.decoding=`async`,r.src=e})}async function HD(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function UD(e,t,n){let r=`http://www.w3.org/2000/svg`,i=document.createElementNS(r,`svg`),a=document.createElementNS(r,`foreignObject`);return i.setAttribute(`width`,`${t}`),i.setAttribute(`height`,`${n}`),i.setAttribute(`viewBox`,`0 0 ${t} ${n}`),a.setAttribute(`width`,`100%`),a.setAttribute(`height`,`100%`),a.setAttribute(`x`,`0`),a.setAttribute(`y`,`0`),a.setAttribute(`externalResourcesRequired`,`true`),i.appendChild(a),a.appendChild(e),HD(i)}var WD=(e,t)=>{if(e instanceof t)return!0;let n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||WD(n,t)};function GD(e){let t=e.getPropertyValue(`content`);return`${e.cssText} content: '${t.replace(/'|"/g,``)}';`}function KD(e,t){return ND(t).map(t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?` !important`:``};`).join(` `)}function qD(e,t,n,r){let i=`.${e}:${t}`,a=n.cssText?GD(n):KD(n,r);return document.createTextNode(`${i}{${a}}`)}function JD(e,t,n,r){let i=window.getComputedStyle(e,n),a=i.getPropertyValue(`content`);if(a===``||a===`none`)return;let o=AD();try{t.className=`${t.className} ${o}`}catch{return}let s=document.createElement(`style`);s.appendChild(qD(o,n,i,r)),t.appendChild(s)}function YD(e,t,n){JD(e,t,`:before`,n),JD(e,t,`:after`,n)}var XD=`application/font-woff`,ZD=`image/jpeg`,QD={woff:XD,woff2:XD,ttf:`application/font-truetype`,eot:`application/vnd.ms-fontobject`,png:`image/png`,jpg:ZD,jpeg:ZD,gif:`image/gif`,tiff:`image/tiff`,svg:`image/svg+xml`,webp:`image/webp`};function $D(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:``}function eO(e){return QD[$D(e).toLowerCase()]||``}function tO(e){return e.split(/,/)[1]}function nO(e){return e.search(/^(data:)/)!==-1}function rO(e,t){return`data:${t};base64,${e}`}async function iO(e,t,n){let r=await fetch(e,t);if(r.status===404)throw Error(`Resource "${r.url}" not found`);let i=await r.blob();return new Promise((e,t)=>{let a=new FileReader;a.onerror=t,a.onloadend=()=>{try{e(n({res:r,result:a.result}))}catch(e){t(e)}},a.readAsDataURL(i)})}var aO={};function oO(e,t,n){let r=e.replace(/\?.*/,``);return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,``)),t?`[${t}]${r}`:r}async function sO(e,t,n){let r=oO(e,t,n.includeQueryParams);if(aO[r]!=null)return aO[r];n.cacheBust&&(e+=(/\?/.test(e)?`&`:`?`)+new Date().getTime());let i;try{i=rO(await iO(e,n.fetchRequestInit,({res:e,result:n})=>(t||=e.headers.get(`Content-Type`)||``,tO(n))),t)}catch(t){i=n.imagePlaceholder||``;let r=`Failed to fetch resource: ${e}`;t&&(r=typeof t==`string`?t:t.message),r&&console.warn(r)}return aO[r]=i,i}async function cO(e){let t=e.toDataURL();return t===`data:,`?e.cloneNode(!1):VD(t)}async function lO(e,t){if(e.currentSrc){let t=document.createElement(`canvas`),n=t.getContext(`2d`);return t.width=e.clientWidth,t.height=e.clientHeight,n?.drawImage(e,0,0,t.width,t.height),VD(t.toDataURL())}let n=e.poster;return VD(await sO(n,eO(n),t))}async function uO(e,t){try{if(e?.contentDocument?.body)return await bO(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function dO(e,t){return WD(e,HTMLCanvasElement)?cO(e):WD(e,HTMLVideoElement)?lO(e,t):WD(e,HTMLIFrameElement)?uO(e,t):e.cloneNode(pO(e))}var fO=e=>e.tagName!=null&&e.tagName.toUpperCase()===`SLOT`,pO=e=>e.tagName!=null&&e.tagName.toUpperCase()===`SVG`;async function mO(e,t,n){if(pO(t))return t;let r=[];return r=fO(e)&&e.assignedNodes?jD(e.assignedNodes()):WD(e,HTMLIFrameElement)&&e.contentDocument?.body?jD(e.contentDocument.body.childNodes):jD((e.shadowRoot??e).childNodes),r.length===0||WD(e,HTMLVideoElement)||await r.reduce((e,r)=>e.then(()=>bO(r,n)).then(e=>{e&&t.appendChild(e)}),Promise.resolve()),t}function hO(e,t,n){let r=t.style;if(!r)return;let i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):ND(n).forEach(n=>{let a=i.getPropertyValue(n);n===`font-size`&&a.endsWith(`px`)&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),WD(e,HTMLIFrameElement)&&n===`display`&&a===`inline`&&(a=`block`),n===`d`&&t.getAttribute(`d`)&&(a=`path(${t.getAttribute(`d`)})`),r.setProperty(n,a,i.getPropertyPriority(n))})}function gO(e,t){WD(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),WD(e,HTMLInputElement)&&t.setAttribute(`value`,e.value)}function _O(e,t){if(WD(e,HTMLSelectElement)){let n=t,r=Array.from(n.children).find(t=>e.value===t.getAttribute(`value`));r&&r.setAttribute(`selected`,``)}}function vO(e,t,n){return WD(t,Element)&&(hO(e,t,n),YD(e,t,n),gO(e,t),_O(e,t)),t}async function yO(e,t){let n=e.querySelectorAll?e.querySelectorAll(`use`):[];if(n.length===0)return e;let r={};for(let i=0;i<n.length;i++){let a=n[i].getAttribute(`xlink:href`);if(a){let n=e.querySelector(a),i=document.querySelector(a);!n&&i&&!r[a]&&(r[a]=await bO(i,t,!0))}}let i=Object.values(r);if(i.length){let t=`http://www.w3.org/1999/xhtml`,n=document.createElementNS(t,`svg`);n.setAttribute(`xmlns`,t),n.style.position=`absolute`,n.style.width=`0`,n.style.height=`0`,n.style.overflow=`hidden`,n.style.display=`none`;let r=document.createElementNS(t,`defs`);n.appendChild(r);for(let e=0;e<i.length;e++)r.appendChild(i[e]);e.appendChild(n)}return e}async function bO(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(e=>dO(e,t)).then(n=>mO(e,n,t)).then(n=>vO(e,n,t)).then(e=>yO(e,t))}var xO=/url\((['"]?)([^'"]+?)\1\)/g,SO=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,CO=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function wO(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,`\\$1`);return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,`g`)}function TO(e){let t=[];return e.replace(xO,(e,n,r)=>(t.push(r),e)),t.filter(e=>!nO(e))}async function EO(e,t,n,r,i){try{let a=n?kD(t,n):t,o=eO(t),s;return s=i?rO(await i(a),o):await sO(a,o,r),e.replace(wO(t),`$1${s}$3`)}catch{}return e}function DO(e,{preferredFontFormat:t}){return t?e.replace(CO,e=>{for(;;){let[n,,r]=SO.exec(e)||[];if(!r)return``;if(r===t)return`src: ${n};`}}):e}function OO(e){return e.search(xO)!==-1}async function kO(e,t,n){if(!OO(e))return e;let r=DO(e,n);return TO(r).reduce((e,r)=>e.then(e=>EO(e,r,t,n)),Promise.resolve(r))}async function AO(e,t,n){let r=t.style?.getPropertyValue(e);if(r){let i=await kO(r,null,n);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function jO(e,t){await AO(`background`,e,t)||await AO(`background-image`,e,t),await AO(`mask`,e,t)||await AO(`-webkit-mask`,e,t)||await AO(`mask-image`,e,t)||await AO(`-webkit-mask-image`,e,t)}async function MO(e,t){let n=WD(e,HTMLImageElement);if((!n||nO(e.src))&&(!WD(e,SVGImageElement)||nO(e.href.baseVal)))return;let r=n?e.src:e.href.baseVal,i=await sO(r,eO(r),t);await new Promise((r,a)=>{e.onload=r,e.onerror=t.onImageErrorHandler?(...e)=>{try{r(t.onImageErrorHandler(...e))}catch(e){a(e)}}:a;let o=e;o.decode&&=r,o.loading===`lazy`&&(o.loading=`eager`),n?(e.srcset=``,e.src=i):e.href.baseVal=i})}async function NO(e,t){let n=jD(e.childNodes).map(e=>PO(e,t));await Promise.all(n).then(()=>e)}async function PO(e,t){WD(e,Element)&&(await jO(e,t),await MO(e,t),await NO(e,t))}function FO(e,t){let{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);let r=t.style;return r!=null&&Object.keys(r).forEach(e=>{n[e]=r[e]}),e}var IO={};async function LO(e){let t=IO[e];return t??(t={url:e,cssText:await(await fetch(e)).text()},IO[e]=t),t}async function RO(e,t){let n=e.cssText,r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let a=i.replace(r,`$1`);return a.startsWith(`https://`)||(a=new URL(a,e.url).href),iO(a,t.fetchRequestInit,({result:e})=>(n=n.replace(i,`url(${e})`),[i,e]))});return Promise.all(i).then(()=>n)}function zO(e){if(e==null)return[];let t=[],n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,``),r=RegExp(`((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})`,`gi`);for(;;){let e=r.exec(n);if(e===null)break;t.push(e[0])}n=n.replace(r,``);let i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=RegExp(`((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})`,`gi`);for(;;){let e=i.exec(n);if(e===null){if(e=a.exec(n),e===null)break;i.lastIndex=a.lastIndex}else a.lastIndex=i.lastIndex;t.push(e[0])}return t}async function BO(e,t){let n=[],r=[];return e.forEach(n=>{if(`cssRules`in n)try{jD(n.cssRules||[]).forEach((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let a=i+1,o=e.href,s=LO(o).then(e=>RO(e,t)).then(e=>zO(e).forEach(e=>{try{n.insertRule(e,e.startsWith(`@import`)?a+=1:n.cssRules.length)}catch(t){console.error(`Error inserting rule from remote css`,{rule:e,error:t})}})).catch(e=>{console.error(`Error loading remote css`,e.toString())});r.push(s)}})}catch(i){let a=e.find(e=>e.href==null)||document.styleSheets[0];n.href!=null&&r.push(LO(n.href).then(e=>RO(e,t)).then(e=>zO(e).forEach(e=>{a.insertRule(e,a.cssRules.length)})).catch(e=>{console.error(`Error loading remote stylesheet`,e)})),console.error(`Error inlining remote css file`,i)}}),Promise.all(r).then(()=>(e.forEach(e=>{if(`cssRules`in e)try{jD(e.cssRules||[]).forEach(e=>{n.push(e)})}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}}),n))}function VO(e){return e.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>OO(e.style.getPropertyValue(`src`)))}async function HO(e,t){if(e.ownerDocument==null)throw Error(`Provided element is not within a Document`);return VO(await BO(jD(e.ownerDocument.styleSheets),t))}function UO(e){return e.trim().replace(/["']/g,``)}function WO(e){let t=new Set;function n(e){(e.style.fontFamily||getComputedStyle(e).fontFamily).split(`,`).forEach(e=>{t.add(UO(e))}),Array.from(e.children).forEach(e=>{e instanceof HTMLElement&&n(e)})}return n(e),t}async function GO(e,t){let n=await HO(e,t),r=WO(e);return(await Promise.all(n.filter(e=>r.has(UO(e.style.fontFamily))).map(e=>{let n=e.parentStyleSheet?e.parentStyleSheet.href:null;return kO(e.cssText,n,t)}))).join(`
|
|
48
|
+
`)}async function KO(e,t){let n=t.fontEmbedCSS==null?t.skipFonts?null:await GO(e,t):t.fontEmbedCSS;if(n){let t=document.createElement(`style`),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function qO(e,t={}){let{width:n,height:r}=LD(e,t),i=await bO(e,t,!0);return await KO(i,t),await PO(i,t),FO(i,t),await UD(i,n,r)}async function JO(e,t={}){let{width:n,height:r}=LD(e,t),i=await VD(await qO(e,t)),a=document.createElement(`canvas`),o=a.getContext(`2d`),s=t.pixelRatio||RD(),c=t.canvasWidth||n,l=t.canvasHeight||r;return a.width=c*s,a.height=l*s,t.skipAutoScale||BD(a),a.style.width=`${c}`,a.style.height=`${l}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(i,0,0,a.width,a.height),a}async function YO(e,t={}){return(await JO(e,t)).toDataURL()}var XO=Object.defineProperty,ZO=(e,t,n)=>t in e?XO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QO=(e,t)=>{for(var n in t)XO(e,n,{get:t[n],enumerable:!0})},$O=(e,t,n)=>ZO(e,typeof t==`symbol`?t:t+``,n),ek={};QO(ek,{Graph:()=>zk,alg:()=>pk});var tk=Object.defineProperty,nk=(e,t)=>{for(var n in t)tk(e,n,{get:t[n],enumerable:!0})},rk=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected=`directed`in e?e.directed:!0,this._isMultigraph=`multigraph`in e&&e.multigraph,this._isCompound=`compound`in e&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=typeof e==`function`?e:()=>e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(e=>{t===void 0?this.setNode(e):this.setNode(e,t)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{this.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e===`\0`)return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),r=this.successors(e);if(r)for(let e of r)n.add(e);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),(t?.length??0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,this.edge(e))});let n={},r=e=>{let i=this.parent(e);return!i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:r(i)};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,r(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=typeof e==`function`?e:()=>e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((e,n)=>(t===void 0?this.setEdge(e,n):this.setEdge(e,n,t),n)),this}setEdge(e,t,n,r){let i,a,o,s,c=!1;typeof e==`object`&&e&&`v`in e?(i=e.v,a=e.w,o=e.name,arguments.length===2&&(s=t,c=!0)):(i=e,a=t,o=r,arguments.length>2&&(s=n,c=!0)),i=``+i,a=``+a,o!==void 0&&(o=``+o);let l=ok(this._isDirected,i,a,o);if(l in this._edgeLabels)return c&&(this._edgeLabels[l]=s),this;if(o!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(i),this.setNode(a),this._edgeLabels[l]=c?s:this._defaultEdgeLabelFn(i,a,o);let u=sk(this._isDirected,i,a,o);return i=u.v,a=u.w,Object.freeze(u),this._edgeObjs[l]=u,ik(this._preds[a],i),ik(this._sucs[i],a),this._in[a][l]=u,this._out[i][l]=u,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?ck(this._isDirected,e):ok(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(e,t,n){let r=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof r!=`object`||!r?{label:r}:r}hasEdge(e,t,n){return(arguments.length===1?ck(this._isDirected,e):ok(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let r=arguments.length===1?ck(this._isDirected,e):ok(this._isDirected,e,t,n),i=this._edgeObjs[r];if(i){let e=i.v,t=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],ak(this._preds[t],e),ak(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let r=Object.values(e);return n?r.filter(e=>e.v===t&&e.w===n||e.v===n&&e.w===t):r}};function ik(e,t){e[t]?e[t]++:e[t]=1}function ak(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function ok(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+``+a+``+(r===void 0?`\0`:r)}function sk(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function ck(e,t){return ok(e,t.v,t.w,t.name)}nk({},{read:()=>fk,write:()=>lk});function lk(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:uk(e),edges:dk(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function uk(e){return e.nodes().map(t=>{let n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function dk(e){return e.edges().map(t=>{let n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function fk(e){let t=new rk(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(e=>{t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(e=>{t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}var pk={};nk(pk,{CycleException:()=>Ok,bellmanFord:()=>hk,components:()=>_k,dijkstra:()=>bk,dijkstraAll:()=>Sk,findCycles:()=>wk,floydWarshall:()=>Ek,isAcyclic:()=>Ak,postorder:()=>Pk,preorder:()=>Fk,prim:()=>Ik,shortestPaths:()=>Lk,tarjan:()=>Ck,topsort:()=>kk});var mk=()=>1;function hk(e,t,n,r){return gk(e,String(t),n||mk,r||function(t){return e.outEdges(t)??[]})}function gk(e,t,n,r){let i={},a,o=0,s=e.nodes(),c=function(e){let t=i[e.v],r=i[e.w];if(!t||!r)return;let o=n(e);t.distance+o<r.distance&&(i[e.w]={distance:t.distance+o,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){r(e).forEach(function(t){let n=t.v===e?t.v:t.w,r=n===t.v?t.w:t.v;c({v:n,w:r})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0,predecessor:``}});let u=s.length;for(let e=1;e<u&&(a=!1,o++,l(),a);e++);if(o===u-1&&(a=!1,l(),a))throw Error(`The graph contains a negative weight cycle`);return i}function _k(e){let t={},n=[],r;function i(n){var a,o;n in t||(t[n]=!0,r.push(n),(a=e.successors(n))==null||a.forEach(i),(o=e.predecessors(n))==null||o.forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}var vk=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){let n=this._keyIndices,r=String(e);if(!(r in n)){let e=this._arr,i=e.length;return n[r]=i,e.push({key:r,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw Error(`Queue underflow`);this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw Error(`Key not found: ${e}`);let r=this._arr[n].priority;if(t>r)throw Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,n=t[e].priority,r;for(;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){let n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}},yk=()=>1;function bk(e,t,n,r){return xk(e,String(t),n||yk,r||function(t){return e.outEdges(t)??[]})}function xk(e,t,n,r){let i={},a=new vk,o,s,c=function(e){let t=e.v===o?e.w:e.v,r=i[t];if(!r)return;let c=n(e),l=s.distance+c;if(c<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+c);l<r.distance&&(r.distance=l,r.predecessor=o,a.decrease(t,l))};for(e.nodes().forEach(function(e){let n=e===t?0:1/0;i[e]={distance:n,predecessor:``},a.add(e,n)});a.size()>0;){o=a.removeMin();let e=i[o];if(!e||e.distance===1/0)break;s=e,r(o).forEach(c)}return i}function Sk(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=bk(e,i,t,n),r},{})}function Ck(e){let t=0,n=[],r={},i=[];function a(o){var s;let c=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),(s=e.successors(o))==null||s.forEach(function(e){if(e in r){let t=r[e];t!=null&&t.onStack&&(c.lowlink=Math.min(c.lowlink,t.index))}else{a(e);let t=r[e];t&&(c.lowlink=Math.min(c.lowlink,t.lowlink))}}),c.lowlink===c.index){let e=[],t;do{t=n.pop();let i=r[t];i&&(i.onStack=!1),e.push(t)}while(o!==t);i.push(e)}}return e.nodes().forEach(function(e){e in r||a(e)}),i}function wk(e){return Ck(e).filter(function(t){let n=t[0];return n?t.length>1||t.length===1&&(e.outEdges(n,n)??[]).length>0:!1})}var Tk=()=>1;function Ek(e,t,n){return Dk(e,t||Tk,n||function(t){return e.outEdges(t)??[]})}function Dk(e,t,n){let r={},i=e.nodes();return i.forEach(function(e){let a={};r[e]=a,a[e]={distance:0,predecessor:``},i.forEach(function(t){e!==t&&(a[t]={distance:1/0,predecessor:``})}),n(e).forEach(function(n){let r=n.v===e?n.w:n.v,i=t(n);a[r]={distance:i,predecessor:e}})}),i.forEach(function(e){let t=r[e];t&&i.forEach(function(n){let a=r[n];a&&i.forEach(function(n){let r=a[e],i=t[n],o=a[n];if(r&&i&&o){let e=r.distance+i.distance;e<o.distance&&(o.distance=e,o.predecessor=i.predecessor)}})})}),r}var Ok=class extends Error{constructor(e){super(e),this.name=`CycleException`}};function kk(e){let t={},n={},r=[];function i(a){var o;if(a in n)throw new Ok;a in t||(n[a]=!0,t[a]=!0,(o=e.predecessors(a))==null||o.forEach(i),delete n[a],r.push(a))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new Ok;return r}function Ak(e){try{kk(e)}catch(e){if(e instanceof Ok)return!1;throw e}return!0}function jk(e,t,n,r,i){Array.isArray(t)||(t=[t]);let a=(t=>(e.isDirected()?e.successors(t):e.neighbors(t))??[]),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i=Mk(e,t,n===`post`,o,a,r,i)}),i}function Mk(e,t,n,r,i,a,o){return t in r||(r[t]=!0,n||(o=a(o,t)),i(t).forEach(function(t){o=Mk(e,t,n,r,i,a,o)}),n&&(o=a(o,t))),o}function Nk(e,t,n){return jk(e,t,n,function(e,t){return e.push(t),e},[])}function Pk(e,t){return Nk(e,t,`post`)}function Fk(e,t){return Nk(e,t,`pre`)}function Ik(e,t){var n;let r=new rk,i={},a=new vk,o;function s(e){let n=e.v===o?e.w:e.v,r=a.priority(n);if(r!==void 0){let s=t(e);s<r&&(i[n]=o,a.decrease(n,s))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(e){a.add(e,1/0),r.setNode(e)});let c=e.nodes()[0];c!==void 0&&a.decrease(c,0);let l=!1;for(;a.size()>0;){if(o=a.removeMin(),o in i)r.setEdge(o,i[o]);else{if(l)throw Error(`Input graph is not connected: `+e);l=!0}(n=e.nodeEdges(o))==null||n.forEach(s)}return r}function Lk(e,t,n,r){return Rk(e,t,n,r??(t=>e.outEdges(t)??[]))}function Rk(e,t,n,r){if(n===void 0)return bk(e,t,n,r);let i=!1,a=e.nodes();for(let o=0;o<a.length;o++){let s=a[o];if(s===void 0)continue;let c=r(s);for(let e=0;e<c.length;e++){let t=c[e];if(!t)continue;let r=t.v===s?t.v:t.w;n({v:r,w:r===t.v?t.w:t.v})<0&&(i=!0)}if(i)return hk(e,t,n,r)}return bk(e,t,n,r)}var zk=rk;function Bk(e,t,n,r){let i=r;for(;e.hasNode(i);)i=nA(r);return n.dummy=t,e.setNode(i,n),i}function Vk(e){let t=new zk().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function Hk(e){let t=new zk({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function Uk(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function Wk(e){let t=rA(Zk(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][r.order]=n)}),t}function Gk(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=Xk(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function Kk(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=Xk(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function qk(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),Bk(e,`border`,i,t)}function Jk(e,t=Yk){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var Yk=65535;function Xk(e,t){return t.length>Yk?e(...Jk(t).map(t=>e(...t))):e(...t)}function Zk(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return Xk(Math.max,t)}function Qk(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function $k(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function eA(e,t){return t()}var tA=0;function nA(e){return e+(``+ ++tA)}function rA(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function iA(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function aA(e,t){let n;return n=typeof t==`string`?e=>e[t]:t,Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function oA(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var sA=`\0`;function cA(e,t,n){if(!(e&&t&&n&&t.dummy===`edge`&&n.dummy===`edge`&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let r=!0;t.edgeObj.w===n.edgeObj.w&&(r=!1);let i=r?e[t.edgeObj.v]?.rank??NaN:e[t.edgeObj.w]?.rank??NaN,a=Object.entries(e).find(e=>e[1].edgeObj?.v===t.edgeObj.v&&e[1].edgeObj?.w===t.edgeObj.w&&e[1].rank===i),o=Object.entries(e).find(e=>e[1].edgeObj?.v===n.edgeObj.v&&e[1].edgeObj?.w===n.edgeObj.w&&e[1].rank===i);if(!a||!o)return 0;let s=a[1].order??NaN,c=o[1].order??NaN;return isNaN(s-c)?0:s-c}var lA=`3.1.1`,uA=class{constructor(){$O(this,`_sentinel`);let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return dA(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&dA(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,fA)),n=n._prev;return`[`+e.join(`, `)+`]`}};function dA(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function fA(e,t){if(e!==`_next`&&e!==`_prev`)return t}var pA=uA,mA=()=>1;function hA(e,t){if(e.nodeCount()<=1)return[];let n=vA(e,t||mA);return gA(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w)||[])}function gA(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)_A(e,t,n,o);for(;o=i.dequeue();)_A(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i]?.dequeue(),o){r=r.concat(_A(e,t,n,o,!0)||[]);break}}}return r}function _A(e,t,n,r,i){let a=[],o=i?a:void 0;return(e.inEdges(r.v)||[]).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,yA(t,n,s)}),(e.outEdges(r.v)||[]).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,yA(t,n,o)}),e.removeNode(r.v),o}function vA(e,t){let n=new zk,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s);let c=n.node(e.v),l=n.node(e.w);i=Math.max(i,c.out+=o),r=Math.max(r,l.in+=o)});let a=bA(i+r+3).map(()=>new pA),o=r+1;return n.nodes().forEach(e=>{yA(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function yA(e,t,n){var r,i,a;n.out?n.in?(a=e[n.out-n.in+t])==null||a.enqueue(n):(i=e[e.length-1])==null||i.enqueue(n):(r=e[0])==null||r.enqueue(n)}function bA(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function xA(e,t){(e.graph().acyclicer===`greedy`?hA(e,n(e)):SA(e,t??null)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,nA(`rev`))});function n(e){return t=>e.edge(t).weight}}function SA(e,t){let n=[],r={},i={};function a(t){Object.hasOwn(i,t)||(i[t]=!0,r[t]=!0,e.outEdges(t).forEach(e=>{Object.hasOwn(r,e.w)?n.push(e):a(e.w)}),delete r[t])}function o(a){var s;Object.hasOwn(i,a)||(i[a]=!0,r[a]=!0,(s=e.outEdges(a))==null||s.forEach(i=>{Object.hasOwn(r,i.w)||t.node(a)?.rank>t.node(i.w)?.rank&&wA(e,i.w,i)?n.push(i):o(i.w)}),delete r[a])}let s=a;return t&&typeof t.node==`function`&&(s=o),e.sources().forEach(s),e.nodes().forEach(s),n}function CA(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function wA(e,t,n){let r=new Set;function i(t){if(e.sources().includes(t))return!0;r.add(t);for(let a of e.inEdges(t)??[])if((a.v!==n.v||a.w!==n.w)&&!r.has(a.v)&&i(a.v))return!0;return!1}return i(t)}function TA(e){e.graph().dummyChains=[],e.edges().forEach(t=>EA(e,t))}function EA(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d=0;for(++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=Bk(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function DA(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function OA(e){let t={};function n(r){let i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let a=e.outEdges(r),o=a?a.map(t=>t==null?1/0:n(t.w)-e.edge(t).minlen):[],s=Xk(Math.min,o);return s===1/0&&(s=0),i.rank=s}e.sources().forEach(n)}function kA(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var AA=jA;function jA(e){let t=new zk({directed:!1}),n=e.nodes();if(n.length===0)throw Error(`Graph must have at least one node`);let r=n[0],i=e.nodeCount();t.setNode(r,{});let a,o;for(;MA(t,e)<i&&(a=NA(t,e),a);)o=t.hasNode(a.v)?kA(e,a):-kA(e,a),PA(t,e,o);return t}function MA(e,t){function n(r){let i=t.nodeEdges(r);i&&i.forEach(i=>{let a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!kA(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return e.nodes().forEach(n),e.nodeCount()}function NA(e,t){return t.edges().reduce((n,r)=>{let i=1/0;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=kA(t,r)),i<n[0]?[i,r]:n},[1/0,null])[1]}function PA(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}var{preorder:FA,postorder:IA}=pk,LA=RA;RA.initLowLimValues=HA,RA.initCutValues=zA,RA.calcCutValue=VA,RA.leaveEdge=WA,RA.enterEdge=GA,RA.exchangeEdges=KA;function RA(e){e=Vk(e),OA(e);let t=AA(e);HA(t),zA(t,e);let n,r;for(;n=WA(t);)r=GA(t,e,n),KA(t,e,n,r)}function zA(e,t){let n=IA(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>BA(e,t,n))}function BA(e,t,n){let r=e.node(n).parent,i=e.edge(n,r);i.cutvalue=VA(e,t,n)}function VA(e,t,n){let r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;a||=(i=!1,t.edge(r,n)),o=a.weight;let s=t.nodeEdges(n);return s&&s.forEach(a=>{let s=a.v===n,c=s?a.w:a.v;if(c!==r){let r=s===i,l=t.edge(a).weight;if(o+=r?l:-l,JA(e,n,c)){let t=e.edge(n,c).cutvalue;o+=r?-t:t}}}),o}function HA(e,t){arguments.length<2&&(t=e.nodes()[0]),UA(e,{},1,t)}function UA(e,t,n,r,i){let a=n,o=e.node(r);t[r]=!0;let s=e.neighbors(r);return s&&s.forEach(i=>{Object.hasOwn(t,i)||(n=UA(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function WA(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function GA(e,t,n){let r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);let a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),t.edges().filter(t=>c===YA(e,e.node(t.v),s)&&c!==YA(e,e.node(t.w),s)).reduce((e,n)=>kA(t,n)<kA(t,e)?n:e)}function KA(e,t,n,r){let i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),HA(e),zA(e,t),qA(e,t)}function qA(e,t){let n=e.nodes().find(t=>!e.node(t).parent);if(!n)return;let r=FA(e,[n]);r=r.slice(1),r.forEach(n=>{let r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function JA(e,t,n){return e.hasEdge(t,n)}function YA(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var XA=ZA;function ZA(e){let t=e.graph().ranker;if(typeof t==`function`)return t(e);switch(t){case`network-simplex`:ej(e);break;case`tight-tree`:$A(e);break;case`longest-path`:QA(e);break;case`none`:break;default:ej(e)}}var QA=OA;function $A(e){OA(e),AA(e)}function ej(e){LA(e)}var tj=nj;function nj(e){let t=ij(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=rj(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;for(;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(o[c+1]).minRank<=r.rank;)c++;l=o[c]}l!==void 0&&e.setParent(n,l),n=e.successors(n)[0]}})}function rj(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));let l=c,u=r;for(;(u=e.parent(u))!==l;)a.push(u);return{path:i.concat(a.reverse()),lca:l}}function ij(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children(sA).forEach(r),t}function aj(e){let t=Bk(e,`root`,{},`_root`),n=sj(e),r=Object.values(n),i=Xk(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=a);let o=cj(e)+1;e.children(sA).forEach(r=>{oj(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function oj(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=qk(e,`_bt`),l=qk(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{oj(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-(a[o]??0)+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+(a[o]??0)})}function sj(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children(sA).forEach(e=>n(e,1)),t}function cj(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function lj(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}var uj=dj;function dj(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),i&&Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)fj(e,`borderLeft`,`_bl`,n,i,t),fj(e,`borderRight`,`_br`,n,i,t)}}e.children(sA).forEach(t)}function fj(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=Bk(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function pj(e){let t=e.graph().rankdir?.toLowerCase();(t===`lr`||t===`rl`)&&hj(e)}function mj(e){let t=e.graph().rankdir?.toLowerCase();(t===`bt`||t===`rl`)&&_j(e),(t===`lr`||t===`rl`)&&(yj(e),hj(e))}function hj(e){e.nodes().forEach(t=>gj(e.node(t))),e.edges().forEach(t=>gj(e.edge(t)))}function gj(e){let t=e.width;e.width=e.height,e.height=t}function _j(e){e.nodes().forEach(t=>vj(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(vj),Object.hasOwn(r,`y`)&&vj(r)})}function vj(e){e.y=-e.y}function yj(e){e.nodes().forEach(t=>bj(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(bj),Object.hasOwn(r,`x`)&&bj(r)})}function bj(e){let t=e.x;e.x=e.y,e.y=t}function xj(e,t=null){let n={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=rA(Xk(Math.max,i)+1).map(()=>[]);function o(t){if(n[t])return;n[t]=!0;let r=e.node(t);a[r.rank].push(t);let i=e.successors(t);i&&[...i].sort((e,t)=>s(e,t)).forEach(o)}r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(o);function s(n,r){return cA(t,e.node(n),e.node(r))}return a}function Sj(e,t){let n=0;for(let r=1;r<t.length;++r)n+=Cj(e,t[r-1],t[r]);return n}function Cj(e,t,n){let r=oA(n,n.map((e,t)=>t)),i=t.flatMap(t=>{let n=e.outEdges(t);return n?n.map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos):[]}),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function wj(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n||!n.length)return{v:t};{let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}})}function Tj(e,t){let n={};return e.forEach((e,t)=>{let r={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight),n[e.v]=r}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),Ej(Object.values(n).filter(e=>!e.indegree))}function Ej(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&Dj(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>iA(e,[`vs`,`i`,`barycenter`,`weight`]))}function Dj(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Oj(e,t,n,r,i){let a={},o=null,s=null,c=i;typeof t==`boolean`?(c=t,a={}):t&&(a=t,o=n??null,s=r??null);let l=Qk(e,e=>Object.hasOwn(e,`barycenter`)),u=l.lhs,d=l.rhs.sort((e,t)=>t.i-e.i),f=[],p=0,m=0,h=0;u.sort(Aj(s,o,!!c));for(let[e,t]of Object.entries(a)){let n=u.findIndex(t=>t.vs[0]===e);u.splice(n+1,0,t)}h=kj(f,d,h),u.forEach(e=>{h+=e.vs.length,f.push(e.vs),p+=e.barycenter*e.weight,m+=e.weight,h=kj(f,d,h)});let g={vs:f.flat(1)};return m&&(g.barycenter=p/m,g.weight=m),g}function kj(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Aj(e,t,n){return(r,i)=>{if(r.barycenter<i.barycenter)return-1;if(r.barycenter>i.barycenter)return 1;if(e&&(typeof r.vs[0]==`string`||typeof i.vs[0]==`string`)){let n=cA(t,e.node(r.vs[0]),e.node(i.vs[0]));if(n!==0)return n}return n?i.i-r.i:r.i-i.i}}function jj(e,t,n,r,i){var a,o;let s=null,c=i;typeof r==`boolean`?(c=r,s=null):r!==void 0&&(s=r);let l=e.children(t),u=e.node(t),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};d&&(l=l.filter(e=>e!==d&&e!==f));let m=wj(e,l);m.forEach(t=>{if(e.children(t.v).length){let{result:r}=jj(e,t.v,n,s,c);p[t.v]=r,Object.hasOwn(r,`barycenter`)&&Nj(t,r)}});let h=Tj(m,n);Mj(h,p);let g={},_=!1;for(let t=0;t<h.length;t++)for(let n=t+1;n<h.length;n++)if(h[t]&&h[n]&&(a=h[t])!=null&&a.barycenter&&(o=h[n])!=null&&o.barycenter&&h[t]?.barycenter===h[n].barycenter){let r=h[t]?.vs[0]??``,i=h[n]?.vs[0]??``,a=e.node(r),o=e.node(i);if(a.dummy===`edge`&&o.dummy===`edge`&&a.edgeObj?.v===o.edgeObj?.v&&a.edgeObj?.w===o.edgeObj?.w){if(a.edgeLabel.reversed){g[i]=h[t],h.splice(t,1),t--;break}g[r]=h[n],h.splice(n,1),n--}else _=!0}let v=Oj(h,g,s,e,c);if(d&&f){v.vs=[d,v.vs,f].flat(1);let t=e.predecessors(d);if(t&&t.length){let n=e.node(t[0]),r=e.predecessors(f),i=e.node(r[0]);Object.hasOwn(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+n.order+i.order)/(v.weight+2),v.weight+=2}}return Object.defineProperty(v,"result",{value:v,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(v,"usedBias",{value:_,enumerable:!1,configurable:!0,writable:!0}),v}function Mj(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function Nj(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function Pj(e,t,n,r){r||=e.nodes();let i=Fj(e),a=new zk({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);if(o.rank===t||o.minRank<=t&&t<=o.maxRank){a.setNode(r),a.setParent(r,s||i);let c=e[n](r);c&&c.forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i===void 0?0:i.weight;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]})}}),a}function Fj(e){let t;for(;e.hasNode(t=nA(`_root`)););return t}function Ij(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function Lj(e,t={},n=null){if(typeof t.customOrder==`function`){t.customOrder(e,Lj);return}let r=Zk(e),i=Rj(e,rA(1,r+1),`inEdges`),a=Rj(e,rA(r-1,-1,-1),`outEdges`),o=xj(e,n);if(Bj(e,o),t.disableOptimalOrderHeuristic)return;let s=1/0,c,l=t.constraints||[];for(let t=0,r=0;r<4;++t,++r){zj(t%2?i:a,t%4>=2,l,n),o=Wk(e);let u=Sj(e,o);u<s?(r=0,c=Object.assign({},o),s=u):u===s&&(c=structuredClone(o))}Bj(e,c)}function Rj(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return Pj(e,t,n,r.get(t)||[])})}function zj(e,t,n,r){let i=!0,a=new zk;e.forEach(function(e){n.forEach(e=>a.setEdge(e.left,e.right));let o=e.graph().root,{result:s,usedBias:c}=jj(e,o,a,r,i);t&&c&&(i=!i),s.vs.forEach((t,n)=>e.node(t).order=n),Ij(e,a,s.vs)})}function Bj(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}function Vj(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=Uj(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{let r=e.predecessors(t);r&&r.forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&Wj(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function Hj(e,t){let n={};function r(t,r,i,a,o){rA(r,i).forEach(r=>{let i=t[r];if(i!==void 0&&e.node(i).dummy){let t=e.predecessors(i);t&&t.forEach(t=>{if(t===void 0)return;let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&Wj(n,t,i)})}})}function i(t,n){let i=-1,a=-1,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);if(t&&t.length){let s=t[0];if(s===void 0)return;a=e.node(s).order,r(n,o,c,i,a),o=c,i=a}}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function Uj(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(t=>e.node(t).dummy)}}function Wj(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function Gj(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];return r!==void 0&&Object.hasOwn(r,n)}function Kj(e,t,n,r,i){let a={},o={},s={};return t.forEach(e=>{e.forEach((e,t)=>{a[e]=e,o[e]=e,s[e]=t})}),t.forEach(t=>{let c=-1,l=-1,u=!1,d=t,f=t.findIndex(t=>i?.includes(t)||tM(t,e,i));f>0&&(d=[t[f],...t.slice(0,f),...t.slice(f+1)],u=!0),d.forEach(t=>{let d=r(t);if(d&&d.length){i!=null&&i.includes(t)&&(d=d.filter(t=>tM(t,e,i)));let r=d.sort((e,t)=>{let n=s[e],r=s[t];return(n===void 0?0:n)-(r===void 0?0:r)}),f=(r.length-1)/2;for(let e=Math.floor(f),i=Math.ceil(f);e<=i;++e){let i=r[e];if(i===void 0)continue;let d=s[i];if(d!==void 0&&o[t]===t&&c<d&&s[i]!==l&&!Gj(n,t,i)){let e=a[i];e!==void 0&&(o[i]=t,o[t]=a[t]=e,c=d,u&&=(c=-1,l=s[i]??-1,!1))}}}})}),{root:a,align:o}}function qj(e,t,n,r,i=!1){let a={},o=Jj(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){let t=o.inEdges(e);t?a[e]=t.reduce((e,t)=>{let n=a[t.v]??0,r=o.edge(t);return Math.max(e,n+(r===void 0?0:r))},0):a[e]=0}function u(t){let n=o.outEdges(t),r=1/0;n&&(r=n.reduce((e,t)=>{let n=a[t.w],r=o.edge(t);return Math.min(e,(n===void 0?0:n)-(r===void 0?0:r))},1/0));let i=e.node(t);r!==1/0&&i.borderType!==s&&(a[t]=Math.max(a[t]===void 0?0:a[t],r))}function d(e){return o.predecessors(e)||[]}function f(e){return o.successors(e)||[]}return c(l,d),c(u,f),Object.keys(r).forEach(e=>{let t=n[e];t!==void 0&&(a[e]=a[t]??0)}),a}function Jj(e,t,n,r){let i=new zk,a=e.graph(),o=$j(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(a!==void 0){if(i.setNode(a),r!==void 0){let s=n[r];if(s!==void 0){let n=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),n||0))}}r=t}})}),i}function Yj(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=eM(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function Xj(e,t){let n=Object.values(t),r=Xk(Math.min,n),i=Xk(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(!s||s===t)return;let c=Object.values(s),l=r-Xk(Math.min,c);a!==`l`&&(l=i-Xk(Math.max,c)),l&&(e[o]=aA(s,e=>e+l))})})}function Zj(e,t=void 0){let n=e.ul;return n?aA(n,(n,r)=>{if(t){let n=e[t.toLowerCase()];if(n&&n[r]!==void 0)return n[r]}let i=Object.values(e).map(e=>{let t=e[r];return t===void 0?0:t}).sort((e,t)=>e-t);return((i[1]??0)+(i[2]??0))/2}):{}}function Qj(e,t){let n=Wk(e),r=Object.assign(Vj(e,n),Hj(e,n)),i={},a;return[`u`,`d`].forEach(o=>{a=o===`u`?n:Object.values(n).reverse(),[`l`,`r`].forEach(n=>{n===`r`&&(a=a.map(e=>Object.values(e).reverse()));let s=Kj(e,a,r,t=>(o===`u`?e.predecessors(t):e.successors(t))||[],t),c=qj(e,a,s.root,s.align,n===`r`);n===`r`&&(c=aA(c,e=>-e)),i[o+n]=c})}),Xj(i,Yj(e,i)),Zj(i,e.graph().align)}function $j(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=void 0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),c}}function eM(e,t){return e.node(t).width}function tM(e,t,n){if(!n)return!1;let r=t.node(e)?.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),a=n.indexOf(r?.w);return i!==-1&&a!==-1&&i===(a+1)%n.length||i===(a-1)%n.length}function nM(e,t){e=Hk(e),rM(e),Object.entries(Qj(e,t)).forEach(([t,n])=>e.node(t).x=n)}function rM(e){let t=Wk(e),n=e.graph(),r=n.ranksep,i=n.rankalign,a=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height??0;return t>r?t:r},0);t.forEach(t=>{let r=e.node(t);r.y=i===`top`?a+r.height/2:i===`bottom`?a+n-r.height/2:a+n/2}),a+=n+r})}var iM=new WeakMap;function aM(e,t={}){return sM(e,eA,t),e}function oM(e,t,n){let r=t;for(;r!==void 0;){let t=e.parent(r);if(t===n)return r;r=t}}function sM(e,t,n){let r=e.nodes().filter(t=>e.children(t).length),i={};r.forEach(r=>{let a=e.node(r);if(a&&a.rankdir){let o=new zk({multigraph:!0,compound:!0});o.setGraph({rankdir:a.rankdir});let s=e.children(r);s.forEach(t=>{let n={...e.node(t)};o.setNode(t,n);let i=e.parent(t);i&&i!==r&&s.includes(i)&&o.setParent(t,i)});let c=new Set;e.edges().forEach(t=>{let n=oM(e,t.v,r),i=oM(e,t.w,r);if(n&&i&&n!==i){let r=`${n}\0${i}`;c.has(r)||(c.add(r),o.setEdge(n,i,{...e.edge(t)}))}}),sM(o,t,n);let l=vM(o);cM(l,t,n,null),lM(o,l);let u=1/0,d=1/0,f=-1/0,p=-1/0;o.nodes().forEach(e=>{if(e===r)return;let t=o.node(e);t&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.width==`number`&&typeof t.height==`number`&&(u=Math.min(u,t.x-t.width/2),f=Math.max(f,t.x+t.width/2),d=Math.min(d,t.y-t.height/2),p=Math.max(p,t.y+t.height/2))}),isFinite(u)&&isFinite(d)&&isFinite(f)&&isFinite(p)||(u=d=0,f=p=0);let m=f-u,h=p-d;i[r]={minX:u,minY:d,maxX:f,maxY:p,width:m,height:h,offsetX:u,offsetY:d},a._dagreClusterSubgraph=o}});let a=[],o=t=>{let n=[],r=(e.children(t)||[]).filter(e=>e!==t);for(;r.length>0;){let t=r.shift();n.push(t),(e.children(t)||[]).filter(e=>e!==t).forEach(e=>r.push(e))}return n},s=new Map;r.forEach(t=>{let n=e.node(t);n&&n.rankdir&&i[t]&&s.set(t,(e.children(t)||[]).filter(e=>e!==t))});let c=new Set([...s.values()].flat()),l=new Map;s.forEach((e,t)=>{c.has(t)||l.set(t,o(t))});let u=new Set([...l.values()].flat()),d=e=>{for(let[t,n]of l)if(n.includes(e))return t;return e},f=[];e.edges().forEach(t=>{(u.has(t.v)||u.has(t.w))&&f.push({edge:t,label:e.edge(t)})});let p=new Map;u.forEach(t=>{let n=e.parent(t);p.set(t,typeof n==`string`?n:void 0)}),l.forEach((t,n)=>{let r=e.node(n),o=[];t.forEach(t=>{let n=e.node(t);n&&(o.push({id:t,node:n,parent:p.get(t)}),e.removeNode(t))});let s=f.filter(({edge:e})=>t.includes(e.v)||t.includes(e.w)),c=i[n];r&&(a.push({clusterId:n,subgraph:r._dagreClusterSubgraph,bounds:c,children:t,removedNodes:o,removedEdges:s}),r.width=c.width,r.height=c.height)});let m=new Set;f.forEach(({edge:t,label:n})=>{let r=d(t.v),i=d(t.w);if(r!==i&&e.hasNode(r)&&e.hasNode(i)){let t=`${r}\0${i}`;m.has(t)||(m.add(t),e.setEdge(r,i,{...n,width:0,height:0}))}});let h=vM(e),g=cM(h,t,n,iM.get(e)??null);iM.set(e,g),lM(e,h),m.forEach(t=>{let n=t.indexOf(`\0`),r=t.slice(0,n),i=t.slice(n+1);e.hasEdge(r,i)&&e.removeEdge(r,i)}),a.forEach(({clusterId:t,subgraph:n,bounds:r,removedNodes:i,removedEdges:a})=>{let o=e.node(t),s=o?.x??0,c=o?.y??0,l=(r.minX+r.maxX)/2,u=(r.minY+r.maxY)/2;i.forEach(({id:t,node:n,parent:r})=>{e.setNode(t,n),r!==void 0&&e.setParent(t,r)}),a.forEach(({edge:t,label:n})=>{e.setEdge(t,n)}),n.nodes().forEach(r=>{if(r===t)return;let i=n.node(r),a=e.node(r);a&&i&&typeof i.x==`number`&&typeof i.y==`number`&&(a.x=s+(i.x-l),a.y=c+(i.y-u))}),delete o._dagreClusterSubgraph}),r.forEach(t=>{let n=e.node(t),r=i[t];if(n&&n.rankdir&&n._dagreClusterSubgraph&&r){let i=n._dagreClusterSubgraph,a=n.x??0,o=n.y??0,s=(r.minX+r.maxX)/2,c=(r.minY+r.maxY)/2;i.nodes().forEach(n=>{if(n===t)return;let r=i.node(n),l=e.node(n);if(l&&r&&typeof r.x==`number`&&typeof r.y==`number`){let e=r.x-s,t=r.y-c;l.x=a+e,l.y=o+t}}),delete n._dagreClusterSubgraph}})}function cM(e,t,n,r=null){var i,a;let o=n?.useDynamic!==!1,s=o&&(i=r?.graph)!=null?i:null,c=o&&(a=r?.rawNodes)!=null?a:null;t(` makeSpaceForEdgeLabels`,()=>yM(e)),t(` removeSelfEdges`,()=>OM(e)),t(` acyclic`,()=>xA(e,s)),t(` nestingGraph.run`,()=>aj(e)),t(` rank`,()=>XA(Hk(e))),t(` injectEdgeLabelProxies`,()=>bM(e)),t(` removeEmptyRanks`,()=>Kk(e)),t(` nestingGraph.cleanup`,()=>lj(e)),t(` normalizeRanks`,()=>Gk(e)),t(` assignRankMinMax`,()=>xM(e)),t(` removeEdgeLabelProxies`,()=>SM(e)),t(` normalize.run`,()=>TA(e)),t(` parentDummyChains`,()=>tj(e)),t(` addBorderSegments`,()=>uj(e)),t(` order`,()=>Lj(e,n,c)),t(` insertSelfEdges`,()=>kM(e)),t(` adjustCoordinateSystem`,()=>pj(e)),t(` position`,()=>nM(e,n.corePath)),t(` positionSelfEdges`,()=>AM(e));let l=JSON.parse(JSON.stringify(e._nodes));return t(` removeBorderNodes`,()=>DM(e)),t(` normalize.undo`,()=>DA(e)),t(` fixupEdgeLabelCoords`,()=>TM(e)),t(` undoCoordinateSystem`,()=>mj(e)),t(` translateGraph`,()=>CM(e)),t(` assignNodeIntersects`,()=>wM(e)),t(` reversePoints`,()=>EM(e)),t(` acyclic.undo`,()=>CA(e)),{graph:e,rawNodes:l}}function lM(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var uM=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],dM={ranksep:50,edgesep:20,nodesep:50,rankdir:`TB`,rankalign:`center`},fM=[`acyclicer`,`ranker`,`rankdir`,`align`,`rankalign`],pM=[`width`,`height`,`rank`],mM={width:0,height:0},hM=[`minlen`,`weight`,`width`,`height`,`labeloffset`],gM={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},_M=[`labelpos`];function vM(e){let t=new zk({multigraph:!0,compound:!0}),n=MM(e.graph());return t.setGraph(Object.assign({},dM,jM(n,uM),iA(n,fM))),e.nodes().forEach(n=>{let r=jM(MM(e.node(n)),pM);Object.keys(mM).forEach(e=>{r[e]===void 0&&(r[e]=mM[e])}),t.setNode(n,r);let i=e.parent(n);i!==void 0&&t.setParent(n,i)}),e.edges().forEach(n=>{let r=MM(e.edge(n));t.setEdge(n,Object.assign({},gM,jM(r,hM),iA(r,_M)))}),t}function yM(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,(r.labelpos??`r`).toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function bM(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);Bk(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function xM(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function SM(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`edge-proxy`){let r=n;e.edge(r.e).labelRank=n.rank,e.removeNode(t)}})}function CM(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function wM(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(Uk(r,a)),n.points.push(Uk(i,o))})}function TM(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function EM(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function DM(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function OM(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function kM(e){Wk(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);typeof i.rank!=`number`&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(t=>{Bk(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,edgeLabel:t.label},`_se`),Array.isArray(t.label.points)&&t.label.points.length===7||(t.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function AM(e){e.nodes().forEach(t=>{let n=e.node(t),r=e=>typeof e==`number`&&isFinite(e);if(n.dummy===`selfedge`){let i=n,a=e.node(i.e.v),o=r(a?.x)?a.x:0,s=r(a?.y)?a.y:0,c=r(a?.width)?a.width:0,l=r(a?.height)?a.height:0,u=r(n.x)?n.x:o,d=r(n.y)?n.y:s,f=c/2,p=l/2;i.edgeLabel.points=[{x:u+f,y:d-p},{x:u+f,y:d-p},{x:u,y:d},{x:u-f,y:d+p},{x:u-f,y:d+p},{x:u,y:d},{x:u,y:d}],i.edgeLabel.x=u,i.edgeLabel.y=d,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(e=>{if(!Array.isArray(e.label.points)||e.label.points.length!==7){let t=r(n.x)?n.x:0,i=r(n.y)?n.y:0,a=r(n.width)?n.width:0,o=r(n.height)?n.height:0,s=a/2,c=o/2;e.label.points=[{x:t+s,y:i-c},{x:t+s,y:i-c},{x:t,y:i},{x:t-s,y:i+c},{x:t-s,y:i+c},{x:t,y:i},{x:t,y:i}]}})})}function jM(e,t){return aA(iA(e,t),Number)}function MM(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}function NM(e){let t=Wk(e),n=new zk({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{n.setNode(t,{label:t}),n.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>n.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let r=`layer`+t;n.setNode(r,{rank:`same`}),e.reduce((e,t)=>(n.setEdge(e,t,{style:`invis`}),t))}),n}var PM={graphlib:ek,version:lA,layout:aM,debug:NM,util:{time:$k,notime:eA}},FM=32,IM=44,LM=48,RM=40,zM=24;function BM(e){if(e.measured?.width&&e.measured?.height)return{width:e.measured.width,height:e.measured.height};if(e.width&&e.height)return{width:e.width,height:e.height};let t=!!e.data.image,n=e.data.detail?Math.min(3,Math.ceil(e.data.detail.length/38)):0;switch(e.type){case`actor`:return{width:160,height:72};case`activity`:return{width:240,height:64};case`note`:return{width:240,height:140};case`image`:return{width:300,height:230};case`lane`:return{width:Number(e.style?.width??600),height:Number(e.style?.height??300)};default:return{width:250,height:74+n*18+(t?150:0)+(e.data.files?.length?24:0)}}}var VM=e=>`lane:${e.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`;function HM(e,t,n){let r=new PM.graphlib.Graph;r.setGraph({rankdir:n,nodesep:36,ranksep:70,marginx:0,marginy:0}),r.setDefaultEdgeLabel(()=>({}));let i=new Set(e.map(e=>e.id));for(let t of e)r.setNode(t.id,BM(t));for(let e of t)i.has(e.source)&&i.has(e.target)&&e.source!==e.target&&r.setEdge(e.source,e.target);return PM.layout(r),new Map(e.map(e=>{let t=r.node(e.id),{width:n,height:i}=BM(e);return[e.id,{x:t.x-n/2,y:t.y-i/2}]}))}function UM(e){let t=e.nodes.filter(e=>e.type!==`lane`),n=e.direction??`LR`,r=[],i=new Map;for(let e of t){let t=e.data.lane??``;i.has(t)||(i.set(t,[]),r.push(t)),i.get(t).push(e)}if(r.length===1&&r[0]===``){let r=HM(t,e.edges,n);return t.map(e=>({...e,parentId:void 0,position:r.get(e.id)}))}let a=[],o=[],s=n===`LR`&&r.length>6?Math.ceil(r.length/6):1,c=Math.ceil(r.length/s),l=0,u=0,d=0;return r.forEach((t,r)=>{r>0&&r%c===0&&(l+=u+96,u=0,d=0);let s=i.get(t),f=HM(s,e.edges,n),p=s.map(e=>f.get(e.id).x),m=s.map(e=>f.get(e.id).y),h=Math.min(...p),g=Math.min(...m),_=Math.max(...s.map(e=>f.get(e.id).x+BM(e).width)),v=Math.max(...s.map(e=>f.get(e.id).y+BM(e).height)),y=_-h+64,b=v-g+FM+IM,x=VM(t||`otros`);a.push({id:x,type:`lane`,position:n===`LR`?{x:l,y:d}:{x:d,y:0},data:{label:t||`Otros`},style:{width:y,height:b},width:y,height:b,zIndex:-1});for(let e of s){let t=f.get(e.id);o.push({...e,parentId:x,position:{x:t.x-h+FM,y:t.y-g+IM}})}u=Math.max(u,y),d+=(n===`LR`?b:y)+LM}),[...a,...o]}function WM(e){let t=e.nodes.filter(e=>e.type!==`lane`),n=t.filter(e=>e.type===`actor`),r=t.filter(e=>e.type===`activity`),i=new Set(r.map(e=>e.id)),a=t.filter(e=>e.type!==`actor`&&e.type!==`activity`&&e.data.activity&&i.has(e.data.activity)),o=t.filter(e=>!n.includes(e)&&!r.includes(e)&&!a.includes(e)),s=[],c=n.length?220:0,l=0;for(let e of n)s.push({...e,parentId:void 0,position:{x:0,y:l}}),l+=BM(e).height+zM;let u=l;r.forEach((e,t)=>{let n=c+t*300;s.push({...e,parentId:void 0,position:{x:n,y:0}});let r=BM(e).height+48;for(let t of a.filter(t=>t.data.activity===e.id))s.push({...t,parentId:void 0,position:{x:n,y:r}}),r+=BM(t).height+zM;u=Math.max(u,r)});let d=c;for(let e of o)s.push({...e,parentId:void 0,position:{x:d,y:u+LM}}),d+=BM(e).width+RM;return s}function GM(e){return e.layout===`storymap`?WM(e):UM(e)}function KM(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function qM(e){let t=e.nodes.map(e=>({...e})),n=new Map(t.map(e=>[e.id,e])),r=()=>t.filter(e=>e.position),i=e=>({...e.position,...BM(e)}),a=e=>r().filter(t=>t.parentId===e&&t.type!==`lane`),o=(e,t,n)=>{let r=BM(t),o={...e},s=a(n).map(i);for(;s.some(e=>KM({...o,...r},e));)o.y+=r.height+zM;return o},s=()=>Math.max(0,...r().filter(e=>!e.parentId).map(e=>e.position.y+BM(e).height)),c=e=>t.find(t=>t.type===`lane`&&(t.data.label===e||t.id===VM(e))),l=new Map;for(let e of t)e.position||e.type===`lane`||!e.data.lane||c(e.data.lane)||l.set(e.data.lane,[...l.get(e.data.lane)??[],e]);for(let[r,i]of l){let a=HM(i,e.edges,e.direction??`LR`),o=Math.min(...i.map(e=>a.get(e.id).x)),c=Math.min(...i.map(e=>a.get(e.id).y)),l=Math.max(...i.map(e=>a.get(e.id).x+BM(e).width)),u=Math.max(...i.map(e=>a.get(e.id).y+BM(e).height)),d=l-o+64,f=u-c+FM+IM,p=VM(r);for(;n.has(p);)p=`${p}-2`;let m={id:p,type:`lane`,position:{x:0,y:s()+LM},data:{label:r},style:{width:d,height:f},width:d,height:f,zIndex:-1};t.push(m),n.set(p,m);for(let e of i){let t=a.get(e.id);e.parentId=p,e.position={x:t.x-o+FM,y:t.y-c+IM}}}for(let i of t){if(i.position||i.type===`lane`)continue;if(e.layout===`storymap`){if(i.type===`activity`){let e=r().filter(e=>e.type===`activity`);i.position={x:Math.max(-40,...e.map(e=>e.position.x+BM(e).width))+RM,y:0};continue}let e=i.data.activity?n.get(i.data.activity):void 0;if(e?.position){let t=r().filter(t=>t.data.activity===e.id&&t.position.x===e.position.x),n=Math.max(e.position.y+BM(e).height+zM,...t.map(e=>e.position.y+BM(e).height+zM));i.position={x:e.position.x,y:n};continue}}let t=i.data.lane?c(i.data.lane):void 0,l=e.edges.map(e=>e.target===i.id?n.get(e.source):void 0).find(e=>e?.position);if(l&&l.parentId===(t?.id??l.parentId))i.parentId=l.parentId,i.position=o({x:l.position.x+BM(l).width+70,y:l.position.y},i,l.parentId);else if(t){let e=a(t.id),n=Math.max(-38,...e.map(e=>e.position.x+BM(e).width));i.parentId=t.id,i.position=o({x:n+70,y:IM},i,t.id)}else i.parentId=void 0,i.position={x:0,y:s()+LM}}for(let e of t.filter(e=>e.type===`lane`)){let n=t.filter(t=>t.parentId===e.id&&t.position);if(!n.length)continue;let r=Math.max(Number(e.style?.width??0),...n.map(e=>e.position.x+BM(e).width+FM)),i=Math.max(Number(e.style?.height??0),...n.map(e=>e.position.y+BM(e).height+FM));e.style={...e.style,width:r,height:i},e.width=r,e.height=i}return t}var JM={note:{width:240,height:140},image:{width:300,height:230}};function YM(e){let t=new Map(e.nodes.filter(e=>e.type===`lane`&&!e.position).map(e=>[e.id,String(e.data.label??``)])),n=new Set(e.nodes.filter(e=>!t.has(e.id)).map(e=>e.id)),r=t.size>0,i=e.nodes.filter(e=>!t.has(e.id)).map(e=>{let i=e.parentId&&!n.has(e.parentId)?{...e,parentId:void 0,position:void 0,data:{...e.data,lane:e.data.lane??t.get(e.parentId)}}:e,a=JM[i.type??``];return!a||i.width&&i.height?i:(r=!0,{...i,...a})}),a=XM(i);return a&&(i.splice(0,i.length,...a),r=!0),i.filter(e=>!e.position).length?{nodes:ZM(i.some(e=>e.position&&e.type!==`lane`)?qM({...e,nodes:i}):GM({...e,nodes:i})),changed:!0}:{nodes:ZM(i),changed:r}}function XM(e){let t=e.filter(e=>e.type===`lane`),n=new Map;for(let r of e)r.type!==`lane`&&!r.parentId&&r.position&&r.data.lane&&(t.some(e=>e.data.label===r.data.lane||e.id===VM(r.data.lane))||n.set(r.data.lane,[...n.get(r.data.lane)??[],r]));if(!n.size)return null;let r=e.map(e=>({...e}));for(let[e,t]of n){let n=Math.min(...t.map(e=>e.position.x)),i=Math.min(...t.map(e=>e.position.y)),a=Math.max(...t.map(e=>e.position.x+BM(e).width)),o=Math.max(...t.map(e=>e.position.y+BM(e).height)),s=a-n+64,c=o-i+FM+IM,l=VM(e);for(;r.some(e=>e.id===l);)l=`${l}-2`;r.push({id:l,type:`lane`,position:{x:n-FM,y:i-IM},data:{label:e},style:{width:s,height:c},width:s,height:c,zIndex:-1});for(let e of t){let t=r.find(t=>t.id===e.id);t.parentId=l,t.position={x:e.position.x-n+FM,y:e.position.y-i+IM}}}return r}function ZM(e){return[...e].sort((e,t)=>Number(t.type===`lane`)-Number(e.type===`lane`))}var QM={new:{label:`Nuevo`,color:`#16a34a`},changed:{label:`Modificado`,color:`#d97706`},same:{label:`Sin cambios`,color:`#94a3b8`},removed:{label:`Eliminado`,color:`#dc2626`},risk:{label:`Riesgo`,color:`#9333ea`}},$M={pass:{label:`Pasó`,icon:`✓`,color:`#16a34a`},fail:{label:`Falló`,icon:`✕`,color:`#dc2626`},todo:{label:`Sin probar`,icon:`○`,color:`#64748b`},skip:{label:`Omitido`,icon:`–`,color:`#94a3b8`}},eN={storymap:{label:`Story map`,icon:`🗺️`},flow:{label:`Flujo`,icon:`🔀`},tests:{label:`Testeo`,icon:`🧪`},tech:{label:`Mapa técnico`,icon:`🧩`},ui:{label:`UI`,icon:`🖼️`},free:{label:`Libre`,icon:`✏️`}},tN=(0,v.createContext)({taskId:``,direction:`LR`,openImage:()=>{}});function nN(){let{direction:e}=(0,v.useContext)(tN),t=e===`LR`;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(fm,{type:`target`,position:t?W.Left:W.Top}),(0,B.jsx)(fm,{type:`source`,position:t?W.Right:W.Bottom})]})}function rN({status:e}){if(!e)return null;let t=QM[e];return(0,B.jsx)(`span`,{className:`chip`,style:{background:`${t.color}1f`,color:t.color},children:t.label})}function iN({test:e}){if(!e)return null;let t=$M[e];return(0,B.jsxs)(`span`,{className:`test-badge`,style:{background:t.color},title:t.label,children:[t.icon,` `,t.label]})}var aN={card:(0,v.memo)(({data:e,selected:t})=>{let{taskId:n,openImage:r}=(0,v.useContext)(tN),i=e.color??(e.status?QM[e.status].color:`transparent`);return(0,B.jsxs)(`div`,{className:`node card ${t?`selected`:``} ${e.status===`removed`?`removed`:``}`,style:{"--accent-color":i},children:[(0,B.jsx)(nN,{}),(e.status||e.repo||e.test)&&(0,B.jsxs)(`div`,{className:`card-meta`,children:[(0,B.jsx)(rN,{status:e.status}),e.repo&&(0,B.jsx)(`span`,{className:`chip repo`,children:e.repo}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(iN,{test:e.test})]}),(0,B.jsx)(`div`,{className:`card-label`,children:e.label}),e.detail&&(0,B.jsx)(`div`,{className:`card-detail`,children:e.detail}),e.image&&(0,B.jsx)(`img`,{className:`card-image nodrag`,src:Yn(n,e.image),alt:e.label,onDoubleClick:()=>r(Yn(n,e.image))}),!!e.files?.length&&(0,B.jsx)(`div`,{className:`card-files`,title:e.files.join(`
|
|
49
|
+
`),children:e.files.length===1?e.files[0].split(`/`).pop():`${e.files.length} archivos`})]})}),actor:(0,v.memo)(({data:e,selected:t})=>(0,B.jsxs)(`div`,{className:`node actor ${t?`selected`:``}`,children:[(0,B.jsx)(nN,{}),(0,B.jsx)(`span`,{className:`actor-icon`,children:(0,B.jsx)(Mn,{size:14})}),(0,B.jsx)(`span`,{children:e.label})]})),activity:(0,v.memo)(({data:e,selected:t})=>(0,B.jsxs)(`div`,{className:`node activity ${t?`selected`:``}`,children:[(0,B.jsx)(nN,{}),(0,B.jsx)(`div`,{className:`activity-label`,children:e.label}),e.status&&e.status!==`same`&&(0,B.jsx)(`div`,{className:`activity-dot`,style:{background:QM[e.status].color}})]})),note:(0,v.memo)(({data:e,selected:t})=>(0,B.jsxs)(`div`,{className:`node note ${t?`selected`:``}`,style:e.color?{background:e.color}:void 0,children:[(0,B.jsx)(jg,{isVisible:t,minWidth:160,minHeight:80}),(0,B.jsx)(nN,{}),(0,B.jsx)(`div`,{className:`note-label`,children:e.label}),e.detail&&(0,B.jsx)(`div`,{className:`note-detail`,children:e.detail})]})),image:(0,v.memo)(({data:e,selected:t})=>{let{taskId:n,openImage:r}=(0,v.useContext)(tN),i=e.image?Yn(n,e.image):void 0;return(0,B.jsxs)(`div`,{className:`node image-node ${t?`selected`:``}`,children:[(0,B.jsx)(jg,{isVisible:t,minWidth:160,minHeight:120,keepAspectRatio:!0}),(0,B.jsx)(nN,{}),i?(0,B.jsx)(`img`,{src:i,alt:e.label,onDoubleClick:()=>r(i),draggable:!1}):(0,B.jsx)(`div`,{className:`image-empty`,children:`Sin imagen`}),(0,B.jsxs)(`div`,{className:`image-caption`,children:[(0,B.jsx)(iN,{test:e.test}),` `,e.label]})]})}),lane:(0,v.memo)(({data:e,selected:t})=>(0,B.jsxs)(`div`,{className:`lane ${t?`selected`:``}`,style:e.color?{background:`${e.color}14`,borderColor:`${e.color}55`}:void 0,children:[(0,B.jsx)(jg,{isVisible:t,minWidth:200,minHeight:120}),(0,B.jsx)(`div`,{className:`lane-label`,children:e.label})]}))},oN={card:`Tarjeta`,actor:`Actor`,activity:`Actividad`,note:`Nota`,image:`Imagen`,lane:`Carril`};function sN(e,t,n,r){return[n,``,`---`,`Contexto: estás editando el board \`${t}\` de la tarea ${e.id} ("${e.title}") en Mono, el workspace de Facundo, que el usuario está mirando en vivo.`,`- Leelo con \`ws get ${e.id} ${t}\`.`,`- Aplicá el pedido escribiendo un JSON con los nodos nuevos o cambiados y cargalo con \`ws board ${e.id} ${t} <archivo> --patch\` (reusá ids existentes; el canvas se actualiza solo).`,`- Para borrar nodos, mandá el board completo sin --patch (los nodos creados o editados a mano se conservan igual).`,"- Usá el formato del skill workspace (labels cortos, status, test, etc.). Para ubicar un nodo en un carril poné su nombre en `lane`; no crees nodos de tipo lane ni pongas parentId o position (el layout lo maneja la app). No toques repos.",r.length?`- Nodos seleccionados por el usuario: ${r.map(e=>`\`${e.id}\` ("${e.label}")`).join(`, `)}.`:null,`- Terminá con una sola línea diciendo qué cambiaste.`].filter(e=>e!==null).join(`
|
|
50
|
+
`)}function cN({task:e,boardId:t,selected:n}){let r=`ws-canvas-session:${e.id}/${t}`,[i,a]=(0,v.useState)(()=>localStorage.getItem(r)),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(null),{stored:f}=wr(),p=(0,v.useRef)(null);(0,v.useEffect)(()=>{i?localStorage.setItem(r,i):localStorage.removeItem(r)},[i,r]);let m=async()=>{let r=o.trim();if(r&&!c){l(!0),d(null);try{let o=sN(e,t,r,n);if(i)await _r.send(i,o,f);else{let t=await _r.start({taskId:e.id,prompt:o,...f});a(t.sessionId)}s(``)}catch(e){d(e.message)}finally{l(!1),p.current?.focus()}}};return(0,B.jsxs)(`div`,{className:`canvas-assistant`,onDoubleClick:e=>e.stopPropagation(),children:[i&&(0,B.jsx)(lN,{sessionId:i,taskId:e.id,boardId:t,onReset:()=>a(null)}),u&&(0,B.jsx)(`div`,{className:`canvas-assistant-error`,children:u}),(0,B.jsxs)(`div`,{className:`canvas-assistant-bar`,children:[(0,B.jsx)(cn,{size:15,className:`canvas-assistant-icon`}),n.length>0&&(0,B.jsxs)(`span`,{className:`canvas-assistant-chip`,title:n.map(e=>e.label).join(`
|
|
51
|
+
`),children:[(0,B.jsx)(Rt,{size:11}),` `,n.length===1?n[0].label.slice(0,24):`${n.length} nodos`]}),(0,B.jsx)(`input`,{ref:p,value:o,placeholder:n.length?`¿Qué hacemos con lo seleccionado?`:`Pedile algo a este canvas… ej: agregá un carril con los casos de error`,onChange:e=>s(e.target.value),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`&&!e.nativeEvent.isComposing&&m()}}),(0,B.jsx)(`button`,{className:`composer-send`,onClick:m,disabled:!o.trim()||c,title:`Enviar (Enter)`,children:c?(0,B.jsx)(vt,{size:14,className:`spin`}):(0,B.jsx)(ie,{size:15})})]})]})}function lN({sessionId:e,taskId:t,boardId:n,onReset:r}){let[i,a]=(0,v.useState)(null),o=async()=>{try{let{remaining:e}=await Jn.undoBoard(t,n);a(e?`Deshecho · quedan ${e} versiones`:`Deshecho`)}catch(e){a(e.message)}},[s]=vr(e),c=Ar(e),l=s?.live?s.state!==`idle`:!1,u=(0,v.useMemo)(()=>[...c.events].reverse().find(e=>e.kind===`tool`),[c.events]),d=(0,v.useMemo)(()=>[...c.events].reverse().find(e=>e.kind===`text`),[c.events]);return(0,B.jsxs)(`div`,{className:`canvas-assistant-status`,children:[l?(0,B.jsx)(vt,{size:13,className:`spin`}):(0,B.jsx)(cn,{size:13,className:`done`}),(0,B.jsx)(`span`,{className:`canvas-assistant-msg`,children:i??(l?u?.title||`Pensando…`:d?.text?.split(`
|
|
52
|
+
`).filter(Boolean).pop()??`Listo`)}),l&&(0,B.jsx)(`button`,{className:`icon-btn tiny`,onClick:()=>void _r.interrupt(e),title:`Interrumpir`,children:(0,B.jsx)(mn,{size:10,fill:`currentColor`})}),!l&&(0,B.jsx)(`button`,{className:`icon-btn tiny`,onClick:o,title:`Deshacer el último cambio de la IA en este board`,children:(0,B.jsx)(On,{size:12})}),(0,B.jsx)(`a`,{className:`icon-btn tiny`,href:V.session(e),title:`Ver la sesión completa`,children:(0,B.jsx)(Me,{size:12})}),(0,B.jsx)(`button`,{className:`icon-btn tiny`,onClick:r,title:`Empezar una conversación nueva`,children:(0,B.jsx)(Yt,{size:12})})]})}var uN=[``,`#fef3c7`,`#dcfce7`,`#dbeafe`,`#fce7f3`,`#ede9fe`,`#fee2e2`,`#e2e8f0`],dN=`__none`;function fN({label:e,children:t}){return(0,B.jsxs)(`div`,{className:`prop`,children:[(0,B.jsx)(`span`,{className:`prop-label`,children:e}),t]})}var pN=e=>(0,B.jsx)(`i`,{className:`dot`,style:{background:e}});function mN({task:e,node:t,edge:n,onNodeChange:r,onEdgeChange:i,onDelete:a}){if(t){let n=t.data,i=e=>r(t.id,e),o=t.type===`lane`;return(0,B.jsxs)(`aside`,{className:`inspector`,children:[(0,B.jsxs)(`div`,{className:`inspector-head`,children:[(0,B.jsx)(Rr,{value:t.type,options:Object.entries(oN).map(([e,t])=>({value:e,label:t})),onChange:e=>r(t.id,{},{type:e}),className:`chip-trigger`,children:oN[t.type??`card`]}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(`button`,{className:`icon-btn danger`,onClick:a,title:`Borrar (Backspace)`,children:(0,B.jsx)(wn,{size:14})})]}),(0,B.jsx)(`textarea`,{className:`inspector-title`,rows:2,value:n.label??``,placeholder:`Título`,onChange:e=>i({label:e.target.value}),autoFocus:!0}),(0,B.jsx)(`textarea`,{className:`inspector-detail`,rows:4,value:n.detail??``,placeholder:`Agregar detalle…`,onChange:e=>i({detail:e.target.value||void 0})}),(0,B.jsxs)(`div`,{className:`prop-group`,children:[!o&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(fN,{label:`Cambio`,children:(0,B.jsx)(Rr,{value:n.status??dN,options:[{value:dN,label:`Sin estado`,icon:pN(`var(--text-4)`)},...Object.entries(QM).map(([e,t])=>({value:e,label:t.label,icon:pN(t.color)}))],onChange:e=>i({status:e===dN?void 0:e}),className:`prop-value`,children:n.status?(0,B.jsxs)(B.Fragment,{children:[pN(QM[n.status].color),` `,QM[n.status].label]}):(0,B.jsx)(`span`,{className:`muted`,children:`Sin estado`})})}),(0,B.jsx)(fN,{label:`Testeo`,children:(0,B.jsx)(Rr,{value:n.test??dN,options:[{value:dN,label:`No aplica`},...Object.entries($M).map(([e,t])=>({value:e,label:t.label,icon:(0,B.jsx)(`span`,{style:{color:t.color},children:t.icon})}))],onChange:e=>i({test:e===dN?void 0:e}),className:`prop-value`,children:n.test?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{style:{color:$M[n.test].color},children:$M[n.test].icon}),` `,$M[n.test].label]}):(0,B.jsx)(`span`,{className:`muted`,children:`No aplica`})})}),(0,B.jsxs)(fN,{label:`Repo`,children:[(0,B.jsx)(`input`,{className:`prop-input`,list:`repos`,value:n.repo??``,placeholder:`—`,onChange:e=>i({repo:e.target.value||void 0})}),(0,B.jsx)(`datalist`,{id:`repos`,children:[...new Set([`instamenu`,`instamenu-api`,`KDS`,...(e.repos??[]).map(e=>e.name)])].map(e=>(0,B.jsx)(`option`,{value:e},e))})]}),e.assets.length>0&&(0,B.jsx)(fN,{label:`Imagen`,children:(0,B.jsx)(Rr,{value:n.image??dN,options:[{value:dN,label:`Sin imagen`},...e.assets.map(e=>({value:`assets/${e}`,label:e}))],onChange:e=>i({image:e===dN?void 0:e}),className:`prop-value`,children:n.image?n.image.replace(`assets/`,``):(0,B.jsx)(`span`,{className:`muted`,children:`Sin imagen`})})})]}),(0,B.jsxs)(fN,{label:`Link`,children:[(0,B.jsx)(`input`,{className:`prop-input`,value:n.link??``,placeholder:`https://…`,onChange:e=>i({link:e.target.value||void 0})}),n.link&&(0,B.jsx)(`a`,{className:`icon-btn tiny`,href:n.link,target:`_blank`,rel:`noreferrer`,children:(0,B.jsx)(Me,{size:12})})]}),(0,B.jsx)(fN,{label:`Color`,children:(0,B.jsx)(`div`,{className:`swatches`,children:uN.map(e=>(0,B.jsx)(`button`,{className:`swatch ${(n.color??``)===e?`active`:``} ${e?``:`none`}`,style:e?{background:e}:void 0,onClick:()=>i({color:e||void 0})},e||`none`))})})]}),n.image&&(0,B.jsx)(`img`,{className:`inspector-thumb`,src:Yn(e.id,n.image),alt:``}),t.type===`card`&&(0,B.jsxs)(`div`,{className:`inspector-files`,children:[(0,B.jsx)(`span`,{className:`prop-label`,children:`Archivos`}),(0,B.jsx)(`textarea`,{rows:3,className:`mono`,placeholder:`un archivo por línea`,value:(n.files??[]).join(`
|
|
53
|
+
`),onChange:e=>i({files:e.target.value?e.target.value.split(`
|
|
54
|
+
`):void 0})})]}),n.edited&&(0,B.jsx)(`p`,{className:`hint`,children:`Editado a mano — la IA no va a pisar este nodo.`})]})}return n?(0,B.jsxs)(`aside`,{className:`inspector`,children:[(0,B.jsxs)(`div`,{className:`inspector-head`,children:[(0,B.jsx)(`span`,{className:`chip-trigger static`,children:`Conexión`}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(`button`,{className:`icon-btn danger`,onClick:a,title:`Borrar`,children:(0,B.jsx)(wn,{size:14})})]}),(0,B.jsx)(`textarea`,{className:`inspector-title`,rows:1,placeholder:`Etiqueta de la conexión`,value:String(n.label??``),onChange:e=>i(n.id,{label:e.target.value||void 0}),autoFocus:!0}),(0,B.jsxs)(`label`,{className:`check`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:!!n.data?.dashed,onChange:e=>i(n.id,{data:{...n.data,dashed:e.target.checked}})}),`Punteada — opcional / alternativa`]}),(0,B.jsxs)(`label`,{className:`check`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:!!n.animated,onChange:e=>i(n.id,{animated:e.target.checked})}),`Animada — camino principal`]})]}):null}function hN(e){return(0,B.jsx)(gN,{...e,children:(0,B.jsx)(Vh,{children:(0,B.jsx)(xN,{...e},`${e.task.id}/${e.boardId}`)})},`${e.task.id}/${e.boardId}`)}var gN=class extends v.Component{state={error:null,busy:!1};static getDerivedStateFromError(e){return{error:e.message,busy:!1}}async recover(e){this.setState({busy:!0});try{await e(),this.setState({error:null,busy:!1})}catch(e){this.setState({error:e.message,busy:!1})}}repair=()=>this.recover(async()=>{let e=await Jn.getBoard(this.props.task.id,this.props.boardId),t=e.nodes.filter(e=>e.type!==`lane`).map(({position:e,parentId:t,...n})=>n);await Jn.saveBoard(this.props.task.id,{...e,nodes:t})});render(){return this.state.error?(0,B.jsxs)(`div`,{className:`board-crash`,children:[(0,B.jsx)(`strong`,{children:`Este board tiene datos que el canvas no puede dibujar.`}),(0,B.jsx)(`code`,{children:this.state.error}),(0,B.jsxs)(`div`,{className:`board-crash-actions`,children:[(0,B.jsx)(`button`,{className:`btn primary`,disabled:this.state.busy,onClick:()=>this.recover(()=>Jn.undoBoard(this.props.task.id,this.props.boardId)),children:`Deshacer último cambio de IA`}),(0,B.jsx)(`button`,{className:`btn ghost`,disabled:this.state.busy,onClick:this.repair,children:`Reparar (re-ordenar todo)`})]})]}):this.props.children}};function _N(e){return e.map(({selected:e,dragging:t,measured:n,resizing:r,...i})=>i)}function vN(e){return e.map(({selected:e,style:t,markerEnd:n,type:r,...i})=>i)}var yN=0,bN=e=>`${e}-${Date.now().toString(36)}${(yN++).toString(36)}`;function xN({task:e,boardId:t,embedded:n=!1}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c,l]=Kh([]),[u,d,f]=qh([]),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(`saved`),_=zp(),{openDialog:y,theme:b}=tr(),x=(0,v.useRef)(null),S=(0,v.useRef)(!1),C=(0,v.useRef)(new Set),w=(0,v.useRef)(``),T=(0,v.useRef)(void 0),E=(0,v.useCallback)(async n=>{try{let r=await Jn.getBoard(e.id,t);if(!n&&JSON.stringify([r.nodes,r.edges??[]])===w.current)return;let{nodes:a,changed:o}=YM(r);w.current=JSON.stringify([_N(a),vN(r.edges??[])]),i(r),c(a),d(r.edges??[]),S.current=!0,o&&await Jn.saveBoard(e.id,{...r,nodes:_N(a)});let s=a.some(e=>!C.current.has(e.id));C.current=new Set(a.map(e=>e.id)),n?requestAnimationFrame(()=>_.fitView({padding:.15,duration:0})):s&&requestAnimationFrame(()=>_.fitView({padding:.15,duration:400}))}catch(e){o(e.message)}},[e.id,t,c,d,_]);(0,v.useEffect)(()=>void E(!0),[E]),(0,v.useEffect)(()=>{let e=x.current;if(!n||!e)return;let t,r=new ResizeObserver(()=>{clearTimeout(t),t=setTimeout(()=>_.fitView({padding:.15,duration:0}),80)});return r.observe(e),()=>{clearTimeout(t),r.disconnect()}},[n,_]),(0,v.useEffect)(()=>Qn(t=>{t.includes(e.id)&&h===`saved`&&E(!1)}),[E,e.id,h]);let D=(0,v.useCallback)((t,n,i=r)=>{S.current&&i&&(g(`pending`),clearTimeout(T.current),T.current=setTimeout(async()=>{g(`saving`),await Jn.saveBoard(e.id,{...i,nodes:_N(t),edges:vN(n)}),g(`saved`)},500))},[r,e.id]);(0,v.useEffect)(()=>{if(!S.current)return;let e=JSON.stringify([_N(s),vN(u)]);e!==w.current&&(w.current=e,D(s,u))},[s,u,D]);let O=(0,v.useCallback)(e=>d(t=>Op({...e,id:bN(`e`),data:{manual:!0}},t)),[d]),k=()=>{let e=x.current.getBoundingClientRect();return _.screenToFlowPosition({x:e.left+e.width/2-120,y:e.top+e.height/2-40})},A=(e,t={},n=k())=>{let r={lane:{style:{width:700,height:260},width:700,height:260,zIndex:-1},note:{width:240,height:140},image:{width:300,height:230}},i={card:`Nuevo paso`,note:`Nota`,lane:`Nuevo carril`,actor:`Actor`,activity:`Actividad`,image:`Captura`}[e]??`Nuevo`,a={id:bN(e),type:e,position:n,data:{label:i,manual:!0,...t},selected:!0,...r[e]};c(e=>ZM([...e.map(e=>({...e,selected:!1})),a]))},j=e=>{e.target.classList.contains(`react-flow__pane`)&&A(`card`,{},_.screenToFlowPosition({x:e.clientX-120,y:e.clientY-30}))},M=(0,v.useCallback)((e,t)=>{if(t.type===`lane`)return;let n=_.getInternalNode(t.id)?.internals.positionAbsolute;if(!n)return;let r=_.getIntersectingNodes(t).filter(e=>e.type===`lane`).pop();if(r?.id===t.parentId||!r&&!t.parentId)return;let i=r?_.getInternalNode(r.id)?.internals.positionAbsolute:void 0;c(e=>ZM(e.map(e=>e.id===t.id?{...e,parentId:r?.id,position:i?{x:n.x-i.x,y:n.y-i.y}:n,data:{...e.data,lane:r?String(r.data.label):void 0}}:e)))},[_,c]),N=()=>{r&&y({title:`¿Re-ordenar todo automáticamente? Se pierde el acomodo manual de este board.`,submitLabel:`Re-ordenar`,fields:[],onSubmit:()=>{let e=s.filter(e=>e.type!==`lane`).map(e=>({...e,parentId:void 0}));c(ZM(GM({...r,nodes:e,edges:u}))),requestAnimationFrame(()=>_.fitView({padding:.15,duration:300}))}})},P=async()=>{let n=tu(s),r=Math.min(6e3,Math.max(1200,n.width+160)),i=Math.min(6e3,Math.max(800,n.height+160)),a=ju(n,r,i,.2,3,.05),o=await YO(x.current.querySelector(`.react-flow__viewport`),{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue(`--bg-canvas`).trim()||`#ffffff`,width:r,height:i,pixelRatio:2,style:{width:`${r}px`,height:`${i}px`,transform:`translate(${a.x}px, ${a.y}px) scale(${a.zoom})`}}),c=document.createElement(`a`);c.download=`${e.id}-${t}.png`,c.href=o,c.click()},F=()=>{r&&y({title:`Renombrar board`,submitLabel:`Guardar`,fields:[{name:`title`,label:`Nombre`,defaultValue:r.title}],onSubmit:({title:e})=>{if(!e.trim())return;let t={...r,title:e.trim()};i(t),D(s,u,t)}})};Ir(`Escape`,()=>pr(V.task(e.id)),{enabled:!n});let I=s.find(e=>e.selected),ee=u.find(e=>e.selected),te=r?.direction??`LR`,re=(0,v.useMemo)(()=>u.map(e=>({...e,type:`smoothstep`,markerEnd:{type:Yl.ArrowClosed,width:18,height:18},style:e.data?.dashed?{strokeDasharray:`6 4`}:void 0})),[u]),ie=(0,v.useMemo)(()=>({taskId:e.id,direction:te,openImage:m}),[e.id,te]);return a?(0,B.jsxs)(`div`,{className:`empty`,children:[`No se pudo abrir el board: `,a]}):(0,B.jsxs)(`div`,{className:`board ${n?`embedded`:``}`,children:[(0,B.jsxs)(`div`,{className:`board-toolbar`,children:[(0,B.jsxs)(`a`,{className:`tool`,href:V.task(e.id),title:`Volver al resumen (Esc)`,children:[(0,B.jsx)(ne,{size:14}),` Resumen`]}),(0,B.jsx)(`button`,{className:`board-title`,onClick:F,title:`Renombrar`,children:r?.title??`…`}),r?.description&&(0,B.jsx)(`span`,{className:`board-description`,children:r.description}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(`span`,{className:`save-state ${h}`,children:h===`saved`?`Guardado`:`Guardando…`}),(0,B.jsxs)(`div`,{className:`tool-group`,children:[(0,B.jsxs)(`button`,{className:`tool`,onClick:()=>A(`card`),title:`Tarjeta (o doble click en el lienzo)`,children:[(0,B.jsx)(qt,{size:14}),` Tarjeta`]}),(0,B.jsx)(`button`,{className:`tool`,onClick:()=>A(`note`,{color:`#fef3c7`}),title:`Nota`,children:(0,B.jsx)(gn,{size:14})}),(0,B.jsx)(`button`,{className:`tool`,onClick:()=>A(`lane`),title:`Carril`,children:(0,B.jsx)(Zt,{size:14})}),r?.layout===`storymap`&&(0,B.jsx)(`button`,{className:`tool`,onClick:()=>A(`activity`),title:`Actividad`,children:(0,B.jsx)(fn,{size:14})}),e.assets.length>0&&(0,B.jsx)(`button`,{className:`tool`,onClick:()=>A(`image`,{image:`assets/${e.assets[0]}`}),title:`Imagen`,children:(0,B.jsx)(nt,{size:14})})]}),(0,B.jsxs)(`div`,{className:`tool-group`,children:[(0,B.jsx)(`button`,{className:`tool`,onClick:N,title:`Re-ordenar automáticamente`,children:(0,B.jsx)(cn,{size:14})}),(0,B.jsx)(`button`,{className:`tool`,onClick:()=>_.fitView({padding:.15,duration:300}),title:`Ajustar a la vista`,children:(0,B.jsx)(Et,{size:14})}),(0,B.jsx)(`button`,{className:`tool`,onClick:P,title:`Exportar PNG`,children:(0,B.jsx)(Ae,{size:14})})]})]}),(0,B.jsxs)(`div`,{className:`board-body`,children:[(0,B.jsxs)(`div`,{className:`canvas`,ref:x,onDoubleClick:j,children:[(0,B.jsx)(tN.Provider,{value:ie,children:(0,B.jsxs)(Gh,{nodes:s,edges:re,nodeTypes:aN,onNodesChange:l,onEdgesChange:f,onConnect:O,onNodeDragStop:M,zoomOnDoubleClick:!1,zoomOnScroll:!n,preventScrolling:!n,deleteKeyCode:[`Backspace`,`Delete`],multiSelectionKeyCode:`Shift`,minZoom:.1,maxZoom:2.5,proOptions:{hideAttribution:!0},colorMode:b,children:[(0,B.jsx)(eg,{variant:Xh.Dots,gap:22,size:1.1,color:`var(--canvas-dots)`}),(0,B.jsx)(lg,{showInteractive:!1}),!n&&(0,B.jsx)(Eg,{pannable:!0,zoomable:!0,maskColor:`var(--minimap-mask)`,nodeColor:e=>e.type===`lane`?`var(--minimap-lane)`:QM[e.data.status??`same`].color})]})}),!n&&(0,B.jsx)(cN,{task:e,boardId:t,selected:s.filter(e=>e.selected&&e.type!==`lane`).map(e=>({id:e.id,label:String(e.data.label??e.id)}))})]}),(I||ee)&&(0,B.jsx)(mN,{task:e,node:I,edge:ee,onNodeChange:(e,t,n)=>c(r=>r.map(r=>r.id===e?{...r,...n,data:{...r.data,...t,edited:!r.data.manual||void 0}}:r)),onEdgeChange:(e,t)=>d(n=>n.map(n=>n.id===e?{...n,...t}:n)),onDelete:()=>{let e=new Set(s.filter(e=>e.selected).map(e=>e.id));c(t=>t.filter(t=>!e.has(t.id)&&!(t.parentId&&e.has(t.parentId)))),d(t=>t.filter(t=>!t.selected&&!e.has(t.source)&&!e.has(t.target)))}})]}),p&&(0,B.jsx)(`div`,{className:`lightbox`,onClick:()=>m(null),children:(0,B.jsx)(`img`,{src:p,alt:``})})]})}function SN({route:e,onClose:t}){let{tasks:n,sessions:r,projects:i,project:a,setProject:o,newTask:s,updateTask:c,theme:l,toggleTheme:u,openDialog:d,reloadTasks:f}=tr(),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(0),_=`taskId`in e?n.find(t=>t.id===e.taskId):void 0,y=(0,v.useMemo)(()=>{let e=[];if(_){for(let t of _.boards)e.push({id:`b:${t.id}`,group:_.id,label:t.title,sublabel:`Board`,icon:(0,B.jsx)(ur,{kind:t.kind}),run:()=>pr(V.board(_.id,t.id))});for(let t of _.docs)e.push({id:`d:${t}`,group:_.id,label:t.replace(/\.md$/,``),sublabel:`Documento`,icon:(0,B.jsx)(dr,{}),run:()=>pr(V.doc(_.id,t))});for(let t of rr)t!==_.status&&e.push({id:`s:${t}`,group:_.id,label:`Cambiar estado a ${ar[t].label}`,icon:(0,B.jsx)(or,{status:t}),run:()=>void c(_.id,{status:t})});e.push({id:`trash`,group:_.id,label:`Eliminar tarea`,icon:(0,B.jsx)(wn,{size:14}),run:()=>d({title:`¿Eliminar ${_.id}? Se mueve a data/.trash, no se borra del disco.`,submitLabel:`Eliminar`,fields:[],onSubmit:async()=>{await Jn.trashTask(_.id),f(),pr(V.home())}})})}e.push({id:`new`,group:`Acciones`,label:`Nueva tarea`,icon:(0,B.jsx)(qt,{size:14}),shortcut:`C`,run:()=>s()}),e.push({id:`home`,group:`Acciones`,label:`Ir a todas las tareas`,icon:(0,B.jsx)(et,{size:14}),shortcut:`G H`,run:()=>pr(V.home())});for(let t of[null,...i])(t?.id??`all`)!==a&&e.push({id:`project:${t?.id??`all`}`,group:`Proyectos`,label:`Cambiar a ${t?.title??`All projects`}`,icon:(0,B.jsx)(Qg,{project:t??void 0,size:16}),run:()=>o(t?.id??`all`)});e.push({id:`new-session`,group:`Acciones`,label:`Nueva sesión (sin tarea)`,icon:(0,B.jsx)(Ot,{size:14}),shortcut:`S`,run:()=>pr(V.newSession())}),e.push({id:`agents`,group:`Acciones`,label:`Ver agentes`,icon:(0,B.jsx)(oe,{size:14}),shortcut:`G A`,run:()=>pr(V.agents())});for(let t of r.filter(e=>e.status!==`inactive`))e.push({id:`session:${t.id}`,group:`Agentes`,label:t.title,sublabel:t.project,icon:(0,B.jsx)(oe,{size:14}),run:()=>pr(V.session(t.id))});e.push({id:`theme`,group:`Acciones`,label:l===`dark`?`Cambiar a tema claro`:`Cambiar a tema oscuro`,icon:l===`dark`?(0,B.jsx)(vn,{size:14}):(0,B.jsx)(It,{size:14}),run:u});for(let t of n)e.push({id:`t:${t.id}`,group:`Tareas`,label:t.title,sublabel:t.id,icon:(0,B.jsx)(or,{status:t.status}),run:()=>pr(V.task(t.id))});return e},[n,r,i,a,o,_,s,c,l,u,d,f]),b=p.toLowerCase().split(/\s+/).filter(Boolean),x=y.filter(e=>b.every(t=>`${e.label} ${e.sublabel??``} ${e.group}`.toLowerCase().includes(t))),S=[...new Set(x.map(e=>e.group))],C=S.flatMap(e=>x.filter(t=>t.group===e)),w=e=>{e&&(t(),e.run())};return(0,Pr.createPortal)((0,B.jsx)(`div`,{className:`overlay palette-overlay`,onMouseDown:t,children:(0,B.jsxs)(`div`,{className:`palette`,onMouseDown:e=>e.stopPropagation(),children:[(0,B.jsxs)(`div`,{className:`palette-search`,children:[(0,B.jsx)($t,{size:16}),(0,B.jsx)(`input`,{autoFocus:!0,placeholder:`Buscá una tarea o escribí un comando…`,value:p,onChange:e=>{m(e.target.value),g(0)},onKeyDown:e=>{e.key===`Escape`&&t(),e.key===`ArrowDown`&&(e.preventDefault(),g(e=>Math.min(C.length-1,e+1))),e.key===`ArrowUp`&&(e.preventDefault(),g(e=>Math.max(0,e-1))),e.key===`Enter`&&w(C[h])}})]}),(0,B.jsxs)(`div`,{className:`palette-list`,children:[S.map(e=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`palette-group`,children:e}),x.filter(t=>t.group===e).map(e=>{let t=C.indexOf(e);return(0,B.jsxs)(`button`,{className:`palette-item ${t===h?`active`:``}`,onMouseMove:()=>g(t),onClick:()=>w(e),ref:e=>{t===h&&e?.scrollIntoView({block:`nearest`})},children:[(0,B.jsx)(`span`,{className:`palette-icon`,children:e.icon}),(0,B.jsx)(`span`,{className:`palette-label`,children:e.label}),e.sublabel&&(0,B.jsx)(`span`,{className:`palette-sub`,children:e.sublabel}),(0,B.jsx)(`span`,{className:`spacer`}),e.shortcut&&(0,B.jsx)(`span`,{className:`palette-shortcut`,children:e.shortcut.split(` `).map(e=>(0,B.jsx)(`kbd`,{className:`kbd`,children:e},e))}),t===h&&(0,B.jsx)(Ee,{size:13,className:`palette-enter`})]},e.id)})]},e)),!C.length&&(0,B.jsxs)(`div`,{className:`menu-empty`,children:[`Nada coincide con “`,p,`”`]})]})]})}),document.body)}function CN({task:e,doc:t}){let{data:n,error:r}=Xn(()=>Jn.getDoc(e.id,t),[e.id,t],e.id),[i,a]=(0,v.useState)(null),o=i!==null,s=async()=>{i!==null&&(await Jn.saveDoc(e.id,t,i),a(null))};return(0,v.useEffect)(()=>{if(!o)return;let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),s()),e.key===`Escape`&&a(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}),r?(0,B.jsxs)(`div`,{className:`empty`,children:[`No se pudo abrir `,t,`: `,r]}):n?(0,B.jsxs)(`div`,{className:`doc`,children:[(0,B.jsxs)(`div`,{className:`doc-toolbar`,children:[(0,B.jsxs)(`span`,{className:`doc-name`,children:[(0,B.jsx)(dr,{}),` `,t.replace(/\.md$/,``)]}),(0,B.jsx)(`span`,{className:`spacer`}),o?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:`btn ghost`,onClick:()=>a(null),children:`Cancelar`}),(0,B.jsxs)(`button`,{className:`btn primary`,onClick:s,children:[`Guardar `,(0,B.jsx)(`kbd`,{className:`kbd on-primary`,children:`⌘S`})]})]}):(0,B.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(n.content),children:[(0,B.jsx)(z,{size:13}),` Editar`]})]}),o?(0,B.jsxs)(`div`,{className:`doc-split`,children:[(0,B.jsx)(`textarea`,{className:`doc-editor`,value:i,onChange:e=>a(e.target.value),autoFocus:!0}),(0,B.jsx)(`div`,{className:`doc-preview`,children:(0,B.jsx)(uD,{taskId:e.id,children:i})})]}):(0,B.jsx)(`div`,{className:`doc-read`,onDoubleClick:()=>a(n.content),children:(0,B.jsx)(uD,{taskId:e.id,children:n.content})})]}):null}var wN=300,TN=52,EN=112,DN=10;function ON(e){return[...e].sort((e,t)=>{let n=e.boardOrder??1/0,r=t.boardOrder??1/0;return n===r?(t.updatedAt??``).localeCompare(e.updatedAt??``):n-r})}var kN=e=>e*328,AN=e=>62+e*122;function jN(e,t,n){let r=t.map(t=>({status:t,items:ON(e.filter(e=>e.status===t))})),i=AN(Math.max(4,...r.map(e=>e.items.length)))+DN;return[...r.map(({status:e,items:t},n)=>({id:`column:${e}`,type:`column`,position:{x:kN(n),y:0},data:{status:e,count:t.length,height:i},draggable:!1,selectable:!1,zIndex:-1,style:{width:wN,height:i}})),...r.flatMap(({items:e},t)=>e.map((e,r)=>({id:e.id,type:`card`,position:{x:kN(t)+DN,y:AN(r)},data:{task:e,live:n.has(e.id)},style:{width:280}})))]}var MN={column:(0,v.memo)(({data:e})=>{let{newTask:t}=tr();return(0,B.jsx)(`div`,{className:`kcol`,style:{height:e.height},children:(0,B.jsxs)(`div`,{className:`kcol-head`,children:[(0,B.jsx)(or,{status:e.status}),(0,B.jsx)(`span`,{className:`group-label`,children:ar[e.status].label}),(0,B.jsx)(`span`,{className:`group-count`,children:e.count}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(`button`,{className:`icon-btn nodrag`,onClick:()=>t(e.status),title:`Nueva tarea en este estado`,children:(0,B.jsx)(qt,{size:14})})]})})}),card:(0,v.memo)(({data:e,dragging:t})=>{let{task:n,live:r}=e;return(0,B.jsxs)(`div`,{className:`kcard ${t?`dragging`:``}`,style:{height:EN},children:[(0,B.jsxs)(`div`,{className:`kanban-card-top`,children:[(0,B.jsx)(`span`,{className:`row-id`,children:n.id}),r&&(0,B.jsxs)(`span`,{className:`row-live`,children:[(0,B.jsx)(fD,{status:`working`,size:6}),` en vivo`]}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(`span`,{className:`row-date`,children:Br(n.updatedAt)})]}),(0,B.jsxs)(`div`,{className:`kanban-card-title`,children:[(0,B.jsx)(or,{status:n.status}),(0,B.jsx)(`span`,{className:`kcard-title`,children:n.title})]}),(0,B.jsxs)(`div`,{className:`kanban-card-meta`,children:[(0,B.jsx)(cr,{risk:n.risk}),n.tags?.slice(0,2).map(e=>(0,B.jsxs)(`span`,{className:`label-pill`,children:[(0,B.jsx)(`i`,{}),e]},e)),!!n.repos?.length&&(0,B.jsxs)(`span`,{className:`meta-repos`,children:[(0,B.jsx)(Xe,{size:12}),n.repos.length]}),!!n.boards.length&&(0,B.jsx)(`span`,{className:`meta-boards`,children:n.boards.slice(0,4).map(e=>(0,B.jsx)(ur,{kind:e.kind,size:13},e.id))})]})]})})};function NN(e){return(0,B.jsx)(Vh,{children:(0,B.jsx)(PN,{...e})})}function PN({tasks:e,statuses:t}){let{sessions:n,updateTask:r,theme:i}=tr(),a=zp(),o=(0,v.useMemo)(()=>new Set(n.filter(e=>e.status===`working`).flatMap(e=>e.taskIds??[])),[n]),s=(0,v.useMemo)(()=>jN(e,t,o),[e,t,o]),[c,l,u]=Kh(s),d=(0,v.useRef)(!1);(0,v.useEffect)(()=>{l(s),!d.current&&s.length&&(d.current=!0,requestAnimationFrame(()=>a.fitView({padding:.12,maxZoom:1})))},[s,l,a]);let f=(0,v.useCallback)((n,i)=>{if(i.type!==`card`)return;let a=i.position.x+wN/2,o=t[Math.max(0,Math.min(t.length-1,Math.floor(a/328)))],c=ON(e.filter(e=>e.status===o&&e.id!==i.id)),u=Math.max(0,Math.min(c.length,Math.round((i.position.y-TN-DN)/122))),d=[...c.slice(0,u),i.data.task,...c.slice(u)],f=!1;d.forEach((e,t)=>{let n={};e.boardOrder!==t&&(n.boardOrder=t),e.id===i.id&&e.status!==o&&(n.status=o),Object.keys(n).length&&(f=!0,r(e.id,n))}),f||l(s)},[t,e,r,l,s]);return(0,B.jsx)(`div`,{className:`kanban-canvas`,children:(0,B.jsxs)(Gh,{nodes:c,edges:[],nodeTypes:MN,onNodesChange:u,onNodeDragStop:f,onNodeClick:(e,t)=>t.type===`card`&&pr(V.task(t.id)),nodesConnectable:!1,zoomOnDoubleClick:!1,minZoom:.2,maxZoom:1.6,colorMode:i,proOptions:{hideAttribution:!0},children:[(0,B.jsx)(eg,{variant:Xh.Dots,gap:22,size:1.1,color:`var(--canvas-dots)`}),(0,B.jsx)(lg,{showInteractive:!1}),(0,B.jsx)(Eg,{pannable:!0,zoomable:!0,maskColor:`var(--minimap-mask)`,nodeColor:e=>e.type===`column`?`var(--minimap-lane)`:`var(--text-3)`})]})})}var FN={todas:`Todas las tareas`,activas:`Activas`,hechas:`Hechas`};function IN({filter:e}){let{tasks:t,newTask:n,project:r,projects:i}=tr(),a=i.find(e=>e.id===r),o=t.filter(e=>e_($g(r,i),e.projectIds)),[s,c]=(0,v.useState)(()=>localStorage.getItem(`ws-display`)??`list`);(0,v.useEffect)(()=>localStorage.setItem(`ws-display`,s),[s]);let l=o.filter(t=>e===`activas`?t.status!==`hecho`:e!==`hechas`||t.status===`hecho`),u=rr.filter(t=>e===`activas`?t!==`hecho`:e!==`hechas`||t===`hecho`);return(0,B.jsxs)(`div`,{className:`home`,children:[(0,B.jsxs)(`header`,{className:`topbar`,children:[(0,B.jsxs)(`div`,{className:`topbar-title`,children:[a&&(0,B.jsxs)(`span`,{className:`topbar-project`,children:[(0,B.jsx)(Qg,{project:a,size:16}),` `,a.title,(0,B.jsx)(L,{size:13})]}),FN[e]]}),(0,B.jsx)(`div`,{className:`view-tabs`,children:[`todas`,`activas`,`hechas`].map(t=>(0,B.jsx)(`a`,{href:V.home(t),className:t===e?`active`:``,children:FN[t].replace(` las tareas`,``)},t))}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsxs)(`div`,{className:`segmented small`,children:[(0,B.jsx)(`button`,{className:s===`list`?`active`:``,onClick:()=>c(`list`),title:`Lista`,children:(0,B.jsx)(gt,{size:14})}),(0,B.jsx)(`button`,{className:s===`board`?`active`:``,onClick:()=>c(`board`),title:`Tablero`,children:(0,B.jsx)(it,{size:14})})]})]}),o.length?s===`list`?(0,B.jsx)(BN,{tasks:l,statuses:u}):(0,B.jsx)(NN,{tasks:l,statuses:u}):(0,B.jsx)(LN,{onCreate:()=>n()})]})}function LN({onCreate:e}){return(0,B.jsxs)(`div`,{className:`empty-state`,children:[(0,B.jsx)(`div`,{className:`empty-icon`,children:`🐒`}),(0,B.jsx)(`h2`,{children:`Todavía no hay tareas`}),(0,B.jsxs)(`p`,{children:[`Pedile a un agente que documente lo que está haciendo: en Claude Code corré `,(0,B.jsx)(`code`,{children:`/workspace`}),` (o `,(0,B.jsx)(`code`,{children:`/workspace TICKET-123`}),`) y arma acá el resumen, el story map y los flujos de testeo.`]}),(0,B.jsxs)(`div`,{className:`empty-actions`,children:[(0,B.jsxs)(`a`,{className:`btn primary`,href:V.newSession(),children:[(0,B.jsx)(qt,{size:14}),` Nueva sesión`]}),(0,B.jsx)(`a`,{className:`btn`,href:V.agents(),children:`Ver mis agentes`}),(0,B.jsxs)(`button`,{className:`btn`,onClick:e,children:[`Nueva tarea `,(0,B.jsx)(`kbd`,{className:`kbd`,children:`C`})]})]})]})}function RN({task:e}){let{updateTask:t}=tr();return(0,B.jsx)(Rr,{value:e.status,placeholder:`Cambiar estado…`,options:ir.map(e=>({value:e,label:ar[e].label,icon:(0,B.jsx)(or,{status:e}),hint:ar[e].key})),onChange:n=>void t(e.id,{status:n}),className:`status-trigger`,children:(0,B.jsx)(or,{status:e.status})})}function zN({task:e}){return(0,B.jsxs)(B.Fragment,{children:[e.tags?.slice(0,3).map(e=>(0,B.jsxs)(`span`,{className:`label-pill`,children:[(0,B.jsx)(`i`,{}),e]},e)),!!e.repos?.length&&(0,B.jsxs)(`span`,{className:`meta-repos`,title:e.repos.map(e=>e.name).join(`, `),children:[(0,B.jsx)(Xe,{size:12}),e.repos.length]}),!!e.boards.length&&(0,B.jsx)(`span`,{className:`meta-boards`,children:e.boards.slice(0,4).map(e=>(0,B.jsx)(ur,{kind:e.kind,size:13},e.id))})]})}function BN({tasks:e,statuses:t}){let{newTask:n,sessions:r}=tr(),i=new Set(r.filter(e=>e.status===`working`).flatMap(e=>e.taskIds??[])),a=t.map(t=>({status:t,items:e.filter(e=>e.status===t)})).filter(e=>e.items.length),o=a.flatMap(e=>e.items),[s,c]=(0,v.useState)(-1);return Ir(`j`,()=>c(e=>Math.min(o.length-1,e+1))),Ir(`arrowdown`,()=>c(e=>Math.min(o.length-1,e+1))),Ir(`k`,()=>c(e=>Math.max(0,e-1))),Ir(`arrowup`,()=>c(e=>Math.max(0,e-1))),Ir(`enter`,()=>o[s]&&pr(V.task(o[s].id))),(0,B.jsxs)(`div`,{className:`list`,children:[a.map(e=>(0,B.jsxs)(`section`,{children:[(0,B.jsxs)(`div`,{className:`group-header`,children:[(0,B.jsx)(or,{status:e.status}),(0,B.jsx)(`span`,{className:`group-label`,children:ar[e.status].label}),(0,B.jsx)(`span`,{className:`group-count`,children:e.items.length}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(`button`,{className:`icon-btn`,onClick:()=>n(e.status),title:`Nueva tarea en este estado`,children:(0,B.jsx)(qt,{size:14})})]}),e.items.map(e=>{let t=o.indexOf(e);return(0,B.jsxs)(`div`,{className:`row ${t===s?`cursor`:``}`,onClick:()=>pr(V.task(e.id)),onMouseEnter:()=>c(t),children:[(0,B.jsx)(`span`,{className:`row-risk`,title:e.risk?`Riesgo ${e.risk}`:`Sin riesgo`,children:(0,B.jsx)(cr,{risk:e.risk})}),(0,B.jsx)(`span`,{className:`row-id`,children:e.id}),(0,B.jsx)(`span`,{className:`row-status`,onClick:e=>e.stopPropagation(),children:(0,B.jsx)(RN,{task:e})}),(0,B.jsx)(`span`,{className:`row-title`,children:e.title}),i.has(e.id)&&(0,B.jsxs)(`span`,{className:`row-live`,title:`Hay agentes trabajando en esta tarea`,children:[(0,B.jsx)(fD,{status:`working`,size:6}),` en vivo`]}),(0,B.jsx)(`span`,{className:`row-tldr`,children:e.tldr?.solucion}),(0,B.jsx)(`span`,{className:`row-meta`,children:(0,B.jsx)(zN,{task:e})}),(0,B.jsx)(`span`,{className:`row-date`,children:Br(e.updatedAt)})]},e.id)})]},e.status)),!a.length&&(0,B.jsx)(`div`,{className:`empty`,children:`No hay tareas en esta vista.`})]})}function VN({task:e,active:t}){let{sessions:n}=tr(),r=n.filter(t=>t.status===`working`&&t.taskIds?.includes(e.id)),i=n.filter(t=>t.taskIds?.includes(e.id)).length,a=Nr(e.id),o=t!==`sessions`&&a&&n.some(t=>t.id===a&&t.taskIds?.includes(e.id))?a:void 0;return(0,B.jsxs)(`header`,{className:`topbar task-topbar`,children:[(0,B.jsxs)(`nav`,{className:`breadcrumb`,children:[(0,B.jsx)(`a`,{href:V.home(),children:`Tareas`}),(0,B.jsx)(L,{size:13}),(0,B.jsxs)(`a`,{href:V.task(e.id),className:`crumb-task`,children:[(0,B.jsx)(or,{status:e.status,size:13}),(0,B.jsx)(`span`,{className:`mono`,children:e.id})]})]}),(0,B.jsxs)(`nav`,{className:`view-tabs`,children:[(0,B.jsxs)(`a`,{className:t===`overview`?`active`:``,href:V.task(e.id),children:[(0,B.jsx)(ct,{size:13}),` Resumen`]}),(0,B.jsxs)(`a`,{className:t===`sessions`?`active`:``,href:V.taskSession(e.id,o),children:[(0,B.jsx)(Mt,{size:13}),` Sesiones`,i>0&&(0,B.jsx)(`span`,{className:`tab-count`,children:i}),r.length>0&&(0,B.jsx)(fD,{status:`working`,size:6})]}),e.docs.map(n=>(0,B.jsxs)(`a`,{className:t===`d:${n}`?`active`:``,href:V.doc(e.id,n),children:[(0,B.jsx)(dr,{size:13}),` `,n.replace(/\.md$/,``)]},n))]}),(0,B.jsx)(`span`,{className:`spacer`}),r.length>0&&(0,B.jsxs)(`a`,{className:`status-pill-live working`,href:V.taskSession(e.id,r[0].id),title:r.map(e=>e.title).join(`
|
|
55
|
+
`),children:[(0,B.jsx)(fD,{status:`working`,size:7}),r.length===1?`1 agente trabajando`:`${r.length} agentes trabajando`]})]})}function HN({value:e,placeholder:t,onSave:n,onDone:r,autoFocus:i,className:a=``,multiline:o=!1}){let[s,c]=(0,v.useState)(e??``),l=(0,v.useRef)(null);return(0,v.useEffect)(()=>c(e??``),[e]),(0,v.useEffect)(()=>{let e=l.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[s]),(0,B.jsx)(`textarea`,{ref:l,rows:1,className:`editable ${a}`,placeholder:t,autoFocus:i,value:s,onChange:e=>c(e.target.value),onBlur:()=>{s.trim()!==(e??``).trim()&&n(s.trim()),r?.()},onKeyDown:t=>{t.key===`Escape`&&(c(e??``),t.target.blur()),t.key===`Enter`&&(!o||t.metaKey)&&(t.preventDefault(),t.target.blur())}})}var UN=[{key:`problema`,label:`Problema`,icon:(0,B.jsx)(En,{size:14}),tone:`red`},{key:`solucion`,label:`Solución`,icon:(0,B.jsx)(In,{size:14}),tone:`blue`},{key:`impacto`,label:`Impacto`,icon:(0,B.jsx)(bn,{size:14}),tone:`green`}];function WN({task:e,onDone:t}){let{openDialog:n}=tr(),[r,i]=(0,v.useState)({status:`never`}),a=(0,v.useCallback)(()=>Er.refreshStatus(e.id).then(i,()=>{}),[e.id]);(0,v.useEffect)(()=>void a(),[a]),(0,v.useEffect)(()=>{if(r.status!==`running`)return;let e=setInterval(a,3e3);return()=>clearInterval(e)},[r.status,a]);let o=(0,v.useRef)(r.status);return(0,v.useEffect)(()=>{o.current===`running`&&r.status!==`running`&&t(),o.current=r.status},[r.status,t]),(0,B.jsxs)(`div`,{className:`refresh-box`,children:[(0,B.jsxs)(`button`,{className:`btn ai`,onClick:async()=>i(await Er.startRefresh(e.id)),disabled:r.status===`running`,children:[r.status===`running`?(0,B.jsx)(vt,{size:13,className:`spin`}):(0,B.jsx)(cn,{size:13}),r.status===`running`?`Actualizando con IA…`:`Actualizar con IA`]}),(0,B.jsxs)(`div`,{className:`refresh-meta`,children:[r.status===`running`&&`Una sesión headless está leyendo lo que hicieron los agentes. Aparece en vivo en Agentes.`,r.status!==`running`&&e.refreshedAt&&`Última actualización: ${Br(e.refreshedAt)}`,r.status!==`running`&&!e.refreshedAt&&`Lee la actividad de los agentes vinculados y actualiza boards y testeo.`,(r.status===`done`||r.status===`failed`)&&(0,B.jsx)(`button`,{className:`link-btn ${r.status===`failed`?`err`:``}`,onClick:()=>n({title:r.status===`failed`?`La actualización falló`:`Resultado de la última actualización`,submitLabel:`Cerrar`,fields:[{name:`out`,label:`Salida`,defaultValue:r.output?.trim()||`(sin salida)`,multiline:!0,readOnly:!0}],onSubmit:()=>{}}),children:r.status===`failed`?`Ver error`:`Ver resultado`})]})]})}function GN({task:e,onChange:t}){let{updateTask:n,openDialog:r,sessions:i,projects:a}=tr(),o=i.filter(t=>t.taskIds?.includes(e.id)),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=async r=>{await n(e.id,r),t()},f=()=>r({title:`Nuevo board`,fields:[{name:`title`,label:`Nombre del board`},{name:`kind`,label:`Tipo`,defaultValue:`free`,options:Object.keys(eN).map(e=>({value:e,label:eN[e].label,icon:(0,B.jsx)(ur,{kind:e,size:13})}))}],onSubmit:async({title:t,kind:n})=>{if(!t.trim())throw Error(`Poné un nombre`);let r=Vr(t);if(e.boards.some(e=>e.id===r))throw Error(`Ya existe un board con ese nombre`);await Jn.saveBoard(e.id,{id:r,title:t.trim(),kind:n,layout:n===`storymap`?`storymap`:`lanes`,nodes:[],edges:[]}),pr(V.board(e.id,r))}}),p=()=>r({title:`Nuevo documento`,fields:[{name:`name`,label:`Nombre del documento`}],onSubmit:async({name:t})=>{if(!t.trim())throw Error(`Poné un nombre`);let n=`${Vr(t.replace(/\.md$/,``))}.md`;await Jn.saveDoc(e.id,n,`# ${t.replace(/\.md$/,``)}\n\n`),pr(V.doc(e.id,n))}});return(0,B.jsxs)(`div`,{className:`issue`,children:[(0,B.jsx)(`div`,{className:`issue-main`,children:(0,B.jsxs)(`div`,{className:`issue-content`,children:[(0,B.jsx)(HN,{className:`issue-title`,value:e.title,placeholder:`Título`,onSave:e=>e&&d({title:e})}),(0,B.jsx)(`div`,{className:`tldr`,children:UN.map(t=>(0,B.jsxs)(`div`,{className:`tldr-block ${t.tone}`,children:[(0,B.jsxs)(`div`,{className:`tldr-head`,children:[t.icon,t.label]}),(0,B.jsx)(HN,{multiline:!0,value:e.tldr?.[t.key],placeholder:`Agregar ${t.label.toLowerCase()}…`,onSave:n=>d({tldr:{...e.tldr,[t.key]:n||void 0}})})]},t.key))}),(0,B.jsx)(KN,{task:e,onCreate:f}),(0,B.jsx)(`div`,{className:`issue-summary`,children:l?(0,B.jsx)(HN,{multiline:!0,autoFocus:!0,className:`summary-editor`,value:e.summary,placeholder:`Notas en markdown… (⌘↵ para guardar)`,onSave:e=>d({summary:e}),onDone:()=>u(!1)}):e.summary?(0,B.jsx)(`div`,{onDoubleClick:()=>u(!0),title:`Doble click para editar`,children:(0,B.jsx)(uD,{taskId:e.id,children:e.summary})}):(0,B.jsx)(`button`,{className:`ghost-add`,onClick:()=>u(!0),children:`Agregar notas…`})}),o.length>0&&(0,B.jsx)(qN,{title:`Agentes`,count:o.length,children:o.map(e=>(0,B.jsx)(_D,{session:e,compact:!0},e.id))}),(0,B.jsxs)(qN,{title:`Documentos`,count:e.docs.length,onAdd:p,children:[e.docs.map(t=>(0,B.jsxs)(`a`,{className:`sub-row`,href:V.doc(e.id,t),children:[(0,B.jsx)(`span`,{className:`sub-icon`,children:(0,B.jsx)(dr,{size:14})}),(0,B.jsx)(`span`,{className:`sub-title`,children:t.replace(/\.md$/,``)}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(L,{size:14,className:`sub-chevron`})]},t)),!e.docs.length&&(0,B.jsx)(JN,{onClick:p,children:`Crear un documento`})]}),e.assets.length>0&&(0,B.jsx)(qN,{title:`Capturas`,count:e.assets.length,children:(0,B.jsx)(`div`,{className:`gallery`,children:e.assets.map(t=>(0,B.jsxs)(`figure`,{onClick:()=>c(Yn(e.id,`assets/${t}`)),children:[(0,B.jsx)(`img`,{src:Yn(e.id,`assets/${t}`),alt:t,loading:`lazy`}),(0,B.jsxs)(`figcaption`,{children:[(0,B.jsx)(nt,{size:11}),` `,t]})]},t))})})]})}),(0,B.jsxs)(`aside`,{className:`properties`,children:[(0,B.jsx)(WN,{task:e,onDone:t}),(0,B.jsxs)(`div`,{className:`prop-group`,children:[(0,B.jsx)(`div`,{className:`prop-title`,children:`Propiedades`}),(0,B.jsx)(YN,{label:`Estado`,children:(0,B.jsxs)(Rr,{value:e.status,options:ir.map(e=>({value:e,label:ar[e].label,icon:(0,B.jsx)(or,{status:e}),hint:ar[e].key})),onChange:e=>d({status:e}),className:`prop-value`,children:[(0,B.jsx)(or,{status:e.status}),` `,ar[e.status]?.label]})}),(0,B.jsx)(YN,{label:`Riesgo`,children:(0,B.jsxs)(Rr,{value:e.risk,options:[`alto`,`medio`,`bajo`].map((e,t)=>({value:e,label:sr[e].label,icon:(0,B.jsx)(cr,{risk:e}),hint:String(t+1)})),onChange:e=>d({risk:e}),className:`prop-value`,children:[(0,B.jsx)(cr,{risk:e.risk}),` `,e.risk?sr[e.risk].label:`Sin definir`]})}),(0,B.jsx)(YN,{label:`Proyectos`,children:(0,B.jsxs)(`div`,{className:`prop-tags`,children:[(e.projectIds??[]).map(e=>{let t=a.find(t=>t.id===e);return(0,B.jsxs)(`span`,{className:`project-chip`,title:t?.root,children:[(0,B.jsx)(Qg,{project:t,size:14}),` `,t?.title??e]},e)}),(0,B.jsx)(Rr,{options:a.map(e=>({value:e.id,label:e.title,icon:(0,B.jsx)(Qg,{project:e,size:14})})),placeholder:`Agregar o quitar proyecto…`,onChange:t=>{let n=e.projectIds??[];d({projects:n.includes(t)?n.filter(e=>e!==t):[...n,t]})},className:`icon-btn tiny`,children:(0,B.jsx)(qt,{size:13})})]})}),(0,B.jsx)(YN,{label:`Etiquetas`,children:(0,B.jsxs)(`div`,{className:`prop-tags`,children:[e.tags?.map(t=>(0,B.jsxs)(`span`,{className:`label-pill removable`,children:[(0,B.jsx)(`i`,{}),t,(0,B.jsx)(`button`,{onClick:()=>d({tags:e.tags?.filter(e=>e!==t)}),title:`Quitar`,children:(0,B.jsx)(Rn,{size:11})})]},t)),(0,B.jsx)(`button`,{className:`icon-btn tiny`,onClick:()=>r({title:`Agregar etiqueta`,submitLabel:`Agregar`,fields:[{name:`tag`,label:`Etiqueta`}],onSubmit:async({tag:t})=>{let n=Vr(t);n&&!e.tags?.includes(n)&&await d({tags:[...e.tags??[],n]})}}),title:`Agregar etiqueta`,children:(0,B.jsx)(qt,{size:13})})]})}),(0,B.jsx)(YN,{label:`Actualizado`,children:(0,B.jsx)(`span`,{className:`prop-static`,children:Br(e.updatedAt)})})]}),!!e.repos?.length&&(0,B.jsxs)(`div`,{className:`prop-group`,children:[(0,B.jsx)(`div`,{className:`prop-title`,children:`Repos y PRs`}),e.repos.map(e=>(0,B.jsxs)(`a`,{className:`pr-row`,href:e.pr,target:`_blank`,rel:`noreferrer`,title:e.branch,children:[(0,B.jsx)(Xe,{size:14}),(0,B.jsx)(`span`,{className:`pr-repo`,children:e.name}),e.pr&&(0,B.jsxs)(`span`,{className:`pr-number`,children:[`#`,e.pr.split(`/`).pop()]}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(Me,{size:12,className:`pr-ext`})]},e.name)),e.repos[0]?.branch&&(0,B.jsxs)(`div`,{className:`branch`,children:[(0,B.jsx)(Je,{size:12}),` `,(0,B.jsx)(`span`,{className:`mono`,children:e.repos[0].branch})]})]}),e.linear&&(0,B.jsxs)(`div`,{className:`prop-group`,children:[(0,B.jsx)(`div`,{className:`prop-title`,children:`Links`}),(0,B.jsxs)(`a`,{className:`pr-row`,href:e.linear,target:`_blank`,rel:`noreferrer`,children:[(0,B.jsx)(ft,{size:14}),(0,B.jsx)(`span`,{className:`pr-repo`,children:`Ticket en Linear`}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsx)(Me,{size:12,className:`pr-ext`})]})]})]}),s&&(0,B.jsx)(`div`,{className:`lightbox`,onClick:()=>c(null),children:(0,B.jsx)(`img`,{src:s,alt:``})})]})}function KN({task:e,onCreate:t}){let[n,r]=(0,v.useState)(()=>localStorage.getItem(`ws-board-${e.id}`)??``),i=e.boards.find(e=>e.id===n)??e.boards[0],[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null);(0,v.useEffect)(()=>{let e=s.current;if(!e)return;let t=new IntersectionObserver(([e])=>e.isIntersecting&&o(!0),{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[i?.id]);let c=t=>{localStorage.setItem(`ws-board-${e.id}`,t),r(t)};return(0,B.jsxs)(`section`,{className:`boards-panel`,children:[(0,B.jsxs)(`div`,{className:`boards-head`,children:[(0,B.jsx)(`div`,{className:`board-switch`,children:e.boards.map(e=>(0,B.jsxs)(`button`,{className:e.id===i?.id?`active`:``,onClick:()=>c(e.id),children:[(0,B.jsx)(ur,{kind:e.kind,size:13}),` `,e.title,(0,B.jsx)(`span`,{className:`tab-count`,children:e.nodeCount})]},e.id))}),(0,B.jsx)(`span`,{className:`spacer`}),i&&(0,B.jsxs)(`a`,{className:`tool`,href:V.board(e.id,i.id),title:`Abrir a pantalla completa para editar`,children:[(0,B.jsx)(wt,{size:13}),` Abrir`]}),(0,B.jsx)(`button`,{className:`icon-btn`,onClick:t,title:`Nuevo board`,children:(0,B.jsx)(qt,{size:14})})]}),(0,B.jsx)(`div`,{className:`boards-body`,ref:s,children:i?a&&(0,B.jsx)(hN,{task:e,boardId:i.id,embedded:!0},i.id):(0,B.jsx)(JN,{onClick:t,children:`Crear el primer board`})})]})}function qN({title:e,count:t,onAdd:n,children:r}){return(0,B.jsxs)(`section`,{className:`issue-section`,children:[(0,B.jsxs)(`div`,{className:`issue-section-head`,children:[(0,B.jsx)(`span`,{children:e}),t?(0,B.jsx)(`span`,{className:`group-count`,children:t}):null,(0,B.jsx)(`span`,{className:`spacer`}),n&&(0,B.jsx)(`button`,{className:`icon-btn`,onClick:n,title:`Agregar ${e.toLowerCase()}`,children:(0,B.jsx)(qt,{size:14})})]}),(0,B.jsx)(`div`,{className:`sub-list`,children:r})]})}function JN({children:e,onClick:t}){return(0,B.jsxs)(`button`,{className:`sub-row empty-row`,onClick:t,children:[(0,B.jsx)(qt,{size:14}),` `,e]})}function YN({label:e,children:t}){return(0,B.jsxs)(`div`,{className:`prop`,children:[(0,B.jsx)(`span`,{className:`prop-label`,children:e}),t]})}async function XN(e){let t=await fetch(e,{credentials:`same-origin`});return!t.ok||!t.headers.get(`content-type`)?.includes(`json`)?null:t.json()}function ZN(){let[e,t]=(0,v.useState)(null);return(0,v.useEffect)(()=>{let e=!1,n=async()=>{let[n,r]=await Promise.all([XN(`/_mono/me`).catch(()=>null),XN(`/api/me`).catch(()=>null)]),i=n?{...n,claude:r?.claude??null}:r;e||t(i)};n();let r=setInterval(n,3e4);return()=>{e=!0,clearInterval(r)}},[]),e}var QN=typeof window<`u`&&`monoDesktop`in window,$N=e=>e.split(/[\s@._-]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``);function eP({account:e}){let[t,n]=(0,v.useState)(!1);return e.mode===`remote`&&e.picture&&!t?(0,B.jsx)(`img`,{className:`user-avatar`,src:e.picture,alt:``,referrerPolicy:`no-referrer`,onError:()=>n(!0)}):e.mode===`local`?(0,B.jsx)(`span`,{className:`user-avatar local`,children:(0,B.jsx)(Pt,{size:13})}):(0,B.jsx)(`span`,{className:`user-avatar`,children:$N(e.name??e.email)})}function tP({icon:e,children:t,href:n,onClick:r,external:i}){let a=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`user-menu-icon`,children:e}),(0,B.jsx)(`span`,{className:`user-menu-label`,children:t})]});return n?(0,B.jsx)(`a`,{className:`user-menu-item`,href:n,target:i?`_blank`:void 0,rel:i?`noreferrer`:void 0,children:a}):(0,B.jsx)(`button`,{className:`user-menu-item`,onClick:r,children:a})}function nP({command:e}){let[t,n]=(0,v.useState)(!1);return(0,B.jsxs)(`button`,{className:`user-command`,onClick:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)},title:`Copiar`,children:[(0,B.jsx)(`code`,{children:e}),t?(0,B.jsx)(ue,{size:13}):(0,B.jsx)(we,{size:13})]})}function rP({account:e}){return e.claude===void 0?null:(0,B.jsxs)(`div`,{className:`user-menu-section`,children:[(0,B.jsx)(`div`,{className:`user-menu-caption`,children:`Agentes`}),e.claude?(0,B.jsxs)(`div`,{className:`user-menu-host`,children:[(0,B.jsx)(`span`,{className:`user-dot`}),`Claude Code `,e.claude.version??``]}):(0,B.jsxs)(`p`,{className:`user-menu-text`,children:[(0,B.jsx)(`span`,{className:`user-warn`,children:`No encontré Claude Code en esta Mac.`}),` `,(0,B.jsx)(`a`,{href:`https://docs.claude.com/en/docs/claude-code/setup`,target:`_blank`,rel:`noreferrer`,children:`Instalalo`}),` `,`y reiniciá Mono.`]})]})}function iP({account:e}){return e.mode===`remote`?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`user-menu-head`,children:[(0,B.jsx)(eP,{account:e}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`user-menu-name`,children:e.name??e.email}),e.name&&(0,B.jsx)(`div`,{className:`user-menu-sub`,children:e.email})]})]}),(0,B.jsxs)(`div`,{className:`user-menu-section`,children:[(0,B.jsx)(`div`,{className:`user-menu-caption`,children:`Mac`}),(0,B.jsxs)(`div`,{className:`user-menu-host`,children:[(0,B.jsx)(`span`,{className:`user-dot`}),e.host?.name??`Ninguna conectada`]})]}),(0,B.jsx)(rP,{account:e}),(0,B.jsx)(`div`,{className:`user-menu-divider`}),e.hosts.length>1&&(0,B.jsx)(tP,{icon:(0,B.jsx)(ee,{size:14}),href:`/_mono/hosts`,children:`Cambiar de Mac`}),e.admin&&(0,B.jsx)(tP,{icon:(0,B.jsx)(An,{size:14}),href:`/_mono/admin`,children:`Invitar gente`}),(0,B.jsx)(tP,{icon:(0,B.jsx)(bt,{size:14}),href:`/_mono/logout`,children:`Salir`})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`user-menu-head`,children:[(0,B.jsx)(eP,{account:e}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`user-menu-name`,children:e.hostname}),(0,B.jsxs)(`div`,{className:`user-menu-sub`,children:[`Esta Mac · `,e.user]})]})]}),(0,B.jsx)(rP,{account:e}),(0,B.jsx)(`div`,{className:`user-menu-divider`}),e.remote?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`user-menu-section`,children:[(0,B.jsx)(`div`,{className:`user-menu-caption`,children:`Celular y web`}),(0,B.jsxs)(`div`,{className:`user-menu-host`,children:[(0,B.jsx)(`span`,{className:`user-dot`}),`Conectada como `,e.remote.email]})]}),(0,B.jsx)(tP,{icon:(0,B.jsx)(on,{size:14}),href:e.remote.relay,external:!0,children:`Abrir desde cualquier lado`})]}):(0,B.jsxs)(`div`,{className:`user-menu-section`,children:[(0,B.jsx)(`div`,{className:`user-menu-caption`,children:`Usala desde el celu`}),QN?(0,B.jsxs)(`p`,{className:`user-menu-text`,children:[`En el menú `,(0,B.jsx)(`b`,{children:`Mono → Conectar con el celular…`}),` y entrá con Google.`]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`p`,{className:`user-menu-text`,children:`Corré esto en la terminal y entrá con Google:`}),(0,B.jsx)(nP,{command:e.connectCommand})]})]}),(0,B.jsxs)(`div`,{className:`user-menu-foot`,children:[`Mono `,e.version]})]})}function aP(){let e=ZN(),[t,n]=(0,v.useState)(!1),r=(0,v.useRef)(null),i=(0,v.useRef)(null),[a,o]=(0,v.useState)({left:0,bottom:0,width:0});if((0,v.useLayoutEffect)(()=>{if(!t||!r.current)return;let e=r.current.getBoundingClientRect();o({left:e.left,bottom:window.innerHeight-e.top+6,width:Math.max(e.width,240)})},[t]),!e)return null;let s=e.mode===`remote`?e.name??e.email:e.hostname,c=e.mode===`remote`?e.host?.name??`Sin Mac`:e.remote?`Conectada al celu`:`Solo en esta Mac`;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`button`,{ref:r,className:`user-widget ${t?`open`:``}`,onClick:()=>n(e=>!e),children:[(0,B.jsx)(eP,{account:e}),(0,B.jsxs)(`span`,{className:`user-widget-text`,children:[(0,B.jsx)(`span`,{className:`user-widget-title`,children:s}),(0,B.jsxs)(`span`,{className:`user-widget-sub`,children:[(e.mode===`remote`?e.host:e.remote)&&(0,B.jsx)(`span`,{className:`user-dot`}),c]})]}),(0,B.jsx)(me,{size:14,className:`user-widget-chevron`})]}),t&&(0,Pr.createPortal)((0,B.jsx)(`div`,{className:`menu-backdrop`,onMouseDown:()=>n(!1),children:(0,B.jsx)(`div`,{className:`user-menu`,ref:i,style:a,onMouseDown:e=>e.stopPropagation(),onKeyDown:e=>e.key===`Escape`&&n(!1),children:(0,B.jsx)(iP,{account:e})})}),document.body)]})}function oP(){let e=mr(),{data:t,reload:n,setData:r}=Xn(Jn.listTasks,[]),i=(0,v.useMemo)(()=>t??[],[t]),{theme:a,toggleTheme:o}=Lr(),s=kr(3),{data:c,reload:l}=Xn(Jn.listProjects,[]),u=(0,v.useMemo)(()=>c??[],[c]),[d,f]=(0,v.useState)(()=>localStorage.getItem(`ws-project`)??`all`),p=(0,v.useCallback)(e=>{localStorage.setItem(`ws-project`,e),f(e)},[]);(0,v.useEffect)(()=>{c&&d!==`all`&&!c.some(e=>e.id===d)&&p(`all`)},[c,d,p]);let[m,h]=(0,v.useState)(null),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(()=>localStorage.getItem(`ws-sidebar`)===`collapsed`);(0,v.useEffect)(()=>localStorage.setItem(`ws-sidebar`,y?`collapsed`:`open`),[y]),(0,v.useEffect)(()=>{window.matchMedia(`(max-width: 760px)`).matches&&b(!0)},[e]);let x=(0,v.useRef)(0),S=(0,v.useCallback)(async(e,t)=>{r(n=>n?.map(n=>n.id===e?{...n,...t}:n)??n),await Jn.saveTask(e,t),n()},[r,n]),C=(0,v.useCallback)((e=`en-curso`)=>h({title:`Nueva tarea`,submitLabel:`Crear tarea`,fields:[{name:`title`,label:`Título de la tarea`},{name:`id`,label:`ID (ej: IME-3001)`,mono:!0},{name:`status`,label:`Estado`,defaultValue:e,options:rr.map(e=>({value:e,label:ar[e].label,icon:(0,B.jsx)(or,{status:e})}))}],onSubmit:async({title:e,id:t,status:r})=>{let a=t.trim().toUpperCase().replace(/\s+/g,`-`)||`T-${Date.now().toString(36).toUpperCase()}`;if(!e.trim())throw Error(`Poné un título`);if(i.some(e=>e.id===a))throw Error(`${a} ya existe`);await Jn.createTask({id:a,title:e.trim(),status:r,...d===`all`?{}:{projects:[d]}}),n(),pr(V.task(a))}}),[i,n,d]),w={tasks:i,sessions:s,projects:u,project:d,setProject:p,reloadProjects:l,reloadTasks:n,updateTask:S,openDialog:h,openPalette:()=>_(!0),newTask:C,theme:a,toggleTheme:o},T=!!(m||g);return Ir(`k`,()=>_(e=>!e),{meta:!0}),Ir(`c`,()=>C(),{enabled:!T}),Ir(`[`,()=>b(e=>!e),{enabled:!T}),Ir(`s`,()=>pr(V.newSession()),{enabled:!T}),Ir(`g`,()=>x.current=Date.now(),{enabled:!T}),Ir(`h`,()=>{Date.now()-x.current<800&&pr(V.home())},{enabled:!T}),Ir(`a`,()=>{Date.now()-x.current<800&&pr(V.agents())},{enabled:!T}),(0,B.jsxs)(er.Provider,{value:w,children:[(0,B.jsxs)(`div`,{className:`app ${y?`collapsed`:``}`,children:[(0,B.jsx)(sP,{route:e,onToggle:()=>b(e=>!e)}),(0,B.jsxs)(`main`,{className:`panel`,children:[y&&(0,B.jsx)(`button`,{className:`icon-btn sidebar-reopen`,onClick:()=>b(!1),title:`Mostrar barra lateral ([)`,children:(0,B.jsx)(Bt,{size:15})}),e.view===`home`?(0,B.jsx)(IN,{filter:e.filter}):e.view===`agents`?(0,B.jsx)(vD,{sessions:s.filter(e=>n_($g(d,u),e,i))}):e.view===`newSession`?(0,B.jsx)(y_,{}):e.view===`session`?(0,B.jsx)(OD,{sessionId:e.sessionId,agentId:e.agentId,sessions:s},`${e.sessionId}/${e.agentId??``}`):e.view===`group`?(0,B.jsx)(Jg,{groupId:e.groupId}):(0,B.jsx)(lP,{route:e},e.taskId)]})]}),g&&(0,B.jsx)(SN,{route:e,onClose:()=>_(!1)}),m&&(0,B.jsx)(zr,{request:m,onClose:()=>h(null)})]})}function sP({route:e,onToggle:t}){let{tasks:n,sessions:r,project:i,projects:a,openPalette:o,newTask:s,openDialog:c,theme:l,toggleTheme:u}=tr(),d=zg(),f=$g(i,a),p=n.filter(e=>e_(f,e.projectIds)),m=r.filter(e=>n_(f,e,n)),h=`taskId`in e?e.taskId:void 0,g=m.filter(e=>e.status===`working`),_=new Set(g.flatMap(e=>e.taskIds??[])),v=ni(),y=m.filter(e=>v(e)),b=new Set(y.flatMap(e=>e.taskIds??[])),x=new Set(r.filter(e=>v(e)).map(e=>e.id)),S={todas:p.length,activas:p.filter(e=>e.status!==`hecho`).length,hechas:p.filter(e=>e.status===`hecho`).length},C=p.slice(0,12),w=[`agents`,`session`,`newSession`].includes(e.view),T=Nr(),E=!w&&T&&r.some(e=>e.id===T)?V.session(T):V.agents(),D=new Set(r.filter(e=>e.status===`working`).map(e=>e.id)),O=()=>c({title:`Nuevo grupo`,submitLabel:`Crear grupo`,fields:[{name:`name`,label:`Nombre del grupo`}],onSubmit:async({name:e})=>{let t=await Pg.create(e);Lg(),pr(V.group(t.id))}}),k=[{filter:`todas`,label:`Todas las tareas`,icon:(0,B.jsx)(ot,{size:15})},{filter:`activas`,label:`Activas`,icon:(0,B.jsx)(ve,{size:15})},{filter:`hechas`,label:`Hechas`,icon:(0,B.jsx)(ge,{size:15})}];return(0,B.jsxs)(`aside`,{className:`sidebar`,children:[(0,B.jsxs)(`div`,{className:`sidebar-top`,children:[(0,B.jsx)(r_,{}),(0,B.jsx)(`button`,{className:`icon-btn`,onClick:o,title:`Buscar (⌘K)`,children:(0,B.jsx)($t,{size:15})}),(0,B.jsx)(`a`,{className:`icon-btn`,href:V.newSession(),title:`Nueva sesión sin tarea (S)`,children:(0,B.jsx)(Ot,{size:15})}),(0,B.jsx)(`button`,{className:`icon-btn new-btn`,onClick:()=>s(),title:`Nueva tarea (C)`,children:(0,B.jsx)(un,{size:15})})]}),(0,B.jsxs)(`nav`,{className:`sidebar-nav`,children:[k.map(t=>(0,B.jsxs)(`a`,{href:V.home(t.filter),className:e.view===`home`&&e.filter===t.filter?`active`:``,children:[t.icon,(0,B.jsx)(`span`,{children:t.label}),(0,B.jsx)(`span`,{className:`nav-count`,children:S[t.filter]||``})]},t.filter)),(0,B.jsxs)(`a`,{href:E,className:w?`active`:``,children:[(0,B.jsx)(oe,{size:15}),(0,B.jsx)(`span`,{children:`Agentes`}),(0,B.jsx)(`span`,{className:`nav-count`,children:(0,B.jsx)(cP,{working:g.length,unread:y.length})})]})]}),(0,B.jsxs)(`div`,{className:`sidebar-section sidebar-section-row`,children:[`Grupos`,(0,B.jsx)(`button`,{className:`icon-btn tiny`,onClick:O,title:`Nuevo grupo de sesiones`,children:(0,B.jsx)(qt,{size:13})})]}),(0,B.jsxs)(`nav`,{className:`sidebar-nav`,children:[d.map(t=>{let n=t.panes.filter(e=>D.has(e.sessionId)).length,r=t.panes.filter(e=>x.has(e.sessionId)).length;return(0,B.jsxs)(`a`,{href:V.group(t.id),className:e.view===`group`&&e.groupId===t.id?`active`:``,title:`${t.name} · ${t.panes.length} sesiones`,children:[(0,B.jsx)(ut,{size:14}),(0,B.jsx)(`span`,{className:`recent-title`,children:t.name}),(0,B.jsx)(`span`,{className:`nav-count`,children:n||r?(0,B.jsx)(cP,{working:n,unread:r}):t.panes.length||``})]},t.id)}),!d.length&&(0,B.jsx)(`span`,{className:`sidebar-empty`,children:`Juntá sesiones para verlas lado a lado`})]}),(0,B.jsx)(`div`,{className:`sidebar-section`,children:`Recientes`}),(0,B.jsxs)(`nav`,{className:`sidebar-nav recent`,children:[C.map(e=>(0,B.jsxs)(`a`,{href:V.task(e.id),className:e.id===h?`active`:``,title:`${e.id} · ${e.title}`,children:[(0,B.jsx)(or,{status:e.status,size:13}),(0,B.jsx)(`span`,{className:`recent-title`,children:e.title}),_.has(e.id)?(0,B.jsx)(fD,{status:`working`,size:6}):b.has(e.id)&&(0,B.jsx)(fD,{status:`unread`,size:6})]},e.id)),!C.length&&(0,B.jsx)(`span`,{className:`sidebar-empty`,children:`Sin tareas todavía`})]}),(0,B.jsx)(aP,{}),(0,B.jsxs)(`div`,{className:`sidebar-bottom`,children:[(0,B.jsx)(`button`,{className:`icon-btn`,onClick:u,title:`Cambiar tema`,children:l===`dark`?(0,B.jsx)(vn,{size:15}):(0,B.jsx)(It,{size:15})}),(0,B.jsx)(`button`,{className:`icon-btn`,onClick:t,title:`Ocultar barra lateral ([)`,children:(0,B.jsx)(Bt,{size:15})}),(0,B.jsx)(`span`,{className:`spacer`}),(0,B.jsxs)(`span`,{className:`sidebar-hint`,children:[(0,B.jsx)(`kbd`,{className:`kbd`,children:`⌘`}),(0,B.jsx)(`kbd`,{className:`kbd`,children:`K`})]})]})]})}function cP({working:e,unread:t}){return(0,B.jsxs)(`span`,{className:`live-counts`,children:[e>0&&(0,B.jsxs)(`span`,{className:`nav-live`,title:`Trabajando`,children:[(0,B.jsx)(fD,{status:`working`,size:6}),` `,e]}),t>0&&(0,B.jsxs)(`span`,{className:`nav-live unread`,title:`Terminaron y no las viste`,children:[(0,B.jsx)(fD,{status:`unread`,size:6}),` `,t]})]})}function lP({route:e}){let{reloadTasks:t}=tr(),{data:n,error:r,reload:i}=Xn(()=>Jn.getTask(e.taskId),[e.taskId],e.taskId);if(r)return(0,B.jsxs)(`div`,{className:`empty`,children:[`No existe la tarea `,e.taskId,`.`]});if(!n)return null;let a=e.view===`board`?`b:${e.boardId}`:e.view===`doc`?`d:${e.doc}`:e.view===`sessions`?`sessions`:`overview`;return(0,B.jsxs)(`div`,{className:`task-shell`,children:[(0,B.jsx)(VN,{task:n,active:a}),(0,B.jsxs)(`div`,{className:`task-content`,children:[e.view===`task`&&(0,B.jsx)(GN,{task:n,onChange:()=>{i(),t()}}),e.view===`board`&&(0,B.jsx)(hN,{task:n,boardId:e.boardId}),e.view===`doc`&&(0,B.jsx)(CN,{task:n,doc:e.doc}),e.view===`sessions`&&(0,B.jsx)(b_,{task:n,sessionId:e.sessionId})]})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(v.StrictMode,{children:(0,B.jsx)(oP,{})}));
|