@anvia/studio 0.2.1 → 0.2.2

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.
@@ -1,91 +0,0 @@
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),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,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{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}}}})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),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=d(),n=p(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function R(e){return{current:e}}function z(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function B(e,t){ne++,te[ne]=e.current,e.current=t}var re=R(null),V=R(null),ie=R(null),ae=R(null);function oe(e,t){switch(B(ie,t),B(V,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),B(re,e)}function H(){z(re),z(V),z(ie)}function se(e){e.memoizedState!==null&&B(ae,e);var t=re.current,n=Ud(t,e.type);t!==n&&(B(V,e),B(re,n))}function ce(e){V.current===e&&(z(re),z(V)),ae.current===e&&(z(ae),$f._currentValue=L)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+le+e+ue}var U=!1;function fe(e,t){if(!e||U)return``;U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
- `),l=s.split(`
5
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{U=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?de(n):``}function pe(e,t){switch(e.tag){case 26:case 27:case 5:return de(e.type);case 16:return de(`Lazy`);case 13:return e.child!==t&&t!==null?de(`Suspense Fallback`):de(`Suspense`);case 19:return de(`SuspenseList`);case 0:case 15:return fe(e.type,!1);case 11:return fe(e.type.render,!1);case 1:return fe(e.type,!0);case 31:return de(`Activity`);default:return``}}function me(e){try{var t=``,n=null;do t+=pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var he=Object.prototype.hasOwnProperty,ge=t.unstable_scheduleCallback,_e=t.unstable_cancelCallback,ve=t.unstable_shouldYield,ye=t.unstable_requestPaint,be=t.unstable_now,xe=t.unstable_getCurrentPriorityLevel,Se=t.unstable_ImmediatePriority,Ce=t.unstable_UserBlockingPriority,we=t.unstable_NormalPriority,Te=t.unstable_LowPriority,Ee=t.unstable_IdlePriority,De=t.log,Oe=t.unstable_setDisableYieldValue,ke=null,Ae=null;function je(e){if(typeof De==`function`&&Oe(e),Ae&&typeof Ae.setStrictMode==`function`)try{Ae.setStrictMode(ke,e)}catch{}}var Me=Math.clz32?Math.clz32:Fe,Ne=Math.log,Pe=Math.LN2;function Fe(e){return e>>>=0,e===0?32:31-(Ne(e)/Pe|0)|0}var Ie=256,Le=262144,Re=4194304;function ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Be(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=ze(n))):i=ze(o):i=ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ze(n))):i=ze(o)):i=ze(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 Ve(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function He(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 Ue(){var e=Re;return Re<<=1,!(Re&62914560)&&(Re=4194304),e}function We(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ge(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ke(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-Me(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Me(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Je(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Me(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ye(e,t){var n=t&-t;return n=n&42?1:Xe(n),(n&(e.suspendedLanes|t))===0?n:0}function Xe(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 Ze(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Qe(){var e=I.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function $e(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var et=Math.random().toString(36).slice(2),tt=`__reactFiber$`+et,nt=`__reactProps$`+et,rt=`__reactContainer$`+et,it=`__reactEvents$`+et,at=`__reactListeners$`+et,ot=`__reactHandles$`+et,st=`__reactResources$`+et,ct=`__reactMarker$`+et;function lt(e){delete e[tt],delete e[nt],delete e[it],delete e[at],delete e[ot]}function ut(e){var t=e[tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rt]||n[tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[tt])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function dt(e){if(e=e[tt]||e[rt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function pt(e){var t=e[st];return t||=e[st]={hoistableStyles:new Map,hoistableScripts:new Map},t}function mt(e){e[ct]=!0}var ht=new Set,W={};function gt(e,t){_t(e,t),_t(e+`Capture`,t)}function _t(e,t){for(W[e]=t,e=0;e<t.length;e++)ht.add(t[e])}var vt=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]*$`),yt={},bt={};function xt(e){return he.call(bt,e)?!0:he.call(yt,e)?!1:vt.test(e)?bt[e]=!0:(yt[e]=!0,!1)}function St(e,t,n){if(xt(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 Ct(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 wt(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 Tt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function G(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(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 Dt(e){if(!e._valueTracker){var t=G(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=G(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(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=``+Tt(t)):e.value!==``+Tt(t)&&(e.value=``+Tt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Nt(e,o,Tt(n)):Nt(e,o,Tt(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=``+Tt(s):e.removeAttribute(`name`)}function K(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)){Dt(e);return}n=n==null?``:``+Tt(n),t=t==null?n:``+Tt(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),Dt(e)}function Nt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Pt(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=``+Tt(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 Ft(e,t,n){if(t!=null&&(t=``+Tt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Tt(n)}function It(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Tt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Lt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rt=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 zt(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||Rt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Bt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&zt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&zt(e,o,t[o])}function Vt(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 Ht=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Ut=/^[\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 Wt(e){return Ut.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Gt(){}var Kt=null;function qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jt=null,Yt=null;function Xt(e){var t=dt(e);if(t&&(e=t.stateNode)){var n=e[nt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(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="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[nt]||null;if(!a)throw Error(i(90));Mt(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&&Ot(r)}break a;case`textarea`:Ft(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Pt(e,!!n.multiple,t,!1)}}}var q=!1;function Zt(e,t,n){if(q)return e(t,n);q=!0;try{return e(t)}finally{if(q=!1,(Jt!==null||Yt!==null)&&(yu(),Jt&&(t=Jt,e=Yt,Yt=Jt=null,Xt(t),e)))for(t=0;t<e.length;t++)Xt(e[t])}}function Qt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[nt]||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 $t=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),en=!1;if($t)try{var tn={};Object.defineProperty(tn,`passive`,{get:function(){en=!0}}),window.addEventListener(`test`,tn,tn),window.removeEventListener(`test`,tn,tn)}catch{en=!1}var nn=null,rn=null,an=null;function on(){if(an)return an;var e,t=rn,n=t.length,r,i=`value`in nn?nn.value:nn.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 an=i.slice(e,1<r?1-r:void 0)}function sn(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 cn(){return!0}function ln(){return!1}function un(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)?cn:ln,this.isPropagationStopped=ln,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=cn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=cn)},persist:function(){},isPersistent:cn}),t}var dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=un(dn),pn=m({},dn,{view:0,detail:0}),mn=un(pn),hn,gn,_n,vn=m({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,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!==_n&&(_n&&e.type===`mousemove`?(hn=e.screenX-_n.screenX,gn=e.screenY-_n.screenY):gn=hn=0,_n=e),hn)},movementY:function(e){return`movementY`in e?e.movementY:gn}}),yn=un(vn),bn=un(m({},vn,{dataTransfer:0})),xn=un(m({},pn,{relatedTarget:0})),Sn=un(m({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),Cn=un(m({},dn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),wn=un(m({},dn,{data:0})),Tn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},En={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`},Dn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function On(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Dn[e])?!!t[e]:!1}function kn(){return On}var An=un(m({},pn,{key:function(e){if(e.key){var t=Tn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=sn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?En[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return e.type===`keypress`?sn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?sn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),jn=un(m({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Mn=un(m({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),Nn=un(m({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=un(m({},vn,{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})),Fn=un(m({},dn,{newState:0,oldState:0})),In=[9,13,27,32],Ln=$t&&`CompositionEvent`in window,Rn=null;$t&&`documentMode`in document&&(Rn=document.documentMode);var zn=$t&&`TextEvent`in window&&!Rn,Bn=$t&&(!Ln||Rn&&8<Rn&&11>=Rn),Vn=` `,Hn=!1;function Un(e,t){switch(e){case`keyup`:return In.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Wn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Gn=!1;function Kn(e,t){switch(e){case`compositionend`:return Wn(t);case`keypress`:return t.which===32?(Hn=!0,Vn):null;case`textInput`:return e=t.data,e===Vn&&Hn?null:e;default:return null}}function qn(e,t){if(Gn)return e===`compositionend`||!Ln&&Un(e,t)?(e=on(),an=rn=nn=null,Gn=!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 Bn&&t.locale!==`ko`?null:t.data;default:return null}}var Jn={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 Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Jn[e.type]:t===`textarea`}function Xn(e,t,n,r){Jt?Yt?Yt.push(r):Yt=[r]:Jt=r,t=Ed(t,`onChange`),0<t.length&&(n=new fn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Zn=null,Qn=null;function $n(e){vd(e,0)}function er(e){if(Ot(ft(e)))return e}function tr(e,t){if(e===`change`)return t}var nr=!1;if($t){var rr;if($t){var ir=`oninput`in document;if(!ir){var ar=document.createElement(`div`);ar.setAttribute(`oninput`,`return;`),ir=typeof ar.oninput==`function`}rr=ir}else rr=!1;nr=rr&&(!document.documentMode||9<document.documentMode)}function or(){Zn&&(Zn.detachEvent(`onpropertychange`,sr),Qn=Zn=null)}function sr(e){if(e.propertyName===`value`&&er(Qn)){var t=[];Xn(t,Qn,e,qt(e)),Zt($n,t)}}function cr(e,t,n){e===`focusin`?(or(),Zn=t,Qn=n,Zn.attachEvent(`onpropertychange`,sr)):e===`focusout`&&or()}function lr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return er(Qn)}function ur(e,t){if(e===`click`)return er(t)}function dr(e,t){if(e===`input`||e===`change`)return er(t)}function fr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var pr=typeof Object.is==`function`?Object.is:fr;function mr(e,t){if(pr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!he.call(t,i)||!pr(e[i],t[i]))return!1}return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gr(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 _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(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=kt(e.document)}return t}function yr(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 br=$t&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Tr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==kt(r)||(r=xr,`selectionStart`in r&&yr(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}),Cr&&mr(Cr,r)||(Cr=r,r=Ed(Sr,`onSelect`),0<r.length&&(t=new fn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=xr)))}function Er(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Dr={animationend:Er(`Animation`,`AnimationEnd`),animationiteration:Er(`Animation`,`AnimationIteration`),animationstart:Er(`Animation`,`AnimationStart`),transitionrun:Er(`Transition`,`TransitionRun`),transitionstart:Er(`Transition`,`TransitionStart`),transitioncancel:Er(`Transition`,`TransitionCancel`),transitionend:Er(`Transition`,`TransitionEnd`)},Or={},kr={};$t&&(kr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Dr.animationend.animation,delete Dr.animationiteration.animation,delete Dr.animationstart.animation),`TransitionEvent`in window||delete Dr.transitionend.transition);function Ar(e){if(Or[e])return Or[e];if(!Dr[e])return e;var t=Dr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kr)return Or[e]=t[n];return e}var jr=Ar(`animationend`),Mr=Ar(`animationiteration`),Nr=Ar(`animationstart`),Pr=Ar(`transitionrun`),Fr=Ar(`transitionstart`),Ir=Ar(`transitioncancel`),Lr=Ar(`transitionend`),Rr=new Map,zr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);zr.push(`scrollEnd`);function Br(e,t){Rr.set(e,t),gt(t,[e])}var Vr=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)},Hr=[],Ur=0,Wr=0;function Gr(){for(var e=Ur,t=Wr=Ur=0;t<e;){var n=Hr[t];Hr[t++]=null;var r=Hr[t];Hr[t++]=null;var i=Hr[t];Hr[t++]=null;var a=Hr[t];if(Hr[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&&Yr(n,i,a)}}function Kr(e,t,n,r){Hr[Ur++]=e,Hr[Ur++]=t,Hr[Ur++]=n,Hr[Ur++]=r,Wr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function qr(e,t,n,r){return Kr(e,t,n,r),Xr(e)}function Jr(e,t){return Kr(e,null,null,t),Xr(e)}function Yr(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-Me(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Xr(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Zr={};function Qr(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 $r(e,t,n,r){return new Qr(e,t,n,r)}function ei(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ti(e,t){var n=e.alternate;return n===null?(n=$r(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ni(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ri(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ei(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=$r(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ii(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=$r(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=$r(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=$r(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=$r(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ii(e,t,n,r){return e=$r(7,e,r,t),e.lanes=n,e}function ai(e,t,n){return e=$r(6,e,null,t),e.lanes=n,e}function oi(e){var t=$r(18,null,null,0);return t.stateNode=e,t}function si(e,t,n){return t=$r(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ci=new WeakMap;function li(e,t){if(typeof e==`object`&&e){var n=ci.get(e);return n===void 0?(t={value:e,source:t,stack:me(t)},ci.set(e,t),t):n}return{value:e,source:t,stack:me(t)}}var ui=[],di=0,fi=null,pi=0,mi=[],hi=0,gi=null,_i=1,vi=``;function yi(e,t){ui[di++]=pi,ui[di++]=fi,fi=e,pi=t}function bi(e,t,n){mi[hi++]=_i,mi[hi++]=vi,mi[hi++]=gi,gi=e;var r=_i;e=vi;var i=32-Me(r)-1;r&=~(1<<i),n+=1;var a=32-Me(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,_i=1<<32-Me(t)+i|n<<i|r,vi=a+e}else _i=1<<a|n<<i|r,vi=e}function xi(e){e.return!==null&&(yi(e,1),bi(e,1,0))}function Si(e){for(;e===fi;)fi=ui[--di],ui[di]=null,pi=ui[--di],ui[di]=null;for(;e===gi;)gi=mi[--hi],mi[hi]=null,vi=mi[--hi],mi[hi]=null,_i=mi[--hi],mi[hi]=null}function Ci(e,t){mi[hi++]=_i,mi[hi++]=vi,mi[hi++]=gi,_i=t.id,vi=t.overflow,gi=e}var wi=null,Ti=null,Ei=!1,Di=null,Oi=!1,ki=Error(i(519));function Ai(e){throw Ii(li(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ki}function ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[tt]=e,t[nt]=r,n){case`dialog`:yd(`cancel`,t),yd(`close`,t);break;case`iframe`:case`object`:case`embed`:yd(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)yd(gd[n],t);break;case`source`:yd(`error`,t);break;case`img`:case`image`:case`link`:yd(`error`,t),yd(`load`,t);break;case`details`:yd(`toggle`,t);break;case`input`:yd(`invalid`,t),K(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:yd(`invalid`,t);break;case`textarea`:yd(`invalid`,t),It(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(yd(`beforetoggle`,t),yd(`toggle`,t)),r.onScroll!=null&&yd(`scroll`,t),r.onScrollEnd!=null&&yd(`scrollend`,t),r.onClick!=null&&(t.onclick=Gt),t=!0):t=!1,t||Ai(e,!0)}function Mi(e){for(wi=e.return;wi;)switch(wi.tag){case 5:case 31:case 13:Oi=!1;return;case 27:case 3:Oi=!0;return;default:wi=wi.return}}function Ni(e){if(e!==wi)return!1;if(!Ei)return Mi(e),Ei=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Wd(e.type,e.memoizedProps)),n=!n),n&&Ti&&Ai(e),Mi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ti=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ti=df(e)}else t===27?(t=Ti,Qd(e.type)?(e=uf,uf=null,Ti=e):Ti=t):Ti=wi?lf(e.stateNode.nextSibling):null;return!0}function Pi(){Ti=wi=null,Ei=!1}function Fi(){var e=Di;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Di=null),e}function Ii(e){Di===null?Di=[e]:Di.push(e)}var Li=R(null),Ri=null,zi=null;function Bi(e,t,n){B(Li,t._currentValue),t._currentValue=n}function Vi(e){e._currentValue=Li.current,z(Li)}function Hi(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 Ui(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),Hi(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),Hi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Wi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;pr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ae.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[$f]:e.push($f))}a=a.return}e!==null&&Ui(t,e,n,r),t.flags|=262144}function Gi(e){for(e=e.firstContext;e!==null;){if(!pr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ki(e){Ri=e,zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qi(e){return Yi(Ri,e)}function Ji(e,t){return Ri===null&&Ki(e),Yi(e,t)}function Yi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},zi===null){if(e===null)throw Error(i(308));zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zi=zi.next=t;return n}var Xi=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()})}},Zi=t.unstable_scheduleCallback,Qi=t.unstable_NormalPriority,$i={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ea(){return{controller:new Xi,data:new Map,refCount:0}}function ta(e){e.refCount--,e.refCount===0&&Zi(Qi,function(){e.controller.abort()})}var na=null,ra=0,ia=0,aa=null;function oa(e,t){if(na===null){var n=na=[];ra=0,ia=ud(),aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ra++,t.then(sa,sa),t}function sa(){if(--ra===0&&na!==null){aa!==null&&(aa.status=`fulfilled`);var e=na;na=null,ia=0,aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ca(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 la=F.S;F.S=function(e,t){$l=be(),typeof t==`object`&&t&&typeof t.then==`function`&&oa(e,t),la!==null&&la(e,t)};var ua=R(null);function da(){var e=ua.current;return e===null?Fl.pooledCache:e}function fa(e,t){t===null?B(ua,ua.current):B(ua,t.pool)}function pa(){var e=da();return e===null?null:{parent:$i._currentValue,pool:e}}var ma=Error(i(460)),ha=Error(i(474)),ga=Error(i(542)),_a={then:function(){}};function va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Gt,Gt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e;default:if(typeof t.status==`string`)t.then(Gt,Gt);else{if(e=Fl,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,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(i(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(i(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ka(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=ti(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ai(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&ba(i)===t.type)?(t=a(t,n.props),Da(t,n),t.return=e,t):(t=ri(n.type,n.key,n.props,null,e.mode,r),Da(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=si(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=ii(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=ai(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ri(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case v:return t=si(t,e.mode,n),t.return=e,t;case O:return t=ba(t),f(e,t,n)}if(ee(t)||M(t))return t=ii(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===C)return f(e,Ji(e,t),n);Oa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ba(n),p(e,t,n,r)}if(ee(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ea(n),r);if(n.$$typeof===C)return p(e,t,Ji(e,n),r);Oa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ba(r),m(e,t,n,r,i)}if(ee(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ea(r),i);if(r.$$typeof===C)return m(e,t,n,Ji(t,r),i);Oa(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),Ei&&yi(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 Ei&&yi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ei&&yi(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),Ei&&yi(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 Ei&&yi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ei&&yi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ba(l)===r.type){n(e,r.sibling),c=a(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ii(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ri(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=si(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ba(o),b(e,r,o,c)}if(ee(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ea(o),c);if(o.$$typeof===C)return b(e,r,Ji(e,o),c);Oa(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=ai(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=b(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=$r(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(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 Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Xr(e),Yr(e,null,n),t}return Kr(e,r,t,n),Xr(e)}function La(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,Je(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!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?(Il&f)===f:(r&f)===f){f!==0&&f===ia&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ma=!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),Wl|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=R(null),Ga=R(0);function Ka(e,t){e=Hl,B(Ga,e),B(Wa,t),Hl=e|t.baseLanes}function qa(){B(Ga,Hl),B(Wa,Wa.current)}function Ja(){Hl=Ga.current,z(Wa),z(Ga)}var Ya=R(null),Xa=null;function Za(e){var t=e.alternate;B(no,no.current&1),B(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){B(no,no.current),B(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(B(no,no.current),B(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){B(no,no.current),B(Ya,Ya.current)}function to(e){z(Ya),Xa===e&&(Xa=null),z(no)}var no=R(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var io=0,J=null,ao=null,oo=null,so=!1,co=!1,lo=!1,uo=0,fo=0,po=null,mo=0;function ho(){throw Error(i(321))}function go(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pr(e[n],t[n]))return!1;return!0}function _o(e,t,n,r,i,a){return io=a,J=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Ps:Fs,lo=!1,a=n(r,i),lo=!1,co&&(a=yo(t,n,r,i)),vo(e),a}function vo(e){F.H=Ns;var t=ao!==null&&ao.next!==null;if(io=0,oo=ao=J=null,so=!1,fo=0,po=null,t)throw Error(i(300));e===null||Qs||(e=e.dependencies,e!==null&&Gi(e)&&(Qs=!0))}function yo(e,t,n,r){J=e;var a=0;do{if(co&&(po=null),fo=0,co=!1,25<=a)throw Error(i(301));if(a+=1,oo=ao=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Is,o=t(n,r)}while(co);return o}function bo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Do(t):t,e=e.useState()[0],(ao===null?null:ao.memoizedState)!==e&&(J.flags|=1024),t}function xo(){var e=uo!==0;return uo=0,e}function So(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Co(e){if(so){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}so=!1}io=0,oo=ao=J=null,co=!1,fo=uo=0,po=null}function wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oo===null?J.memoizedState=oo=e:oo=oo.next=e,oo}function To(){if(ao===null){var e=J.alternate;e=e===null?null:e.memoizedState}else e=ao.next;var t=oo===null?J.memoizedState:oo.next;if(t!==null)oo=t,ao=e;else{if(e===null)throw J.alternate===null?Error(i(467)):Error(i(310));ao=e,e={memoizedState:ao.memoizedState,baseState:ao.baseState,baseQueue:ao.baseQueue,queue:ao.queue,next:null},oo===null?J.memoizedState=oo=e:oo=oo.next=e}return oo}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Do(e){var t=fo;return fo+=1,po===null&&(po=[]),e=ya(po,e,t),t=J,(oo===null?t.memoizedState:oo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Ps:Fs),e}function Oo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Do(e);if(e.$$typeof===C)return qi(e)}throw Error(i(438,String(e)))}function ko(e){var t=null,n=J.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=J.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=Eo(),J.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Ao(e,t){return typeof t==`function`?t(e):t}function jo(e){return Mo(To(),ao,e)}function Mo(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?(io&f)===f:(Il&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===ia&&(d=!0);else if((io&p)===p){u=u.next,p===ia&&(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,J.lanes|=p,Wl|=p;f=u.action,lo&&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,J.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!pr(o,e.memoizedState)&&(Qs=!0,d&&(n=aa,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 No(e){var t=To(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);pr(o,t.memoizedState)||(Qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Po(e,t,n){var r=J,a=To(),o=Ei;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!pr((ao||a).memoizedState,n);if(s&&(a.memoizedState=n,Qs=!0),a=a.queue,as(Lo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||oo!==null&&oo.memoizedState.tag&1){if(r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||io&127||Fo(r,t,n)}return n}function Fo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=J.updateQueue,t===null?(t=Eo(),J.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Io(e,t,n,r){t.value=n,t.getSnapshot=r,Ro(t)&&zo(e)}function Lo(e,t,n){return n(function(){Ro(t)&&zo(e)})}function Ro(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pr(e,n)}catch{return!0}}function zo(e){var t=Jr(e,2);t!==null&&mu(t,e,2)}function Bo(e){var t=wo();if(typeof e==`function`){var n=e;if(e=n(),lo){je(!0);try{n()}finally{je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:e},t}function Vo(e,t,n,r){return e.baseState=n,Mo(e,ao,typeof r==`function`?r:Ao)}function Ho(e,t,n,r,a){if(As(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Uo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Uo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Wo(e,t,s)}catch(n){Ko(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Wo(e,t,a)}catch(n){Ko(e,t,n)}}function Wo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Go(e,t,n)},function(n){return Ko(e,t,n)}):Go(e,t,n)}function Go(e,t,n){t.status=`fulfilled`,t.value=n,qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Uo(e,n)))}function Ko(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,qo(t),t=t.next;while(t!==r)}e.action=null}function qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jo(e,t){return t}function Yo(e,t){if(Ei){var n=Fl.formState;if(n!==null){a:{var r=J;if(Ei){if(Ti){b:{for(var i=Ti,a=Oi;i.nodeType!==8;){if(!a){i=null;break b}if(i=lf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ti=lf(i.nextSibling),r=i.data===`F!`;break a}}Ai(r)}r=!1}r&&(t=n[0])}}return n=wo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t},n.queue=r,n=Ds.bind(null,J,r),r.dispatch=n,r=Bo(!1),a=ks.bind(null,J,!1,r.queue),r=wo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ho.bind(null,J,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Xo(e){return Zo(To(),ao,e)}function Zo(e,t,n){if(t=Mo(e,t,Jo)[0],e=jo(Ao)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Do(t)}catch(e){throw e===ma?ga:e}else r=t;t=To();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(J.flags|=2048,es(9,{destroy:void 0},Qo.bind(null,i,n),null)),[r,a,e]}function Qo(e,t){e.action=t}function $o(e){var t=To(),n=ao;if(n!==null)return Zo(t,n,e);To(),t=t.memoizedState,n=To();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function es(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=J.updateQueue,t===null&&(t=Eo(),J.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 ts(){return To().memoizedState}function ns(e,t,n,r){var i=wo();J.flags|=e,i.memoizedState=es(1|t,{destroy:void 0},n,r===void 0?null:r)}function rs(e,t,n,r){var i=To();r=r===void 0?null:r;var a=i.memoizedState.inst;ao!==null&&r!==null&&go(r,ao.memoizedState.deps)?i.memoizedState=es(t,a,n,r):(J.flags|=e,i.memoizedState=es(1|t,a,n,r))}function is(e,t){ns(8390656,8,e,t)}function as(e,t){rs(2048,8,e,t)}function os(e){J.flags|=4;var t=J.updateQueue;if(t===null)t=Eo(),J.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ss(e){var t=To().memoizedState;return os({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function cs(e,t){return rs(4,2,e,t)}function ls(e,t){return rs(4,4,e,t)}function us(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 ds(e,t,n){n=n==null?null:n.concat([e]),rs(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&go(t,r[1]))return r[0];if(r=e(),lo){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r}function hs(e,t,n){return n===void 0||io&1073741824&&!(Il&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),J.lanes|=e,Wl|=e,n)}function gs(e,t,n,r){return pr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(Il&261930)?(Qs=!0,e.memoizedState=n):(e=pu(),J.lanes|=e,Wl|=e,t):(e=hs(e,n,r),pr(e,t)||(Qs=!0),e)}function _s(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,ks(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,ca(c,r),fu(e)):Os(e,t,r,fu(e))}catch(n){Os(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=bs(e).queue;_s(e,a,t,L,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},fu())}function Ss(){return qi($f)}function Cs(){return To().memoizedState}function ws(){return To().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(mu(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=qr(e,t,n,r),n!==null&&(mu(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,fu())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,pr(s,o))return Kr(e,t,i,0),Fl===null&&Gr(),!1}catch{}if(n=qr(e,t,i,r),n!==null)return mu(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(i(479))}else t=qr(e,n,r,2),t!==null&&mu(t,e,2)}function As(e){var t=e.alternate;return e===J||t!==null&&t===J}function js(e,t){co=so=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Je(e,n)}}var Ns={readContext:qi,use:Oo,useCallback:ho,useContext:ho,useEffect:ho,useImperativeHandle:ho,useLayoutEffect:ho,useInsertionEffect:ho,useMemo:ho,useReducer:ho,useRef:ho,useState:ho,useDebugValue:ho,useDeferredValue:ho,useTransition:ho,useSyncExternalStore:ho,useId:ho,useHostTransitionStatus:ho,useFormState:ho,useActionState:ho,useOptimistic:ho,useMemoCache:ho,useCacheRefresh:ho};Ns.useEffectEvent=ho;var Ps={readContext:qi,use:Oo,useCallback:function(e,t){return wo().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ns(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=wo();t=t===void 0?null:t;var r=e();if(lo){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=wo();if(n!==void 0){var i=n(t);if(lo){je(!0);try{n(t)}finally{je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Es.bind(null,J,e),[r.memoizedState,e]},useRef:function(e){var t=wo();return e={current:e},t.memoizedState=e},useState:function(e){e=Bo(e);var t=e.queue,n=Ds.bind(null,J,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(wo(),e,t)},useTransition:function(){var e=Bo(!1);return e=_s.bind(null,J,e.queue,!0,!1),wo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=J,a=wo();if(Ei){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Il&127||Fo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Lo.bind(null,r,o,e),[e]),r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,o,n,t),null),n},useId:function(){var e=wo(),t=Fl.identifierPrefix;if(Ei){var n=vi,r=_i;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=uo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=mo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ss,useFormState:Yo,useActionState:Yo,useOptimistic:function(e){var t=wo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ks.bind(null,J,!0,n),n.dispatch=t,[e,t]},useMemoCache:ko,useCacheRefresh:function(){return wo().memoizedState=Ts.bind(null,J)},useEffectEvent:function(e){var t=wo(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Fs={readContext:qi,use:Oo,useCallback:ps,useContext:qi,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:jo,useRef:ts,useState:function(){return jo(Ao)},useDebugValue:fs,useDeferredValue:function(e,t){return gs(To(),ao.memoizedState,e,t)},useTransition:function(){var e=jo(Ao)[0],t=To().memoizedState;return[typeof e==`boolean`?e:Do(e),t]},useSyncExternalStore:Po,useId:Cs,useHostTransitionStatus:Ss,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){return Vo(To(),ao,e,t)},useMemoCache:ko,useCacheRefresh:ws};Fs.useEffectEvent=ss;var Is={readContext:qi,use:Oo,useCallback:ps,useContext:qi,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:No,useRef:ts,useState:function(){return No(Ao)},useDebugValue:fs,useDeferredValue:function(e,t){var n=To();return ao===null?hs(n,e,t):gs(n,ao.memoizedState,e,t)},useTransition:function(){var e=No(Ao)[0],t=To().memoizedState;return[typeof e==`boolean`?e:Do(e),t]},useSyncExternalStore:Po,useId:Cs,useHostTransitionStatus:Ss,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){var n=To();return ao===null?(n.baseState=e,[e,n.queue.dispatch]):Vo(n,ao,e,t)},useMemoCache:ko,useCacheRefresh:ws};Is.useEffectEvent=ss;function Ls(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(mu(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(mu(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(mu(t,e,n),La(t,e,n))}};function zs(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?!mr(n,r)||!mr(i,a):!0}function Bs(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&&Rs.enqueueReplaceState(t,t.state,null)}function Vs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Hs(e){Vr(e)}function Us(e){console.error(e)}function Ws(e){Vr(e)}function Gs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Gs(e,t)},n}function Js(e){return e=Fa(e),e.tag=3,e}function Ys(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(){Ks(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ks(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Xs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Wi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Eu(),!1}if(Ei)return t=Ya.current,t===null?(r!==ki&&(t=Error(i(423),{cause:r}),Ii(li(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=li(r,n),a=qs(e.stateNode,r,a),Ra(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ki&&(e=Error(i(422),{cause:r}),Ii(li(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=li(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=li(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=qs(n.stateNode,r,e),Ra(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`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Js(a),Ys(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Zs=Error(i(461)),Qs=!1;function $s(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function ec(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 Ki(t),r=_o(e,t,n,o,a,i),s=xo(),e!==null&&!Qs?(So(e,t,i),wc(e,t,i)):(Ei&&s&&xi(t),t.flags|=1,$s(e,t,r,i),t.child)}function tc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ei(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nc(e,t,a,r,i)):(e=ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Tc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?mr:n,n(o,r)&&e.ref===t.ref)return wc(e,t,i)}return t.flags|=1,e=ti(a,r),e.ref=t.ref,e.return=t,t.child=e}function nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(mr(a,r)&&e.ref===t.ref)if(Qs=!1,t.pendingProps=r=a,Tc(e,i))e.flags&131072&&(Qs=!0);else return t.lanes=e.lanes,wc(e,t,i)}return uc(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 ac(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,ac(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return $s(e,t,i,n),t.child}function ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ac(e,t,n,r,i){var a=da();return a=a===null?null:{parent:$i._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Wi(e,t,r,!0),t.childLanes=i,null}function oc(e,t){return t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sc(e,t,n){return Aa(t,e.child,null,n),e=oc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function cc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ei){if(r.mode===`hidden`)return e=oc(t,r),t.lanes=536870912,ic(null,e);if(Qa(t),(e=Ti)?(e=af(e,Oi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gi===null?null:{id:_i,overflow:vi},retryLane:536870912,hydrationErrors:null},n=oi(e),n.return=t,t.child=n,wi=t,Ti=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return oc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a)if(t.flags&256)t.flags&=-257,t=sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Qs||Wi(e,t,n,!1),a=(n&e.childLanes)!==0,Qs||a){if(r=Fl,r!==null&&(s=Ye(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Jr(e,s),mu(r,e,s),Zs;Eu(),t=sc(e,t,n)}else e=o.treeContext,Ti=lf(s.nextSibling),wi=t,Ei=!0,Di=null,Oi=!1,e!==null&&Ci(t,e),t=oc(t,r),t.flags|=4096;return t}return e=ti(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(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 uc(e,t,n,r,i){return Ki(t),n=_o(e,t,n,r,void 0,i),r=xo(),e!==null&&!Qs?(So(e,t,i),wc(e,t,i)):(Ei&&r&&xi(t),t.flags|=1,$s(e,t,n,i),t.child)}function dc(e,t,n,r,i,a){return Ki(t),t.updateQueue=null,n=yo(t,r,n,i),vo(e),r=xo(),e!==null&&!Qs?(So(e,t,a),wc(e,t,a)):(Ei&&r&&xi(t),t.flags|=1,$s(e,t,n,a),t.child)}function fc(e,t,n,r,i){if(Ki(t),t.stateNode===null){var a=Zr,o=n.contextType;typeof o==`object`&&o&&(a=qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Rs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?qi(o):Zr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ls(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&&Rs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),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=Vs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Zr,typeof u==`object`&&u&&(o=qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Bs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Ls(t,n,d,r),l=t.memoizedState),(c=Ma||zs(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,Pa(e,t),o=t.memoizedProps,u=Vs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Zr,typeof l==`object`&&l&&(c=qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Bs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Gi(e.dependencies)?(typeof s==`function`&&(Ls(t,n,s,r),p=t.memoizedState),(u=Ma||zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Gi(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,lc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):$s(e,t,n,i),t.memoizedState=a.state,e=t.child):e=wc(e,t,i),e}function pc(e,t,n,r){return Pi(),t.flags|=256,$s(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:pa()}}function gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function _c(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(no.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ei){if(a?Za(t):eo(t),(e=Ti)?(e=af(e,Oi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gi===null?null:{id:_i,overflow:vi},retryLane:536870912,hydrationErrors:null},n=oi(e),n.return=t,t.child=n,wi=t,Ti=null)):e=null,e===null)throw Ai(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=yc({mode:`hidden`,children:c},a),r=ii(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(null,r)):(Za(t),vc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=bc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=yc({mode:`visible`,children:r.children},a),c=ii(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,t=ic(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ii({value:r,source:null,stack:null}),t=bc(e,t,n)}else if(Qs||Wi(e,t,n,!1),s=(n&e.childLanes)!==0,Qs||s){if(s=Fl,s!==null&&(r=Ye(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Jr(e,r),mu(s,e,r),Zs;of(c)||Eu(),t=bc(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ti=lf(c.nextSibling),wi=t,Ei=!0,Di=null,Oi=!1,e!==null&&Ci(t,e),t=vc(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ti(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ii(c,a,n,null),c.flags|=2):c=ti(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ic(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(a=c.cachePool,a===null?a=pa():(l=$i._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ti(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function vc(e,t){return t=yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=$r(22,e,null,t),e.lanes=0,e}function bc(e,t,n){return Aa(t,e.child,null,n),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hi(e.return,t,n)}function Sc(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 Cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(no,o),$s(e,t,r,n),r=Ei?pi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xc(e,n,t);else if(e.tag===19)xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,a,r);break;case`together`:Sc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function wc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Wi(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=ti(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ti(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Gi(e))):!0}function Ec(e,t,n){switch(t.tag){case 3:oe(t,t.stateNode.containerInfo),Bi(t,$i,e.memoizedState.cache),Pi();break;case 27:case 5:se(t);break;case 4:oe(t,t.stateNode.containerInfo);break;case 10:Bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=wc(e,t,n),e===null?null:e.sibling):_c(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Wi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(no,no.current),r)break;return null;case 22:return t.lanes=0,rc(e,t,n,t.pendingProps);case 24:Bi(t,$i,e.memoizedState.cache)}return wc(e,t,n)}function Dc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qs=!0;else{if(!Tc(e,n)&&!(t.flags&128))return Qs=!1,Ec(e,t,n);Qs=!!(e.flags&131072)}else Qs=!1,Ei&&t.flags&1048576&&bi(t,pi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e==`function`)ei(e)?(r=Vs(e,r),t.tag=1,t=fc(null,t,e,r,n)):(t.tag=0,t=uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ec(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=tc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Vs(r,t.pendingProps),fc(e,t,r,a,n);case 3:a:{if(oe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Pa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Bi(t,$i,r),r!==o.cache&&Ui(t,[$i],n,!0),Ba(),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=pc(e,t,r,n);break a}else if(r!==a){a=li(Error(i(424)),t),Ii(a),t=pc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ti=lf(e.firstChild),wi=t,Ei=!0,Di=null,Oi=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Pi(),r===a){t=wc(e,t,n);break a}$s(e,t,r,n)}t=t.child}return t;case 26:return lc(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ei||(n=t.type,e=t.pendingProps,r=Vd(ie.current).createElement(n),r[tt]=t,r[nt]=e,Fd(r,n,e),mt(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return se(t),e===null&&Ei&&(r=t.stateNode=pf(t.type,t.pendingProps,ie.current),wi=t,Oi=!0,a=Ti,Qd(t.type)?(uf=a,Ti=lf(r.firstChild)):Ti=a),$s(e,t,t.pendingProps.children,n),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ei&&((a=r=Ti)&&(r=nf(r,t.type,t.pendingProps,Oi),r===null?a=!1:(t.stateNode=r,wi=t,Ti=lf(r.firstChild),Oi=!1,a=!0)),a||Ai(t)),se(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=_o(e,t,bo,null,null,n),$f._currentValue=a),lc(e,t),$s(e,t,r,n),t.child;case 6:return e===null&&Ei&&((e=n=Ti)&&(n=rf(n,t.pendingProps,Oi),n===null?e=!1:(t.stateNode=n,wi=t,Ti=null,e=!0)),e||Ai(t)),null;case 13:return _c(e,t,n);case 4:return oe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):$s(e,t,r,n),t.child;case 11:return ec(e,t,t.type,t.pendingProps,n);case 7:return $s(e,t,t.pendingProps,n),t.child;case 8:return $s(e,t,t.pendingProps.children,n),t.child;case 12:return $s(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Bi(t,t.type,r.value),$s(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ki(t),a=qi(a),r=r(a),t.flags|=1,$s(e,t,r,n),t.child;case 14:return tc(e,t,t.type,t.pendingProps,n);case 15:return nc(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return cc(e,t,n);case 22:return rc(e,t,n,t.pendingProps);case 24:return Ki(t),r=qi($i),e===null?(a=da(),a===null&&(a=Fl,o=ea(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),Bi(t,$i,a)):((e.lanes&n)!==0&&(Pa(e,t),Va(t,null,null,n),Ba()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Bi(t,$i,r),r!==a.cache&&Ui(t,[$i],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Bi(t,$i,r))),$s(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Oc(e){e.flags|=4}function kc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw xa=_a,ha}else e.flags&=-16777217}function Ac(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t))if(Cu())e.flags|=8192;else throw xa=_a,ha}function jc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ue(),e.lanes|=t,Jl|=t)}function Mc(e,t){if(!Ei)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pc(e,t,n){var r=t.pendingProps;switch(Si(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nc(t),null;case 1:return Nc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Vi($i),H(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?Oc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fi())),Nc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Oc(t),o===null?(Nc(t),kc(t,a,null,r,n)):(Nc(t),Ac(t,o))):o?o===e.memoizedState?(Nc(t),t.flags&=-16777217):(Oc(t),Nc(t),Ac(t,o)):(e=e.memoizedProps,e!==r&&Oc(t),Nc(t),kc(t,a,e,r,n)),null;case 27:if(ce(t),n=ie.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}e=re.current,Ni(t)?ji(t,e):(e=pf(a,r,n),t.stateNode=e,Oc(t))}return Nc(t),null;case 5:if(ce(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}if(o=re.current,Ni(t))ji(t,o);else{var s=Vd(ie.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[tt]=t,o[nt]=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(Fd(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&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ie.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=wi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[tt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ai(t,!0)}else e=Vd(e).createTextNode(r),e[tt]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(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[tt]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ni(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[tt]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),a=!1}else a=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(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),jc(t,t.updateQueue),Nc(t),null);case 4:return H(),e===null&&Sd(t.stateNode.containerInfo),Nc(t),null;case 10:return Vi(t.type),Nc(t),null;case 19:if(z(no),r=t.memoizedState,r===null)return Nc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Mc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ni(n,e),n=n.sibling;return B(no,no.current&1|2),Ei&&yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&be()>eu&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Nc(t),null}else 2*be()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=be(),e.sibling=null,n=no.current,B(no,a?n&1|2:n&1),Ei&&yi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(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&&z(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Nc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fc(e,t){switch(Si(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),H(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ce(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(no),null;case 4:return H(),null;case 10:return Vi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&z(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Ic(e,t){switch(Si(t),t.tag){case 3:Vi($i),H();break;case 26:case 27:case 5:ce(t);break;case 4:H();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:z(no);break;case 10:Vi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&z(ua);break;case 24:Vi($i)}}function Lc(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){Wu(t,t.return,e)}}function Rc(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){Wu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Wu(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Wu(e,e.return,t)}}}function Bc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Wu(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Wu(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Wu(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){Wu(e,t,n)}else n.current=null}function Uc(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){Wu(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[nt]=t}catch(t){Wu(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(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&&Qd(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 qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gt));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[tt]=e,t[nt]=n}catch(t){Wu(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,zd=cp,e=vr(e),yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},cp=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Vs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Wu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Lc(5,n);break;case 1:if(hl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Wu(n,n.return,e)}else{var i=Vs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Wu(n,n.return,e)}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(hl(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{Ua(e,t)}catch(e){Wu(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&cl(e,n);break;case 13:hl(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Q.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?_l(e,n,(n.subtreeFlags&8772)!=0):hl(e,n),Xc=i,Zc=a}break;case 30:break;default:hl(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lt(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 il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(Ae&&typeof Ae.onCommitFiberUnmount==`function`)try{Ae.onCommitFiberUnmount(ke,n)}catch{}switch(n.tag){case 26:Zc||Hc(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||Hc(n,t);var r=il,i=al;Qd(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),mf(n.stateNode),il=r,al=i;break;case 5:Zc||Hc(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null)if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){Wu(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){Wu(n,t,e)}break;case 18:il!==null&&(al?(e=il,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):$d(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Zc||Rc(4,n,t),ol(e,t,n);break;case 1:Zc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){Wu(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){Wu(t,t.return,e)}}function Y(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(i(435,e.tag))}}function ul(e,t){var n=Y(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function dl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(i(160));sl(o,s,a),il=null,al=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var X=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:dl(t,e),pl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:dl(t,e),pl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&64&&Xc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=X;if(dl(t,e),pl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ct]||o[tt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[tt]=e,mt(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[tt]=e,mt(o),r=o}e.stateNode=r}else Uf(a,e.type,e.stateNode);else e.stateNode=Lf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(a,e.type,e.stateNode):Lf(a,r,e.memoizedProps))}break;case 27:dl(t,e),pl(e),r&512&&(Zc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(dl(t,e),pl(e),r&512&&(Zc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{Lt(a,``)}catch(t){Wu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(dl(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Wu(e,e.return,t)}}break;case 3:if(Vf=null,a=X,X=_f(t.containerInfo),dl(t,e),X=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){Wu(e,e.return,t)}Qc&&(Qc=!1,ml(e));break;case 4:r=X,X=_f(e.stateNode.containerInfo),dl(t,e),pl(e),X=r;break;case 12:dl(t,e),pl(e);break;case 31:dl(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 13:dl(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=be()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||a,Zc=d||l,dl(t,e),Zc=d,Xc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Xc||Zc||gl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Wu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Wu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){Wu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ul(e,n))));break;case 19:dl(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 30:break;case 21:break;default:dl(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Lt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Wu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),gl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),gl(t);break;case 27:mf(t.stateNode);case 26:case 5:Hc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Lc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Wu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ha(c[i],s)}catch(e){Wu(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Yc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&cl(i,a);break;case 13:_l(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),Vc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ta(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e)));break;case 12:if(i&2048){bl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Wu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(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:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Kf(n,X,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=X;X=_f(e.stateNode.containerInfo),Tl(e,t,n),X=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(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 Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:Rc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var Ml={getCacheForType:function(e){var t=qi($i),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qi($i).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Z=null,Il=0,Ll=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return Pl&2&&Il!==0?Il&-Il:F.T===null?Qe():ud()}function pu(){if(ql===0)if(!(Il&536870912)||Ei){var e=Le;Le<<=1,!(Le&3932160)&&(Le=262144),ql=e}else ql=536870912;return e=Ya.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Fl&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,Il,ql,!1)),Ge(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Gl|=n),Ul===4&&vu(e,Il,ql,!1)),nd(e))}function hu(e,t,n){if(Pl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ve(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-be(),10<a)){if(vu(r,t,ql,!zl),Be(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=qd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);nd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gt},El(t,a,d);var m=(a&62914560)===a?Ql-be():(a&4194048)===a?$l-be():0;if(m=Jf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!pr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Me(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&qe(e,n,t)}function yu(){return Pl&6?!0:(rd(0,!1),!1)}function bu(){if(Z!==null){if(Ll===0)var e=Z.return;else e=Z,zi=Ri=null,Co(e),wa=null,Ta=0,e=Z;for(;e!==null;)Ic(e.alternate,e),e=e.return;Z=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Fl=e,Z=n=ti(e.current,null),Il=t,Ll=0,Rl=null,zl=!1,Bl=Ve(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Me(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,Gr(),n}function Su(e,t){J=null,F.H=Ns,t===ma||t===ga?(t=Sa(),Ll=3):t===ha?(t=Sa(),Ll=4):Ll=t===Zs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Z===null&&(Ul=1,Gs(e,li(t,e.current)))}function Cu(){var e=Ya.current;return e===null?!0:(Il&4194048)===Il?Xa===null:(Il&62914560)===Il||Il&536870912?e===Xa:!1}function wu(){var e=F.H;return F.H=Ns,e===null?Ns:e}function Tu(){var e=F.A;return F.A=Ml,e}function Eu(){Ul=4,zl||(Il&4194048)!==Il&&Ya.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Fl===null||vu(Fl,Il,ql,!1)}function Du(e,t,n){var r=Pl;Pl|=2;var i=wu(),a=Tu();(Fl!==e||Il!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Ll!==0&&Z!==null){var s=Z,c=Rl;switch(Ll){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=Ll;if(Ll=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Ll,Ll=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,zi=Ri=null,Pl=r,F.H=i,F.A=a,Z===null&&(Fl=null,Il=0,Gr()),o}function Ou(){for(;Z!==null;)ju(Z)}function ku(e,t){var n=Pl;Pl|=2;var r=wu(),a=Tu();Fl!==e||Il!==t?(tu=null,eu=be()+500,xu(e,t)):Bl=Ve(e,t);a:do try{if(Ll!==0&&Z!==null){t=Z;var o=Rl;b:switch(Ll){case 1:Ll=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(va(o)){Ll=0,Rl=null,Mu(t);break}t=function(){Ll!==2&&Ll!==9||Fl!==e||(Ll=7),nd(e)},o.then(t,t);break a;case 3:Ll=7;break a;case 4:Ll=5;break a;case 7:va(o)?(Ll=0,Rl=null,Mu(t)):(Ll=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Gf(s):c.stateNode.complete){Ll=0,Rl=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Pu(u))}break b}}Ll=0,Rl=null,Nu(e,t,o,5);break;case 6:Ll=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return zi=Ri=null,F.H=r,F.A=a,Pl=n,Z===null?(Fl=null,Il=0,Gr(),Ul):0}function Au(){for(;Z!==null&&!ve();)ju(Z)}function ju(e){var t=Dc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Z=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dc(n,t,t.pendingProps,t.type,void 0,Il);break;case 11:t=dc(n,t,t.pendingProps,t.type.render,t.ref,Il);break;case 5:Co(t);default:Ic(n,t),t=Z=ni(t,Hl),t=Dc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Z=t}function Nu(e,t,n,r){zi=Ri=null,Co(t),wa=null,Ta=0;var i=t.return;try{if(Xs(e,i,t,n,Il)){Ul=1,Gs(e,li(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Ul=1,Gs(e,li(n,e.current)),Z=null;return}t.flags&32768?(Ei||r===1?e=!0:Bl||Il&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Pc(t.alternate,t,Hl);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Fc(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);Ul=6,Z=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(Pl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Wr,Ke(e,n,o,s,c,l),e===Fl&&(Z=Fl=null,Il=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(we,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=Pl,Pl|=4;try{tl(e,t,n)}finally{Pl=s,I.p=a,F.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=Bd,o=vr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&_r(s.ownerDocument.documentElement,s)){if(c!==null&&yr(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 _=gr(s,h),v=gr(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}}cp=!!zd,Bd=zd=null}finally{Pl=i,I.p=r,F.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Pl;Pl|=4;try{nl(e,t.alternate,t)}finally{Pl=i,I.p=r,F.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,ye();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),Ze(n),t=t.stateNode,Ae&&typeof Ae.onCommitFiberRoot==`function`)try{Ae.onCommitFiberRoot(ke,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,I.p=i}}ou&3&&Vu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,rd(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ta(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=Ze(ou),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,rd(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot==`function`)try{Ae.onPostCommitFiberRoot(ke,o)}catch{}return!0}finally{I.p=a,F.T=r,Bu(e,t)}}function Uu(e,t,n){t=li(n,t),t=qs(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ge(e,2),nd(e))}function Wu(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=li(n,e),n=Js(2),r=Ia(t,n,2),r!==null&&(Ys(n,r,t,e),Ge(r,2),nd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;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)||(Vl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Il&n)===n&&(Ul===4||Ul===3&&(Il&62914560)===Il&&300>be()-Ql?!(Pl&2)&&xu(e,0):Kl|=n,Jl===Il&&(Jl=0)),nd(e)}function qu(e,t){t===0&&(t=Ue()),e=Jr(e,t),e!==null&&(Ge(e,t),nd(e))}function Q(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Yu(e,t){return ge(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;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-Me(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Il,a=Be(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ve(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Kd()&&(e=td);for(var t=be(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}ru!==0&&ru!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Me(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=He(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Il,n=Be(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&_e(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ve(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&_e(r),Ze(n)){case 2:case 8:n=Ce;break;case 32:n=we;break;case 268435456:n=Ee;break;default:n=we}return r=sd.bind(null,e),n=ge(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&_e(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=Il;return r=Be(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),od(e,be()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Vu())return null;hu(e,t,!0)}function ld(){Xd(function(){Pl&6?ge(Se,id):ad()})}function ud(){if(td===0){var e=ia;e===0&&(e=Ie,Ie<<=1,!(Ie&261888)&&(Ie=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Wt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[nt]||null).action),o=r.submitter;o&&(t=(t=o[nt]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new fn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);ys(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<zr.length;md++){var hd=zr[md];Br(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Br(jr,`onAnimationEnd`),Br(Mr,`onAnimationIteration`),Br(Nr,`onAnimationStart`),Br(`dblclick`,`onDoubleClick`),Br(`focusin`,`onFocus`),Br(`focusout`,`onBlur`),Br(Pr,`onTransitionRun`),Br(Fr,`onTransitionStart`),Br(Ir,`onTransitionCancel`),Br(Lr,`onTransitionEnd`),_t(`onMouseEnter`,[`mouseout`,`mouseover`]),_t(`onMouseLeave`,[`mouseout`,`mouseover`]),_t(`onPointerEnter`,[`pointerout`,`pointerover`]),_t(`onPointerLeave`,[`pointerout`,`pointerover`]),gt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),gt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),gt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),gt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Vr(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){Vr(e)}i.currentTarget=null,a=c}}}}function yd(e,t){var n=t[it];n===void 0&&(n=t[it]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,ht.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(hp(t)){case 2:var i=lp;break;case 8:i=up;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!en||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ut(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}Zt(function(){var r=a,i=qt(n),s=[];a:{var c=Rr.get(e);if(c!==void 0){var l=fn,u=e;switch(e){case`keypress`:if(sn(n)===0)break a;case`keydown`:case`keyup`:l=An;break;case`focusin`:u=`focus`,l=xn;break;case`focusout`:u=`blur`,l=xn;break;case`beforeblur`:case`afterblur`:l=xn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=yn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=bn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Mn;break;case jr:case Mr:case Nr:l=Sn;break;case Lr:l=Nn;break;case`scroll`:case`scrollend`:l=mn;break;case`wheel`:l=Pn;break;case`copy`:case`cut`:case`paste`:l=Cn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=jn;break;case`toggle`:case`beforetoggle`:l=Fn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Qt(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Kt&&(u=n.relatedTarget||n.fromElement)&&(ut(u)||u[rt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ut(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=yn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=jn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ft(l),h=u==null?c:ft(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ut(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=tr;else if(Yn(c))if(nr)v=dr;else{v=lr;var y=cr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Vt(r.elementType)&&(v=tr):v=ur;if(v&&=v(e,r)){Xn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Nt(c,`number`,c.value)}switch(y=r?ft(r):window,e){case`focusin`:(Yn(y)||y.contentEditable===`true`)&&(xr=y,Sr=r,Cr=null);break;case`focusout`:Cr=Sr=xr=null;break;case`mousedown`:wr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:wr=!1,Tr(s,n,i);break;case`selectionchange`:if(br)break;case`keydown`:case`keyup`:Tr(s,n,i)}var b;if(Ln)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Gn?Un(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Bn&&n.locale!==`ko`&&(Gn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Gn&&(b=on()):(nn=i,rn=`value`in nn?nn.value:nn.textContent,Gn=!0)),y=Ed(r,x),0<y.length&&(x=new wn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Wn(n),b!==null&&(x.data=b)))),(b=zn?Kn(e,n):qn(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new wn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Qt(e,n),i!=null&&r.unshift(Td(e,i,a)),i=Qt(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Qt(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=Qt(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9
- `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function Nd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Lt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Bt(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Nd(e,t,`name`,a.name,a,null),Nd(e,t,`formEncType`,a.formEncType,a,null),Nd(e,t,`formMethod`,a.formMethod,a,null),Nd(e,t,`formTarget`,a.formTarget,a,null)):(Nd(e,t,`encType`,a.encType,a,null),Nd(e,t,`method`,a.method,a,null),Nd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Wt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:yd(`beforetoggle`,e),yd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ht.get(n)||n,St(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:Bt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Lt(e,``+r);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!W.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[nt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):St(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:yd(`error`,e),yd(`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:Nd(e,t,o,s,n,null)}}a&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:yd(`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:Nd(e,t,r,d,n,null)}}K(e,o,c,l,u,s,a,!1);return;case`select`:for(a in yd(`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:Nd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Pt(e,!!r,n,!0):Pt(e,!!r,t,!1);return;case`textarea`:for(s in yd(`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:Nd(e,t,s,c,n,null)}It(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:Nd(e,t,l,r,n,null)}return;case`dialog`:yd(`beforetoggle`,e),yd(`toggle`,e),yd(`cancel`,e),yd(`close`,e);break;case`iframe`:case`object`:yd(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)yd(gd[r],e);break;case`image`:yd(`error`,e),yd(`load`,e);break;case`details`:yd(`toggle`,e);break;case`embed`:case`source`:case`link`:yd(`error`,e),yd(`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:Nd(e,t,u,r,n,null)}return;default:if(Vt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(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)||Nd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Nd(e,t,p,m,r,f)}}Mt(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)||Nd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Nd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Pt(e,!!n,n?[]:``,!1):Pt(e,!!n,t,!0)):Pt(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:Nd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Nd(e,t,s,a,r,o)}Ft(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:Nd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Nd(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)&&Nd(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:Nd(e,t,u,p,r,m)}return;default:if(Vt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(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||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(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||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){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&&Ld(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&&Ld(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 zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(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 Ud(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 Wd(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 Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(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),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Pp(t)}function ef(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 tf(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`:tf(n),lt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(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[ct])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=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(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 lf(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 uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(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 pf(e,t,n){switch(t=Vd(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 mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lt(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=I.d;I.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=yu();return e||t}function bf(e){var t=dt(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),mt(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),mt(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),mt(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=pt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);mt(c),Fd(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,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=pt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),mt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=pt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),mt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=ie.current)?_f(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=pt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=pt(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(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=pt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+jt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),mt(t),e.head.appendChild(t))}function Ff(e){return`[src="`+jt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,mt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),mt(r),Fd(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,mt(o),o;r=Nf(n),(a=hf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,mt(a),a):(r=n,(a=hf.get(o))&&(r=m({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),mt(a),Fd(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,Rf(r,n.precedence,e));return t.instance}function Rf(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 zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,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[ct]||a[tt]||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 Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(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 Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(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=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,mt(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(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=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.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=Yf.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 $f={$$typeof:C,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function ep(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=We(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=We(0),this.hiddenUpdates=We(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function tp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ep(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=$r(3,null,null,t),e.current=a,a.stateNode=e,t=ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function np(e){return e?(e=Zr,e):Zr}function rp(e,t,n,r,i,a){i=np(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(mu(n,e,t),La(n,e,t))}function ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=Jr(e,67108864);t!==null&&mu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=fu();t=Xe(t);var n=Jr(e,t);n!==null&&mu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,dp(e,t,n,r)}finally{I.p=a,F.T=i}}function up(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,dp(e,t,n,r)}finally{I.p=a,F.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)wd(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Me(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&(eu=be()+500,rd(0,!1))}}break;case 31:case 13:s=Jr(a,2),s!==null&&mu(s,a,2),yu(),ap(a,2)}if(a=fp(r),a===null&&wd(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function fp(e){return e=qt(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=ut(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 pp=e,null}function hp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(xe()){case Se:return 2;case Ce:return 8;case we:case Te:return 32;case Ee:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`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 wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(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=dt(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=ut(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,$e(e.priority,function(){sp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,$e(e.priority,function(){sp(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 Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Kt=r,n.target.dispatchEvent(r),Kt=null}else return t=dt(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=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(mp(r||n)===null)continue;break}var a=dt(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.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[nt]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[nt]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){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 Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;rp(n,fu(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rp(e.current,2,null,e,null,null),yu(),t[rt]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.6`)throw Error(i(527,Rp,`19.2.6`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{ke=Bp.inject(zp),Ae=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Hs,s=Us,c=Ws;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=tp(e,1,!1,null,null,n,r,null,o,s,c,Fp),e[rt]=t.current,Sd(e),new Ip(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=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),y=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),b=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),x=e=>{let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)},S={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},C=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},w=l(p(),1),T=(0,w.createContext)({}),E=()=>(0,w.useContext)(T),D=(0,w.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=E()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,w.createElement)(`svg`,{ref:c,...S,width:t??l??S.width,height:t??l??S.height,stroke:e??f,strokeWidth:m,className:v(`lucide`,p,i),...!a&&!C(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),O=(e,t)=>{let n=(0,w.forwardRef)(({className:n,...r},i)=>(0,w.createElement)(D,{ref:i,iconNode:t,className:v(`lucide-${y(x(e))}`,`lucide-${e}`,n),...r}));return n.displayName=x(e),n},k=O(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),A=O(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),j=O(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),M=O(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),N=O(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),P=O(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ee=O(`cpu`,[[`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`}]]),F=O(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),I=O(`external-link`,[[`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`}]]),L=O(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),te=O(`list`,[[`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`}]]),ne=O(`message-square`,[[`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`}]]),R=O(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),z=O(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),B=O(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),re=O(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),V=O(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),ie=O(`shield-check`,[[`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`}]]),ae=O(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),oe=O(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),H=O(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),se=_();function ce(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function le(...e){return t=>{let n=!1,r=e.map(e=>{let r=ce(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():ce(e[t],null)}}}}function ue(...e){return w.useCallback(le(...e),e)}var de=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})),U=o(((e,t)=>{t.exports=de()}))(),fe=Symbol.for(`react.lazy`),pe=w.use;function me(e){return typeof e==`object`&&!!e&&`then`in e}function he(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===fe&&`_payload`in e&&me(e._payload)}function ge(e){let t=ve(e),n=w.forwardRef((e,n)=>{let{children:r,...i}=e;he(r)&&typeof pe==`function`&&(r=pe(r._payload));let a=w.Children.toArray(r),o=a.find(be);if(o){let e=o.props.children,r=a.map(t=>t===o?w.Children.count(e)>1?w.Children.only(null):w.isValidElement(e)?e.props.children:null:t);return(0,U.jsx)(t,{...i,ref:n,children:w.isValidElement(e)?w.cloneElement(e,void 0,r):null})}return(0,U.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var _e=ge(`Slot`);function ve(e){let t=w.forwardRef((e,t)=>{let{children:n,...r}=e;if(he(n)&&typeof pe==`function`&&(n=pe(n._payload)),w.isValidElement(n)){let e=Se(n),i=xe(r,n.props);return n.type!==w.Fragment&&(i.ref=t?le(t,e):e),w.cloneElement(n,i)}return w.Children.count(n)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ye=Symbol(`radix.slottable`);function be(e){return w.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ye}function xe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Se(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ce(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ce(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function we(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ce(e))&&(r&&(r+=` `),r+=t);return r}var Te=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Ee=we,De=(e,t)=>n=>{if(t?.variants==null)return Ee(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Te(t)||Te(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Ee(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Oe=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ke=(e,t)=>({classGroupId:e,validator:t}),Ae=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),je=`-`,Me=[],Ne=`arbitrary..`,Pe=e=>{let t=Le(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Ie(e);let n=e.split(je);return Fe(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Oe(i,t):t:i||Me}return n[e]||Me}}},Fe=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Fe(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(je):e.slice(t).join(je),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Ie=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ne+r:void 0})(),Le=e=>{let{theme:t,classGroups:n}=e;return Re(n,t)},Re=(e,t)=>{let n=Ae();for(let r in e){let i=e[r];ze(i,n,r,t)}return n},ze=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Be(i,t,n,r)}},Be=(e,t,n,r)=>{if(typeof e==`string`){Ve(e,t,n);return}if(typeof e==`function`){He(e,t,n,r);return}Ue(e,t,n,r)},Ve=(e,t,n)=>{let r=e===``?t:We(t,e);r.classGroupId=n},He=(e,t,n,r)=>{if(Ge(e)){ze(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ke(n,e))},Ue=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ze(o,We(t,a),n,r)}},We=(e,t)=>{let n=e,r=t.split(je),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Ae(),n.nextPart.set(t,i)),n=i}return n},Ge=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ke=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},qe=`!`,Je=`:`,Ye=[],Xe=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ze=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Je){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(qe)?(c=s.slice(0,-1),l=!0):s.startsWith(qe)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Xe(t,l,c,u)};if(t){let e=t+Je,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Xe(Ye,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Qe=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},$e=e=>({cache:Ke(e.cacheSize),parseClassName:Ze(e),sortModifiers:Qe(e),...Pe(e)}),et=/\s+/,tt=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(et),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+qe:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},nt=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=rt(n))&&(i&&(i+=` `),i+=r);return i},rt=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=rt(e[r]))&&(n&&(n+=` `),n+=t);return n},it=(e,...t)=>{let n,r,i,a,o=o=>(n=$e(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=tt(e,n);return i(e,a),a};return a=o,(...e)=>a(nt(...e))},at=[],ot=e=>{let t=t=>t[e]||at;return t.isThemeGetter=!0,t},st=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ct=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ut=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ft=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=e=>lt.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),gt=e=>!!e&&Number.isInteger(Number(e)),_t=e=>e.endsWith(`%`)&&W(e.slice(0,-1)),vt=e=>ut.test(e),yt=()=>!0,bt=e=>dt.test(e)&&!ft.test(e),xt=()=>!1,St=e=>pt.test(e),Ct=e=>mt.test(e),wt=e=>!G(e)&&!K(e),Tt=e=>Bt(e,Wt,xt),G=e=>st.test(e),Et=e=>Bt(e,Gt,bt),Dt=e=>Bt(e,Kt,W),Ot=e=>Bt(e,Jt,yt),kt=e=>Bt(e,qt,xt),At=e=>Bt(e,Ht,xt),jt=e=>Bt(e,Ut,Ct),Mt=e=>Bt(e,Yt,St),K=e=>ct.test(e),Nt=e=>Vt(e,Gt),Pt=e=>Vt(e,qt),Ft=e=>Vt(e,Ht),It=e=>Vt(e,Wt),Lt=e=>Vt(e,Ut),Rt=e=>Vt(e,Yt,!0),zt=e=>Vt(e,Jt,!0),Bt=(e,t,n)=>{let r=st.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Vt=(e,t,n=!1)=>{let r=ct.exec(e);return r?r[1]?t(r[1]):n:!1},Ht=e=>e===`position`||e===`percentage`,Ut=e=>e===`image`||e===`url`,Wt=e=>e===`length`||e===`size`||e===`bg-size`,Gt=e=>e===`length`,Kt=e=>e===`number`,qt=e=>e===`family-name`,Jt=e=>e===`number`||e===`weight`,Yt=e=>e===`shadow`,Xt=it(()=>{let e=ot(`color`),t=ot(`font`),n=ot(`text`),r=ot(`font-weight`),i=ot(`tracking`),a=ot(`leading`),o=ot(`breakpoint`),s=ot(`container`),c=ot(`spacing`),l=ot(`radius`),u=ot(`shadow`),d=ot(`inset-shadow`),f=ot(`text-shadow`),p=ot(`drop-shadow`),m=ot(`blur`),h=ot(`perspective`),g=ot(`aspect`),_=ot(`ease`),v=ot(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),K,G],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[K,G,c],T=()=>[ht,`full`,`auto`,...w()],E=()=>[gt,`none`,`subgrid`,K,G],D=()=>[`auto`,{span:[`full`,gt,K,G]},gt,K,G],O=()=>[gt,`auto`,K,G],k=()=>[`auto`,`min`,`max`,`fr`,K,G],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ht,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ht,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[ht,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,K,G],I=()=>[...b(),Ft,At,{position:[K,G]}],L=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,It,Tt,{size:[K,G]}],ne=()=>[_t,Nt,Et],R=()=>[``,`none`,`full`,l,K,G],z=()=>[``,W,Nt,Et],B=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],V=()=>[W,_t,Ft,At],ie=()=>[``,`none`,m,K,G],ae=()=>[`none`,W,K,G],oe=()=>[`none`,W,K,G],H=()=>[W,K,G],se=()=>[ht,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[vt],breakpoint:[vt],color:[yt],container:[vt],"drop-shadow":[vt],ease:[`in`,`out`,`in-out`],font:[wt],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[vt],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[vt],shadow:[vt],spacing:[`px`,W],text:[vt],"text-shadow":[vt],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ht,G,K,g]}],container:[`container`],columns:[{columns:[W,G,K,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[gt,`auto`,K,G]}],basis:[{basis:[ht,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[W,ht,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,W,K,G]}],shrink:[{shrink:[``,W,K,G]}],order:[{order:[gt,`first`,`last`,`none`,K,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Nt,Et]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,zt,Ot]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,_t,G]}],"font-family":[{font:[Pt,kt,t]}],"font-features":[{"font-features":[G]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,K,G]}],"line-clamp":[{"line-clamp":[W,`none`,K,Dt]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,K,G]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,K,G]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...B(),`wavy`]}],"text-decoration-thickness":[{decoration:[W,`from-font`,`auto`,K,Et]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[W,`auto`,K,G]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,K,G]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,K,G]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},gt,K,G],radial:[``,K,G],conic:[gt,K,G]},Lt,jt]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":z()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...B(),`hidden`,`none`]}],"divide-style":[{divide:[...B(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...B(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[W,K,G]}],"outline-w":[{outline:[``,W,Nt,Et]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,Rt,Mt]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Rt,Mt]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:z()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[W,Et]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Rt,Mt]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[W,K,G]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,K,G]}],filter:[{filter:[``,`none`,K,G]}],blur:[{blur:ie()}],brightness:[{brightness:[W,K,G]}],contrast:[{contrast:[W,K,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Rt,Mt]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,W,K,G]}],"hue-rotate":[{"hue-rotate":[W,K,G]}],invert:[{invert:[``,W,K,G]}],saturate:[{saturate:[W,K,G]}],sepia:[{sepia:[``,W,K,G]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,K,G]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[W,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[W,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,W,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,K,G]}],"backdrop-invert":[{"backdrop-invert":[``,W,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[W,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[W,K,G]}],"backdrop-sepia":[{"backdrop-sepia":[``,W,K,G]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,K,G]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[W,`initial`,K,G]}],ease:[{ease:[`linear`,`initial`,_,K,G]}],delay:[{delay:[W,K,G]}],animate:[{animate:[`none`,v,K,G]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,K,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:H()}],"skew-x":[{"skew-x":H()}],"skew-y":[{"skew-y":H()}],transform:[{transform:[K,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":[`translate-none`],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,K,G]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,K,G]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[W,Nt,Et,Dt]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function q(...e){return Xt(we(e))}var Zt=De(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-sm text-sm font-semibold shadow-none transition duration-200 ease-out active:translate-y-px disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:ring-2 focus-visible:ring-ring/35 focus-visible:ring-offset-0 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`border border-primary/80 bg-primary text-primary-foreground shadow-sm shadow-primary/15 hover:border-primary hover:bg-primary/90`,ghost:`border border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,destructive:`border border-destructive bg-destructive text-destructive-foreground hover:bg-destructive/90`,secondary:`border border-border/80 bg-secondary text-secondary-foreground shadow-xs hover:border-primary/35 hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-3`,icon:`h-8 w-8 p-0`,sm:`h-8 px-2.5`}},defaultVariants:{variant:`default`,size:`default`}});function Qt({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,U.jsx)(r?_e:`button`,{className:q(Zt({variant:t,size:n,className:e})),...i})}var $t=l(h(),1);function en(e,[t,n]){return Math.min(n,Math.max(t,e))}typeof window<`u`&&window.document&&window.document.createElement;function tn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function nn(e,t){let n=w.createContext(t),r=e=>{let{children:t,...r}=e,i=w.useMemo(()=>r,Object.values(r));return(0,U.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=w.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function rn(e,t=[]){let n=[];function r(t,r){let i=w.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=w.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=w.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>w.createContext(e));return function(n){let r=n?.[e]||t;return w.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,an(i,...t)]}function an(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function on(e){let t=sn(e),n=w.forwardRef((e,n)=>{let{children:r,...i}=e,a=w.Children.toArray(r),o=a.find(ln);if(o){let e=o.props.children,r=a.map(t=>t===o?w.Children.count(e)>1?w.Children.only(null):w.isValidElement(e)?e.props.children:null:t);return(0,U.jsx)(t,{...i,ref:n,children:w.isValidElement(e)?w.cloneElement(e,void 0,r):null})}return(0,U.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function sn(e){let t=w.forwardRef((e,t)=>{let{children:n,...r}=e;if(w.isValidElement(n)){let e=dn(n),i=un(r,n.props);return n.type!==w.Fragment&&(i.ref=t?le(t,e):e),w.cloneElement(n,i)}return w.Children.count(n)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cn=Symbol(`radix.slottable`);function ln(e){return w.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===cn}function un(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function dn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function fn(e){let t=e+`CollectionProvider`,[n,r]=rn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=w.useRef(null),a=w.useRef(new Map).current;return(0,U.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=on(s),l=w.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,U.jsx)(c,{ref:ue(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=on(u),p=w.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=w.useRef(null),s=ue(t,o),c=a(u,n);return w.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,U.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return w.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var pn=w.createContext(void 0);function mn(e){let t=w.useContext(pn);return e||t||`ltr`}var hn=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=on(`Primitive.${t}`),r=w.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,U.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gn(e,t){e&&$t.flushSync(()=>e.dispatchEvent(t))}function _n(e){let t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...e)=>t.current?.(...e),[])}function vn(e,t=globalThis?.document){let n=_n(e);w.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var yn=`DismissableLayer`,bn=`dismissableLayer.update`,xn=`dismissableLayer.pointerDownOutside`,Sn=`dismissableLayer.focusOutside`,Cn,wn=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tn=w.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=w.useContext(wn),[u,d]=w.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=w.useState({}),m=ue(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=On(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=kn(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return vn(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),w.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Cn=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),An(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Cn)}},[u,f,n,l]),w.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),An())},[u,l]),w.useEffect(()=>{let e=()=>p({});return document.addEventListener(bn,e),()=>document.removeEventListener(bn,e)},[]),(0,U.jsx)(hn.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:tn(e.onFocusCapture,S.onFocusCapture),onBlurCapture:tn(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:tn(e.onPointerDownCapture,x.onPointerDownCapture)})});Tn.displayName=yn;var En=`DismissableLayerBranch`,Dn=w.forwardRef((e,t)=>{let n=w.useContext(wn),r=w.useRef(null),i=ue(t,r);return w.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,U.jsx)(hn.div,{...e,ref:i})});Dn.displayName=En;function On(e,t=globalThis?.document){let n=_n(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){jn(xn,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kn(e,t=globalThis?.document){let n=_n(e),r=w.useRef(!1);return w.useEffect(()=>{let e=e=>{e.target&&!r.current&&jn(Sn,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function An(){let e=new CustomEvent(bn);document.dispatchEvent(e)}function jn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?gn(i,a):i.dispatchEvent(a)}var Mn=0;function Nn(){w.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Pn()),document.body.insertAdjacentElement(`beforeend`,e[1]??Pn()),Mn++,()=>{Mn===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Mn--}},[])}function Pn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Fn=`focusScope.autoFocusOnMount`,In=`focusScope.autoFocusOnUnmount`,Ln={bubbles:!1,cancelable:!0},Rn=`FocusScope`,zn=w.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=w.useState(null),l=_n(i),u=_n(a),d=w.useRef(null),f=ue(t,e=>c(e)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Kn(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Kn(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Kn(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),w.useEffect(()=>{if(s){qn.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Fn,Ln);s.addEventListener(Fn,l),s.dispatchEvent(t),t.defaultPrevented||(Bn(Xn(Hn(s)),{select:!0}),document.activeElement===e&&Kn(s))}return()=>{s.removeEventListener(Fn,l),setTimeout(()=>{let t=new CustomEvent(In,Ln);s.addEventListener(In,u),s.dispatchEvent(t),t.defaultPrevented||Kn(e??document.body,{select:!0}),s.removeEventListener(In,u),qn.remove(p)},0)}}},[s,l,u,p]);let m=w.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Vn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Kn(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Kn(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,U.jsx)(hn.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});zn.displayName=Rn;function Bn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Kn(r,{select:t}),document.activeElement!==n)return}function Vn(e){let t=Hn(e);return[Un(t,e),Un(t.reverse(),e)]}function Hn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Un(e,t){for(let n of e)if(!Wn(n,{upTo:t}))return n}function Wn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Gn(e){return e instanceof HTMLInputElement&&`select`in e}function Kn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gn(e)&&t&&e.select()}}var qn=Jn();function Jn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Yn(e,t),e.unshift(t)},remove(t){e=Yn(e,t),e[0]?.resume()}}}function Yn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Xn(e){return e.filter(e=>e.tagName!==`A`)}var Zn=globalThis?.document?w.useLayoutEffect:()=>{},Qn=w.useId||(()=>void 0),$n=0;function er(e){let[t,n]=w.useState(Qn());return Zn(()=>{e||n(e=>e??String($n++))},[e]),e||(t?`radix-${t}`:``)}var tr=[`top`,`right`,`bottom`,`left`],nr=Math.min,rr=Math.max,ir=Math.round,ar=Math.floor,or=e=>({x:e,y:e}),sr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function cr(e,t,n){return rr(e,nr(t,n))}function lr(e,t){return typeof e==`function`?e(t):e}function ur(e){return e.split(`-`)[0]}function dr(e){return e.split(`-`)[1]}function fr(e){return e===`x`?`y`:`x`}function pr(e){return e===`y`?`height`:`width`}function mr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function hr(e){return fr(mr(e))}function gr(e,t,n){n===void 0&&(n=!1);let r=dr(e),i=hr(e),a=pr(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Tr(o)),[o,Tr(o)]}function _r(e){let t=Tr(e);return[vr(e),t,vr(t)]}function vr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var yr=[`left`,`right`],br=[`right`,`left`],xr=[`top`,`bottom`],Sr=[`bottom`,`top`];function Cr(e,t,n){switch(e){case`top`:case`bottom`:return n?t?br:yr:t?yr:br;case`left`:case`right`:return t?xr:Sr;default:return[]}}function wr(e,t,n,r){let i=dr(e),a=Cr(ur(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vr)))),a}function Tr(e){let t=ur(e);return sr[t]+e.slice(t.length)}function Er(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dr(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Er(e)}function Or(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function kr(e,t,n){let{reference:r,floating:i}=e,a=mr(t),o=hr(t),s=pr(o),c=ur(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(dr(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Ar(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=lr(t,e),p=Dr(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Or(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Or(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var jr=50,Mr=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Ar},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=kr(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<jr&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=kr(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Nr=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=lr(e,t)||{};if(l==null)return{};let d=Dr(u),f={x:n,y:r},p=hr(i),m=pr(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=nr(d[_],T),D=nr(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=cr(O,A,k),M=!c.arrow&&dr(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Pr=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=lr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ur(r),_=mr(o),v=ur(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Tr(o)]:_r(o)),x=p!==`none`;!d&&x&&b.push(...wr(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=gr(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==mr(t))||T.every(e=>mr(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=mr(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Fr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ir(e){return tr.some(t=>e[t]>=0)}var Lr=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=lr(e,t);switch(i){case`referenceHidden`:{let e=Fr(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ir(e)}}}case`escaped`:{let e=Fr(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ir(e)}}}default:return{}}}}},Rr=new Set([`left`,`top`]);async function zr(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ur(n),s=dr(n),c=mr(n)===`y`,l=Rr.has(o)?-1:1,u=a&&c?-1:1,d=lr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Br=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await zr(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Vr=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=lr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=mr(ur(i)),p=fr(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=cr(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=cr(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Hr=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=lr(e,t),u={x:n,y:r},d=mr(i),f=fr(d),p=u[f],m=u[d],h=lr(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Rr.has(ur(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ur=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=lr(e,t),u=await o.detectOverflow(t,l),d=ur(i),f=dr(i),p=mr(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=nr(h-u[g],v),x=nr(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=rr(u.left,0),t=rr(u.right,0),n=rr(u.top,0),r=rr(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:rr(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:rr(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Wr(){return typeof window<`u`}function Gr(e){return Jr(e)?(e.nodeName||``).toLowerCase():`#document`}function Kr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qr(e){return((Jr(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Jr(e){return Wr()?e instanceof Node||e instanceof Kr(e).Node:!1}function Yr(e){return Wr()?e instanceof Element||e instanceof Kr(e).Element:!1}function Xr(e){return Wr()?e instanceof HTMLElement||e instanceof Kr(e).HTMLElement:!1}function Zr(e){return!Wr()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Kr(e).ShadowRoot}function Qr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=li(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function $r(e){return/^(table|td|th)$/.test(Gr(e))}function ei(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ti=/transform|translate|scale|rotate|perspective|filter/,ni=/paint|layout|strict|content/,ri=e=>!!e&&e!==`none`,ii;function ai(e){let t=Yr(e)?li(e):e;return ri(t.transform)||ri(t.translate)||ri(t.scale)||ri(t.rotate)||ri(t.perspective)||!si()&&(ri(t.backdropFilter)||ri(t.filter))||ti.test(t.willChange||``)||ni.test(t.contain||``)}function oi(e){let t=di(e);for(;Xr(t)&&!ci(t);){if(ai(t))return t;if(ei(t))return null;t=di(t)}return null}function si(){return ii??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ii}function ci(e){return/^(html|body|#document)$/.test(Gr(e))}function li(e){return Kr(e).getComputedStyle(e)}function ui(e){return Yr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function di(e){if(Gr(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Zr(e)&&e.host||qr(e);return Zr(t)?t.host:t}function fi(e){let t=di(e);return ci(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xr(t)&&Qr(t)?t:fi(t)}function pi(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=fi(e),i=r===e.ownerDocument?.body,a=Kr(r);if(i){let e=mi(a);return t.concat(a,a.visualViewport||[],Qr(r)?r:[],e&&n?pi(e):[])}else return t.concat(r,pi(r,[],n))}function mi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hi(e){let t=li(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Xr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ir(n)!==a||ir(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function gi(e){return Yr(e)?e:e.contextElement}function _i(e){let t=gi(e);if(!Xr(t))return or(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=hi(t),o=(a?ir(n.width):n.width)/r,s=(a?ir(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var vi=or(0);function yi(e){let t=Kr(e);return!si()||!t.visualViewport?vi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bi(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kr(e)?!1:t}function xi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=gi(e),o=or(1);t&&(r?Yr(r)&&(o=_i(r)):o=_i(e));let s=bi(a,n,r)?yi(a):or(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Kr(a),t=r&&Yr(r)?Kr(r):r,n=e,i=mi(n);for(;i&&r&&t!==n;){let e=_i(i),t=i.getBoundingClientRect(),r=li(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Kr(i),i=mi(n)}}return Or({width:u,height:d,x:c,y:l})}function Si(e,t){let n=ui(e).scrollLeft;return t?t.left+n:xi(qr(e)).left+n}function Ci(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Si(e,n),y:n.top+t.scrollTop}}function wi(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=qr(r),s=t?ei(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=or(1),u=or(0),d=Xr(r);if((d||!d&&!a)&&((Gr(r)!==`body`||Qr(o))&&(c=ui(r)),d)){let e=xi(r);l=_i(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ci(o,c):or(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ti(e){return Array.from(e.getClientRects())}function Ei(e){let t=qr(e),n=ui(e),r=e.ownerDocument.body,i=rr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=rr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Si(e),s=-n.scrollTop;return li(r).direction===`rtl`&&(o+=rr(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Di=25;function Oi(e,t){let n=Kr(e),r=qr(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=si();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Si(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Di&&(a-=o)}else l<=Di&&(a+=l);return{width:a,height:o,x:s,y:c}}function ki(e,t){let n=xi(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Xr(e)?_i(e):or(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ai(e,t,n){let r;if(t===`viewport`)r=Oi(e,n);else if(t===`document`)r=Ei(qr(e));else if(Yr(t))r=ki(t,n);else{let n=yi(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Or(r)}function ji(e,t){let n=di(e);return n===t||!Yr(n)||ci(n)?!1:li(n).position===`fixed`||ji(n,t)}function Mi(e,t){let n=t.get(e);if(n)return n;let r=pi(e,[],!1).filter(e=>Yr(e)&&Gr(e)!==`body`),i=null,a=li(e).position===`fixed`,o=a?di(e):e;for(;Yr(o)&&!ci(o);){let t=li(o),n=ai(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Qr(o)&&!n&&ji(e,o))?r=r.filter(e=>e!==o):i=t,o=di(o)}return t.set(e,r),r}function Ni(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ei(t)?[]:Mi(t,this._c):[].concat(n),r],o=Ai(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ai(t,a[e],i);s=rr(n.top,s),c=nr(n.right,c),l=nr(n.bottom,l),u=rr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pi(e){let{width:t,height:n}=hi(e);return{width:t,height:n}}function Fi(e,t,n){let r=Xr(t),i=qr(t),a=n===`fixed`,o=xi(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=or(0);function l(){c.x=Si(i)}if(r||!r&&!a)if((Gr(t)!==`body`||Qr(i))&&(s=ui(t)),r){let e=xi(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ci(i,s):or(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Ii(e){return li(e).position===`static`}function Li(e,t){if(!Xr(e)||li(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return qr(e)===n&&(n=n.ownerDocument.body),n}function Ri(e,t){let n=Kr(e);if(ei(e))return n;if(!Xr(e)){let t=di(e);for(;t&&!ci(t);){if(Yr(t)&&!Ii(t))return t;t=di(t)}return n}let r=Li(e,t);for(;r&&$r(r)&&Ii(r);)r=Li(r,t);return r&&ci(r)&&Ii(r)&&!ai(r)?n:r||oi(e)||n}var zi=async function(e){let t=this.getOffsetParent||Ri,n=this.getDimensions,r=await n(e.floating);return{reference:Fi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bi(e){return li(e).direction===`rtl`}var Vi={convertOffsetParentRelativeRectToViewportRelativeRect:wi,getDocumentElement:qr,getClippingRect:Ni,getOffsetParent:Ri,getElementRects:zi,getClientRects:Ti,getDimensions:Pi,getScale:_i,isElement:Yr,isRTL:Bi};function Hi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ui(e,t){let n=null,r,i=qr(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=ar(d),h=ar(i.clientWidth-(u+f)),g=ar(i.clientHeight-(d+p)),_=ar(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:rr(0,nr(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Hi(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Wi(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=gi(e),u=i||a?[...l?pi(l):[],...t?pi(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ui(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?xi(e):null;c&&g();function g(){let t=xi(e);h&&!Hi(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Gi=Br,Ki=Vr,qi=Pr,Ji=Ur,Yi=Lr,Xi=Nr,Zi=Hr,Qi=(e,t,n)=>{let r=new Map,i={platform:Vi,...n},a={...i.platform,_c:r};return Mr(e,t,{...i,platform:a})},$i=typeof document<`u`?w.useLayoutEffect:function(){};function ea(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ea(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ea(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ta(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function na(e,t){let n=ta(e);return Math.round(t*n)/n}function ra(e){let t=w.useRef(e);return $i(()=>{t.current=e}),t}function ia(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=w.useState(r);ea(f,r)||p(r);let[m,h]=w.useState(null),[g,_]=w.useState(null),v=w.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=w.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=w.useRef(null),C=w.useRef(null),T=w.useRef(u),E=c!=null,D=ra(c),O=ra(i),k=ra(l),A=w.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Qi(S.current,C.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ea(T.current,t)&&(T.current=t,$t.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);$i(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=w.useRef(!1);$i(()=>(j.current=!0,()=>{j.current=!1}),[]),$i(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=w.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),N=w.useMemo(()=>({reference:b,floating:x}),[b,x]),P=w.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=na(N.floating,u.x),r=na(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ta(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var aa=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Xi({element:r.current,padding:i}).fn(n):r?Xi({element:r,padding:i}).fn(n):{}}}},oa=(e,t)=>{let n=Gi(e);return{name:n.name,fn:n.fn,options:[e,t]}},sa=(e,t)=>{let n=Ki(e);return{name:n.name,fn:n.fn,options:[e,t]}},ca=(e,t)=>({fn:Zi(e).fn,options:[e,t]}),la=(e,t)=>{let n=qi(e);return{name:n.name,fn:n.fn,options:[e,t]}},ua=(e,t)=>{let n=Ji(e);return{name:n.name,fn:n.fn,options:[e,t]}},da=(e,t)=>{let n=Yi(e);return{name:n.name,fn:n.fn,options:[e,t]}},fa=(e,t)=>{let n=aa(e);return{name:n.name,fn:n.fn,options:[e,t]}},pa=`Arrow`,ma=w.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,U.jsx)(hn.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,U.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});ma.displayName=pa;var ha=ma;function ga(e){let[t,n]=w.useState(void 0);return Zn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var _a=`Popper`,[va,ya]=rn(_a),[ba,xa]=va(_a),Sa=e=>{let{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return(0,U.jsx)(ba,{scope:t,anchor:r,onAnchorChange:i,children:n})};Sa.displayName=_a;var Ca=`PopperAnchor`,wa=w.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=xa(Ca,n),o=w.useRef(null),s=ue(t,o),c=w.useRef(null);return w.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,U.jsx)(hn.div,{...i,ref:s})});wa.displayName=Ca;var Ta=`PopperContent`,[Ea,Da]=va(Ta),Oa=w.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=xa(Ta,n),[_,v]=w.useState(null),y=ue(t,e=>v(e)),[b,x]=w.useState(null),S=ga(b),C=S?.width??0,T=S?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(Ma),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:ee}=ia({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Wi(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[oa({mainAxis:i+T,alignmentAxis:o}),c&&sa({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?ca():void 0,...A}),c&&la({...A}),ua({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&fa({element:b,padding:s}),Na({arrowWidth:C,arrowHeight:T}),f&&da({strategy:`referenceHidden`,...A})]}),[F,I]=Pa(N),L=_n(m);Zn(()=>{P&&L?.()},[P,L]);let te=ee.arrow?.x,ne=ee.arrow?.y,R=ee.arrow?.centerOffset!==0,[z,B]=w.useState();return Zn(()=>{_&&B(window.getComputedStyle(_).zIndex)},[_]),(0,U.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(` `),...ee.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,U.jsx)(Ea,{scope:n,placedSide:F,onArrowChange:x,arrowX:te,arrowY:ne,shouldHideArrow:R,children:(0,U.jsx)(hn.div,{"data-side":F,"data-align":I,...h,ref:y,style:{...h.style,animation:P?void 0:`none`}})})})});Oa.displayName=Ta;var ka=`PopperArrow`,Aa={top:`bottom`,right:`left`,bottom:`top`,left:`right`},ja=w.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Da(ka,n),a=Aa[i.placedSide];return(0,U.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,U.jsx)(ha,{...r,ref:t,style:{...r.style,display:`block`}})})});ja.displayName=ka;function Ma(e){return e!==null}var Na=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Pa(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Pa(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Fa=Sa,Ia=wa,La=Oa,Ra=ja,za=`Portal`,Ba=w.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=w.useState(!1);Zn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?$t.createPortal((0,U.jsx)(hn.div,{...r,ref:t}),o):null});Ba.displayName=za;var Va=w.useInsertionEffect||Zn;function Ha({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Ua({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=w.useRef(e!==void 0);w.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,w.useCallback(t=>{if(s){let n=Wa(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Ua({defaultProp:e,onChange:t}){let[n,r]=w.useState(e),i=w.useRef(n),a=w.useRef(t);return Va(()=>{a.current=t},[t]),w.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Wa(e){return typeof e==`function`}function Ga(e){let t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ka=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),qa=`VisuallyHidden`,Ja=w.forwardRef((e,t)=>(0,U.jsx)(hn.span,{...e,ref:t,style:{...Ka,...e.style}}));Ja.displayName=qa;var Ya=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Xa=new WeakMap,Za=new WeakMap,Qa={},$a=0,eo=function(e){return e&&(e.host||eo(e.parentNode))},to=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=eo(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},no=function(e,t,n,r){var i=to(t,Array.isArray(e)?e:[e]);Qa[n]||(Qa[n]=new WeakMap);var a=Qa[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Xa.get(e)||0)+1,l=(a.get(e)||0)+1;Xa.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Za.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),$a++,function(){o.forEach(function(e){var t=Xa.get(e)-1,i=a.get(e)-1;Xa.set(e,t),a.set(e,i),t||(Za.has(e)||e.removeAttribute(r),Za.delete(e)),i||e.removeAttribute(n)}),$a--,$a||(Xa=new WeakMap,Xa=new WeakMap,Za=new WeakMap,Qa={})}},ro=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ya(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),no(r,i,n,`aria-hidden`)):function(){return null}},io=function(){return io=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},io.apply(this,arguments)};function J(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ao(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var oo=`right-scroll-bar-position`,so=`width-before-scroll-bar`,co=`with-scroll-bars-hidden`,lo=`--removed-body-scroll-bar-size`;function uo(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function fo(e,t){var n=(0,w.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var po=typeof window<`u`?w.useLayoutEffect:w.useEffect,mo=new WeakMap;function ho(e,t){var n=fo(t||null,function(t){return e.forEach(function(e){return uo(e,t)})});return po(function(){var t=mo.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||uo(e,null)}),i.forEach(function(e){r.has(e)||uo(e,a)})}mo.set(n,e)},[e]),n}function go(e){return e}function _o(e,t){t===void 0&&(t=go);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function vo(e){e===void 0&&(e={});var t=_o(null);return t.options=io({async:!0,ssr:!1},e),t}var yo=function(e){var t=e.sideCar,n=J(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return w.createElement(r,io({},n))};yo.isSideCarExport=!0;function bo(e,t){return e.useMedium(t),yo}var xo=vo(),So=function(){},Co=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:So,onWheelCapture:So,onTouchMoveCapture:So}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=J(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=ho([n,t]),C=io(io({},b),i);return w.createElement(w.Fragment,null,u&&w.createElement(x,{sideCar:xo,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?w.cloneElement(w.Children.only(s),io(io({},C),{ref:S})):w.createElement(v,io({},C,{className:c,ref:S}),s))});Co.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Co.classNames={fullWidth:so,zeroRight:oo};var wo,To=function(){if(wo)return wo;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Eo(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=To();return t&&e.setAttribute(`nonce`,t),e}function Do(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Oo(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ko=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Eo())&&(Do(t,n),Oo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ao=function(){var e=ko();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},jo=function(){var e=Ao();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Mo={left:0,top:0,right:0,gap:0},No=function(e){return parseInt(e||``,10)||0},Po=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[No(n),No(r),No(i)]},Fo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Mo;var t=Po(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Io=jo(),Lo=`data-scroll-locked`,Ro=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
10
- .${co} {
11
- overflow: hidden ${r};
12
- padding-right: ${s}px ${r};
13
- }
14
- body[${Lo}] {
15
- overflow: hidden ${r};
16
- overscroll-behavior: contain;
17
- ${[t&&`position: relative ${r};`,n===`margin`&&`
18
- padding-left: ${i}px;
19
- padding-top: ${a}px;
20
- padding-right: ${o}px;
21
- margin-left:0;
22
- margin-top:0;
23
- margin-right: ${s}px ${r};
24
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
25
- }
26
-
27
- .${oo} {
28
- right: ${s}px ${r};
29
- }
30
-
31
- .${so} {
32
- margin-right: ${s}px ${r};
33
- }
34
-
35
- .${oo} .${oo} {
36
- right: 0 ${r};
37
- }
38
-
39
- .${so} .${so} {
40
- margin-right: 0 ${r};
41
- }
42
-
43
- body[${Lo}] {
44
- ${lo}: ${s}px;
45
- }
46
- `},zo=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Bo=function(){w.useEffect(function(){return document.body.setAttribute(Lo,(zo()+1).toString()),function(){var e=zo()-1;e<=0?document.body.removeAttribute(Lo):document.body.setAttribute(Lo,e.toString())}},[])},Vo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Bo();var a=w.useMemo(function(){return Fo(i)},[i]);return w.createElement(Io,{styles:Ro(a,!t,i,n?``:`!important`)})},Ho=!1;if(typeof window<`u`)try{var Uo=Object.defineProperty({},`passive`,{get:function(){return Ho=!0,!0}});window.addEventListener(`test`,Uo,Uo),window.removeEventListener(`test`,Uo,Uo)}catch{Ho=!1}var Wo=Ho?{passive:!1}:!1,Go=function(e){return e.tagName===`TEXTAREA`},Ko=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Go(e)&&n[t]===`visible`)},qo=function(e){return Ko(e,`overflowY`)},Jo=function(e){return Ko(e,`overflowX`)},Yo=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Qo(e,r)){var i=$o(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xo=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Zo=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Qo=function(e,t){return e===`v`?qo(t):Jo(t)},$o=function(e,t){return e===`v`?Xo(t):Zo(t)},es=function(e,t){return e===`h`&&t===`rtl`?-1:1},ts=function(e,t,n,r,i){var a=es(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=$o(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Qo(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},ns=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rs=function(e){return[e.deltaX,e.deltaY]},is=function(e){return e&&`current`in e?e.current:e},as=function(e,t){return e[0]===t[0]&&e[1]===t[1]},os=function(e){return`
47
- .block-interactivity-${e} {pointer-events: none;}
48
- .allow-interactivity-${e} {pointer-events: all;}
49
- `},ss=0,cs=[];function ls(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(ss++)[0],a=w.useState(jo)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ao([e.lockRef.current],(e.shards||[]).map(is),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=ns(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Yo(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Yo(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ts(h,t,e,h===`h`?s:c,!0)},[]),c=w.useCallback(function(e){var n=e;if(!(!cs.length||cs[cs.length-1]!==a)){var r=`deltaY`in n?rs(n):ns(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&as(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(is).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=w.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:us(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=w.useCallback(function(e){n.current=ns(e),r.current=void 0},[]),d=w.useCallback(function(t){l(t.type,rs(t),t.target,s(t,e.lockRef.current))},[]),f=w.useCallback(function(t){l(t.type,ns(t),t.target,s(t,e.lockRef.current))},[]);w.useEffect(function(){return cs.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Wo),document.addEventListener(`touchmove`,c,Wo),document.addEventListener(`touchstart`,u,Wo),function(){cs=cs.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Wo),document.removeEventListener(`touchmove`,c,Wo),document.removeEventListener(`touchstart`,u,Wo)}},[]);var p=e.removeScrollBar,m=e.inert;return w.createElement(w.Fragment,null,m?w.createElement(a,{styles:os(i)}):null,p?w.createElement(Vo,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function us(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ds=bo(xo,ls),fs=w.forwardRef(function(e,t){return w.createElement(Co,io({},e,{ref:t,sideCar:ds}))});fs.classNames=Co.classNames;var ps=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ms=[` `,`Enter`],hs=`Select`,[gs,_s,vs]=fn(hs),[ys,bs]=rn(hs,[vs,ya]),xs=ya(),[Ss,Cs]=ys(hs),[ws,Ts]=ys(hs),Es=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=xs(t),[g,_]=w.useState(null),[v,y]=w.useState(null),[b,x]=w.useState(!1),S=mn(l),[C,T]=Ha({prop:r,defaultProp:i??!1,onChange:a,caller:hs}),[E,D]=Ha({prop:o,defaultProp:s,onChange:c,caller:hs}),O=w.useRef(null),k=g?m||!!g.closest(`form`):!0,[A,j]=w.useState(new Set),M=Array.from(A).map(e=>e.props.value).join(`;`);return(0,U.jsx)(Fa,{...h,children:(0,U.jsxs)(Ss,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:er(),value:E,onValueChange:D,open:C,onOpenChange:T,dir:S,triggerPointerDownPosRef:O,disabled:f,children:[(0,U.jsx)(gs.Provider,{scope:t,children:(0,U.jsx)(ws,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(e=>{j(t=>new Set(t).add(e))},[]),onNativeOptionRemove:w.useCallback(e=>{j(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),k?(0,U.jsxs)(xc,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:E,onChange:e=>D(e.target.value),disabled:f,form:m,children:[E===void 0?(0,U.jsx)(`option`,{value:``}):null,Array.from(A)]},M):null]})})};Es.displayName=hs;var Ds=`SelectTrigger`,Os=w.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=xs(n),o=Cs(Ds,n),s=o.disabled||r,c=ue(t,o.onTriggerChange),l=_s(n),u=w.useRef(`touch`),[d,f,p]=Cc(e=>{let t=l().filter(e=>!e.disabled),n=wc(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,U.jsx)(Ia,{asChild:!0,...a,children:(0,U.jsx)(hn.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Sc(o.value)?``:void 0,...i,ref:c,onClick:tn(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:tn(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:tn(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&ps.includes(e.key)&&(m(),e.preventDefault())})})})});Os.displayName=Ds;var ks=`SelectValue`,As=w.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Cs(ks,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=ue(t,c.onValueNodeChange);return Zn(()=>{l(u)},[l,u]),(0,U.jsx)(hn.span,{...s,ref:d,style:{pointerEvents:`none`},children:Sc(c.value)?(0,U.jsx)(U.Fragment,{children:o}):a})});As.displayName=ks;var js=`SelectIcon`,Ms=w.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,U.jsx)(hn.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Ms.displayName=js;var Ns=`SelectPortal`,Ps=e=>(0,U.jsx)(Ba,{asChild:!0,...e});Ps.displayName=Ns;var Fs=`SelectContent`,Is=w.forwardRef((e,t)=>{let n=Cs(Fs,e.__scopeSelect),[r,i]=w.useState();if(Zn(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?$t.createPortal((0,U.jsx)(Rs,{scope:e.__scopeSelect,children:(0,U.jsx)(gs.Slot,{scope:e.__scopeSelect,children:(0,U.jsx)(`div`,{children:e.children})})}),t):null}return(0,U.jsx)(Hs,{...e,ref:t})});Is.displayName=Fs;var Ls=10,[Rs,zs]=ys(Fs),Bs=`SelectContentImpl`,Vs=on(`SelectContent.RemoveScroll`),Hs=w.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=Cs(Fs,n),[y,b]=w.useState(null),[x,S]=w.useState(null),C=ue(t,e=>b(e)),[T,E]=w.useState(null),[D,O]=w.useState(null),k=_s(n),[A,j]=w.useState(!1),M=w.useRef(!1);w.useEffect(()=>{if(y)return ro(y)},[y]),Nn();let N=w.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,x]),P=w.useCallback(()=>N([T,y]),[N,T,y]);w.useEffect(()=>{A&&P()},[A,P]);let{onOpenChange:ee,triggerPointerDownPosRef:F}=v;w.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||ee(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,ee,F]),w.useEffect(()=>{let e=()=>ee(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ee]);let[I,L]=Cc(e=>{let t=k().filter(e=>!e.disabled),n=wc(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),te=w.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&(E(e),r&&(M.current=!0))},[v.value]),ne=w.useCallback(()=>y?.focus(),[y]),R=w.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),z=r===`popper`?Ks:Ws,B=z===Ks?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,U.jsx)(Rs,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:te,selectedItem:T,onItemLeave:ne,itemTextRefCallback:R,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:I,children:(0,U.jsx)(fs,{as:Vs,allowPinchZoom:!0,children:(0,U.jsx)(zn,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:tn(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,U.jsx)(Tn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,U.jsx)(z,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...B,onPlaced:()=>j(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:tn(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&L(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})});Hs.displayName=Bs;var Us=`SelectItemAlignedPosition`,Ws=w.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=Cs(Fs,n),o=zs(Fs,n),[s,c]=w.useState(null),[l,u]=w.useState(null),d=ue(t,e=>u(e)),f=_s(n),p=w.useRef(!1),m=w.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=w.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Ls,d=en(a,[Ls,Math.max(Ls,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Ls,d=en(a,[Ls,Math.max(Ls,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Ls*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Ls,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Ls}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Zn(()=>y(),[y]);let[b,x]=w.useState();return Zn(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,U.jsx)(qs,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:w.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,U.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,U.jsx)(hn.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Ws.displayName=Us;var Gs=`SelectPopperPosition`,Ks=w.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Ls,...a}=e,o=xs(n);return(0,U.jsx)(La,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Ks.displayName=Gs;var[qs,Js]=ys(Fs,{}),Ys=`SelectViewport`,Xs=w.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=zs(Ys,n),o=Js(Ys,n),s=ue(t,a.onViewportChange),c=w.useRef(0);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,U.jsx)(gs.Slot,{scope:n,children:(0,U.jsx)(hn.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:tn(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Ls*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});Xs.displayName=Ys;var Zs=`SelectGroup`,[Qs,$s]=ys(Zs),ec=w.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=er();return(0,U.jsx)(Qs,{scope:n,id:i,children:(0,U.jsx)(hn.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});ec.displayName=Zs;var tc=`SelectLabel`,nc=w.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=$s(tc,n);return(0,U.jsx)(hn.div,{id:i.id,...r,ref:t})});nc.displayName=tc;var rc=`SelectItem`,[ic,ac]=ys(rc),oc=w.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Cs(rc,n),c=zs(rc,n),l=s.value===r,[u,d]=w.useState(a??``),[f,p]=w.useState(!1),m=ue(t,e=>c.itemRefCallback?.(e,r,i)),h=er(),g=w.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,U.jsx)(ic,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:w.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,U.jsx)(gs.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,U.jsx)(hn.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:tn(o.onFocus,()=>p(!0)),onBlur:tn(o.onBlur,()=>p(!1)),onClick:tn(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:tn(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:tn(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:tn(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:tn(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:tn(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(ms.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});oc.displayName=rc;var sc=`SelectItemText`,cc=w.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=Cs(sc,n),s=zs(sc,n),c=ac(sc,n),l=Ts(sc,n),[u,d]=w.useState(null),f=ue(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=w.useMemo(()=>(0,U.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Zn(()=>(h(m),()=>g(m)),[h,g,m]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(hn.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?$t.createPortal(a.children,o.valueNode):null]})});cc.displayName=sc;var lc=`SelectItemIndicator`,uc=w.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return ac(lc,n).isSelected?(0,U.jsx)(hn.span,{"aria-hidden":!0,...r,ref:t}):null});uc.displayName=lc;var dc=`SelectScrollUpButton`,fc=w.forwardRef((e,t)=>{let n=zs(dc,e.__scopeSelect),r=Js(dc,e.__scopeSelect),[i,a]=w.useState(!1),o=ue(t,r.onScrollButtonChange);return Zn(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,U.jsx)(hc,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});fc.displayName=dc;var pc=`SelectScrollDownButton`,mc=w.forwardRef((e,t)=>{let n=zs(pc,e.__scopeSelect),r=Js(pc,e.__scopeSelect),[i,a]=w.useState(!1),o=ue(t,r.onScrollButtonChange);return Zn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,U.jsx)(hc,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});mc.displayName=pc;var hc=w.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=zs(`SelectScrollButton`,n),o=w.useRef(null),s=_s(n),c=w.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return w.useEffect(()=>()=>c(),[c]),Zn(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,U.jsx)(hn.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:tn(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:tn(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:tn(i.onPointerLeave,()=>{c()})})}),gc=`SelectSeparator`,_c=w.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,U.jsx)(hn.div,{"aria-hidden":!0,...r,ref:t})});_c.displayName=gc;var vc=`SelectArrow`,yc=w.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=xs(n),a=Cs(vc,n),o=zs(vc,n);return a.open&&o.position===`popper`?(0,U.jsx)(Ra,{...i,...r,ref:t}):null});yc.displayName=vc;var bc=`SelectBubbleInput`,xc=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=w.useRef(null),a=ue(r,i),o=Ga(t);return w.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,U.jsx)(hn.select,{...n,style:{...Ka,...n.style},ref:a,defaultValue:t})});xc.displayName=bc;function Sc(e){return e===``||e===void 0}function Cc(e){let t=_n(e),n=w.useRef(``),r=w.useRef(0),i=w.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=w.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function wc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Tc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Tc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ec=Es,Dc=Os,Oc=As,kc=Ms,Ac=Ps,jc=Is,Mc=Xs,Nc=oc,Pc=cc,Fc=uc,Ic=Ec,Lc=Oc;function Rc({className:e,children:t,...n}){return(0,U.jsxs)(Dc,{className:q(`flex h-9 w-full items-center justify-between rounded-sm border border-input bg-card/90 px-3 text-sm text-foreground outline-none shadow-inner shadow-black/10 transition duration-200 hover:border-primary/35 focus:border-ring focus:ring-2 focus:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:[t,(0,U.jsx)(kc,{asChild:!0,children:(0,U.jsx)(P,{className:`h-4 w-4 opacity-60`})})]})}function zc({className:e,children:t,position:n=`popper`,...r}){return(0,U.jsx)(Ac,{children:(0,U.jsx)(jc,{position:n,className:q(`z-50 max-h-80 min-w-[8rem] overflow-hidden rounded-sm border border-border/90 bg-popover/98 text-popover-foreground shadow-xl shadow-black/45 backdrop-blur`,e),...r,children:(0,U.jsx)(Mc,{className:`p-1`,children:t})})})}function Bc({className:e,children:t,...n}){return(0,U.jsxs)(Nc,{className:q(`relative flex min-h-8 cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50`,e),...n,children:[(0,U.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,U.jsx)(Fc,{children:(0,U.jsx)(N,{className:`h-4 w-4`})})}),(0,U.jsx)(Pc,{children:t})]})}function Vc({className:e,...t}){return(0,U.jsx)(`textarea`,{className:q(`min-h-9 w-full resize-none rounded-sm border border-input bg-card/90 px-3 py-2.5 leading-6 text-foreground outline-none shadow-inner shadow-black/10 transition duration-200 placeholder:text-muted-foreground/65 focus:border-ring focus:ring-2 focus:ring-ring/20`,e),...t})}var Hc=De(`inline-flex items-center rounded-sm border px-2 py-1 font-mono text-[11px] font-semibold uppercase tracking-[0.12em]`,{variants:{variant:{default:`border-border/80 bg-muted/70 text-muted-foreground`,success:`border-primary/40 bg-primary/15 text-primary`,destructive:`border-destructive/40 bg-destructive/15 text-destructive`}},defaultVariants:{variant:`default`}});function Uc({className:e,variant:t,...n}){return(0,U.jsx)(`span`,{className:q(Hc({variant:t,className:e})),...n})}function Wc(e){return(0,U.jsxs)(`section`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background/55`,"aria-label":`Agents`,children:[(0,U.jsx)(`header`,{className:`border-b border-border/80 bg-background/70 px-6 py-5 backdrop-blur`,children:(0,U.jsx)(`div`,{className:`mx-auto grid max-w-[1500px] grid-cols-[minmax(0,1fr)_auto] items-end gap-4 max-md:grid-cols-1`,children:(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-2`,children:[(0,U.jsx)(`div`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.24em] text-primary`,children:`Studio registry`}),(0,U.jsx)(`h1`,{className:`m-0 text-2xl font-semibold leading-none tracking-tight text-foreground`,children:`Studio`}),(0,U.jsx)(`p`,{className:`m-0 max-w-[62ch] text-sm leading-6 text-muted-foreground`,children:`Registered agents, operational prompts, and runtime metadata for Studio agents.`})]})})}),(0,U.jsx)(`div`,{className:`min-h-0 overflow-auto px-6 py-6`,children:(0,U.jsx)(`div`,{className:`mx-auto grid max-w-[1500px] gap-4`,children:e.agents.length===0?(0,U.jsx)(`div`,{className:`grid min-h-80 place-items-center border border-dashed border-border/80 bg-card/35 px-6 text-center`,children:(0,U.jsxs)(`div`,{className:`grid max-w-md gap-2`,children:[(0,U.jsx)(`h2`,{className:`m-0 text-base font-semibold text-foreground`,children:`No agents`}),(0,U.jsx)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground`,children:`Studio has no registered agents to inspect.`})]})}):(0,U.jsx)(`div`,{className:`grid gap-4`,children:e.agents.map(t=>(0,U.jsx)(Gc,{agent:t,active:t.id===e.selectedAgentId},t.id))})})})]})}function Gc(e){let t=qc(e.agent.metadata);return(0,U.jsx)(`article`,{className:q(`grid overflow-hidden border border-border/80 bg-card/45 shadow-sm transition duration-200 hover:border-border hover:bg-card/60`,e.active&&`border-primary/35 bg-card/70 shadow-[inset_0_1px_0_hsl(0_0%_100%_/_0.08)]`),children:(0,U.jsxs)(`div`,{className:`grid gap-0 xl:grid-cols-[minmax(280px,0.72fr)_minmax(0,1fr)_minmax(280px,0.7fr)]`,children:[(0,U.jsxs)(`section`,{className:`grid content-between gap-8 border-b border-border/70 p-5 xl:border-b-0 xl:border-r`,children:[(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,U.jsx)(Uc,{className:q(`border-border/80 bg-muted/45 text-muted-foreground`,e.active&&`border-primary/35 bg-primary/10 text-primary`),children:e.active?`selected`:`agent`}),(0,U.jsxs)(`span`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:[e.agent.quickPrompts.length,` prompts`]})]}),(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsx)(`h2`,{className:`m-0 text-xl font-semibold leading-tight tracking-tight text-foreground text-balance`,children:e.agent.name??e.agent.id}),(0,U.jsx)(`span`,{className:`min-w-0 break-all font-mono text-xs font-medium leading-5 text-muted-foreground`,children:e.agent.id})]})]}),(0,U.jsx)(`div`,{className:`h-px w-20 bg-primary/55`})]}),(0,U.jsxs)(`section`,{className:`grid content-start gap-5 border-b border-border/70 p-5 xl:border-b-0 xl:border-r`,children:[(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsx)(Kc,{children:`description`}),(0,U.jsx)(`p`,{className:`m-0 max-w-[72ch] text-sm leading-6 text-muted-foreground`,children:e.agent.description??`No description`})]}),(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsx)(Kc,{children:`quick prompts`}),e.agent.quickPrompts.length===0?(0,U.jsx)(`div`,{className:`border border-dashed border-border/80 bg-background/35 px-3 py-2 text-sm text-muted-foreground`,children:`None configured`}):(0,U.jsx)(`div`,{className:`grid gap-2`,children:e.agent.quickPrompts.map((e,t)=>(0,U.jsxs)(`div`,{className:`grid grid-cols-[28px_minmax(0,1fr)] gap-3 border border-border/70 bg-background/35 px-3 py-2 text-sm leading-6 text-foreground`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[11px] font-semibold text-muted-foreground`,children:String(t+1).padStart(2,`0`)}),(0,U.jsx)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:e})]},e))})]})]}),(0,U.jsxs)(`section`,{className:`grid content-start gap-3 p-5`,children:[(0,U.jsx)(Kc,{children:`metadata`}),t.length===0?(0,U.jsx)(`div`,{className:`border border-dashed border-border/80 bg-background/35 px-3 py-2 text-sm text-muted-foreground`,children:`None`}):(0,U.jsx)(`div`,{className:`grid divide-y divide-border/70 border border-border/70 bg-background/35`,children:t.map(([e,t])=>(0,U.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(110px,0.75fr)_minmax(0,1fr)] gap-3 px-3 py-2 text-sm`,children:[(0,U.jsx)(`span`,{className:`min-w-0 truncate font-medium text-muted-foreground`,title:e,children:e}),(0,U.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs text-foreground`,title:Jc(t),children:Jc(t)})]},e))})]})]})})}function Kc(e){return(0,U.jsx)(`h3`,{className:`m-0 font-mono text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:e.children})}function qc(e){return e===void 0?[]:Object.entries(e)}function Jc(e){return e===null?`null`:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?`[${e.length}]`:typeof e==`object`?`{...}`:``}function Yc({className:e,...t}){return(0,U.jsx)(`div`,{className:q(`rounded-sm border border-border/80 bg-card/95 text-card-foreground shadow-sm shadow-black/20`,e),...t})}function Xc(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Zc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$c={};function el(e,t){return((t||$c).jsx?Qc:Zc).test(e)}var tl=/[ \t\n\f\r]/g;function nl(e){return typeof e==`object`?e.type===`text`?rl(e.value):!1:rl(e)}function rl(e){return e.replace(tl,``)===``}var il=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};il.prototype.normal={},il.prototype.property={},il.prototype.space=void 0;function al(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new il(n,r,t)}function ol(e){return e.toLowerCase()}var sl=class{constructor(e,t){this.attribute=t,this.property=e}};sl.prototype.attribute=``,sl.prototype.booleanish=!1,sl.prototype.boolean=!1,sl.prototype.commaOrSpaceSeparated=!1,sl.prototype.commaSeparated=!1,sl.prototype.defined=!1,sl.prototype.mustUseProperty=!1,sl.prototype.number=!1,sl.prototype.overloadedBoolean=!1,sl.prototype.property=``,sl.prototype.spaceSeparated=!1,sl.prototype.space=void 0;var cl=s({boolean:()=>Y,booleanish:()=>ul,commaOrSpaceSeparated:()=>ml,commaSeparated:()=>pl,number:()=>X,overloadedBoolean:()=>dl,spaceSeparated:()=>fl}),ll=0,Y=hl(),ul=hl(),dl=hl(),X=hl(),fl=hl(),pl=hl(),ml=hl();function hl(){return 2**++ll}var gl=Object.keys(cl),_l=class extends sl{constructor(e,t,n,r){let i=-1;if(super(e,t),vl(this,`space`,r),typeof n==`number`)for(;++i<gl.length;){let e=gl[i];vl(this,gl[i],(n&cl[e])===cl[e])}}};_l.prototype.defined=!0;function vl(e,t,n){n&&(e[t]=n)}function yl(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new _l(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ol(r)]=r,n[ol(a.attribute)]=r}return new il(t,n,e.space)}var bl=yl({properties:{ariaActiveDescendant:null,ariaAtomic:ul,ariaAutoComplete:null,ariaBusy:ul,ariaChecked:ul,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:fl,ariaCurrent:null,ariaDescribedBy:fl,ariaDetails:null,ariaDisabled:ul,ariaDropEffect:fl,ariaErrorMessage:null,ariaExpanded:ul,ariaFlowTo:fl,ariaGrabbed:ul,ariaHasPopup:null,ariaHidden:ul,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fl,ariaLevel:X,ariaLive:null,ariaModal:ul,ariaMultiLine:ul,ariaMultiSelectable:ul,ariaOrientation:null,ariaOwns:fl,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:ul,ariaReadOnly:ul,ariaRelevant:null,ariaRequired:ul,ariaRoleDescription:fl,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:ul,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function xl(e,t){return t in e?e[t]:t}function Sl(e,t){return xl(e,t.toLowerCase())}var Cl=yl({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:pl,acceptCharset:fl,accessKey:fl,action:null,allow:null,allowFullScreen:Y,allowPaymentRequest:Y,allowUserMedia:Y,alt:null,as:null,async:Y,autoCapitalize:null,autoComplete:fl,autoFocus:Y,autoPlay:Y,blocking:fl,capture:null,charSet:null,checked:Y,cite:null,className:fl,cols:X,colSpan:null,content:null,contentEditable:ul,controls:Y,controlsList:fl,coords:X|pl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Y,defer:Y,dir:null,dirName:null,disabled:Y,download:dl,draggable:ul,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Y,formTarget:null,headers:fl,height:X,hidden:dl,high:X,href:null,hrefLang:null,htmlFor:fl,httpEquiv:fl,id:null,imageSizes:null,imageSrcSet:null,inert:Y,inputMode:null,integrity:null,is:null,isMap:Y,itemId:null,itemProp:fl,itemRef:fl,itemScope:Y,itemType:fl,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Y,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:Y,muted:Y,name:null,nonce:null,noModule:Y,noValidate:Y,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:Y,optimum:X,pattern:null,ping:fl,placeholder:null,playsInline:Y,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Y,referrerPolicy:null,rel:fl,required:Y,reversed:Y,rows:X,rowSpan:X,sandbox:fl,scope:null,scoped:Y,seamless:Y,selected:Y,shadowRootClonable:Y,shadowRootDelegatesFocus:Y,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:ul,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:Y,useMap:null,value:ul,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fl,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Y,declare:Y,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:Y,noHref:Y,noShade:Y,noWrap:Y,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:ul,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Y,disableRemotePlayback:Y,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:Sl}),wl=yl({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:ml,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:fl,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:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:Y,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,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:pl,g2:pl,glyphName:pl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:ml,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,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:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fl,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ml,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ml,rev:ml,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ml,requiredFeatures:ml,requiredFonts:ml,requiredFormats:ml,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:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:ml,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ml,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ml,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:xl}),Tl=yl({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()}}),El=yl({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Sl}),Dl=yl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ol={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`},kl=/[A-Z]/g,Al=/-[a-z]/g,jl=/^data[-\w.:]+$/i;function Ml(e,t){let n=ol(t),r=t,i=sl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&jl.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Al,Pl);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Al.test(e)){let n=e.replace(kl,Nl);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=_l}return new i(r,t)}function Nl(e){return`-`+e.toLowerCase()}function Pl(e){return e.charAt(1).toUpperCase()}var Fl=al([bl,Cl,Tl,El,Dl],`html`),Z=al([bl,wl,Tl,El,Dl],`svg`);function Il(e){return e.join(` `).trim()}var Ll=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
50
- `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Rl=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Ll());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),zl=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))}})),Bl=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Rl()),r=zl();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Vl=Ul(`end`),Hl=Ul(`start`);function Ul(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 Wl(e){let t=Hl(e),n=Vl(e);if(t&&n)return{start:t,end:n}}function Gl(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?ql(e.position):`start`in e||`end`in e?ql(e):`line`in e||`column`in e?Kl(e):``}function Kl(e){return Jl(e&&e.line)+`:`+Jl(e&&e.column)}function ql(e){return Kl(e&&e.start)+`-`+Kl(e&&e.end)}function Jl(e){return e&&typeof e==`number`?e:1}var Yl=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=Gl(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}};Yl.prototype.file=``,Yl.prototype.name=``,Yl.prototype.reason=``,Yl.prototype.message=``,Yl.prototype.stack=``,Yl.prototype.column=void 0,Yl.prototype.line=void 0,Yl.prototype.ancestors=void 0,Yl.prototype.cause=void 0,Yl.prototype.fatal=void 0,Yl.prototype.place=void 0,Yl.prototype.ruleId=void 0,Yl.prototype.source=void 0;var Xl=l(Bl(),1),Zl={}.hasOwnProperty,Ql=new Map,$l=/[A-Z]/g,eu=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),tu=new Set([`td`,`th`]),nu=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function ru(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=mu(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=pu(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`?Z:Fl,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=iu(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function iu(e,t,n){if(t.type===`element`)return au(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return ou(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return cu(e,t,n);if(t.type===`mdxjsEsm`)return su(e,t);if(t.type===`root`)return lu(e,t,n);if(t.type===`text`)return uu(e,t)}function au(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Z,e.schema=i),e.ancestors.push(t);let a=bu(e,t.tagName,!1),o=hu(e,t),s=_u(e,t);return eu.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!nl(e):!0})),du(e,o,a,t),fu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ou(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)}xu(e,t.position)}function su(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xu(e,t.position)}function cu(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Z,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:bu(e,t.name,!0),o=gu(e,t),s=_u(e,t);return du(e,o,a,t),fu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function lu(e,t,n){let r={};return fu(r,_u(e,t)),e.create(t,e.Fragment,r,n)}function uu(e,t){return t.value}function du(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fu(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function pu(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 mu(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Hl(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 hu(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Zl.call(t.properties,i)){let a=vu(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&tu.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 gu(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 xu(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 xu(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function _u(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ql;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=iu(e,a,o);s!==void 0&&n.push(s)}return n}function vu(e,t,n){let r=Ml(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Xc(n):Il(n)),r.property===`style`){let t=typeof n==`object`?n:yu(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Su(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ol[r.property]||r.property:r.attribute,n]}}function yu(e,t){try{return(0,Xl.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Yl("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=nu+`#cannot-parse-style-attribute`,r}}function bu(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=el(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=el(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Zl.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);xu(e)}function xu(e,t){let n=new Yl("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=nu+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Su(e){let t={},n;for(n in e)Zl.call(e,n)&&(t[Cu(n)]=e[n]);return t}function Cu(e){let t=e.replace($l,wu);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function wu(e){return`-`+e.toLowerCase()}var Tu={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`]},Eu={};function Du(e,t){let n=t||Eu;return Ou(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Ou(e,t,n){if(Au(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 ku(e.children,t,n)}return Array.isArray(e)?ku(e,t,n):``}function ku(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Ou(e[i],t,n);return r.join(``)}function Au(e){return!!(e&&typeof e==`object`)}var ju=document.createElement(`i`);function Mu(e){let t=`&`+e+`;`;ju.innerHTML=t;let n=ju.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Nu(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 Pu(e,t){return e.length>0?(Nu(e,e.length,0,t),e):t}var Fu={}.hasOwnProperty;function Iu(e){let t={},n=-1;for(;++n<e.length;)Lu(t,e[n]);return t}function Lu(e,t){let n;for(n in t){let r=(Fu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Fu.call(r,a)||(r[a]=[]);let e=i[a];Ru(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ru(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Nu(e,0,0,r)}function zu(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 Bu(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Vu=Qu(/[A-Za-z]/),Hu=Qu(/[\dA-Za-z]/),Uu=Qu(/[#-'*+\--9=?A-Z^-~]/);function Wu(e){return e!==null&&(e<32||e===127)}var Gu=Qu(/\d/),Ku=Qu(/[\dA-Fa-f]/),qu=Qu(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function Ju(e){return e!==null&&(e<0||e===32)}function Yu(e){return e===-2||e===-1||e===32}var Xu=Qu(/\p{P}|\p{S}/u),Zu=Qu(/\s/);function Qu(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function $u(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Hu(e.charCodeAt(n+1))&&Hu(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 ed(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Yu(r)?(e.enter(n),s(r)):t(r)}function s(r){return Yu(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var td={tokenize:nd};function nd(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ed(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var rd={tokenize:ad},id={tokenize:od};function ad(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Nu(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(id,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(id,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return 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++;Nu(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function od(e,t,n){return ed(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function sd(e){if(e===null||Ju(e)||Zu(e))return 1;if(Xu(e))return 2}function cd(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 ld={name:`attention`,resolveAll:ud,tokenize:dd};function ud(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};fd(d,-c),fd(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Pu(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Pu(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Pu(l,cd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Pu(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Pu(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Nu(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function dd(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=sd(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=sd(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function fd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var pd={name:`autolink`,tokenize:md};function md(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 Vu(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Hu(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||Hu(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||Wu(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Uu(t)?(e.consume(t),l):n(t)}function u(e){return Hu(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||Hu(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var hd={partial:!0,tokenize:gd};function gd(e,t,n){return r;function r(t){return Yu(t)?ed(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var _d={continuation:{tokenize:yd},exit:bd,name:`blockQuote`,tokenize:vd};function vd(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 Yu(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function yd(e,t,n){let r=this;return i;function i(t){return Yu(t)?ed(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(_d,t,n)(r)}}function bd(e){e.exit(`blockQuote`)}var xd={name:`characterEscape`,tokenize:Sd};function Sd(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 qu(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Cd={name:`characterReference`,tokenize:wd};function wd(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=Hu,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=Ku,u):(e.enter(`characterReferenceValue`),a=7,o=Gu,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Hu&&!Mu(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 Td={partial:!0,tokenize:Od},Ed={concrete:!0,name:`codeFenced`,tokenize:Dd};function Dd(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`),Yu(t)?ed(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Td,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)):Yu(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),ed(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&&Yu(t)?ed(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(Td,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`),Yu(t)?ed(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`),Yu(t)?ed(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Od(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 kd={name:`codeIndented`,tokenize:jd},Ad={partial:!0,tokenize:Md};function jd(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),ed(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Q(t)?e.attempt(Ad,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Md(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):ed(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Q(e)?i(e):n(e)}}var Nd={name:`codeText`,previous:Fd,resolve:Pd,tokenize:Id};function Pd(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 Fd(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Id(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 Ld=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&&Rd(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),Rd(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Rd(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);Rd(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Rd(this.left,t.reverse())}}};function Rd(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 zd(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Ld(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,Bd(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 Nu(e,0,1/0,u.slice(0)),!l}function Bd(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 Vd={resolve:Ud,tokenize:Wd},Hd={partial:!0,tokenize:Gd};function Ud(e){return zd(e),e}function Wd(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(Hd,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 Gd(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ed(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 Kd(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||Wu(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||Ju(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||Wu(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 qd(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||=!Yu(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Jd(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`),ed(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 Yd(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Yu(i)?ed(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Xd={name:`definition`,tokenize:Qd},Zd={partial:!0,tokenize:$d};function Qd(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return qd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Bu(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 Ju(t)?Yd(e,l)(t):l(t)}function l(t){return Kd(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Zd,d,d)(t)}function d(t){return Yu(t)?ed(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 $d(e,t,n){return r;function r(t){return Ju(t)?Yd(e,i)(t):n(t)}function i(t){return Jd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Yu(t)?ed(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var ef={name:`hardBreakEscape`,tokenize:tf};function tf(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 nf={name:`headingAtx`,resolve:rf,tokenize:af};function rf(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Nu(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function af(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||Ju(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)):Yu(n)?ed(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||Ju(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var of=`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(`.`),sf=[`pre`,`script`,`style`,`textarea`],cf={concrete:!0,name:`htmlFlow`,resolveTo:df,tokenize:ff},lf={partial:!0,tokenize:mf},uf={partial:!0,tokenize:pf};function df(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 ff(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:F):Vu(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):Vu(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):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 Vu(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ju(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&sf.includes(l)?(i=1,r.interrupt?t(s):O(s)):of.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||Hu(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 Yu(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Vu(t)?(e.consume(t),b):Yu(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Hu(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Yu(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):Yu(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||Ju(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Yu(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):Yu(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),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(lf,L,k)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(uf,A,L)(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),F):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 sf.includes(n)?(e.consume(t),I):O(t)}return Vu(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),L(t)):(e.consume(t),I)}function L(n){return e.exit(`htmlFlow`),t(n)}}function pf(e,t,n){let r=this;return i;function i(t){return Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function mf(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(hd,t,n)}}var hf={name:`htmlText`,tokenize:gf};function gf(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):Vu(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):Vu(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 Vu(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Hu(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,N(t)):Yu(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Hu(t)?(e.consume(t),w):t===47||t===62||Ju(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Vu(t)?(e.consume(t),E):Q(t)?(o=T,N(t)):Yu(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Hu(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,N(t)):Yu(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)):Yu(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||Ju(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Ju(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 Yu(t)?ed(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var _f={name:`labelEnd`,resolveAll:xf,resolveTo:Sf,tokenize:Cf},vf={tokenize:wf},yf={tokenize:Tf},bf={tokenize:Ef};function xf(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&&Nu(e,0,e.length,n),e}function Sf(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Pu(s,e.slice(a+1,a+r+3)),s=Pu(s,[[`enter`,u,t]]),s=Pu(s,cd(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Pu(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Pu(s,e.slice(o+1)),s=Pu(s,[[`exit`,c,t]]),Nu(e,a,e.length,s),e}function Cf(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Bu(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(vf,u,o?u:d)(t):t===91?e.attempt(yf,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(bf,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function wf(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 Ju(t)?Yd(e,a)(t):a(t)}function a(t){return t===41?u(t):Kd(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Ju(t)?Yd(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Jd(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Ju(t)?Yd(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 Tf(e,t,n){let r=this;return i;function i(t){return qd.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Bu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ef(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 Df={name:`labelStartImage`,resolveAll:_f.resolveAll,tokenize:Of};function Of(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var kf={name:`labelStartLink`,resolveAll:_f.resolveAll,tokenize:Af};function Af(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var jf={name:`lineEnding`,tokenize:Mf};function Mf(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ed(e,t,`linePrefix`)}}var Nf={name:`thematicBreak`,tokenize:Pf};function Pf(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`),Yu(t)?ed(e,s,`whitespace`)(t):s(t))}}var Ff={continuation:{tokenize:zf},exit:Vf,name:`list`,tokenize:Rf},If={partial:!0,tokenize:Hf},Lf={partial:!0,tokenize:Bf};function Rf(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:Gu(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(Nf,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 Gu(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(hd,r.interrupt?n:u,e.attempt(If,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Yu(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 zf(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(hd,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ed(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Yu(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(Lf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ed(e,e.attempt(Ff,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Bf(e,t,n){let r=this;return ed(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 Vf(e){e.exit(this.containerState.type)}function Hf(e,t,n){let r=this;return ed(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!Yu(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Uf={name:`setextUnderline`,resolveTo:Wf,tokenize:Gf};function Wf(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Gf(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`),Yu(t)?ed(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Kf={tokenize:qf};function qf(e){let t=this,n=e.attempt(hd,r,e.attempt(this.parser.constructs.flowInitial,i,ed(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Vd,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Jf={resolveAll:Qf()},Yf=Zf(`string`),Xf=Zf(`text`);function Zf(e){return{resolveAll:Qf(e===`text`?$f:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Qf(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 $f(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var ep=s({attentionMarkers:()=>cp,contentInitial:()=>np,disable:()=>lp,document:()=>tp,flow:()=>ip,flowInitial:()=>rp,insideSpan:()=>sp,string:()=>ap,text:()=>op}),tp={42:Ff,43:Ff,45:Ff,48:Ff,49:Ff,50:Ff,51:Ff,52:Ff,53:Ff,54:Ff,55:Ff,56:Ff,57:Ff,62:_d},np={91:Xd},rp={[-2]:kd,[-1]:kd,32:kd},ip={35:nf,42:Nf,45:[Uf,Nf],60:cf,61:Uf,95:Nf,96:Ed,126:Ed},ap={38:Cd,92:xd},op={[-5]:jf,[-4]:jf,[-3]:jf,33:Df,38:Cd,42:ld,60:[pd,hf],91:kf,92:[ef,xd],93:_f,95:ld,96:Nd},sp={null:[ld,Jf]},cp={null:[42,95]},lp={null:[]};function up(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=Pu(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=cd(a,l.events,l),l.events):[]}function f(e,t){return fp(p(e),t)}function p(e){return dp(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){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&&Nu(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 dp(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 fp(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=`
51
- `;break;case-3:o=`\r
52
- `;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 pp(e){let t={constructs:Iu([ep,...(e||{}).extensions||[]]),content:n(td),defined:[],document:n(rd),flow:n(Kf),lazy:{},string:n(Yf),text:n(Xf)};return t;function n(e){return n;function n(n){return up(t,e,n)}}}function mp(e){for(;!zd(e););return e}var hp=/[\0\t\n\r]/g;function gp(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(hp.lastIndex=u,c=hp.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var _p=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vp(e){return e.replace(_p,yp)}function yp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return zu(n.slice(t?2:1),t?16:10)}return Mu(n)||e}var bp={}.hasOwnProperty;function xp(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Sp(n)(mp(pp(n).document().write(gp()(e,t,!0))))}function Sp(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(U),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ce),blockQuote:a(ie),characterEscape:T,characterReference:T,codeFenced:a(ae),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ae,o),codeText:a(oe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(H),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(se),hardBreakEscape:a(le),hardBreakTrailing:a(le),htmlFlow:a(ue,o),htmlFlowData:T,htmlText:a(ue,o),htmlTextData:T,image:a(de),label:o,link:a(U),listItem:a(pe),listItemValue:f,listOrdered:a(fe,d),listUnordered:a(fe),paragraph:a(me),reference:te,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ce),strong:a(he),thematicBreak:a(_e)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:V,autolinkProtocol:re,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:R,characterReferenceMarkerNumeric:R,characterReferenceValue:z,characterReference:B,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:ee,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ne,resourceDestinationString:F,resourceTitleString:I,resource:L,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};wp(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];bp.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Ep).call(a,void 0,e[0])}for(r.position={start:Cp(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Cp(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Cp(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ep).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Gl({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Cp(e.end)}function u(){return Du(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Bu(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ge(),n.position={start:Cp(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Cp(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Cp(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=vp(t),n.identifier=Bu(t).toLowerCase()}function ee(){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 F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function L(){this.data.inReference=void 0}function te(){this.data.referenceType=`collapsed`}function ne(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Bu(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function R(e){this.data.characterReferenceType=e.type}function z(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=zu(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Mu(t);let i=this.stack[this.stack.length-1];i.value+=r}function B(e){let t=this.stack.pop();t.position.end=Cp(e.end)}function re(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function V(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ie(){return{type:`blockquote`,children:[]}}function ae(){return{type:`code`,lang:null,meta:null,value:``}}function oe(){return{type:`inlineCode`,value:``}}function H(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function se(){return{type:`emphasis`,children:[]}}function ce(){return{type:`heading`,depth:0,children:[]}}function le(){return{type:`break`}}function ue(){return{type:`html`,value:``}}function de(){return{type:`image`,title:null,url:``,alt:null}}function U(){return{type:`link`,title:null,url:``,children:[]}}function fe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function pe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function me(){return{type:`paragraph`,children:[]}}function he(){return{type:`strong`,children:[]}}function ge(){return{type:`text`,value:``}}function _e(){return{type:`thematicBreak`}}}function Cp(e){return{line:e.line,column:e.column,offset:e.offset}}function wp(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?wp(e,r):Tp(e,r)}}function Tp(e,t){let n;for(n in t)if(bp.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Ep(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Gl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Gl({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Gl({start:t.start,end:t.end})+`) is still open`)}function Dp(e){let t=this;t.parser=n;function n(n){return xp(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Op(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 kp(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
53
- `}]}function Ap(e,t){let n=t.value?t.value+`
54
- `:``,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 jp(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mp(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Np(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=$u(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 Pp(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 Fp(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ip(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 Lp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ip(e,t);let i={src:$u(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 Rp(e,t){let n={src:$u(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 zp(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 Bp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ip(e,t);let i={href:$u(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 Vp(e,t){let n={href:$u(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 Hp(e,t,n){let r=e.all(t),i=n?Up(n):Wp(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:`
55
- `}),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:`
56
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Up(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Wp(n[r])}return t}function Wp(e){return e.spread??e.children.length>1}function Gp(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 Kp(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qp(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Jp(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yp(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=Hl(t.children[1]),o=Vl(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 Xp(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 Zp(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Qp=9,$p=32;function em(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(tm(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(tm(t.slice(i),i>0,!1)),a.join(``)}function tm(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Qp||t===$p;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Qp||t===$p;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function nm(e,t){let n={type:`text`,value:em(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rm(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var im={blockquote:Op,break:kp,code:Ap,delete:jp,emphasis:Mp,footnoteReference:Np,heading:Pp,html:Fp,imageReference:Lp,image:Rp,inlineCode:zp,linkReference:Bp,link:Vp,listItem:Hp,list:Gp,paragraph:Kp,root:qp,strong:Jp,table:Yp,tableCell:Zp,tableRow:Xp,text:nm,thematicBreak:rm,toml:am,yaml:am,definition:am,footnoteDefinition:am};function am(){}var om=typeof self==`object`?self:globalThis,sm=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new om[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new om[a](o),i)};return r},cm=e=>sm(new Map,e)(0),lm=``,{toString:um}={},{keys:dm}=Object,fm=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=um.call(e).slice(8,-1);switch(n){case`Array`:return[1,lm];case`Object`:return[2,lm];case`Date`:return[3,lm];case`RegExp`:return[4,lm];case`Map`:return[5,lm];case`Set`:return[6,lm];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},pm=([e,t])=>e===0&&(t===`function`||t===`symbol`),mm=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=fm(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of dm(r))(e||!pm(fm(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(pm(fm(n))||pm(fm(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!pm(fm(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},hm=(e,{json:t,lossy:n}={})=>{let r=[];return mm(!(t||n),!!t,new Map,r)(e),r},gm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?cm(hm(e,t)):structuredClone(e):(e,t)=>cm(hm(e,t));function _m(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 vm(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function ym(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||_m,r=e.options.footnoteBackLabel||vm,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=$u(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:{...gm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
57
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
58
- `}]}}var bm=(function(e){if(e==null)return Tm;if(typeof e==`function`)return wm(e);if(typeof e==`object`)return Array.isArray(e)?xm(e):Sm(e);if(typeof e==`string`)return Cm(e);throw Error(`Expected function, string, or object as test`)});function xm(e){let t=[],n=-1;for(;++n<e.length;)t[n]=bm(e[n]);return wm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Sm(e){let t=e;return wm(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Cm(e){return wm(t);function t(t){return t&&t.type===e}}function wm(e){return t;function t(t,n,r){return!!(Em(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Tm(){return!0}function Em(e){return typeof e==`object`&&!!e&&`type`in e}function Dm(e){return e}var Om=[];function km(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=bm(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 (`+Dm(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Om,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Am(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 Am(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Om:[e]}function jm(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),km(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 Mm={}.hasOwnProperty,Nm={};function Pm(e,t){let n=t||Nm,r=new Map,i=new Map,a={all:s,applyData:Im,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...im,...n.handlers},one:o,options:n,patch:Fm,wrap:Rm};return jm(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(Mm.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=gm(n);return r.children=a.all(e),r}return gm(e)}return(a.options.unknownHandler||Lm)(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=zm(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=zm(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Fm(e,t){e.position&&(t.position=Wl(e))}function Im(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,gm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Lm(e,t){let n=t.data||{},r=`value`in t&&!(Mm.call(n,`hProperties`)||Mm.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 Rm(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
59
- `});++r<e.length;)r&&n.push({type:`text`,value:`
60
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
61
- `}),n}function zm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Bm(e,t){let n=Pm(e,t),r=n.one(e,void 0),i=ym(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
62
- `},i)),a}function Vm(e,t){return e&&`run`in e?async function(n,r){let i=Bm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Bm(n,{file:r,...e||t})}}function Hm(e){if(e)throw e}var Um=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 Wm(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 Gm(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Km(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 Km(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 qm={basename:Jm,dirname:Ym,extname:Xm,join:Zm,sep:`/`};function Jm(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);eh(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 Ym(e){if(eh(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 Xm(e){eh(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Zm(...e){let t=-1,n;for(;++t<e.length;)eh(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Qm(n)}function Qm(e){eh(e);let t=e.codePointAt(0)===47,n=$m(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function $m(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 eh(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var th={cwd:nh};function nh(){return`/`}function rh(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function ih(e){if(typeof e==`string`)e=new URL(e);else if(!rh(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 ah(e)}function ah(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 oh=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],sh=class{constructor(e){let t;t=e?rh(e)?{path:e}:typeof e==`string`||dh(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:th.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<oh.length;){let e=oh[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)oh.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?qm.basename(this.path):void 0}set basename(e){lh(e,`basename`),ch(e,`basename`),this.path=qm.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?qm.dirname(this.path):void 0}set dirname(e){uh(this.basename,`dirname`),this.path=qm.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?qm.extname(this.path):void 0}set extname(e){if(ch(e,`extname`),uh(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=qm.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){rh(e)&&(e=ih(e)),lh(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?qm.basename(this.path,this.extname):void 0}set stem(e){lh(e,`stem`),ch(e,`stem`),this.path=qm.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 Yl(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 ch(e,t){if(e&&e.includes(qm.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+qm.sep+"`")}function lh(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function uh(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function dh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var fh=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),ph=l(Um(),1),mh={}.hasOwnProperty,hh=new class e extends fh{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=Gm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,ph.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(vh(`data`,this.frozen),this.namespace[e]=t,this):mh.call(this.namespace,e)&&this.namespace[e]||void 0:e?(vh(`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=xh(e),n=this.parser||this.Parser;return gh(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),gh(`process`,this.parser||this.Parser),_h(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=xh(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);Ch(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(),gh(`processSync`,this.parser||this.Parser),_h(`processSync`,this.compiler||this.Compiler),this.process(e,r),bh(`processSync`,`process`,t),n;function r(e,r){t=!0,Hm(e),n=r}}run(e,t,n){yh(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=xh(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),bh(`runSync`,`run`,n),r;function i(e,t){Hm(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=xh(t),r=this.compiler||this.Compiler;return _h(`stringify`,r),yh(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(vh(`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,ph.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];Wm(o)&&Wm(r)&&(r=(0,ph.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function gh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function _h(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function vh(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 yh(e){if(!Wm(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function bh(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function xh(e){return Sh(e)?e:new sh(e)}function Sh(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Ch(e){return typeof e==`string`||wh(e)}function wh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Th=[],Eh={allowDangerousHtml:!0},Dh=/^(https?|ircs?|mailto|xmpp)$/i,Oh=[{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 kh(e){let t=Ah(e),n=jh(e);return Mh(t.runSync(t.parse(n),n),e)}function Ah(e){let t=e.rehypePlugins||Th,n=e.remarkPlugins||Th,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Eh}:Eh;return hh().use(Dp).use(n).use(Vm,r).use(t)}function jh(e){let t=e.children||``,n=new sh;return typeof t==`string`?n.value=t:``+t,n}function Mh(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Nh;for(let e of Oh)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return jm(e,l),ru(e,{Fragment:U.Fragment,components:i,ignoreInvalidStyle:!0,jsx:U.jsx,jsxs:U.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 Tu)if(Object.hasOwn(Tu,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Tu[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 Nh(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||Dh.test(e.slice(0,t))?e:``}function Ph(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 Fh(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Ih(e,t,n){let r=bm((n||{}).ignore||[]),i=Lh(t),a=-1;for(;++a<i.length;)km(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Lh(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Rh(e[0]),zh(e[1])])}return t}function Rh(e){return typeof e==`string`?new RegExp(Fh(e),`g`):e}function zh(e){return typeof e==`function`?e:function(){return e}}var Bh=`phrasing`,Vh=[`autolink`,`link`,`image`,`label`];function Hh(){return{transforms:[Xh],enter:{literalAutolink:Wh,literalAutolinkEmail:Gh,literalAutolinkHttp:Gh,literalAutolinkWww:Gh},exit:{literalAutolink:Yh,literalAutolinkEmail:Jh,literalAutolinkHttp:Kh,literalAutolinkWww:qh}}}function Uh(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Bh,notInConstruct:Vh},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Bh,notInConstruct:Vh},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Bh,notInConstruct:Vh}]}}function Wh(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Gh(e){this.config.enter.autolinkProtocol.call(this,e)}function Kh(e){this.config.exit.autolinkProtocol.call(this,e)}function qh(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 Jh(e){this.config.exit.autolinkEmail.call(this,e)}function Yh(e){this.exit(e)}function Xh(e){Ih(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Zh],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Qh]],{ignore:[`link`,`linkReference`]})}function Zh(e,t,n,r,i){let a=``;if(!tg(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!$h(n)))return!1;let o=eg(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 Qh(e,t,n,r){return!tg(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function $h(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 eg(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=Ph(e,`(`),a=Ph(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 tg(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Zu(n)||Xu(n))&&(!t||n!==47)}dg.peek=ug;function ng(){this.buffer()}function rg(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ig(){this.buffer()}function ag(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function og(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Bu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sg(e){this.exit(e)}function cg(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Bu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lg(e){this.exit(e)}function ug(){return`[`}function dg(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 fg(){return{enter:{gfmFootnoteCallString:ng,gfmFootnoteCall:rg,gfmFootnoteDefinitionLabelString:ig,gfmFootnoteDefinition:ag},exit:{gfmFootnoteCallString:og,gfmFootnoteCall:sg,gfmFootnoteDefinitionLabelString:cg,gfmFootnoteDefinition:lg}}}function pg(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:dg},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?`
63
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?hg:mg))),s(),o}}function mg(e,t,n){return t===0?e:hg(e,t,n)}function hg(e,t,n){return(n?``:` `)+e}var gg=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];xg.peek=Sg;function _g(){return{canContainEols:[`delete`],enter:{strikethrough:yg},exit:{strikethrough:bg}}}function vg(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:gg}],handlers:{delete:xg}}}function yg(e){this.enter({type:`delete`,children:[]},e)}function bg(e){this.exit(e)}function xg(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Sg(){return`~`}function Cg(e){return e.length}function wg(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Cg,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=Tg(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]=Eg(r[d]);else{let e=Eg(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(`
64
- `)}function Tg(e){return e==null?``:String(e)}function Eg(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Dg(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()),Og);return i(),o}function Og(e,t,n){return`>`+(n?``:` `)+e}function kg(e,t){return Ag(e,t.inConstruct,!0)&&!Ag(e,t.notInConstruct,!1)}function Ag(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 jg(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
65
- `&&kg(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
66
- `}function Mg(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 Ng(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Pg(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Fg(e,t,n,r){let i=Pg(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Ng(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Ig);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Mg(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
67
- `,encode:["`"],...s.current()})),t()}return u+=s.move(`
68
- `),a&&(u+=s.move(a+`
69
- `)),u+=s.move(c),l(),u}function Ig(e,t,n){return(n?``:` `)+e}function Lg(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Rg(e,t,n,r){let i=Lg(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?` `:`
70
- `,...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 zg(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Bg(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Vg(e,t,n){let r=sd(e),i=sd(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Hg.peek=Ug;function Hg(e,t,n,r){let i=zg(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Vg(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Bg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Vg(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Bg(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Ug(e,t,n){return n.options.emphasis||`*`}function Wg(e,t){let n=!1;return jm(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)&&Du(e)&&(t.options.setext||n))}function Gg(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Wg(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
71
- `,after:`
72
- `});return r(),t(),o+`
73
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
74
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
75
- `,...a.current()});return/^[\t ]/.test(l)&&(l=Bg(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Kg.peek=qg;function Kg(e){return e.value||``}function qg(){return`<`}Jg.peek=Yg;function Jg(e,t,n,r){let i=Lg(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 Yg(){return`!`}Xg.peek=Zg;function Xg(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Zg(){return`!`}Qg.peek=$g;function Qg(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function $g(){return"`"}function e_(e,t){let n=Du(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))}t_.peek=n_;function t_(e,t,n,r){let i=Lg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(e_(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function n_(e,t,n){return e_(e,n)?`<`:`[`}r_.peek=i_;function r_(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function i_(){return`[`}function a_(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 o_(e){let t=a_(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 s_(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function c_(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 l_(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?s_(n):a_(n),s=e.ordered?o===`.`?`)`:`.`:o_(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),c_(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 u_(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 d_(e,t,n,r){let i=u_(n),a=n.bulletCurrent||a_(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 f_(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var p_=bm([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function m_(e,t,n,r){return(e.children.some(function(e){return p_(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function h_(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}g_.peek=__;function g_(e,t,n,r){let i=h_(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Vg(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Bg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Vg(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Bg(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function __(e,t,n){return n.options.strong||`*`}function v_(e,t,n,r){return n.safe(e.value,r)}function y_(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 b_(e,t,n){let r=(c_(n)+(n.options.ruleSpaces?` `:``)).repeat(y_(n));return n.options.ruleSpaces?r.slice(0,-1):r}var x_={blockquote:Dg,break:jg,code:Fg,definition:Rg,emphasis:Hg,hardBreak:jg,heading:Gg,html:Kg,image:Jg,imageReference:Xg,inlineCode:Qg,link:t_,linkReference:r_,list:l_,listItem:d_,paragraph:f_,root:m_,strong:g_,text:v_,thematicBreak:b_};function S_(){return{enter:{table:C_,tableData:D_,tableHeader:D_,tableRow:T_},exit:{codeText:O_,table:w_,tableData:E_,tableHeader:E_,tableRow:E_}}}function C_(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 w_(e){this.exit(e),this.data.inTable=void 0}function T_(e){this.enter({type:`tableRow`,children:[]},e)}function E_(e){this.exit(e)}function D_(e){this.enter({type:`tableCell`,children:[]},e)}function O_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,k_));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function k_(e,t){return t===`|`?t:e}function A_(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
76
- `,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(`
77
- `))}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 wg(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=x_.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function j_(){return{exit:{taskListCheckValueChecked:N_,taskListCheckValueUnchecked:N_,paragraph:P_}}}function M_(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:F_}}}function N_(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function P_(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 F_(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=x_.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 I_(){return[Hh(),fg(),_g(),S_(),j_()]}function L_(e){return{extensions:[Uh(),pg(e),vg(),A_(e),M_()]}}var R_={tokenize:Q_,partial:!0},z_={tokenize:$_,partial:!0},B_={tokenize:ev,partial:!0},V_={tokenize:tv,partial:!0},H_={tokenize:nv,partial:!0},U_={name:`wwwAutolink`,tokenize:X_,previous:rv},W_={name:`protocolAutolink`,tokenize:Z_,previous:iv},G_={name:`emailAutolink`,tokenize:Y_,previous:av},K_={};function q_(){return{text:K_}}for(var J_=48;J_<123;)K_[J_]=G_,J_++,J_===58?J_=65:J_===91&&(J_=97);K_[43]=G_,K_[45]=G_,K_[46]=G_,K_[95]=G_,K_[72]=[G_,W_],K_[104]=[G_,W_],K_[87]=[G_,U_],K_[119]=[G_,U_];function Y_(e,t,n){let r=this,i,a;return o;function o(t){return!ov(t)||!av.call(r,r.previous)||sv(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return ov(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(H_,u,l)(t):t===45||t===95||Hu(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&&Vu(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function X_(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!rv.call(r,r.previous)||sv(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(R_,e.attempt(z_,e.attempt(B_,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Z_(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&iv.call(r,r.previous)&&!sv(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Vu(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||Wu(t)||Ju(t)||Zu(t)||Xu(t)?n(t):e.attempt(z_,e.attempt(B_,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Q_(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 $_(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(V_,c,s)(t):t===null||Ju(t)||Zu(t)||t!==45&&Xu(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 ev(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(V_,t,a)(o):o===null||Ju(o)||Zu(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function tv(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||Ju(o)||Zu(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Ju(e)||Zu(e)?t(e):r(e)}function a(e){return Vu(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Vu(t)?(e.consume(t),o):n(t)}}function nv(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Hu(e)?n(e):t(e)}}function rv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ju(e)}function iv(e){return!Vu(e)}function av(e){return!(e===47||ov(e))}function ov(e){return e===43||e===45||e===46||e===95||Hu(e)}function sv(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 cv={tokenize:gv,partial:!0};function lv(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:pv,continuation:{tokenize:mv},exit:hv}},text:{91:{name:`gfmFootnoteCall`,tokenize:fv},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:uv,resolveTo:dv}}}}function uv(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=Bu(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 dv(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 fv(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||Ju(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Bu(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ju(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 pv(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||Ju(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Bu(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ju(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),ed(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function mv(e,t,n){return e.check(hd,t,e.attempt(cv,t,n))}function hv(e){e.exit(`gfmFootnoteDefinition`)}function gv(e,t,n){let r=this;return ed(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 _v(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&&Nu(o,o.length,0,cd(s,e.slice(r+1,n),t)),Nu(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Nu(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=sd(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=sd(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var vv=class{constructor(){this.map=[]}add(e,t,n){yv(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function yv(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function bv(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 xv(){return{flow:{null:{name:`table`,tokenize:Sv,resolveAll:Cv}}}}function Sv(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Yu(t)?ed(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||Ju(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,Yu(t)?ed(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 Yu(t)?ed(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 Yu(t)?ed(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)):Yu(n)?ed(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Ju(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 Cv(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 vv;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Tv(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=wv(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=wv(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=wv(f,t,o,i,n,d)):(o[0]=o[1],d=wv(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Tv(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=bv(t.events,n))}return e}function wv(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ev(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ev(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=Ev(t.events,n[2]),a=Ev(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({},Ev(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Tv(e,t,n,r,i){let a=[],o=Ev(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 Ev(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Dv={name:`tasklistCheck`,tokenize:kv};function Ov(){return{text:{91:Dv}}}function kv(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 Ju(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):Yu(r)?e.check({tokenize:Av},t,n)(r):n(r)}}function Av(e,t,n){return ed(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function jv(e){return Iu([q_(),lv(),_v(e),xv(),Ov()])}var Mv={};function Nv(e){let t=this,n=e||Mv,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(jv(n)),a.push(I_()),o.push(L_(n))}function Pv(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fv(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return``;let n=Math.max(0,Math.floor((Date.now()-t.getTime())/1e3));if(n<60)return`now`;let r=Math.floor(n/60);if(r<60)return`${r}m`;let i=Math.floor(r/60);if(i<24)return`${i}h`;let a=Math.floor(i/24);if(a<7)return`${a}d`;let o=Math.floor(a/7);return o<5?`${o}w`:`${Math.floor(a/30)}mo`}function Iv(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}function Lv(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function Rv(e){return e===void 0?``:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function zv(e){return e===void 0?`-`:`${e.totalTokens} tok`}function Bv(e,t){return e.find(e=>e.id===t)?.name??t}function Vv(e,t){if(Pv(t.metadata)&&typeof t.metadata.agentName==`string`)return t.metadata.agentName;let n=Hv(t);return n===void 0?`-`:Bv(e,n)}function Hv(e){if(Pv(e.metadata)){if(typeof e.metadata.agentId==`string`)return e.metadata.agentId;if(Pv(e.metadata.metadata)&&typeof e.metadata.metadata.agentId==`string`)return e.metadata.metadata.agentId}}function Uv(e){return e.length===0?`-`:e}function Wv(e){switch(e.status){case`pending`:return`Waiting for your decision`;case`approved`:return`Approved`;case`rejected`:return`Rejected`;case`timed_out`:return`Timed out`;default:return e.status}}function Gv(e){if(e===void 0)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Kv(e){let t=e.trim();if(t.length===0)return{kind:`text`,value:e};try{return{kind:`json`,value:JSON.parse(t)}}catch{return{kind:`text`,value:e}}}function qv(e){let t=e.replace(/s+/g,` `).trim();return t.length>72?`${t.slice(0,69)}...`:t}function Jv(e){return e instanceof Error?e.message:String(e)}function Yv(e){return(0,U.jsx)(`div`,{className:`prose prose-sm max-w-none text-current [overflow-wrap:anywhere] prose-headings:text-current prose-headings:font-semibold prose-p:text-current prose-p:leading-7 prose-a:text-current prose-a:decoration-muted-foreground prose-a:underline-offset-2 prose-strong:text-current prose-code:rounded-sm prose-code:border prose-code:border-border/80 prose-code:bg-muted/80 prose-code:px-1 prose-code:py-0.5 prose-code:text-[0.92em] prose-code:font-semibold prose-code:text-current prose-code:before:content-none prose-code:after:content-none prose-pre:overflow-auto prose-pre:rounded-sm prose-pre:border prose-pre:border-border/80 prose-pre:bg-card/90 prose-pre:text-current prose-blockquote:border-border prose-blockquote:text-muted-foreground prose-li:marker:text-muted-foreground prose-hr:border-border prose-table:m-0 prose-thead:border-0 prose-tr:border-0 prose-th:p-0 prose-td:p-0 dark:prose-invert dark:prose-headings:text-current dark:prose-p:text-current dark:prose-strong:text-current dark:prose-code:text-current dark:prose-pre:bg-card dark:prose-pre:text-current`,children:(0,U.jsx)(kh,{components:{table({children:e}){return(0,U.jsx)(`div`,{className:`my-4 min-w-0 overflow-hidden rounded-sm border border-border/80 bg-card/90 shadow-sm`,children:(0,U.jsx)(`div`,{className:`min-w-0 overflow-x-auto`,children:(0,U.jsx)(`table`,{className:`m-0 w-full min-w-130 border-separate border-spacing-0 text-left text-sm`,children:e})})})},thead({children:e}){return(0,U.jsx)(`thead`,{className:`bg-muted/45`,children:e})},tbody({children:e}){return(0,U.jsx)(`tbody`,{children:e})},tr({children:e}){return(0,U.jsx)(`tr`,{className:`group/row align-top`,children:e})},th({children:e}){return(0,U.jsx)(`th`,{className:`border-b border-border px-4 font-mono text-[11px] font-semibold uppercase tracking-[0.2em] text-muted-foreground first:pl-5 last:pr-5`,style:{paddingBottom:`0.625rem`,paddingTop:`0.625rem`},children:e})},td({children:e}){return(0,U.jsx)(`td`,{className:`border-b border-border/70 px-4 text-sm leading-6 text-foreground [overflow-wrap:anywhere] first:pl-5 last:pr-5 group-last/row:border-b-0`,style:{paddingBottom:`0.75rem`,paddingTop:`0.75rem`},children:e})}},remarkPlugins:[Nv],children:e.text})})}function Xv(e){let t=Zv(e.value);return(0,U.jsxs)(`section`,{className:`overflow-hidden rounded-sm border border-border/80 bg-background/70`,children:[(0,U.jsx)(`div`,{className:`flex min-h-9 items-center gap-3 border-b border-border/80 bg-muted/20 px-3`,children:(0,U.jsx)(`div`,{className:`font-mono text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:e.title})}),(0,U.jsx)(`div`,{className:`min-w-0 overflow-x-auto`,children:(0,U.jsx)(`pre`,{className:`m-0 min-w-max p-3 font-mono text-[13px] leading-6 text-foreground`,children:(0,U.jsx)(`code`,{children:(0,U.jsx)(Qv,{text:t})})})})]})}function Zv(e){let t=Kv(e),n=t.kind===`json`?t.value:e;try{return JSON.stringify(n,null,2)}catch{return JSON.stringify(String(n),null,2)}}function Qv(e){let t=/"(?:\\.|[^"\\])*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|\btrue\b|\bfalse\b|\bnull\b|[{}[\],:]/g,n=[],r=0,i=t.exec(e.text);for(;i!==null;){i.index>r&&n.push(e.text.slice(r,i.index));let a=i[0],o=e.text.slice(t.lastIndex).match(/\S/)?.[0],s=$v(a,o);n.push((0,U.jsx)(`span`,{className:ey(s),children:a},`${i.index}:${a}`)),r=t.lastIndex,i=t.exec(e.text)}return r<e.text.length&&n.push(e.text.slice(r)),(0,U.jsx)(U.Fragment,{children:n})}function $v(e,t){return e.startsWith(`"`)?t===`:`?`key`:`string`:e===`true`||e===`false`?`boolean`:e===`null`?`null`:/^-?\d/.test(e)?`number`:`punctuation`}function ey(e){switch(e){case`key`:return`text-primary`;case`string`:return`text-zinc-100`;case`number`:return`text-sky-300`;case`boolean`:return`text-fuchsia-300`;case`null`:return`text-zinc-500`;case`punctuation`:return`text-zinc-500`}}function ty(e){if(Array.isArray(e.value))return e.value.length===0?(0,U.jsx)(`span`,{className:`italic text-muted-foreground`,children:`Empty array`}):(0,U.jsx)(`div`,{className:`grid gap-1.5`,children:Object.entries(e.value).map(([e,t])=>(0,U.jsx)(ny,{label:e,value:t},e))});if(Pv(e.value)){let t=Object.entries(e.value);return t.length===0?(0,U.jsx)(`span`,{className:`italic text-muted-foreground`,children:`Empty object`}):(0,U.jsx)(`div`,{className:`grid gap-1.5`,children:t.map(([e,t])=>(0,U.jsx)(ny,{label:e,value:t},e))})}return(0,U.jsx)(ry,{value:e.value})}function ny(e){let t=Array.isArray(e.value)||Pv(e.value);return(0,U.jsxs)(`div`,{className:q(`grid min-w-0 grid-cols-[minmax(92px,max-content)_minmax(0,1fr)] items-baseline gap-2.5`,t&&`items-start`),children:[(0,U.jsx)(`div`,{className:`text-xs font-semibold text-muted-foreground [overflow-wrap:anywhere]`,children:e.label}),(0,U.jsx)(`div`,{className:`min-w-0 text-[13px] leading-5 text-foreground [overflow-wrap:anywhere] [&_.grid]:mt-2 [&_.grid]:border-l [&_.grid]:border-border [&_.grid]:pl-3`,children:t?(0,U.jsx)(ty,{value:e.value}):(0,U.jsx)(ry,{value:e.value})})]})}function ry(e){return e.value===null?(0,U.jsx)(`span`,{className:`italic text-muted-foreground`,children:`null`}):typeof e.value==`string`||typeof e.value==`number`?(0,U.jsx)(`span`,{children:e.value}):(e.value,(0,U.jsx)(`span`,{children:String(e.value)}))}function iy(e){if(!e.enabled)return(0,U.jsx)(ay,{title:`Knowledge unavailable`,text:`No registered agent exposes inspectable context.`});let t=e.summary?.agents??[],n=e.summary?.evidence??[];return(0,U.jsxs)(`section`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background/45`,children:[(0,U.jsxs)(`header`,{className:`flex min-h-16 items-center justify-between gap-3 border-b border-border/80 bg-card/70 px-6 shadow-sm`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h1`,{className:`m-0 text-sm font-semibold text-foreground`,children:`Knowledge`}),(0,U.jsx)(`p`,{className:`m-0 text-xs font-medium text-muted-foreground`,children:`Context and retrieval signals visible to Studio`})]}),(0,U.jsxs)(Qt,{className:`h-8 min-h-8 gap-2`,type:`button`,variant:`secondary`,onClick:e.onRefresh,children:[(0,U.jsx)(re,{"aria-hidden":`true`}),`Refresh`]})]}),(0,U.jsx)(`div`,{className:`min-h-0 overflow-auto p-6`,children:(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-5 xl:grid-cols-[minmax(0,1fr)_minmax(380px,0.8fr)]`,children:[(0,U.jsxs)(`section`,{className:`grid min-w-0 content-start gap-3`,"aria-label":`Agent knowledge`,children:[e.loading&&t.length===0?(0,U.jsx)(oy,{text:`Loading knowledge`}):null,!e.loading&&t.length===0?(0,U.jsx)(oy,{text:`No knowledge sources`}):null,t.map(e=>(0,U.jsxs)(Yc,{className:`overflow-hidden rounded-sm bg-card/90`,children:[(0,U.jsxs)(`div`,{className:`grid gap-1 border-b border-border/80 px-4 py-3`,children:[(0,U.jsx)(`strong`,{className:`truncate text-sm font-semibold text-foreground`,children:e.agentName??e.agentId}),(0,U.jsx)(`span`,{className:`truncate font-mono text-xs font-medium text-muted-foreground`,children:e.agentId})]}),(0,U.jsx)(`div`,{className:`flex flex-wrap gap-2 border-b border-border/80 bg-muted/20 px-4 py-3`,children:e.sources.map(e=>(0,U.jsxs)(Uc,{className:`rounded-sm`,children:[e.kind.replaceAll(`_`,` `),`: `,e.count]},e.kind))}),(0,U.jsx)(`div`,{className:`grid gap-0`,children:e.staticContext.length===0?(0,U.jsx)(oy,{text:`No static context`}):e.staticContext.map(e=>(0,U.jsxs)(`div`,{className:`grid gap-2 border-b border-border/75 px-4 py-3.5 last:border-b-0`,children:[(0,U.jsx)(`span`,{className:`font-mono text-xs font-semibold text-muted-foreground`,children:e.id}),(0,U.jsx)(`p`,{className:`m-0 whitespace-pre-wrap text-sm leading-6 text-foreground [overflow-wrap:anywhere]`,children:e.text}),e.additionalProps===void 0?null:(0,U.jsx)(ty,{value:e.additionalProps})]},e.id))})]},e.agentId))]}),(0,U.jsxs)(`section`,{className:`grid min-w-0 content-start gap-3`,"aria-label":`Recent evidence`,children:[(0,U.jsx)(`div`,{className:`font-mono text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:`Recent trace evidence`}),n.length===0?(0,U.jsx)(oy,{text:`No retrieved context captured yet`}):null,n.map(t=>(0,U.jsxs)(Yc,{className:`overflow-hidden rounded-sm bg-card/90`,children:[(0,U.jsxs)(`div`,{className:`grid gap-1 border-b border-border/80 px-4 py-3`,children:[(0,U.jsx)(`strong`,{className:`truncate text-sm font-semibold text-foreground`,children:t.observationName}),(0,U.jsx)(Qt,{className:`h-auto min-h-0 max-w-full justify-self-start rounded-sm border border-border bg-muted px-2 py-1 font-mono text-xs font-semibold text-muted-foreground hover:bg-accent hover:text-accent-foreground`,type:`button`,variant:`ghost`,onClick:()=>e.onOpenTrace(t.traceId),children:t.traceId})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2 border-b border-border/80 bg-muted/20 px-4 py-3`,children:[(0,U.jsxs)(Uc,{children:[`Turn `,t.turn]}),(0,U.jsxs)(Uc,{children:[t.documentCount,` docs`]}),(0,U.jsxs)(Uc,{children:[t.toolCount,` tools`]})]}),(0,U.jsxs)(`div`,{className:`grid gap-2 px-4 py-3`,children:[t.query===void 0?null:(0,U.jsxs)(`p`,{className:`m-0 border-b border-border pb-3 text-sm leading-6 text-muted-foreground [overflow-wrap:anywhere]`,children:[(0,U.jsx)(`span`,{className:`font-mono text-xs font-semibold uppercase tracking-[0.16em] text-foreground`,children:`Query`}),` `,t.query]}),t.documents.slice(0,4).map(e=>(0,U.jsxs)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground [overflow-wrap:anywhere]`,children:[(0,U.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:e.id??`document`}),` `,e.text??``]},`${e.id??`doc`}:${e.text??``}`)),t.tools.length===0?null:(0,U.jsxs)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground`,children:[`Tools: `,t.tools.join(`, `)]})]})]},`${t.traceId}:${t.observationId}`))]})]})})]})}function ay(e){return(0,U.jsx)(`section`,{className:`grid h-full place-items-center p-8`,children:(0,U.jsxs)(`div`,{className:`grid max-w-sm gap-2 text-center`,children:[(0,U.jsx)(`h1`,{className:`m-0 text-base font-semibold text-foreground`,children:e.title}),(0,U.jsx)(`p`,{className:`m-0 text-sm font-medium leading-6 text-muted-foreground`,children:e.text})]})})}function oy(e){return(0,U.jsx)(`div`,{className:`rounded-sm border border-dashed border-border px-4 py-3 text-sm font-medium text-muted-foreground`,children:e.text})}function sy(e){let t=e.agents.find(t=>t.id===e.selectedAgentId)??e.agents[0],n=e.summary?.servers??[],r=n.reduce((e,t)=>e+t.toolCount,0);return(0,U.jsxs)(`section`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background/55`,"aria-label":`MCPs`,children:[(0,U.jsx)(`header`,{className:`border-b border-border/80 bg-background/70 px-6 py-5 backdrop-blur`,children:(0,U.jsxs)(`div`,{className:`mx-auto grid max-w-[1500px] grid-cols-[minmax(0,1fr)_auto] items-end gap-4 max-md:grid-cols-1`,children:[(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-2`,children:[(0,U.jsx)(`div`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.24em] text-primary`,children:`External context`}),(0,U.jsx)(`h1`,{className:`m-0 text-2xl font-semibold leading-none tracking-tight text-foreground`,children:`MCPs`}),(0,U.jsx)(`p`,{className:`m-0 max-w-[62ch] text-sm leading-6 text-muted-foreground`,children:`MCP servers and remote tools registered on Studio agents, grouped by server.`})]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3 max-md:grid max-md:grid-cols-1`,children:[(0,U.jsxs)(Uc,{className:`h-9 justify-center border-border/80 bg-card/70 text-muted-foreground`,children:[n.length,` servers / `,r,` tools`]}),e.agents.length>1?(0,U.jsxs)(Ic,{value:t?.id??``,onValueChange:e.onSelectAgent,children:[(0,U.jsx)(Rc,{className:`h-9 min-h-9 w-64 rounded-sm border-border bg-card/80 font-mono text-xs max-md:w-full`,children:(0,U.jsx)(Lc,{placeholder:`Agent`})}),(0,U.jsx)(zc,{align:`end`,children:e.agents.map(e=>(0,U.jsx)(Bc,{value:e.id,children:e.name??e.id},e.id))})]}):null]})]})}),(0,U.jsx)(`div`,{className:`min-h-0 overflow-auto px-6 py-6`,children:(0,U.jsx)(`div`,{className:`mx-auto grid max-w-[1500px] gap-5`,children:e.enabled?e.loading?(0,U.jsx)(dy,{title:`Loading MCPs`,message:`Reading registered MCP metadata.`}):n.length===0?(0,U.jsx)(dy,{title:`No MCPs`,message:`The selected agent has no registered MCP tools.`}):n.map(e=>(0,U.jsx)(cy,{server:e},e.name)):(0,U.jsx)(dy,{title:`MCPs unavailable`,message:`No registered Studio agent exposes MCP tools.`})})})]})}function cy(e){return(0,U.jsxs)(`section`,{className:`overflow-hidden border border-border/80 bg-card/55 shadow-sm`,children:[(0,U.jsxs)(`header`,{className:`grid min-h-14 grid-cols-[minmax(0,1fr)_auto] items-center gap-4 border-b border-border/80 bg-muted/20 px-4`,children:[(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,U.jsx)(`h2`,{className:`m-0 truncate font-mono text-[15px] font-semibold text-foreground`,children:e.server.name}),(0,U.jsx)(`span`,{className:`truncate font-mono text-[11px] font-medium text-muted-foreground`,children:e.server.agentId})]}),(0,U.jsxs)(Uc,{className:`border-border/80 bg-background/50 text-muted-foreground`,children:[e.server.toolCount,` tools`]})]}),(0,U.jsx)(`div`,{className:`grid divide-y divide-border/70`,children:e.server.tools.map(e=>(0,U.jsx)(ly,{tool:e},`${e.source}:${e.name}`))})]})}function ly(e){return(0,U.jsxs)(`article`,{className:`grid grid-cols-[minmax(300px,0.75fr)_minmax(0,1fr)] max-lg:grid-cols-1`,children:[(0,U.jsxs)(`div`,{className:`grid content-start gap-4 border-r border-border/70 p-4 max-lg:border-b max-lg:border-r-0`,children:[(0,U.jsxs)(`div`,{className:`grid gap-1`,children:[(0,U.jsx)(`h3`,{className:`m-0 truncate font-mono text-[15px] font-semibold text-foreground`,children:e.tool.name}),(0,U.jsx)(`span`,{className:`font-mono text-[11px] font-medium text-muted-foreground`,children:e.tool.source})]}),(0,U.jsx)(`p`,{className:`m-0 max-w-[62ch] text-sm leading-6 text-muted-foreground`,children:e.tool.description}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2`,children:[(0,U.jsx)(Uc,{className:fy(e.tool.source),children:e.tool.source}),(0,U.jsxs)(Uc,{className:`border-border/80 bg-transparent text-muted-foreground`,children:[my(e.tool.parameters),` fields`]})]})]}),(0,U.jsx)(uy,{value:e.tool.parameters})]})}function uy(e){return(0,U.jsxs)(`section`,{className:`grid min-w-0 content-start bg-background/35`,children:[(0,U.jsxs)(`div`,{className:`flex min-h-9 items-center justify-between gap-3 border-b border-border/70 px-4`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:`Parameter schema`}),(0,U.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:py(e.value)})]}),(0,U.jsx)(`div`,{className:`min-w-0 overflow-x-auto`,children:(0,U.jsx)(`pre`,{className:`m-0 max-h-80 min-w-max p-4 font-mono text-[12px] leading-5 text-foreground`,children:(0,U.jsx)(`code`,{children:hy(e.value)})})})]})}function dy(e){return(0,U.jsx)(`div`,{className:`grid min-h-80 place-items-center border border-dashed border-border/80 bg-card/35 px-6 text-center`,children:(0,U.jsxs)(`div`,{className:`grid max-w-md gap-2`,children:[(0,U.jsx)(`h2`,{className:`m-0 text-base font-semibold text-foreground`,children:e.title}),(0,U.jsx)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground`,children:e.message})]})})}function fy(e){return e===`dynamic`?`border-primary/35 bg-primary/10 text-primary`:`border-border/80 bg-muted/55 text-muted-foreground`}function py(e){if(typeof e!=`object`||!e||Array.isArray(e))return`value`;let t=e.type;return typeof t==`string`?t:`object`}function my(e){if(typeof e!=`object`||!e||Array.isArray(e))return 0;let t=e.properties;return typeof t==`object`&&t&&!Array.isArray(t)?Object.keys(t).length:0}function hy(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function gy(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=gy(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var _y={value:()=>{}};function vy(){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 yy(n)}function yy(e){this._=e}function by(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}})}yy.prototype=vy.prototype={constructor:yy,on:function(e,t){var n=this._,r=by(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=xy(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Sy(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Sy(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 yy(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 xy(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Sy(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=_y,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Cy={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 wy(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Cy.hasOwnProperty(t)?{space:Cy[t],local:e}:e}function Ty(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 Ey(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Dy(e){var t=wy(e);return(t.local?Ey:Ty)(t)}function Oy(){}function ky(e){return e==null?Oy:function(){return this.querySelector(e)}}function Ay(e){typeof e!=`function`&&(e=ky(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 vx(r,this._parents)}function jy(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function My(){return[]}function Ny(e){return e==null?My:function(){return this.querySelectorAll(e)}}function Py(e){return function(){return jy(e.apply(this,arguments))}}function Fy(e){e=typeof e==`function`?Py(e):Ny(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 vx(r,i)}function Iy(e){return function(){return this.matches(e)}}function Ly(e){return function(t){return t.matches(e)}}var Ry=Array.prototype.find;function zy(e){return function(){return Ry.call(this.children,e)}}function By(){return this.firstElementChild}function Vy(e){return this.select(e==null?By:zy(typeof e==`function`?e:Ly(e)))}var Hy=Array.prototype.filter;function Uy(){return Array.from(this.children)}function Wy(e){return function(){return Hy.call(this.children,e)}}function Gy(e){return this.selectAll(e==null?Uy:Wy(typeof e==`function`?e:Ly(e)))}function Ky(e){typeof e!=`function`&&(e=Iy(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 vx(r,this._parents)}function qy(e){return Array(e.length)}function Jy(){return new vx(this._enter||this._groups.map(qy),this._parents)}function Yy(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Yy.prototype={constructor:Yy,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 Xy(e){return function(){return e}}function Zy(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 Yy(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Qy(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 Yy(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function $y(e){return e.__data__}function eb(e,t){if(!arguments.length)return Array.from(this,$y);var n=t?Qy:Zy,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Xy(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=tb(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 vx(o,r),o._enter=s,o._exit=c,o}function tb(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function nb(){return new vx(this._exit||this._groups.map(qy),this._parents)}function rb(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 ib(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 vx(s,this._parents)}function ab(){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 ob(e){e||=sb;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 vx(i,this._parents).order()}function sb(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function cb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function lb(){return Array.from(this)}function ub(){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 db(){let e=0;for(let t of this)++e;return e}function fb(){return!this.node()}function pb(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 mb(e){return function(){this.removeAttribute(e)}}function hb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gb(e,t){return function(){this.setAttribute(e,t)}}function _b(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function vb(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function yb(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 bb(e,t){var n=wy(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?hb:mb:typeof t==`function`?n.local?yb:vb:n.local?_b:gb)(n,t))}function xb(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Sb(e){return function(){this.style.removeProperty(e)}}function Cb(e,t,n){return function(){this.style.setProperty(e,t,n)}}function wb(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Tb(e,t,n){return arguments.length>1?this.each((t==null?Sb:typeof t==`function`?wb:Cb)(e,t,n??``)):Eb(this.node(),e)}function Eb(e,t){return e.style.getPropertyValue(t)||xb(e).getComputedStyle(e,null).getPropertyValue(t)}function Db(e){return function(){delete this[e]}}function Ob(e,t){return function(){this[e]=t}}function kb(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ab(e,t){return arguments.length>1?this.each((t==null?Db:typeof t==`function`?kb:Ob)(e,t)):this.node()[e]}function jb(e){return e.trim().split(/^|\s+/)}function Mb(e){return e.classList||new Nb(e)}function Nb(e){this._node=e,this._names=jb(e.getAttribute(`class`)||``)}Nb.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 Pb(e,t){for(var n=Mb(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Fb(e,t){for(var n=Mb(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ib(e){return function(){Pb(this,e)}}function Lb(e){return function(){Fb(this,e)}}function Rb(e,t){return function(){(t.apply(this,arguments)?Pb:Fb)(this,e)}}function zb(e,t){var n=jb(e+``);if(arguments.length<2){for(var r=Mb(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Rb:t?Ib:Lb)(n,t))}function Bb(){this.textContent=``}function Vb(e){return function(){this.textContent=e}}function Hb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function Ub(e){return arguments.length?this.each(e==null?Bb:(typeof e==`function`?Hb:Vb)(e)):this.node().textContent}function Wb(){this.innerHTML=``}function Gb(e){return function(){this.innerHTML=e}}function Kb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function qb(e){return arguments.length?this.each(e==null?Wb:(typeof e==`function`?Kb:Gb)(e)):this.node().innerHTML}function Jb(){this.nextSibling&&this.parentNode.appendChild(this)}function Yb(){return this.each(Jb)}function Xb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zb(){return this.each(Xb)}function Qb(e){var t=typeof e==`function`?e:Dy(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function $b(){return null}function ex(e,t){var n=typeof e==`function`?e:Dy(e),r=t==null?$b:typeof t==`function`?t:ky(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function tx(){var e=this.parentNode;e&&e.removeChild(this)}function nx(){return this.each(tx)}function rx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ix(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ax(e){return this.select(e?ix:rx)}function ox(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function sx(e){return function(t){e.call(this,t,this.__data__)}}function cx(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 lx(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 ux(e,t,n){return function(){var r=this.__on,i,a=sx(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 dx(e,t,n){var r=cx(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}return}for(s=t?ux:lx,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function fx(e,t,n){var r=xb(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 px(e,t){return function(){return fx(this,e,t)}}function mx(e,t){return function(){return fx(this,e,t.apply(this,arguments))}}function hx(e,t){return this.each((typeof t==`function`?mx:px)(e,t))}function*gx(){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 _x=[null];function vx(e,t){this._groups=e,this._parents=t}function yx(){return new vx([[document.documentElement]],_x)}function bx(){return this}vx.prototype=yx.prototype={constructor:vx,select:Ay,selectAll:Fy,selectChild:Vy,selectChildren:Gy,filter:Ky,data:eb,enter:Jy,exit:nb,join:rb,merge:ib,selection:bx,order:ab,sort:ob,call:cb,nodes:lb,node:ub,size:db,empty:fb,each:pb,attr:bb,style:Tb,property:Ab,classed:zb,text:Ub,html:qb,raise:Yb,lower:Zb,append:Qb,insert:ex,remove:nx,clone:ax,datum:ox,on:dx,dispatch:hx,[Symbol.iterator]:gx};function xx(e){return typeof e==`string`?new vx([[document.querySelector(e)]],[document.documentElement]):new vx([[e]],_x)}function Sx(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Cx(e,t){if(e=Sx(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 wx={passive:!1},Tx={capture:!0,passive:!1};function Ex(e){e.stopImmediatePropagation()}function Dx(e){e.preventDefault(),e.stopImmediatePropagation()}function Ox(e){var t=e.document.documentElement,n=xx(e).on(`dragstart.drag`,Dx,Tx);`onselectstart`in t?n.on(`selectstart.drag`,Dx,Tx):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function kx(e,t){var n=e.document.documentElement,r=xx(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,Dx,Tx),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 Ax=e=>()=>e;function jx(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}})}jx.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Mx(e){return!e.ctrlKey&&!e.button}function Nx(){return this.parentNode}function Px(e,t){return t??{x:e.x,y:e.y}}function Fx(){return navigator.maxTouchPoints||`ontouchstart`in this}function Ix(){var e=Mx,t=Nx,n=Px,r=Fx,i={},a=vy(`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`,_,wx).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&&(xx(n.view).on(`mousemove.drag`,m,Tx).on(`mouseup.drag`,h,Tx),Ox(n.view),Ex(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function m(e){if(Dx(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>d}i.mouse(`drag`,e)}function h(e){xx(e.view).on(`mousemove.drag mouseup.drag`,null),kx(e.view,l),Dx(e),i.mouse(`end`,e)}function g(n,r){if(e.call(this,n,r)){var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s,c;for(s=0;s<o;++s)(c=y(this,a,n,r,i[s].identifier,i[s]))&&(Ex(n),c(`start`,n,i[s]))}}function _(e){var t=e.changedTouches,n=t.length,r,a;for(r=0;r<n;++r)(a=i[t[r].identifier])&&(Dx(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])&&(Ex(e),a(`end`,e,t[r]))}function y(e,t,r,s,c,l){var u=a.copy(),d=Cx(l||r,t),p,m,h;if((h=n.call(e,new jx(`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=Cx(l||a,t),_=o;break}u.call(r,e,new jx(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:Ax(!!t),f):e},f.container=function(e){return arguments.length?(t=typeof e==`function`?e:Ax(e),f):t},f.subject=function(e){return arguments.length?(n=typeof e==`function`?e:Ax(e),f):n},f.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:Ax(!!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 Lx(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Rx(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zx(){}var Bx=.7,Vx=1/Bx,Hx=`\\s*([+-]?\\d+)\\s*`,Ux=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Wx=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Gx=/^#([0-9a-f]{3,8})$/,Kx=RegExp(`^rgb\\(${Hx},${Hx},${Hx}\\)$`),qx=RegExp(`^rgb\\(${Wx},${Wx},${Wx}\\)$`),Jx=RegExp(`^rgba\\(${Hx},${Hx},${Hx},${Ux}\\)$`),Yx=RegExp(`^rgba\\(${Wx},${Wx},${Wx},${Ux}\\)$`),Xx=RegExp(`^hsl\\(${Ux},${Wx},${Wx}\\)$`),Zx=RegExp(`^hsla\\(${Ux},${Wx},${Wx},${Ux}\\)$`),Qx={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};Lx(zx,rS,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$x,formatHex:$x,formatHex8:eS,formatHsl:tS,formatRgb:nS,toString:nS});function $x(){return this.rgb().formatHex()}function eS(){return this.rgb().formatHex8()}function tS(){return gS(this).formatHsl()}function nS(){return this.rgb().formatRgb()}function rS(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Gx.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?iS(t):n===3?new cS(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?aS(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?aS(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=Kx.exec(e))?new cS(t[1],t[2],t[3],1):(t=qx.exec(e))?new cS(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Jx.exec(e))?aS(t[1],t[2],t[3],t[4]):(t=Yx.exec(e))?aS(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Xx.exec(e))?hS(t[1],t[2]/100,t[3]/100,1):(t=Zx.exec(e))?hS(t[1],t[2]/100,t[3]/100,t[4]):Qx.hasOwnProperty(e)?iS(Qx[e]):e===`transparent`?new cS(NaN,NaN,NaN,0):null}function iS(e){return new cS(e>>16&255,e>>8&255,e&255,1)}function aS(e,t,n,r){return r<=0&&(e=t=n=NaN),new cS(e,t,n,r)}function oS(e){return e instanceof zx||(e=rS(e)),e?(e=e.rgb(),new cS(e.r,e.g,e.b,e.opacity)):new cS}function sS(e,t,n,r){return arguments.length===1?oS(e):new cS(e,t,n,r??1)}function cS(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Lx(cS,sS,Rx(zx,{brighter(e){return e=e==null?Vx:Vx**+e,new cS(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bx:Bx**+e,new cS(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cS(pS(this.r),pS(this.g),pS(this.b),fS(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:lS,formatHex:lS,formatHex8:uS,formatRgb:dS,toString:dS}));function lS(){return`#${mS(this.r)}${mS(this.g)}${mS(this.b)}`}function uS(){return`#${mS(this.r)}${mS(this.g)}${mS(this.b)}${mS((isNaN(this.opacity)?1:this.opacity)*255)}`}function dS(){let e=fS(this.opacity);return`${e===1?`rgb(`:`rgba(`}${pS(this.r)}, ${pS(this.g)}, ${pS(this.b)}${e===1?`)`:`, ${e})`}`}function fS(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pS(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mS(e){return e=pS(e),(e<16?`0`:``)+e.toString(16)}function hS(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vS(e,t,n,r)}function gS(e){if(e instanceof vS)return new vS(e.h,e.s,e.l,e.opacity);if(e instanceof zx||(e=rS(e)),!e)return new vS;if(e instanceof vS)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 vS(o,s,c,e.opacity)}function _S(e,t,n,r){return arguments.length===1?gS(e):new vS(e,t,n,r??1)}function vS(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Lx(vS,_S,Rx(zx,{brighter(e){return e=e==null?Vx:Vx**+e,new vS(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bx:Bx**+e,new vS(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 cS(xS(e>=240?e-240:e+120,i,r),xS(e,i,r),xS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new vS(yS(this.h),bS(this.s),bS(this.l),fS(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=fS(this.opacity);return`${e===1?`hsl(`:`hsla(`}${yS(this.h)}, ${bS(this.s)*100}%, ${bS(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function yS(e){return e=(e||0)%360,e<0?e+360:e}function bS(e){return Math.max(0,Math.min(1,e||0))}function xS(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 SS=e=>()=>e;function CS(e,t){return function(n){return e+n*t}}function wS(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function TS(e){return(e=+e)==1?ES:function(t,n){return n-t?wS(t,n,e):SS(isNaN(t)?n:t)}}function ES(e,t){var n=t-e;return n?CS(e,n):SS(isNaN(e)?t:e)}var DS=(function e(t){var n=TS(t);function r(e,t){var r=n((e=sS(e)).r,(t=sS(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=ES(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 OS(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 kS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function AS(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=zS(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 jS(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function MS(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function NS(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]=zS(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var PS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,FS=new RegExp(PS.source,`g`);function IS(e){return function(){return e}}function LS(e){return function(t){return e(t)+``}}function RS(e,t){var n=PS.lastIndex=FS.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=PS.exec(e))&&(i=FS.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:MS(r,i)})),n=FS.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?LS(c[0].x):IS(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 zS(e,t){var n=typeof t,r;return t==null||n===`boolean`?SS(t):(n===`number`?MS:n===`string`?(r=rS(t))?(t=r,DS):RS:t instanceof rS?DS:t instanceof Date?jS:kS(t)?OS:Array.isArray(t)?AS:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?NS:MS)(e,t)}var BS=180/Math.PI,VS={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function HS(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)*BS,skewX:Math.atan(c)*BS,scaleX:o,scaleY:s}}var US;function WS(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?VS:HS(t.a,t.b,t.c,t.d,t.e,t.f)}function GS(e){return e==null||(US||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),US.setAttribute(`transform`,e),!(e=US.transform.baseVal.consolidate()))?VS:(e=e.matrix,HS(e.a,e.b,e.c,e.d,e.e,e.f))}function KS(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:MS(e,i)},{i:c-2,x:MS(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:MS(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:MS(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:MS(e,n)},{i:s-2,x:MS(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 qS=KS(WS,`px, `,`px)`,`deg)`),JS=KS(GS,`, `,`)`,`)`),YS=1e-12;function XS(e){return((e=Math.exp(e))+1/e)/2}function ZS(e){return((e=Math.exp(e))-1/e)/2}function QS(e){return((e=Math.exp(2*e))-1)/(e+1)}var $S=(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<YS)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=XS(y),c=s/(n*g)*(i*QS(t*r+y)-ZS(y));return[a+c*d,o+c*f,s*i/XS(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),eC=0,tC=0,nC=0,rC=1e3,iC,aC,oC=0,sC=0,cC=0,lC=typeof performance==`object`&&performance.now?performance:Date,uC=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function dC(){return sC||=(uC(fC),lC.now()+cC)}function fC(){sC=0}function pC(){this._call=this._time=this._next=null}pC.prototype=mC.prototype={constructor:pC,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?dC():+n)+(t==null?0:+t),!this._next&&aC!==this&&(aC?aC._next=this:iC=this,aC=this),this._call=e,this._time=n,yC()},stop:function(){this._call&&(this._call=null,this._time=1/0,yC())}};function mC(e,t,n){var r=new pC;return r.restart(e,t,n),r}function hC(){dC(),++eC;for(var e=iC,t;e;)(t=sC-e._time)>=0&&e._call.call(void 0,t),e=e._next;--eC}function gC(){sC=(oC=lC.now())+cC,eC=tC=0;try{hC()}finally{eC=0,vC(),sC=0}}function _C(){var e=lC.now(),t=e-oC;t>rC&&(cC-=t,oC=e)}function vC(){for(var e,t=iC,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:iC=n);aC=e,yC(r)}function yC(e){eC||(tC&&=clearTimeout(tC),e-sC>24?(e<1/0&&(tC=setTimeout(gC,e-lC.now()-cC)),nC&&=clearInterval(nC)):(nC||=(oC=lC.now(),setInterval(_C,rC)),eC=1,uC(gC)))}function bC(e,t,n){var r=new pC;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var xC=vy(`start`,`end`,`cancel`,`interrupt`),SC=[];function CC(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;DC(e,n,{name:t,index:r,group:i,on:xC,tween:SC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function wC(e,t){var n=EC(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function TC(e,t){var n=EC(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function EC(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function DC(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=mC(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 bC(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(bC(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 OC(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}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&&delete e.__transition}}function kC(e){return this.each(function(){OC(this,e)})}function AC(e,t){var n,r;return function(){var i=TC(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 jC(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=TC(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 MC(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=EC(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?AC:jC)(n,e,t))}function NC(e,t,n){var r=e._id;return e.each(function(){var e=TC(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return EC(e,r).value[t]}}function PC(e,t){var n;return(typeof t==`number`?MS:t instanceof rS?DS:(n=rS(t))?(t=n,DS):RS)(e,t)}function FC(e){return function(){this.removeAttribute(e)}}function IC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function LC(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 RC(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 zC(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 BC(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 VC(e,t){var n=wy(e),r=n===`transform`?JS:PC;return this.attrTween(e,typeof t==`function`?(n.local?BC:zC)(n,r,NC(this,`attr.`+e,t)):t==null?(n.local?IC:FC)(n):(n.local?RC:LC)(n,r,t))}function HC(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function UC(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function WC(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&UC(e,i)),n}return i._value=t,i}function GC(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&HC(e,i)),n}return i._value=t,i}function KC(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=wy(e);return this.tween(n,(r.local?WC:GC)(r,t))}function qC(e,t){return function(){wC(this,e).delay=+t.apply(this,arguments)}}function JC(e,t){return t=+t,function(){wC(this,e).delay=t}}function YC(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?qC:JC)(t,e)):EC(this.node(),t).delay}function XC(e,t){return function(){TC(this,e).duration=+t.apply(this,arguments)}}function ZC(e,t){return t=+t,function(){TC(this,e).duration=t}}function QC(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?XC:ZC)(t,e)):EC(this.node(),t).duration}function $C(e,t){if(typeof t!=`function`)throw Error();return function(){TC(this,e).ease=t}}function ew(e){var t=this._id;return arguments.length?this.each($C(t,e)):EC(this.node(),t).ease}function tw(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();TC(this,e).ease=n}}function nw(e){if(typeof e!=`function`)throw Error();return this.each(tw(this._id,e))}function rw(e){typeof e!=`function`&&(e=Iy(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 Mw(r,this._parents,this._name,this._id)}function iw(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 Mw(o,this._parents,this._name,this._id)}function aw(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 ow(e,t,n){var r,i,a=aw(t)?wC:TC;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function sw(e,t){var n=this._id;return arguments.length<2?EC(this.node(),n).on.on(e):this.each(ow(n,e,t))}function cw(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function lw(){return this.on(`end.remove`,cw(this._id))}function uw(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ky(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,CC(l[f],t,n,f,l,EC(u,n)));return new Mw(a,this._parents,t,n)}function dw(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Ny(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=EC(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&CC(p,t,n,h,f,m);a.push(f),o.push(u)}return new Mw(a,o,t,n)}var fw=yx.prototype.constructor;function pw(){return new fw(this._groups,this._parents)}function mw(e,t){var n,r,i;return function(){var a=Eb(this,e),o=(this.style.removeProperty(e),Eb(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function hw(e){return function(){this.style.removeProperty(e)}}function gw(e,t,n){var r,i=n+``,a;return function(){var o=Eb(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function _w(e,t,n){var r,i,a;return function(){var o=Eb(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Eb(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function vw(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=TC(this,e),l=c.on,u=c.value[a]==null?s||=hw(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function yw(e,t,n){var r=(e+=``)==`transform`?qS:PC;return t==null?this.styleTween(e,mw(e,r)).on(`end.style.`+e,hw(e)):typeof t==`function`?this.styleTween(e,_w(e,r,NC(this,`style.`+e,t))).each(vw(this._id,e)):this.styleTween(e,gw(e,r,t),n).on(`end.style.`+e,null)}function bw(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function xw(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&bw(e,a,n)),r}return a._value=t,a}function Sw(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,xw(e,t,n??``))}function Cw(e){return function(){this.textContent=e}}function ww(e){return function(){var t=e(this);this.textContent=t??``}}function Tw(e){return this.tween(`text`,typeof e==`function`?ww(NC(this,`text`,e)):Cw(e==null?``:e+``))}function Ew(e){return function(t){this.textContent=e.call(this,t)}}function Dw(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ew(r)),t}return r._value=e,r}function Ow(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,Dw(e))}function kw(){for(var e=this._name,t=this._id,n=Pw(),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=EC(c,t);CC(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Mw(r,this._parents,e,n)}function Aw(){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=TC(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 jw=0;function Mw(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Nw(e){return yx().transition(e)}function Pw(){return++jw}var Fw=yx.prototype;Mw.prototype=Nw.prototype={constructor:Mw,select:uw,selectAll:dw,selectChild:Fw.selectChild,selectChildren:Fw.selectChildren,filter:rw,merge:iw,selection:pw,transition:kw,call:Fw.call,nodes:Fw.nodes,node:Fw.node,size:Fw.size,empty:Fw.empty,each:Fw.each,on:sw,attr:VC,attrTween:KC,style:yw,styleTween:Sw,text:Tw,textTween:Ow,remove:lw,tween:MC,delay:YC,duration:QC,ease:ew,easeVarying:nw,end:Aw,[Symbol.iterator]:Fw[Symbol.iterator]};function Iw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Lw={time:null,delay:0,duration:250,ease:Iw};function Rw(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function zw(e){var t,n;e instanceof Mw?(t=e._id,e=e._name):(t=Pw(),(n=Lw).time=dC(),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])&&CC(c,e,t,l,o,n||Rw(c,t));return new Mw(r,this._parents,e,t)}yx.prototype.interrupt=kC,yx.prototype.transition=zw;var Bw=e=>()=>e;function Vw(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 Hw(e,t,n){this.k=e,this.x=t,this.y=n}Hw.prototype={constructor:Hw,scale:function(e){return e===1?this:new Hw(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Hw(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 Uw=new Hw(1,0,0);Ww.prototype=Hw.prototype;function Ww(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Uw;return e.__zoom}function Gw(e){e.stopImmediatePropagation()}function Kw(e){e.preventDefault(),e.stopImmediatePropagation()}function qw(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function Jw(){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 Yw(){return this.__zoom||Uw}function Xw(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Zw(){return navigator.maxTouchPoints||`ontouchstart`in this}function Qw(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 $w(){var e=qw,t=Jw,n=Qw,r=Xw,i=Zw,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=$S,l=vy(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,Yw).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`,Yw),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(Uw.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 Hw(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 Hw(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 Hw(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=xx(this.that).datum();l.call(e,this.that,new Vw(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=Cx(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)],OC(this),s.start();Kw(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=xx(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=Cx(t,i),l=t.clientX,u=t.clientY;Ox(t.view),Gw(t),a.mouse=[c,this.__zoom.invert(c)],OC(this),a.start();function d(e){if(Kw(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]=Cx(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),kx(e.view,a.moved),Kw(e),a.event(e).end()}}function E(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=Cx(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);Kw(r),s>0?xx(this).transition().duration(s).call(x,d,c,r):xx(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(Gw(t),s=0;s<i;++s)c=r[s],l=Cx(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)),OC(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(Kw(e),s=0;s<a;++s)c=i[s],l=Cx(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(Gw(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=Cx(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=xx(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:Bw(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Bw(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Bw(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:Bw([[+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 eT={error001:()=>`[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.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 React Flow 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.`},tT=[[-1/0,-1/0],[1/0,1/0]],nT=[`Enter`,` `,`Escape`],rT={"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`},iT;(function(e){e.Strict=`strict`,e.Loose=`loose`})(iT||={});var aT;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(aT||={});var oT;(function(e){e.Partial=`partial`,e.Full=`full`})(oT||={});var sT={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},cT;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(cT||={});var lT;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(lT||={});var $;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})($||={});var uT={[$.Left]:$.Right,[$.Right]:$.Left,[$.Top]:$.Bottom,[$.Bottom]:$.Top};function dT(e){return e===null?null:e?`valid`:`invalid`}var fT=e=>`id`in e&&`source`in e&&`target`in e,pT=e=>`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),mT=e=>`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),hT=(e,t=[0,0])=>{let{width:n,height:r}=JT(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},gT=(e,t={nodeOrigin:[0,0]})=>e.length===0?{x:0,y:0,width:0,height:0}:jT(e.reduce((e,n)=>{let r=typeof n==`string`,i=!t.nodeLookup&&!r?n:void 0;return t.nodeLookup&&(i=r?t.nodeLookup.get(n):mT(n)?n:t.nodeLookup.get(n.id)),kT(e,i?NT(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})),_T=(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=kT(n,NT(e)),r=!0)}),r?jT(n):{x:0,y:0,width:0,height:0}},vT=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s={...BT(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];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??null,l=e.height??t.height??t.initialHeight??null,u=FT(s,MT(t)),d=(i??0)*(l??0),f=a&&u>0;(!t.internals.handleBounds||f||u>=d||t.dragging)&&c.push(t)}return c},yT=(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 bT(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{e.measured.width&&e.measured.height&&(t?.includeHiddenNodes||!e.hidden)&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function xT({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);let s=GT(_T(bT(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}),Promise.resolve(!0)}function ST({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`,eT.error005());else{let e=s.measured.width,t=s.measured.height;e&&t&&(d=[[c,l],[c+e,l+t]])}else s&&qT(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=qT(d)?TT(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,eT.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 CT({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=yT(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 wT=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),TT=(e={x:0,y:0},t,n)=>({x:wT(e.x,t[0][0],t[1][0]-(n?.width??0)),y:wT(e.y,t[0][1],t[1][1]-(n?.height??0))});function ET(e,t,n){let{width:r,height:i}=JT(n),{x:a,y:o}=n.internals.positionAbsolute;return TT(e,[[a,o],[a+r,o+i]],t)}var DT=(e,t,n)=>e<t?wT(Math.abs(e-t),1,t)/t:e>n?-wT(Math.abs(e-n),1,t)/t:0,OT=(e,t,n=15,r=40)=>[DT(e.x,r,t.width-r)*n,DT(e.y,r,t.height-r)*n],kT=(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)}),AT=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),jT=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),MT=(e,t=[0,0])=>{let{x:n,y:r}=mT(e)?e.internals.positionAbsolute:hT(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}},NT=(e,t=[0,0])=>{let{x:n,y:r}=mT(e)?e.internals.positionAbsolute:hT(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)}},PT=(e,t)=>jT(kT(AT(e),AT(t))),FT=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},IT=e=>LT(e.width)&&LT(e.height)&&LT(e.x)&&LT(e.y),LT=e=>!isNaN(e)&&isFinite(e),RT=(e,t)=>{},zT=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),BT=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?zT(s,o):s},VT=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function HT(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(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function UT(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=HT(e,n),i=HT(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=HT(e.top??e.y??0,n),i=HT(e.bottom??e.y??0,n),a=HT(e.left??e.x??0,t),o=HT(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 WT(e,t,n,r,i,a){let{x:o,y:s}=VT(e,[t,n,r]),{x:c,y:l}=VT({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 GT=(e,t,n,r,i,a)=>{let o=UT(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=wT(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=WT(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}},KT=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function qT(e){return e!=null&&e!==`parent`}function JT(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function YT(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function XT(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 ZT(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function QT(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function $T(e){return{...rT,...e||{}}}function eE(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=oE(e),s=BT({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?zT(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var tE=e=>({width:e.offsetWidth,height:e.offsetHeight}),nE=e=>e?.getRootNode?.()||window?.document,rE=[`INPUT`,`SELECT`,`TEXTAREA`];function iE(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?rE.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var aE=e=>`clientX`in e,oE=(e,t)=>{let n=aE(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)}},sE=(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,...tE(t)}})};function cE({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 lE(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function uE({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case $.Left:return[t-lE(t-r,a),n];case $.Right:return[t+lE(r-t,a),n];case $.Top:return[t,n-lE(n-i,a)];case $.Bottom:return[t,n+lE(i-n,a)]}}function dE({sourceX:e,sourceY:t,sourcePosition:n=$.Bottom,targetX:r,targetY:i,targetPosition:a=$.Top,curvature:o=.25}){let[s,c]=uE({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=uE({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=cE({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 fE({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 pE({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 mE({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=kT(NT(e),NT(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),FT({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},jT(a))>0}var hE=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,gE=(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)),_E=(e,t,n={})=>{if(!e.source||!e.target)return eT.error006(),t;let r=n.getEdgeId||hE,i;return i=fT(e)?{...e}:{...e,id:r(e)},gE(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function vE({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=fE({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var yE={[$.Left]:{x:-1,y:0},[$.Right]:{x:1,y:0},[$.Top]:{x:0,y:-1},[$.Bottom]:{x:0,y:1}},bE=({source:e,sourcePosition:t=$.Bottom,target:n})=>t===$.Left||t===$.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},xE=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function SE({source:e,sourcePosition:t=$.Bottom,target:n,targetPosition:r=$.Top,center:i,offset:a,stepPosition:o}){let s=yE[t],c=yE[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=bE({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]=fE({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 CE(e,t,n,r){let i=Math.min(xE(e,t)/2,xE(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 wE({sourceX:e,sourceY:t,sourcePosition:n=$.Bottom,targetX:r,targetY:i,targetPosition:a=$.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=SE({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+=CE(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 TE(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function EE(e){let{sourceNode:t,targetNode:n}=e;if(!TE(t)||!TE(n))return null;let r=t.internals.handleBounds||DE(t.handles),i=n.internals.handleBounds||DE(n.handles),a=kE(r?.source??[],e.sourceHandle),o=kE(e.connectionMode===iT.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,eT.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||$.Bottom,c=o?.position||$.Top,l=OE(t,a,s),u=OE(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function DE(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 OE(e,t,n=$.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??JT(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case $.Top:return{x:i+o/2,y:a};case $.Right:return{x:i+o,y:a+s/2};case $.Bottom:return{x:i+o/2,y:a+s};case $.Left:return{x:i,y:a+s/2}}}function kE(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function AE(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function jE(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=AE(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 ME=1e3,NE=10,PE={nodeOrigin:[0,0],nodeExtent:tT,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},FE={...PE,checkEquality:!0};function IE(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function LE(e,t,n){let r=IE(PE,n);for(let n of e.values())if(n.parentId)HE(n,e,t,r);else{let e=TT(hT(n,r.nodeOrigin),qT(n.extent)?n.extent:r.nodeExtent,JT(n));n.internals.positionAbsolute=e}}function RE(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 zE(e){return e===`manual`}function BE(e,t,n,r={}){let i=IE(FE,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!zE(i.zIndexMode)?ME: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=TT(hT(u,i.nodeOrigin),qT(u.extent)?u.extent:i.nodeExtent,JT(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:RE(u,e),z:UE(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&&HE(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function VE(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 HE(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=IE(PE,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}VE(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*NE),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=WE(e,u,o,s,a&&!zE(c)?ME: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 UE(e,t,n){let r=LT(e.zIndex)?e.zIndex:0;return zE(n)?r:r+(e.selected?t:0)}function WE(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=JT(e),l=hT(e,n),u=qT(e.extent)?TT(l,e.extent,c):l,d=TT({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=ET(d,c,t));let f=UE(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function GE(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=PT(a.get(n.parentId)?.expandedRect??MT(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=JT(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 KE(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=tE(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=qT(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;e.parentId&&e.extent===`parent`?h=ET(h,s,t.get(e.parentId)):m&&(h=TT(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:sE(`source`,r.nodeElement,p,d,e.id),target:sE(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&HE(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:MT(g,i)}))}}if(f.length>0){let e=GE(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function qE({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),s=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(s)}function JE(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 YE(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}`;JE(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),JE(`target`,s,c,e,i,o),t.set(r.id,r)}}function XE(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:XE(n,t):!1}function ZE(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 QE(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!XE(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 $E({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 eD({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=zT(a,t);return{x:o.x-a.x,y:o.y-a.y}}function tD({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=xx(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?AT(_T(s)):null,x=v&&l?eD({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)}:zT(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}=ST({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]=$E({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]=OT(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=eE(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=v,s=QE(i,c,v,b),s.size>0&&(n||h||!b&&g)){let[e,t]=$E({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}let T=Ix().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=eE(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=oE(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),g=eE(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=oE(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=oE(e.sourceEvent,u),S(g))}}).on(`end`,e=>{if(!(!d||p)&&(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]=$E({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||!ZE(t,`.${g}`,v))&&(!_||ZE(t,_,v))});f.call(T)}function _(){f?.on(`.drag`,null)}return{update:g,destroy:_}}function nD(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())FT(i,MT(e))>0&&r.push(e);return r}var rD=250;function iD(e,t,n,r){let i=[],a=1/0,o=nD(e,n,t+rD);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}=OE(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 aD(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,...OE(o,c,c.position,!0)}:c}function oD(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function sD(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var cD=()=>!0;function lD(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:_=cD,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=nE(e.target),E=0,D,{x:O,y:k}=oE(e),A=oD(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let N=aD(i,A,r,c,t);if(!N)return;let P=oE(e,j),ee=!1,F=null,I=!1,L=null;function te(){if(!u||!j)return;let[e,t]=OT(P,j,S);f({x:e,y:t}),E=requestAnimationFrame(te)}let ne={...N,nodeId:i,type:A,position:N.position},R=c.get(i),z={inProgress:!0,isValid:null,from:OE(R,ne,$.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:R,to:P,toHandle:null,toPosition:uT[ne.position],toNode:null,pointer:P};function B(){M=!0,y(z),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&B();function re(e){if(!M){let{x:t,y:n}=oE(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;B()}if(!x()||!ne){V(e);return}let a=b();P=oE(e,j),D=iD(BT(P,a,!1,[1,1]),n,c,ne),ee||=(te(),!0);let s=uD(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});L=s.handleDomNode,F=s.connection,I=sD(!!D,s.isValid);let u=c.get(i),f=u?OE(u,ne,$.Left,!0):z.from,p={...z,from:f,isValid:I,to:s.toHandle&&I?VT({x:s.toHandle.x,y:s.toHandle.y},a):P,toHandle:s.toHandle,toPosition:I&&s.toHandle?s.toHandle.position:uT[ne.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:P};y(p),z=p}function V(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||L)&&F&&I&&h?.(F);let{inProgress:t,...n}=z,r={...n,toPosition:z.toHandle?z.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),ee=!1,I=!1,F=null,L=null,T.removeEventListener(`mousemove`,re),T.removeEventListener(`mouseup`,V),T.removeEventListener(`touchmove`,re),T.removeEventListener(`touchend`,V)}}T.addEventListener(`mousemove`,re),T.addEventListener(`mouseup`,V),T.addEventListener(`touchmove`,re),T.addEventListener(`touchend`,V)}function uD(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=cD,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}=oE(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=oD(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===iT.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=aD(t,e,a,u,n,!0)}return _}var dD={onPointerDown:lD,isValid:uD};function fD({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=xx(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&&KT()?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=$w().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:Cx}}var pD=e=>({x:e.x,y:e.y,zoom:e.k}),mD=({x:e,y:t,zoom:n})=>Uw.translate(e,t).scale(n),hD=(e,t)=>e.target.closest(`.${t}`),gD=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),_D=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,vD=(e,t=0,n=_D,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},yD=e=>{let t=e.ctrlKey&&KT()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function bD({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(hD(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=Cx(u),t=d*2**yD(u);r.scaleTo(n,t,e,u);return}let f=u.deltaMode===1?20:1,p=i===aT.Vertical?0:u.deltaX*f,m=i===aT.Horizontal?0:u.deltaY*f;!KT()&&u.shiftKey&&i!==aT.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-(p/d)*a,-(m/d)*a,{internal:!0});let h=pD(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(u,h),e.panScrollTimeout=setTimeout(()=>{l?.(u,h),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(u,h))}}function xD({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=hD(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function SD({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=pD(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 CD({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&gD(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,pD(a.transform))}}function wD({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&gD(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=pD(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function TD({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:u}){return d=>{let f=e||t,p=n&&d.ctrlKey,m=d.type===`wheel`;if(d.button===1&&d.type===`mousedown`&&(hD(d,`${l}-flow__node`)||hD(d,`${l}-flow__edge`)))return!0;if(!r&&!f&&!i&&!a&&!n||o||u&&!m||hD(d,s)&&m||hD(d,c)&&(!m||i&&m&&!e)||!n&&d.ctrlKey&&m)return!1;if(!n&&d.type===`touchstart`&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!p&&m||!r&&(d.type===`mousedown`||d.type===`touchstart`)||Array.isArray(r)&&!r.includes(d.button)&&d.type===`mousedown`)return!1;let h=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||m)&&h}}function ED({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:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=$w().scaleExtent([t,n]).translateExtent(r),f=xx(e).call(d);v({x:i.x,y:i.y,zoom:wT(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);let p=f.on(`wheel.zoom`),m=f.on(`dblclick.zoom`);d.wheelDelta(yD);function h(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?zS:$S).transform(vD(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function g({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:h,panOnScrollSpeed:g,preventScrolling:v,zoomOnPinch:y,zoomOnScroll:b,zoomOnDoubleClick:x,zoomActivationKeyPressed:S,lib:C,onTransformChange:w,connectionInProgress:T,paneClickDistance:E,selectionOnDrag:D}){r&&!l.isZoomingOrPanning&&_();let O=i&&!S&&!r;d.clickDistance(D?1/0:!LT(E)||E<0?0:E);let k=O?bD({zoomPanValues:l,noWheelClassName:e,d3Selection:f,d3Zoom:d,panOnScrollMode:h,panOnScrollSpeed:g,zoomOnPinch:y,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):xD({noWheelClassName:e,preventScrolling:v,d3ZoomHandler:p});if(f.on(`wheel.zoom`,k,{passive:!1}),!r){let e=SD({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});d.on(`start`,e);let t=CD({zoomPanValues:l,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:w});d.on(`zoom`,t);let r=wD({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});d.on(`end`,r)}let A=TD({zoomActivationKeyPressed:S,panOnDrag:u,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:x,zoomOnPinch:y,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:C,connectionInProgress:T});d.filter(A),x?f.on(`dblclick.zoom`,m):f.on(`dblclick.zoom`,null)}function _(){d.on(`zoom`,null)}async function v(e,t,n){let r=mD(e),i=d?.constrain()(r,t,n);return i&&await h(i),new Promise(e=>e(i))}async function y(e,t){let n=mD(e);return await h(n,t),new Promise(e=>e(n))}function b(e){if(f){let t=mD(e),n=f.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&d?.transform(f,t,null,{sync:!0})}}function x(){let e=f?Ww(f.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}function S(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?zS:$S).scaleTo(vD(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function C(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?zS:$S).scaleBy(vD(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function w(e){d?.scaleExtent(e)}function T(e){d?.translateExtent(e)}function E(e){let t=!LT(e)||e<0?0:e;d?.clickDistance(t)}return{update:g,destroy:_,setViewport:y,setViewportConstrained:v,getViewport:x,scaleTo:S,scaleBy:C,setScaleExtent:w,setTranslateExtent:T,syncViewport:b,setClickDistance:E}}var DD;(function(e){e.Line=`line`,e.Handle=`handle`})(DD||={});function OD({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 kD(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 AD(e,t){return Math.max(0,t-e)}function jD(e,t){return Math.max(0,e-t)}function MD(e,t,n){return Math.max(0,t-e,e-n)}function ND(e,t){return e?!t:t}function PD(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=MD(E,h,g),j=MD(D,_,v);if(o){let e=0,t=0;c&&w<0?e=AD(y+w+O,o[0][0]):!c&&w>0&&(e=jD(y+E+O,o[1][0])),l&&T<0?t=AD(b+T+k,o[0][1]):!l&&T>0&&(t=jD(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=jD(y+w,s[0][0]):!c&&w<0&&(e=AD(y+E,s[1][0])),l&&T>0?t=jD(b+T,s[0][1]):!l&&T<0&&(t=AD(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=MD(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||c&&!l&&f?jD(b+k+E/C,o[1][1])*C:AD(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?AD(b+E/C,s[1][1])*C:jD(b+(c?w:-w)/C,s[0][1])*C,A=Math.max(A,e)}}if(d){let e=MD(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=0;e=!c&&!l||l&&!c&&f?jD(y+D*C+O,o[1][0])/C:AD(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?AD(y+D*C,s[1][0])/C:jD(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=(ND(c,l)?-w:w)/C:w=(ND(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 FD={width:0,height:0,x:0,y:0},ID={...FD,pointerX:0,pointerY:0,aspectRatio:1};function LD(e){return[[0,0],[e.measured.width,e.measured.height]]}function RD(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 zD({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=xx(e),o={controlDirection:kD(`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={...FD},h={...ID};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:kD(e)};let g,_=null,v=[],y,b,x,S=!1,C=Ix().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}=eE(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,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId),b=y&&g.extent===`parent`?LD(y):void 0),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=RD(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=eE(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:C,height:w}=m,T={},E=g.origin??s,{width:D,height:O,x:k,y:A}=PD(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,E,b,x),j=D!==C,M=O!==w,N=k!==u&&j,P=A!==f&&M;if(!N&&!P&&!j&&!M)return;if((N||P||E[0]===1||E[1]===1)&&(T.x=N?k:m.x,T.y=P?A:m.y,m.x=T.x,m.y=T.y,v.length>0)){let e=k-u,t=A-f;for(let n of v)n.position={x:n.position.x-e+E[0]*(D-C),y:n.position.y-t+E[1]*(O-w)},l.push(n)}if((j||M)&&(T.width=j&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?D:m.width,T.height=M&&(!o.resizeDirection||o.resizeDirection===`vertical`)?O:m.height,m.width=T.width,m.height=T.height),y&&g.expandParent){let e=E[0]*(T.width??0);T.x&&T.x<e&&(m.x=e,h.x-=T.x-e);let t=E[1]*(T.height??0);T.y&&T.y<t&&(m.y=t,h.y-=T.y-t)}let ee=OD({width:m.width,prevWidth:C,height:m.height,prevHeight:w,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),F={...m,direction:ee};p?.(e,F)!==!1&&(S=!0,d?.(e,F),r(T,l))}).on(`end`,e=>{S&&=(f?.(e,{...m}),i?.({...m}),!1)});a.call(C)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var BD=o((e=>{var t=p();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 d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),VD=o(((e,t)=>{t.exports=BD()})),HD=o((e=>{var t=p(),n=VD();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}})),UD=l(o(((e,t)=>{t.exports=HD()}))(),1),WD=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},GD=e=>e?WD(e):WD,{useDebugValue:KD}=w.default,{useSyncExternalStoreWithSelector:qD}=UD.default,JD=e=>e;function YD(e,t=JD,n){let r=qD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return KD(r),r}var XD=(e,t)=>{let n=GD(e),r=(e,r=t)=>YD(n,e,r);return Object.assign(r,n),r},ZD=(e,t)=>e?XD(e,t):XD;function QD(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 $D=(0,w.createContext)(null),eO=$D.Provider,tO=eT.error001();function nO(e,t){let n=(0,w.useContext)($D);if(n===null)throw Error(tO);return YD(n,e,t)}function rO(){let e=(0,w.useContext)($D);if(e===null)throw Error(tO);return(0,w.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var iO={display:`none`},aO={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},oO=`react-flow__node-desc`,sO=`react-flow__edge-desc`,cO=`react-flow__aria-live`,lO=e=>e.ariaLiveMessage,uO=e=>e.ariaLabelConfig;function dO({rfId:e}){let t=nO(lO);return(0,U.jsx)(`div`,{id:`${cO}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:aO,children:t})}function fO({rfId:e,disableKeyboardA11y:t}){let n=nO(uO);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{id:`${oO}-${e}`,style:iO,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,U.jsx)(`div`,{id:`${sO}-${e}`,style:iO,children:n[`edge.a11yDescription.default`]}),!t&&(0,U.jsx)(dO,{rfId:e})]})}var pO=(0,w.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>(0,U.jsx)(`div`,{className:gy([`react-flow__panel`,n,...`${e}`.split(`-`)]),style:r,ref:a,...i,children:t}));pO.displayName=`Panel`;function mO({proOptions:e,position:t=`bottom-right`}){return e?.hideAttribution?null:(0,U.jsx)(pO,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev`,children:(0,U.jsx)(`a`,{href:`https://reactflow.dev`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var hO=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}},gO=e=>e.id;function _O(e,t){return QD(e.selectedNodes.map(gO),t.selectedNodes.map(gO))&&QD(e.selectedEdges.map(gO),t.selectedEdges.map(gO))}function vO({onSelectionChange:e}){let t=rO(),{selectedNodes:n,selectedEdges:r}=nO(hO,_O);return(0,w.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var yO=e=>!!e.onSelectionChangeHandlers;function bO({onSelectionChange:e}){let t=nO(yO);return e||t?(0,U.jsx)(vO,{onSelectionChange:e}):null}var xO=typeof window<`u`?w.useLayoutEffect:w.useEffect,SO=[0,0],CO={x:0,y:0,zoom:1},wO=[...`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`],TO=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}),EO={translateExtent:tT,nodeOrigin:SO,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function DO(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:c}=nO(TO,QD),l=rO();xO(()=>(c(e.defaultNodes,e.defaultEdges),()=>{u.current=EO,s()}),[]);let u=(0,w.useRef)(EO);return xO(()=>{for(let s of wO){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:$T(c)}):s===`fitView`?l.setState({fitViewQueued:c}):s===`fitViewOptions`?l.setState({fitViewOptions:c}):l.setState({[s]:c}))}u.current=e},wO.map(t=>e[t])),null}function OO(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function kO(e){let[t,n]=(0,w.useState)(e===`system`?null:e);return(0,w.useEffect)(()=>{if(e!==`system`){n(e);return}let t=OO(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?OO()?.matches?`dark`:`light`:t}var AO=typeof document<`u`?document:null;function jO(e=null,t={target:AO,actInsideInputWithModifier:!0}){let[n,r]=(0,w.useState)(!1),i=(0,w.useRef)(!1),a=(0,w.useRef)(new Set([])),[o,s]=(0,w.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(`+`,`
78
- `).replace(`
79
-
80
- `,`
81
- +`).split(`
82
- `));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,w.useEffect)(()=>{let n=t?.target??AO,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)&&iE(e))return!1;let n=NO(e.code,s);if(a.current.add(e[n]),MO(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=NO(e.code,s);MO(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 MO(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function NO(e,t){return t.includes(e)?`code`:`key`}var PO=()=>{let e=rO();return(0,w.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!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),Promise.resolve(!0)):Promise.resolve(!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=GT(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!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 BT(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=VT(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function FO(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)IO(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 IO(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);break}}function LO(e,t){return FO(e,t)}function RO(e,t){return FO(e,t)}function zO(e,t){return{id:e,type:`select`,selected:t}}function BO(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(zO(a.id,e)))}return r}function VO({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 HO(e){return{id:e.id,type:`remove`}}var UO=e=>pT(e),WO=e=>fT(e);function GO(e){return(0,w.forwardRef)(e)}function KO(e){let[t,n]=(0,w.useState)(BigInt(0)),[r]=(0,w.useState)(()=>qO(()=>n(e=>e+BigInt(1))));return xO(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function qO(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var JO=(0,w.createContext)(null);function YO({children:e}){let t=rO(),n=KO((0,w.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=VO({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=KO((0,w.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(VO({items:s,lookup:o}))},[])),i=(0,w.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,U.jsx)(JO.Provider,{value:i,children:e})}function XO(){let e=(0,w.useContext)(JO);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var ZO=e=>!!e.panZoom;function QO(){let e=PO(),t=rO(),n=XO(),r=nO(ZO),i=(0,w.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=UO(e)?e:n.get(e.id),a=i.parentId?XT(i.position,i.measured,i.parentId,n,r):i.position;return MT({...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&&UO(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&&WO(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 CT({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(HO);o?.(f),c(e)}if(m){let e=d.map(HO);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=IT(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=MT(s?r:a),l=FT(c,o);return n&&l>0||l>=c.width*c.height||l>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=IT(e)?e:a(e);if(!r)return!1;let i=FT(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 gT(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??QT();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,w.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var $O=e=>e.selected,ek=typeof window<`u`?window:void 0;function tk({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=rO(),{deleteElements:r}=QO(),i=jO(e,{actInsideInputWithModifier:!1}),a=jO(t,{target:ek});(0,w.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter($O),edges:e.filter($O)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,w.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function nk(e){let t=rO();(0,w.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=tE(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,eT.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 rk={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},ik=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function ak({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=aT.Free,zoomOnDoubleClick:o=!0,panOnDrag:s=!0,defaultViewport:c,translateExtent:l,minZoom:u,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:p=!0,children:m,noWheelClassName:h,noPanClassName:g,onViewportChange:_,isControlledViewport:v,paneClickDistance:y,selectionOnDrag:b}){let x=rO(),S=(0,w.useRef)(null),{userSelectionActive:C,lib:T,connectionInProgress:E}=nO(ik,QD),D=jO(f),O=(0,w.useRef)();nk(S);let k=(0,w.useCallback)(e=>{_?.({x:e[0],y:e[1],zoom:e[2]}),v||x.setState({transform:e})},[_,v]);return(0,w.useEffect)(()=>{if(S.current){O.current=ED({domNode:S.current,minZoom:u,maxZoom:d,translateExtent:l,viewport:c,onDraggingChange:e=>x.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=x.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=x.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=x.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=O.current.getViewport();return x.setState({panZoom:O.current,transform:[e,t,n],domNode:S.current.closest(`.react-flow`)}),()=>{O.current?.destroy()}}},[]),(0,w.useEffect)(()=>{O.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:s,zoomActivationKeyPressed:D,preventScrolling:p,noPanClassName:g,userSelectionActive:C,noWheelClassName:h,lib:T,onTransformChange:k,connectionInProgress:E,selectionOnDrag:b,paneClickDistance:y})},[e,t,n,r,i,a,o,s,D,p,g,C,h,T,k,E,b,y]),(0,U.jsx)(`div`,{className:`react-flow__renderer`,ref:S,style:rk,children:m})}var ok=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function sk(){let{userSelectionActive:e,userSelectionRect:t}=nO(ok,QD);return e&&t?(0,U.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 ck=(e,t)=>n=>{n.target===t.current&&e?.(n)},lk=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function uk({isSelecting:e,selectionKeyPressed:t,selectionMode:n=oT.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:s,onPaneClick:c,onPaneContextMenu:l,onPaneScroll:u,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:p,children:m}){let h=rO(),{userSelectionActive:g,elementsSelectable:_,dragging:v,connectionInProgress:y}=nO(lk,QD),b=_&&(e||g),x=(0,w.useRef)(null),S=(0,w.useRef)(),C=(0,w.useRef)(new Set),T=(0,w.useRef)(new Set),E=(0,w.useRef)(!1),D=e=>{if(E.current||y){E.current=!1;return}c?.(e),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},O=e=>{if(Array.isArray(r)&&r?.includes(2)){e.preventDefault();return}l?.(e)},k=u?e=>u(e):void 0;return(0,U.jsxs)(`div`,{className:gy([`react-flow__pane`,{draggable:r===!0||Array.isArray(r)&&r.includes(0),dragging:v,selection:e}]),onClick:b?void 0:ck(D,x),onContextMenu:ck(O,x),onWheel:ck(k,x),onPointerEnter:b?void 0:d,onPointerMove:b?e=>{let{userSelectionRect:r,transform:a,nodeLookup:s,edgeLookup:c,connectionLookup:l,triggerNodeChanges:u,triggerEdgeChanges:d,defaultEdgeOptions:f,resetSelectedElements:p}=h.getState();if(!S.current||!r)return;let{x:m,y:g}=oE(e.nativeEvent,S.current),{startX:_,startY:v}=r;if(!E.current){let n=t?0:i;if(Math.hypot(m-_,g-v)<=n)return;p(),o?.(e)}E.current=!0;let y={startX:_,startY:v,x:m<_?m:_,y:g<v?g:v,width:Math.abs(m-_),height:Math.abs(g-v)},b=C.current,x=T.current;C.current=new Set(vT(s,y,a,n===oT.Partial,!0).map(e=>e.id)),T.current=new Set;let w=f?.selectable??!0;for(let e of C.current){let t=l.get(e);if(t)for(let{edgeId:e}of t.values()){let t=c.get(e);t&&(t.selectable??w)&&T.current.add(e)}}ZT(b,C.current)||u(BO(s,C.current,!0)),ZT(x,T.current)||d(BO(c,T.current)),h.setState({userSelectionRect:y,userSelectionActive:!0,nodesSelectionActive:!1})}:f,onPointerUp:b?e=>{e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!g&&e.target===x.current&&h.getState().userSelectionRect&&D?.(e),h.setState({userSelectionActive:!1,userSelectionRect:null}),E.current&&(s?.(e),h.setState({nodesSelectionActive:C.current.size>0})))}:void 0,onPointerDownCapture:b?n=>{let{domNode:r}=h.getState();if(S.current=r?.getBoundingClientRect(),!S.current)return;let i=n.target===x.current;if(!i&&n.target.closest(`.nokey`)||!e||!(a&&i||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),E.current=!1;let{x:o,y:s}=oE(n.nativeEvent,S.current);h.setState({userSelectionRect:{width:0,height:0,startX:o,startY:s,x:o,y:s}}),i||(n.stopPropagation(),n.preventDefault())}:void 0,onClickCapture:b?e=>{E.current&&=(e.stopPropagation(),!1)}:void 0,onPointerLeave:p,ref:x,style:rk,children:[m,(0,U.jsx)(sk,{})]})}function dk({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);if(!l){c?.(`012`,eT.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function fk({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=rO(),[c,l]=(0,w.useState)(!1),u=(0,w.useRef)();return(0,w.useEffect)(()=>{u.current=tD({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{dk({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}})},[]),(0,w.useEffect)(()=>{if(!(t||!e.current||!u.current))return u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{u.current?.destroy()}},[n,r,t,a,e,i,o]),c}var pk=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function mk(){let e=rO();return(0,w.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=pk(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=zT(t,i));let{position:a,positionAbsolute:s}=ST({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 hk=(0,w.createContext)(null),gk=hk.Provider;hk.Consumer;var _k=()=>(0,w.useContext)(hk),vk=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),yk=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o,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===iT.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function bk({type:e=`source`,position:t=$.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=rO(),_=_k(),{connectOnClick:v,noPanClassName:y,rfId:b}=nO(vk,QD),{connectingFrom:x,connectingTo:S,clickConnecting:C,isPossibleEndHandle:w,connectionInProcess:T,clickConnectionInProcess:E,valid:D}=nO(yk(_,m,e),QD);_||g.getState().onError?.(`010`,eT.error010());let O=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t}=g.getState();t(_E(i,e))}n?.(i),s?.(i)},k=e=>{if(!_)return;let t=aE(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();dD.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,U.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${b}-${_}-${m}-${e}`,className:gy([`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=nE(t.target),h=n||c,{connection:v,isValid:y}=dD.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 xk=(0,w.memo)(GO(bk));function Sk({data:e,isConnectable:t,sourcePosition:n=$.Bottom}){return(0,U.jsxs)(U.Fragment,{children:[e?.label,(0,U.jsx)(xk,{type:`source`,position:n,isConnectable:t})]})}function Ck({data:e,isConnectable:t,targetPosition:n=$.Top,sourcePosition:r=$.Bottom}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(xk,{type:`target`,position:n,isConnectable:t}),e?.label,(0,U.jsx)(xk,{type:`source`,position:r,isConnectable:t})]})}function wk(){return null}function Tk({data:e,isConnectable:t,targetPosition:n=$.Top}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(xk,{type:`target`,position:n,isConnectable:t}),e?.label]})}var Ek={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Dk={input:Sk,default:Ck,output:Tk,group:wk};function Ok(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 kk=e=>{let{width:t,height:n,x:r,y:i}=_T(e.nodeLookup,{filter:e=>!!e.selected});return{width:LT(t)?t:null,height:LT(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 Ak({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=rO(),{width:i,height:a,transformString:o,userSelectionActive:s}=nO(kk,QD),c=mk(),l=(0,w.useRef)(null);(0,w.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if(fk({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,U.jsx)(`div`,{className:gy([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,U.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(Ek,e.key)&&(e.preventDefault(),c({direction:Ek[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var jk=typeof window<`u`?window:void 0,Mk=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Nk({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,defaultViewport:T,translateExtent:E,minZoom:D,maxZoom:O,preventScrolling:k,onSelectionContextMenu:A,noWheelClassName:j,noPanClassName:M,disableKeyboardA11y:N,onViewportChange:P,isControlledViewport:ee}){let{nodesSelectionActive:F,userSelectionActive:I}=nO(Mk,QD),L=jO(l,{target:jk}),te=jO(h,{target:jk}),ne=te||w,R=te||b,z=u&&ne!==!0,B=L||I||z;return tk({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,U.jsx)(ak,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:R,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:!L&&ne,defaultViewport:T,translateExtent:E,minZoom:D,maxZoom:O,zoomActivationKeyCode:g,preventScrolling:k,noWheelClassName:j,noPanClassName:M,onViewportChange:P,isControlledViewport:ee,paneClickDistance:s,selectionOnDrag:z,children:(0,U.jsxs)(uk,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:ne,isSelecting:!!B,selectionMode:d,selectionKeyPressed:L,paneClickDistance:s,selectionOnDrag:z,children:[e,F&&(0,U.jsx)(Ak,{onSelectionContextMenu:A,noPanClassName:M,disableKeyboardA11y:N})]})})}Nk.displayName=`FlowRenderer`;var Pk=(0,w.memo)(Nk),Fk=e=>t=>e?vT(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 Ik(e){return nO((0,w.useCallback)(Fk(e),[e]),QD)}var Lk=e=>e.updateNodeInternals;function Rk(){let e=nO(Lk),[t]=(0,w.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,w.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function zk({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=rO(),a=(0,w.useRef)(null),o=(0,w.useRef)(null),s=(0,w.useRef)(e.sourcePosition),c=(0,w.useRef)(e.targetPosition),l=(0,w.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,w.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,w.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,w.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 Bk({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}=nO(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},QD),S=y.type||`default`,C=g?.[S]||Dk[S];C===void 0&&(v?.(`003`,eT.error003(S)),S=`default`,C=g?.default||Dk.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=rO(),k=YT(y),A=zk({node:y,nodeType:S,hasDimensions:k,resizeObserver:d}),j=fk({nodeRef:A,disabled:y.hidden||!w,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:_}),M=mk();if(y.hidden)return null;let N=JT(y),P=Ok(y),ee=T||w||t||n||r||i,F=n?e=>n(e,{...b.userNode}):void 0,I=r?e=>r(e,{...b.userNode}):void 0,L=i?e=>i(e,{...b.userNode}):void 0,te=a?e=>a(e,{...b.userNode}):void 0,ne=o?e=>o(e,{...b.userNode}):void 0,R=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=O.getState();T&&(!r||!w||i>0)&&dk({id:e,store:O,nodeRef:A}),t&&t(n,{...b.userNode})},z=t=>{if(!(iE(t.nativeEvent)||m)){if(nT.includes(t.key)&&T)dk({id:e,store:O,unselect:t.key===`Escape`,nodeRef:A});else if(w&&y.selected&&Object.prototype.hasOwnProperty.call(Ek,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:Ek[t.key],factor:t.shiftKey?4:1})}}},B=()=>{if(m||!A.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=O.getState();i&&(vT(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,U.jsx)(`div`,{className:gy([`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:ee?`all`:`none`,visibility:k?`visible`:`hidden`,...y.style,...P},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:F,onMouseMove:I,onMouseLeave:L,onContextMenu:te,onClick:R,onDoubleClick:ne,onKeyDown:D?z:void 0,tabIndex:D?0:void 0,onFocus:D?B:void 0,role:y.ariaRole??(D?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${oO}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,U.jsx)(gk,{value:e,children:(0,U.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 Vk=(0,w.memo)(Bk),Hk=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Uk(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=nO(Hk,QD),o=Ik(e.onlyRenderVisibleElements),s=Rk();return(0,U.jsx)(`div`,{className:`react-flow__nodes`,style:rk,children:o.map(o=>(0,U.jsx)(Vk,{id:o,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:s,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},o))})}Uk.displayName=`NodeRenderer`;var Wk=(0,w.memo)(Uk);function Gk(e){return nO((0,w.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&&mE({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),QD)}var Kk=({color:e=`none`,strokeWidth:t=1})=>(0,U.jsx)(`polyline`,{className:`arrow`,style:{strokeWidth:t,...e&&{stroke:e}},strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`}),qk=({color:e=`none`,strokeWidth:t=1})=>(0,U.jsx)(`polyline`,{className:`arrowclosed`,style:{strokeWidth:t,...e&&{stroke:e,fill:e}},strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`}),Jk={[lT.Arrow]:Kk,[lT.ArrowClosed]:qk};function Yk(e){let t=rO();return(0,w.useMemo)(()=>Object.prototype.hasOwnProperty.call(Jk,e)?Jk[e]:(t.getState().onError?.(`009`,eT.error009(e)),null),[e])}var Xk=({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=Yk(t);return c?(0,U.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,U.jsx)(c,{color:n,strokeWidth:o})}):null},Zk=({defaultColor:e,rfId:t})=>{let n=nO(e=>e.edges),r=nO(e=>e.defaultEdgeOptions),i=(0,w.useMemo)(()=>jE(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,U.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,U.jsx)(`defs`,{children:i.map(e=>(0,U.jsx)(Xk,{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};Zk.displayName=`MarkerDefinitions`;var Qk=(0,w.memo)(Zk);function $k({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,w.useState)({x:1,y:0,width:0,height:0}),p=gy([`react-flow__edge-textwrapper`,l]),m=(0,w.useRef)(null);return(0,w.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,U.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,U.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,U.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}$k.displayName=`EdgeText`;var eA=(0,w.memo)($k);function tA({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`path`,{...u,d:e,fill:`none`,className:gy([`react-flow__edge-path`,u.className])}),l?(0,U.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&LT(t)&&LT(n)?(0,U.jsx)(eA,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function nA({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===$.Left||e===$.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function rA({sourceX:e,sourceY:t,sourcePosition:n=$.Bottom,targetX:r,targetY:i,targetPosition:a=$.Top}){let[o,s]=nA({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=nA({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=cE({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 iA(e){return(0,w.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]=rA({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s});return(0,U.jsx)(tA,{id:e.isInternal?void 0:t,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 aA=iA({isInternal:!1}),oA=iA({isInternal:!0});aA.displayName=`SimpleBezierEdge`,oA.displayName=`SimpleBezierEdgeInternal`;function sA(e){return(0,w.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=$.Bottom,targetPosition:m=$.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=wE({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition});return(0,U.jsx)(tA,{id:e.isInternal?void 0:t,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 cA=sA({isInternal:!1}),lA=sA({isInternal:!0});cA.displayName=`SmoothStepEdge`,lA.displayName=`SmoothStepEdgeInternal`;function uA(e){return(0,w.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,U.jsx)(cA,{...n,id:r,pathOptions:(0,w.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var dA=uA({isInternal:!1}),fA=uA({isInternal:!0});dA.displayName=`StepEdge`,fA.displayName=`StepEdgeInternal`;function pA(e){return(0,w.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]=vE({sourceX:n,sourceY:r,targetX:i,targetY:a});return(0,U.jsx)(tA,{id:e.isInternal?void 0:t,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 mA=pA({isInternal:!1}),hA=pA({isInternal:!0});mA.displayName=`StraightEdge`,hA.displayName=`StraightEdgeInternal`;function gA(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=$.Bottom,targetPosition:s=$.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]=dE({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature});return(0,U.jsx)(tA,{id:e.isInternal?void 0:t,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 _A=gA({isInternal:!1}),vA=gA({isInternal:!0});_A.displayName=`BezierEdge`,vA.displayName=`BezierEdgeInternal`;var yA={default:vA,straight:hA,step:fA,smoothstep:lA,simplebezier:oA},bA={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},xA=(e,t,n)=>n===$.Left?e-t:n===$.Right?e+t:e,SA=(e,t,n)=>n===$.Top?e-t:n===$.Bottom?e+t:e,CA=`react-flow__edgeupdater`;function wA({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,U.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:gy([CA,`${CA}-${s}`]),cx:xA(t,r,e),cy:SA(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function TA({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=rO(),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`;dD.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,U.jsxs)(U.Fragment,{children:[(e===!0||e===`source`)&&(0,U.jsx)(wA,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,U.jsx)(wA,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function EA({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:v}){let y=nO(t=>t.edgeLookup.get(e)),b=nO(e=>e.defaultEdgeOptions);y=b?{...b,...y}:y;let x=y.type||`default`,S=h?.[x]||yA[x];S===void 0&&(_?.(`011`,eT.error011(x)),x=`default`,S=h?.default||yA.default);let C=!!(y.focusable||t&&y.focusable===void 0),T=d!==void 0&&(y.reconnectable||n&&y.reconnectable===void 0),E=!!(y.selectable||r&&y.selectable===void 0),D=(0,w.useRef)(null),[O,k]=(0,w.useState)(!1),[A,j]=(0,w.useState)(!1),M=rO(),{zIndex:N,sourceX:P,sourceY:ee,targetX:F,targetY:I,sourcePosition:L,targetPosition:te}=nO((0,w.useCallback)(t=>{let n=t.nodeLookup.get(y.source),r=t.nodeLookup.get(y.target);if(!n||!r)return{zIndex:y.zIndex,...bA};let i=EE({id:e,sourceNode:n,targetNode:r,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:t.connectionMode,onError:_});return{zIndex:pE({selected:y.selected,zIndex:y.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode}),...i||bA}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),QD),ne=(0,w.useMemo)(()=>y.markerStart?`url('#${AE(y.markerStart,m)}')`:void 0,[y.markerStart,m]),R=(0,w.useMemo)(()=>y.markerEnd?`url('#${AE(y.markerEnd,m)}')`:void 0,[y.markerEnd,m]);if(y.hidden||P===null||ee===null||F===null||I===null)return null;let z=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=M.getState();E&&(M.setState({nodesSelectionActive:!1}),y.selected&&a?(r({nodes:[],edges:[y]}),D.current?.blur()):n([e])),i&&i(t,y)},B=a?e=>{a(e,{...y})}:void 0,re=o?e=>{o(e,{...y})}:void 0,V=s?e=>{s(e,{...y})}:void 0,ie=c?e=>{c(e,{...y})}:void 0,ae=l?e=>{l(e,{...y})}:void 0;return(0,U.jsx)(`svg`,{style:{zIndex:N},children:(0,U.jsxs)(`g`,{className:gy([`react-flow__edge`,`react-flow__edge-${x}`,y.className,g,{selected:y.selected,animated:y.animated,inactive:!E&&!i,updating:O,selectable:E}]),onClick:z,onDoubleClick:B,onContextMenu:re,onMouseEnter:V,onMouseMove:ie,onMouseLeave:ae,onKeyDown:C?t=>{if(!v&&nT.includes(t.key)&&E){let{unselectNodesAndEdges:n,addSelectedEdges:r}=M.getState();t.key===`Escape`?(D.current?.blur(),n({edges:[y]})):r([e])}}:void 0,tabIndex:C?0:void 0,role:y.ariaRole??(C?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":C?`${sO}-${m}`:void 0,ref:D,...y.domAttributes,children:[!A&&(0,U.jsx)(S,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:E,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:P,sourceY:ee,targetX:F,targetY:I,sourcePosition:L,targetPosition:te,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:ne,markerEnd:R,pathOptions:`pathOptions`in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),T&&(0,U.jsx)(TA,{edge:y,isReconnectable:T,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:P,sourceY:ee,targetX:F,targetY:I,sourcePosition:L,targetPosition:te,setUpdateHover:k,setReconnecting:j})]})})}var DA=(0,w.memo)(EA),OA=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function kA({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}=nO(OA,QD),b=Gk(t);return(0,U.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,U.jsx)(Qk,{defaultColor:e,rfId:n}),b.map(e=>(0,U.jsx)(DA,{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))]})}kA.displayName=`EdgeRenderer`;var AA=(0,w.memo)(kA),jA=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function MA({children:e}){return(0,U.jsx)(`div`,{className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:nO(jA)},children:e})}function NA(e){let t=QO(),n=(0,w.useRef)(!1);(0,w.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var PA=e=>e.panZoom?.syncViewport;function FA(e){let t=nO(PA),n=rO();return(0,w.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function IA(e){return e.connection.inProgress?{...e.connection,to:BT(e.connection.to,e.transform)}:{...e.connection}}function LA(e){return e?t=>e(IA(t)):IA}function RA(e){return nO(LA(e),QD)}var zA=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function BA({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=nO(zA,QD);return a&&i&&c?(0,U.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,U.jsx)(`g`,{className:gy([`react-flow__connection`,dT(s)]),children:(0,U.jsx)(VA,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var VA=({style:e,type:t=cT.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}=RA();if(!i)return;if(n)return(0,U.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:dT(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 cT.Bezier:[m]=dE(h);break;case cT.SimpleBezier:[m]=rA(h);break;case cT.Step:[m]=wE({...h,borderRadius:0});break;case cT.SmoothStep:[m]=wE(h);break;default:[m]=vE(h)}return(0,U.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};VA.displayName=`ConnectionLine`;var HA={};function UA(e=HA){(0,w.useRef)(e),rO(),(0,w.useEffect)(()=>{},[e])}function WA(){rO(),(0,w.useRef)(!1),(0,w.useEffect)(()=>{},[])}function GA({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:ee,panOnScrollSpeed:F,panOnScrollMode:I,zoomOnDoubleClick:L,panOnDrag:te,onPaneClick:ne,onPaneMouseEnter:R,onPaneMouseMove:z,onPaneMouseLeave:B,onPaneScroll:re,onPaneContextMenu:V,paneClickDistance:ie,nodeClickDistance:ae,onEdgeContextMenu:oe,onEdgeMouseEnter:H,onEdgeMouseMove:se,onEdgeMouseLeave:ce,reconnectRadius:le,onReconnect:ue,onReconnectStart:de,onReconnectEnd:fe,noDragClassName:pe,noWheelClassName:me,noPanClassName:he,disableKeyboardA11y:ge,nodeExtent:_e,rfId:ve,viewport:ye,onViewportChange:be}){return UA(e),UA(t),WA(),NA(n),FA(ye),(0,U.jsx)(Pk,{onPaneClick:ne,onPaneMouseEnter:R,onPaneMouseMove:z,onPaneMouseLeave:B,onPaneContextMenu:V,onPaneScroll:re,paneClickDistance:ie,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:L,panOnScroll:ee,panOnScrollSpeed:F,panOnScrollMode:I,panOnDrag:te,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,onSelectionContextMenu:d,preventScrolling:j,noDragClassName:pe,noWheelClassName:me,noPanClassName:he,disableKeyboardA11y:ge,onViewportChange:be,isControlledViewport:!!ye,children:(0,U.jsxs)(MA,{children:[(0,U.jsx)(AA,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:ue,onReconnectStart:de,onReconnectEnd:fe,onlyRenderVisibleElements:T,onEdgeContextMenu:oe,onEdgeMouseEnter:H,onEdgeMouseMove:se,onEdgeMouseLeave:ce,reconnectRadius:le,defaultMarkerColor:M,noPanClassName:he,disableKeyboardA11y:ge,rfId:ve}),(0,U.jsx)(BA,{style:h,type:m,component:g,containerStyle:_}),(0,U.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,U.jsx)(Wk,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:ae,onlyRenderVisibleElements:T,noPanClassName:he,noDragClassName:pe,disableKeyboardA11y:ge,nodeExtent:_e,rfId:ve}),(0,U.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}GA.displayName=`GraphView`;var KA=(0,w.memo)(GA),qA=({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??tT;YE(h,g,_);let{nodesInitialized:x}=BE(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=GT(_T(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:tT,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:iT.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:{...sT},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:RT,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:rT,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},JA=({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})=>ZD((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 xT({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...qA({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,elevateNodesOnSelect:i,fitViewQueued:a,zIndexMode:o,nodesSelectionActive:s}=m(),{nodesInitialized:c,hasSelectedNodes:l}=BE(e,t,n,{nodeOrigin:r,nodeExtent:d,elevateNodesOnSelect:i,checkEquality:!0,zIndexMode:o}),u=s&&l;a&&c?(h(),p({nodes:e,nodesInitialized:c,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:u})):p({nodes:e,nodesInitialized:c,nodesSelectionActive:u})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();YE(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}=KE(e,n,r,i,a,o,l);d&&(LE(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=OE(e,o.fromHandle,$.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=GE(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(LO(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(RO(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();if(t){i(e.map(e=>zO(e,!0)));return}i(BO(r,new Set([...e]),!0)),a(BO(n))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){a(e.map(e=>zO(e,!0)));return}a(BO(n,new Set([...e]))),i(BO(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(zO(e.id,!1))}let u=[];for(let e of c)e.selected&&u.push(zO(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,zO(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,zO(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]||(BE(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 qE({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 Promise.resolve(!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}),Promise.resolve(!0)},cancelConnection:()=>{p({connection:{...sT}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...qA()})}},Object.is);function YA({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,w.useState)(()=>JA({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,U.jsx)(eO,{value:m,children:(0,U.jsx)(YO,{children:p})})}function XA({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,w.useContext)($D)?(0,U.jsx)(U.Fragment,{children:e}):(0,U.jsx)(YA,{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 ZA={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function QA({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:v,onNodeMouseMove:y,onNodeMouseLeave:b,onNodeContextMenu:x,onNodeDoubleClick:S,onNodeDragStart:C,onNodeDrag:T,onNodeDragStop:E,onNodesDelete:D,onEdgesDelete:O,onDelete:k,onSelectionChange:A,onSelectionDragStart:j,onSelectionDrag:M,onSelectionDragStop:N,onSelectionContextMenu:P,onSelectionStart:ee,onSelectionEnd:F,onBeforeDelete:I,connectionMode:L,connectionLineType:te=cT.Bezier,connectionLineStyle:ne,connectionLineComponent:R,connectionLineContainerStyle:z,deleteKeyCode:B=`Backspace`,selectionKeyCode:re=`Shift`,selectionOnDrag:V=!1,selectionMode:ie=oT.Full,panActivationKeyCode:ae=`Space`,multiSelectionKeyCode:oe=KT()?`Meta`:`Control`,zoomActivationKeyCode:H=KT()?`Meta`:`Control`,snapToGrid:se,snapGrid:ce,onlyRenderVisibleElements:le=!1,selectNodesOnDrag:ue,nodesDraggable:de,autoPanOnNodeFocus:fe,nodesConnectable:pe,nodesFocusable:me,nodeOrigin:he=SO,edgesFocusable:ge,edgesReconnectable:_e,elementsSelectable:ve=!0,defaultViewport:ye=CO,minZoom:be=.5,maxZoom:xe=2,translateExtent:Se=tT,preventScrolling:Ce=!0,nodeExtent:we,defaultMarkerColor:Te=`#b1b1b7`,zoomOnScroll:Ee=!0,zoomOnPinch:De=!0,panOnScroll:Oe=!1,panOnScrollSpeed:ke=.5,panOnScrollMode:Ae=aT.Free,zoomOnDoubleClick:je=!0,panOnDrag:Me=!0,onPaneClick:Ne,onPaneMouseEnter:Pe,onPaneMouseMove:Fe,onPaneMouseLeave:Ie,onPaneScroll:Le,onPaneContextMenu:Re,paneClickDistance:ze=1,nodeClickDistance:Be=0,children:Ve,onReconnect:He,onReconnectStart:Ue,onReconnectEnd:We,onEdgeContextMenu:Ge,onEdgeDoubleClick:Ke,onEdgeMouseEnter:qe,onEdgeMouseMove:Je,onEdgeMouseLeave:Ye,reconnectRadius:Xe=10,onNodesChange:Ze,onEdgesChange:Qe,noDragClassName:$e=`nodrag`,noWheelClassName:et=`nowheel`,noPanClassName:tt=`nopan`,fitView:nt,fitViewOptions:rt,connectOnClick:it,attributionPosition:at,proOptions:ot,defaultEdgeOptions:st,elevateNodesOnSelect:ct=!0,elevateEdgesOnSelect:lt=!1,disableKeyboardA11y:ut=!1,autoPanOnConnect:dt,autoPanOnNodeDrag:ft,autoPanSpeed:pt,connectionRadius:mt,isValidConnection:ht,onError:W,style:gt,id:_t,nodeDragThreshold:vt,connectionDragThreshold:yt,viewport:bt,onViewportChange:xt,width:St,height:Ct,colorMode:wt=`light`,debug:Tt,onScroll:G,ariaLabelConfig:Et,zIndexMode:Dt=`basic`,...Ot},kt){let At=_t||`1`,jt=kO(wt),Mt=(0,w.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),G?.(e)},[G]);return(0,U.jsx)(`div`,{"data-testid":`rf__wrapper`,...Ot,onScroll:Mt,style:{...gt,...ZA},ref:kt,className:gy([`react-flow`,i,jt]),id:_t,role:`application`,children:(0,U.jsxs)(XA,{nodes:e,edges:t,width:St,height:Ct,fitView:nt,fitViewOptions:rt,minZoom:be,maxZoom:xe,nodeOrigin:he,nodeExtent:we,zIndexMode:Dt,children:[(0,U.jsx)(DO,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,nodesDraggable:de,autoPanOnNodeFocus:fe,nodesConnectable:pe,nodesFocusable:me,edgesFocusable:ge,edgesReconnectable:_e,elementsSelectable:ve,elevateNodesOnSelect:ct,elevateEdgesOnSelect:lt,minZoom:be,maxZoom:xe,nodeExtent:we,onNodesChange:Ze,onEdgesChange:Qe,snapToGrid:se,snapGrid:ce,connectionMode:L,translateExtent:Se,connectOnClick:it,defaultEdgeOptions:st,fitView:nt,fitViewOptions:rt,onNodesDelete:D,onEdgesDelete:O,onDelete:k,onNodeDragStart:C,onNodeDrag:T,onNodeDragStop:E,onSelectionDrag:M,onSelectionDragStart:j,onSelectionDragStop:N,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:tt,nodeOrigin:he,rfId:At,autoPanOnConnect:dt,autoPanOnNodeDrag:ft,autoPanSpeed:pt,onError:W,connectionRadius:mt,isValidConnection:ht,selectNodesOnDrag:ue,nodeDragThreshold:vt,connectionDragThreshold:yt,onBeforeDelete:I,debug:Tt,ariaLabelConfig:Et,zIndexMode:Dt}),(0,U.jsx)(KA,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:b,onNodeContextMenu:x,onNodeDoubleClick:S,nodeTypes:a,edgeTypes:o,connectionLineType:te,connectionLineStyle:ne,connectionLineComponent:R,connectionLineContainerStyle:z,selectionKeyCode:re,selectionOnDrag:V,selectionMode:ie,deleteKeyCode:B,multiSelectionKeyCode:oe,panActivationKeyCode:ae,zoomActivationKeyCode:H,onlyRenderVisibleElements:le,defaultViewport:ye,translateExtent:Se,minZoom:be,maxZoom:xe,preventScrolling:Ce,zoomOnScroll:Ee,zoomOnPinch:De,zoomOnDoubleClick:je,panOnScroll:Oe,panOnScrollSpeed:ke,panOnScrollMode:Ae,panOnDrag:Me,onPaneClick:Ne,onPaneMouseEnter:Pe,onPaneMouseMove:Fe,onPaneMouseLeave:Ie,onPaneScroll:Le,onPaneContextMenu:Re,paneClickDistance:ze,nodeClickDistance:Be,onSelectionContextMenu:P,onSelectionStart:ee,onSelectionEnd:F,onReconnect:He,onReconnectStart:Ue,onReconnectEnd:We,onEdgeContextMenu:Ge,onEdgeDoubleClick:Ke,onEdgeMouseEnter:qe,onEdgeMouseMove:Je,onEdgeMouseLeave:Ye,reconnectRadius:Xe,defaultMarkerColor:Te,noDragClassName:$e,noWheelClassName:et,noPanClassName:tt,rfId:At,disableKeyboardA11y:ut,nodeExtent:we,viewport:bt,onViewportChange:xt}),(0,U.jsx)(bO,{onSelectionChange:A}),Ve,(0,U.jsx)(mO,{proOptions:ot,position:at}),(0,U.jsx)(fO,{rfId:At,disableKeyboardA11y:ut})]})})}var $A=GO(QA);eT.error014();function ej({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,U.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:gy([`react-flow__background-pattern`,n,r])})}function tj({radius:e,className:t}){return(0,U.jsx)(`circle`,{cx:e,cy:e,r:e,className:gy([`react-flow__background-pattern`,`dots`,t])})}var nj;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(nj||={});var rj={[nj.Dots]:1,[nj.Lines]:1,[nj.Cross]:6},ij=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function aj({id:e,variant:t=nj.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,w.useRef)(null),{transform:f,patternId:p}=nO(ij,QD),m=r||rj[t],h=t===nj.Dots,g=t===nj.Cross,_=Array.isArray(n)?n:[n,n],v=[_[0]*f[2]||1,_[1]*f[2]||1],y=m*f[2],b=Array.isArray(a)?a:[a,a],x=g?[y,y]:v,S=[b[0]*f[2]||1+x[0]/2,b[1]*f[2]||1+x[1]/2],C=`${p}${e||``}`;return(0,U.jsxs)(`svg`,{className:gy([`react-flow__background`,l]),style:{...c,...rk,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,U.jsx)(`pattern`,{id:C,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${S[0]},-${S[1]})`,children:h?(0,U.jsx)(tj,{radius:y/2,className:u}):(0,U.jsx)(ej,{dimensions:x,lineWidth:i,variant:t,className:u})}),(0,U.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${C})`})]})}aj.displayName=`Background`;var oj=(0,w.memo)(aj);function sj(){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,U.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function cj(){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,U.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function lj(){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,U.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 uj(){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,U.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 dj(){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,U.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 fj({children:e,className:t,...n}){return(0,U.jsx)(`button`,{type:`button`,className:gy([`react-flow__controls-button`,t]),...n,children:e})}var pj=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function mj({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=rO(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=nO(pj,QD),{zoomIn:y,zoomOut:b,fitView:x}=QO();return(0,U.jsxs)(pO,{className:gy([`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,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(fj,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,U.jsx)(sj,{})}),(0,U.jsx)(fj,{onClick:()=>{b(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,U.jsx)(cj,{})})]}),n&&(0,U.jsx)(fj,{className:`react-flow__controls-fitview`,onClick:()=>{x(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,U.jsx)(lj,{})}),r&&(0,U.jsx)(fj,{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,U.jsx)(dj,{}):(0,U.jsx)(uj,{})}),u]})}mj.displayName=`Controls`;var hj=(0,w.memo)(mj);function gj({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,U.jsx)(`rect`,{className:gy([`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 _j=(0,w.memo)(gj),vj=e=>e.nodes.map(e=>e.id),yj=e=>e instanceof Function?e:()=>e;function bj({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=_j,onClick:o}){let s=nO(vj,QD),c=yj(t),l=yj(e),u=yj(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,U.jsx)(U.Fragment,{children:s.map(e=>(0,U.jsx)(Sj,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function xj({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}=nO(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}=JT(r);return{node:r,x:i,y:a,width:o,height:s}},QD);return!l||l.hidden||!YT(l)?null:(0,U.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 Sj=(0,w.memo)(xj),Cj=(0,w.memo)(bj),wj=200,Tj=150,Ej=e=>!e.hidden,Dj=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]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?PT(_T(e.nodeLookup,{filter:Ej}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Oj=`react-flow__minimap-desc`;function kj({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:v,zoomStep:y=1,offsetScale:b=5}){let x=rO(),S=(0,w.useRef)(null),{boundingRect:C,viewBB:T,rfId:E,panZoom:D,translateExtent:O,flowWidth:k,flowHeight:A,ariaLabelConfig:j}=nO(Dj,QD),M=e?.width??wj,N=e?.height??Tj,P=C.width/M,ee=C.height/N,F=Math.max(P,ee),I=F*M,L=F*N,te=b*F,ne=C.x-(I-C.width)/2-te,R=C.y-(L-C.height)/2-te,z=I+te*2,B=L+te*2,re=`${Oj}-${E}`,V=(0,w.useRef)(0),ie=(0,w.useRef)();V.current=F,(0,w.useEffect)(()=>{if(S.current&&D)return ie.current=fD({domNode:S.current,panZoom:D,getTransform:()=>x.getState().transform,getViewScale:()=>V.current}),()=>{ie.current?.destroy()}},[D]),(0,w.useEffect)(()=>{ie.current?.update({translateExtent:O,width:k,height:A,inversePan:v,pannable:h,zoomStep:y,zoomable:g})},[h,g,v,y,O,k,A]);let ae=p?e=>{let[t,n]=ie.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,oe=m?(0,w.useCallback)((e,t)=>{let n=x.getState().nodeLookup.get(t).internals.userNode;m(e,n)},[]):void 0,H=_??j[`minimap.ariaLabel`];return(0,U.jsx)(pO,{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*F: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:gy([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,U.jsxs)(`svg`,{width:M,height:N,viewBox:`${ne} ${R} ${z} ${B}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":re,ref:S,onClick:ae,children:[H&&(0,U.jsx)(`title`,{id:re,children:H}),(0,U.jsx)(Cj,{onClick:oe,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,U.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${ne-te},${R-te}h${z+te*2}v${B+te*2}h${-z-te*2}z
83
- M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}kj.displayName=`MiniMap`,(0,w.memo)(kj);var Aj=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,jj={[DD.Line]:`right`,[DD.Handle]:`bottom-right`};function Mj({nodeId:e,position:t,variant:n=DD.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 v=_k(),y=typeof e==`string`?e:v,b=rO(),x=(0,w.useRef)(null),S=n===DD.Handle,C=nO((0,w.useCallback)(Aj(S&&p),[S,p]),QD),T=(0,w.useRef)(null),E=t??jj[n];return(0,w.useEffect)(()=>{if(!(!x.current||!y))return T.current||=zD({domNode:x.current,nodeId:y,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=b.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}=b.getState(),o=[],s={x:e.x,y:e.y},c=r.get(y);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=GE([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...XT({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:y,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:y,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:y,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};b.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]),(0,U.jsx)(`div`,{className:gy([`react-flow__resize-control`,`nodrag`,...E.split(`-`),n,r]),ref:x,style:{...i,scale:C,...o&&{[S?`backgroundColor`:`borderColor`]:o}},children:a})}(0,w.memo)(Mj);var Nj={pipelineStage:nM},Pj=`var(--primary)`,Fj=`var(--background)`,Ij=`var(--muted-foreground)`,Lj=`var(--destructive)`,Rj=`hsl(38 96% 56%)`;function zj(e){let[t,n]=(0,w.useState)(),r=e.detail?.graph,i=r?.nodes.find(e=>e.id===t)??r?.nodes[0]??void 0,a=(0,w.useMemo)(()=>rM(e.logs,e.activeRunId),[e.logs,e.activeRunId]),o=(0,w.useMemo)(()=>r===void 0?{nodes:[],edges:[]}:iM(r,a),[r,a]);return e.enabled?(0,U.jsxs)(`section`,{className:`grid min-h-0 min-w-0 grid-cols-[minmax(0,2fr)_minmax(0,1fr)] overflow-hidden bg-background/45 max-lg:grid-cols-1`,children:[(0,U.jsxs)(`div`,{className:`relative min-h-0 min-w-0 overflow-hidden bg-card/25`,children:[e.detailLoading&&r===void 0?(0,U.jsx)(`div`,{className:`grid h-full min-h-96 place-items-center p-6`,children:(0,U.jsxs)(`div`,{className:`grid w-full max-w-lg gap-3`,children:[(0,U.jsx)(`div`,{className:`h-4 w-40 animate-pulse rounded-sm bg-muted`}),(0,U.jsx)(`div`,{className:`h-16 animate-pulse rounded-sm bg-muted/60`}),(0,U.jsx)(`div`,{className:`h-16 w-4/5 animate-pulse rounded-sm bg-muted/60`})]})}):null,!e.detailLoading&&r===void 0?(0,U.jsx)(`div`,{className:`grid h-full min-h-96 place-items-center p-8 text-center`,children:(0,U.jsxs)(`div`,{className:`max-w-sm`,children:[(0,U.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:`No pipeline selected`}),(0,U.jsx)(`p`,{className:`m-0 mt-2 text-sm leading-6 text-muted-foreground`,children:`Choose a registered pipeline to inspect its graph and runtime logs.`})]})}):null,r===void 0?null:(0,U.jsxs)($A,{nodes:o.nodes,edges:o.edges,className:`pipeline-flow`,style:{"--xy-edge-stroke":`var(--primary)`,"--xy-edge-stroke-width":`1.6`,"--xy-edge-stroke-selected":`var(--primary)`},fitView:!0,fitViewOptions:{padding:.18,maxZoom:.96},minZoom:.48,maxZoom:1.35,colorMode:`dark`,nodeTypes:Nj,proOptions:{hideAttribution:!0},defaultEdgeOptions:{type:`smoothstep`,focusable:!0},onNodeClick:(e,t)=>n(t.id),children:[(0,U.jsx)(oj,{variant:nj.Dots,gap:14,size:1.8,color:Ij,className:`opacity-35`}),(0,U.jsx)(hj,{showInteractive:!1})]})]}),(0,U.jsx)(Bj,{pipelines:e.pipelines,selectedPipelineId:e.selectedPipelineId,detail:e.detail,logs:e.logs,runs:e.runs,logsLoading:e.logsLoading,runsLoading:e.runsLoading,runState:e.runState,runInput:e.runInput,runOutput:e.runOutput,selectedNode:i,selectedNodeStatus:i?.id===void 0?void 0:a.get(i.id),onSelectPipeline:t=>{n(void 0),e.onSelectPipeline(t)},onRunInputChange:e.onRunInputChange,onRun:e.onRun})]}):(0,U.jsx)(`section`,{className:`grid min-h-0 place-items-center p-8 text-center`,children:(0,U.jsxs)(`div`,{className:`grid max-w-lg gap-3`,children:[(0,U.jsx)(`h1`,{className:`m-0 text-2xl font-semibold text-foreground`,children:`Pipelines unavailable`}),(0,U.jsx)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground`,children:`This Studio runner has no registered pipelines.`})]})})}function Bj(e){let[t,n]=(0,w.useState)(`input`),r=e.detail?.graph,i=r===void 0?void 0:{nodes:r.nodes.length,edges:r.edges.length,agents:r.nodes.filter(e=>e.kind===`agent`).length,extractors:r.nodes.filter(e=>e.kind===`extractor`).length,parallel:r.nodes.some(e=>e.kind===`parallel`)?`yes`:`no`};return(0,U.jsxs)(`aside`,{className:`grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden border-l border-border/80 bg-background/70 max-lg:border-l-0 max-lg:border-t`,children:[(0,U.jsxs)(`header`,{className:`grid gap-3 border-b border-border/80 bg-card/35 px-4 py-4`,children:[(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h1`,{className:`m-0 truncate text-base font-semibold tracking-tight text-foreground`,children:e.detail?.name??`Pipeline`}),e.detail?.description===void 0?null:(0,U.jsx)(`p`,{className:`m-0 mt-1 line-clamp-2 text-xs leading-5 text-muted-foreground`,children:e.detail.description})]}),(0,U.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] font-semibold tabular-nums text-muted-foreground`,children:e.logs.length})]}),(0,U.jsxs)(Ic,{value:e.selectedPipelineId,onValueChange:e.onSelectPipeline,children:[(0,U.jsx)(Rc,{className:`h-8 w-full rounded-sm border-border bg-background font-mono text-[11px]`,children:(0,U.jsx)(Lc,{placeholder:`Select pipeline`})}),(0,U.jsx)(zc,{children:e.pipelines.map(e=>(0,U.jsx)(Bc,{value:e.id,children:e.name??e.id},e.id))})]})]}),(0,U.jsx)(Hj,{activeTab:t,onChange:n})]}),(0,U.jsxs)(`div`,{className:[`min-h-0 min-w-0 px-5 py-5`,t===`logs`?`grid overflow-hidden`:`overflow-auto`].join(` `),children:[t===`input`?(0,U.jsx)(Wj,{runInput:e.runInput,runState:e.runState,disabled:e.detail===void 0,onRunInputChange:e.onRunInputChange,onRun:e.onRun}):null,t===`metadata`?(0,U.jsx)(Gj,{graphStats:i,selectedNode:e.selectedNode,selectedNodeStatus:e.selectedNodeStatus}):null,t===`runs`?(0,U.jsx)(Kj,{runs:e.runs,runOutput:e.runOutput,runState:e.runState,loading:e.runsLoading}):null,t===`logs`?(0,U.jsx)(Qj,{logs:e.logs,selectedPipelineId:e.selectedPipelineId,loading:e.logsLoading}):null]})]})}var Vj=[{id:`input`,label:`Input`},{id:`metadata`,label:`Metadata`},{id:`runs`,label:`Runs`},{id:`logs`,label:`Logs`}];function Hj(e){return(0,U.jsx)(`div`,{className:`grid grid-cols-4 border border-border/80 bg-background`,role:`tablist`,"aria-label":`Pipeline sidebar`,children:Vj.map(t=>(0,U.jsx)(`button`,{"aria-selected":e.activeTab===t.id,className:[`h-8 border-r border-border/80 px-2 font-mono text-[10px] font-semibold uppercase tracking-[0.1em] transition duration-200 last:border-r-0`,e.activeTab===t.id?`bg-primary text-primary-foreground`:`text-muted-foreground hover:bg-accent/60 hover:text-foreground`].join(` `),onClick:()=>e.onChange(t.id),role:`tab`,type:`button`,children:t.label},t.id))})}function Uj(e){return(0,U.jsxs)(`div`,{className:`min-w-0 border-r border-border/80 px-2.5 py-2.5 last:border-r-0`,children:[(0,U.jsx)(`div`,{className:`truncate font-mono text-[9px] font-semibold uppercase tracking-[0.12em] text-muted-foreground`,children:e.label}),(0,U.jsx)(`div`,{className:`mt-1 truncate font-mono text-base font-semibold tabular-nums text-foreground`,children:e.value})]})}function Wj(e){return(0,U.jsxs)(`section`,{className:`grid gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Pipeline input`}),(0,U.jsx)(`p`,{className:`m-0 mt-1 text-xs leading-5 text-muted-foreground`,children:`Provide JSON-compatible input for this pipeline run.`})]}),(0,U.jsxs)(Qt,{className:`h-8 shrink-0 rounded-sm px-3 text-xs font-semibold`,disabled:e.runState===`running`||e.disabled,onClick:e.onRun,children:[(0,U.jsx)(R,{className:`mr-1.5 h-3.5 w-3.5`}),e.runState===`running`?`Running`:`Run`]})]}),(0,U.jsxs)(`label`,{className:`grid gap-2`,htmlFor:`pipeline-run-input`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[9px] font-semibold uppercase tracking-[0.14em] text-muted-foreground`,children:`JSON`}),(0,U.jsx)(Vc,{id:`pipeline-run-input`,value:e.runInput,onChange:t=>e.onRunInputChange(t.target.value),className:`min-h-44 resize-y rounded-sm border-border bg-card/30 font-mono text-xs leading-5 text-foreground`,spellCheck:!1})]})]})}function Gj(e){return(0,U.jsxs)(`section`,{className:`grid gap-5`,children:[e.graphStats===void 0?null:(0,U.jsxs)(`div`,{className:`grid grid-cols-5 border-y border-border/80`,children:[(0,U.jsx)(Uj,{label:`Nodes`,value:String(e.graphStats.nodes)}),(0,U.jsx)(Uj,{label:`Edges`,value:String(e.graphStats.edges)}),(0,U.jsx)(Uj,{label:`Agents`,value:String(e.graphStats.agents)}),(0,U.jsx)(Uj,{label:`Extractors`,value:String(e.graphStats.extractors)}),(0,U.jsx)(Uj,{label:`Parallel`,value:e.graphStats.parallel})]}),(0,U.jsx)(Zj,{node:e.selectedNode,status:e.selectedNodeStatus})]})}function Kj(e){return(0,U.jsxs)(`section`,{className:`grid gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Runs`}),(0,U.jsx)(`p`,{className:`m-0 mt-1 text-xs leading-5 text-muted-foreground`,children:`Persisted pipeline executions.`})]}),(0,U.jsx)(tM,{children:e.runState})]}),e.runOutput.length>0&&e.runs.length===0?(0,U.jsx)(Jj,{title:`Latest output`,output:e.runOutput}):null,(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[e.loading&&e.runs.length===0?(0,U.jsxs)(`div`,{className:`grid gap-2 py-3`,children:[(0,U.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded-sm bg-muted`}),(0,U.jsx)(`div`,{className:`h-4 w-56 max-w-full animate-pulse rounded-sm bg-muted/60`})]}):null,!e.loading&&e.runs.length===0?(0,U.jsx)(`div`,{className:`py-3 text-sm font-medium text-muted-foreground`,children:`No saved pipeline runs yet.`}):null,e.runs.map(e=>(0,U.jsx)(qj,{run:e},e.runId))]})]})}function qj(e){let t=Yj(e.run);return(0,U.jsxs)(`article`,{className:`grid gap-3 rounded-sm border border-border/80 bg-card/25 p-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,U.jsx)(`span`,{className:`truncate font-mono text-[11px] font-semibold text-foreground`,children:e.run.runId}),(0,U.jsx)(`span`,{className:[`shrink-0 font-mono text-[10px] font-semibold uppercase tracking-[0.08em]`,Xj(e.run.status)].join(` `),children:e.run.status})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`truncate`,children:cM(e.run.startedAt)}),(0,U.jsx)(`span`,{className:`truncate text-right tabular-nums`,children:e.run.durationMs===void 0?``:`${e.run.durationMs}ms`})]}),(0,U.jsx)(Jj,{title:`Output`,output:t})]})}function Jj(e){return(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[9px] font-semibold uppercase tracking-[0.14em] text-muted-foreground`,children:e.title}),(0,U.jsxs)(`span`,{className:`font-mono text-[9px] font-medium tabular-nums text-muted-foreground`,children:[e.output.length,` bytes`]})]}),(0,U.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-sm border border-border/80 bg-background/55 p-3 font-mono text-xs leading-5 text-foreground`,children:e.output.length>0?e.output:`No output saved.`})]})}function Yj(e){return e.output===void 0?e.error===void 0?``:JSON.stringify(e.error,null,2):JSON.stringify(e.output,null,2)}function Xj(e){switch(e){case`success`:return`text-primary`;case`error`:return`text-destructive`;case`running`:return`text-muted-foreground`}}function Zj(e){if(e.node===void 0)return(0,U.jsx)(`section`,{className:`text-sm font-medium text-muted-foreground`,children:`Select a node for details.`});let t=Object.entries(e.node.metadata??{});return(0,U.jsxs)(`section`,{className:`grid content-start gap-5`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Selected node`}),(0,U.jsx)(`h2`,{className:`m-0 mt-2 text-lg font-semibold tracking-tight text-foreground`,children:e.node.label}),(0,U.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[(0,U.jsx)(tM,{children:e.node.kind}),e.status===void 0?null:(0,U.jsx)(tM,{children:e.status}),e.node.branchKey===void 0?null:(0,U.jsx)(tM,{children:e.node.branchKey})]})]}),e.node.description===void 0?null:(0,U.jsx)(`p`,{className:`m-0 border-l border-primary/45 pl-3 text-sm leading-6 text-muted-foreground`,children:e.node.description}),(0,U.jsx)(eM,{items:[[`ID`,e.node.id],[`Agent`,e.node.agentId],[`Pipeline`,e.node.pipelineId]]}),t.length>0?(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsx)(`div`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Metadata`}),(0,U.jsx)(`div`,{className:`grid gap-1`,children:t.map(([e,t])=>(0,U.jsxs)(`div`,{className:`grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs`,children:[(0,U.jsx)(`span`,{className:`truncate font-mono text-muted-foreground`,children:e}),(0,U.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:lM(t)})]},e))})]}):null]})}function Qj(e){let t=(0,w.useRef)(null),n=(0,w.useRef)(!0);(0,w.useEffect)(()=>{let e=t.current;e===null||!n.current||(e.scrollTop=e.scrollHeight)});function r(){let e=t.current;e!==null&&(n.current=e.scrollHeight-e.scrollTop-e.clientHeight<24)}return(0,U.jsxs)(`section`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Pipeline logs`}),(0,U.jsx)(`div`,{className:`mt-1 truncate font-mono text-[11px] font-medium text-muted-foreground`,children:e.selectedPipelineId.length===0?`No active pipeline`:e.selectedPipelineId})]}),(0,U.jsx)(`span`,{className:`font-mono text-[10px] font-semibold tabular-nums text-muted-foreground`,children:e.logs.length})]}),(0,U.jsxs)(`div`,{className:`min-h-0 overflow-auto border-y border-border/65 font-mono`,ref:t,onScroll:r,children:[e.selectedPipelineId.length===0?(0,U.jsx)(`div`,{className:`px-0 py-4 text-sm font-medium text-muted-foreground`,children:`No pipeline selected.`}):null,e.selectedPipelineId.length>0&&e.loading&&e.logs.length===0?(0,U.jsxs)(`div`,{className:`grid gap-2 py-4`,children:[(0,U.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded-sm bg-muted`}),(0,U.jsx)(`div`,{className:`h-4 w-64 max-w-full animate-pulse rounded-sm bg-muted/60`}),(0,U.jsx)(`div`,{className:`h-4 w-52 max-w-full animate-pulse rounded-sm bg-muted/60`})]}):null,e.selectedPipelineId.length>0&&!e.loading&&e.logs.length===0?(0,U.jsx)(`div`,{className:`py-4 text-sm font-medium text-muted-foreground`,children:`No logs yet. Run the pipeline to populate this console.`}):null,e.logs.map(e=>(0,U.jsx)($j,{log:e},e.id))]})]})}function $j(e){let t=Object.entries(e.log.metadata??{}).slice(0,4).map(([e,t])=>`${e}=${lM(t)}`).join(` `);return(0,U.jsxs)(`article`,{className:[`w-max min-w-full whitespace-nowrap border-l-2 px-3 py-1.5 text-[11px] leading-5 transition duration-200 hover:bg-accent/45`,uM(e.log.level)].join(` `),children:[(0,U.jsx)(`time`,{className:`text-muted-foreground`,children:cM(e.log.timestamp)}),(0,U.jsx)(`span`,{className:[`ml-3 font-semibold`,dM(e.log.level)].join(` `),children:e.log.level.toUpperCase().padEnd(5,` `)}),(0,U.jsxs)(`span`,{className:`ml-3 text-muted-foreground`,children:[e.log.category,`/`,e.log.event]}),(0,U.jsx)(`span`,{className:`ml-3 font-medium text-foreground`,children:e.log.message}),(0,U.jsx)(`span`,{className:`ml-3 text-muted-foreground/85`,children:t})]})}function eM(e){let t=e.items.filter(([,e])=>e!==void 0&&e.length>0);return t.length===0?null:(0,U.jsx)(`div`,{className:`grid gap-2 border-y border-border/80 py-4`,children:t.map(([e,t])=>(0,U.jsxs)(`div`,{className:`grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs`,children:[(0,U.jsx)(`span`,{className:`truncate font-mono text-muted-foreground`,children:e}),(0,U.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:t})]},e))})}function tM(e){return(0,U.jsx)(`span`,{className:`rounded-sm border border-border/70 bg-background/70 px-2 py-1 font-mono text-[10px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e.children})}function nM(e){let t=e.data.status;return(0,U.jsxs)(`article`,{className:[`group relative min-h-[74px] w-[210px] rounded-md border bg-card px-4 py-3 text-left shadow-[inset_0_1px_0_hsl(var(--foreground)/0.06)] transition duration-200`,e.selected?`border-primary`:`border-border/80`,t===`running`?`translate-y-[-1px] border-amber-400`:``,t===`completed`?`border-primary/70`:``,t===`failed`?`border-destructive`:``].join(` `),children:[(0,U.jsx)(xk,{type:`target`,position:$.Top,className:`!h-0 !w-0 !border-0 !bg-transparent !opacity-0`}),(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`truncate text-[13px] font-semibold leading-5 tracking-tight text-foreground`,children:e.data.label}),(0,U.jsxs)(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full`,style:{backgroundColor:e.data.statusColor}}),(0,U.jsx)(`span`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.12em] text-muted-foreground`,children:e.data.kind})]})]}),t===void 0?null:(0,U.jsx)(`span`,{className:`rounded-sm border border-border/70 bg-background/70 px-1.5 py-0.5 font-mono text-[9px] font-semibold uppercase tracking-[0.08em]`,style:{color:e.data.statusColor},children:t})]}),e.data.branchKey===void 0?null:(0,U.jsxs)(`div`,{className:`mt-2 truncate font-mono text-[10px] text-muted-foreground`,children:[`branch: `,e.data.branchKey]}),(0,U.jsx)(xk,{type:`source`,position:$.Bottom,className:`!h-0 !w-0 !border-0 !bg-transparent !opacity-0`})]})}function rM(e,t){let n=new Map;if(t.length===0)return n;for(let r of e){if(r.runId!==t)continue;let e=sM(r.metadata,`nodeId`);e!==void 0&&(r.event.endsWith(`.started`)&&n.set(e,`running`),r.event.endsWith(`.completed`)&&n.set(e,`completed`),r.event.endsWith(`.failed`)&&n.set(e,`failed`))}return n}function iM(e,t){let n=aM(e),r=new Map,i=new Map;for(let e of n.values())i.set(e,(i.get(e)??0)+1);return{nodes:e.nodes.map(e=>{let a=n.get(e.id)??0,o=r.get(a)??0;r.set(a,o+1);let s=i.get(a)??1,c=t.get(e.id);return{id:e.id,type:`pipelineStage`,position:{x:(o-(s-1)/2)*280,y:a*170},sourcePosition:$.Bottom,targetPosition:$.Top,data:{label:e.label,kind:e.kind,status:c,statusColor:oM(c),branchKey:e.branchKey}}}),edges:e.edges.map(e=>({id:e.id,source:e.source,target:e.target,type:`smoothstep`,className:`pipeline-flow-edge`,label:e.label,markerEnd:{type:lT.ArrowClosed,width:10,height:10,color:Pj},style:{stroke:Pj,strokeWidth:1.6,opacity:.78},labelShowBg:!0,labelStyle:{fill:Ij,fontSize:11,fontWeight:700},labelBgStyle:{fill:Fj,fillOpacity:.92},labelBgPadding:[6,4],labelBgBorderRadius:2}))}}function aM(e){let t=new Map;for(let n of e.nodes){let r=e.edges.filter(e=>e.target===n.id),i=r.length===0?0:Math.max(...r.map(e=>(t.get(e.source)??0)+1));t.set(n.id,i)}return t}function oM(e){switch(e){case`running`:return Rj;case`completed`:return Pj;case`failed`:return Lj;default:return Pj}}function sM(e,t){let n=e?.[t];return typeof n==`string`?n:void 0}function cM(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function lM(e){return e===null?`null`:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?`[${e.length}]`:typeof e==`object`&&e?`{...}`:``}function uM(e){switch(e){case`error`:return`border-destructive`;case`warn`:return`border-muted-foreground`;case`debug`:return`border-muted-foreground/45`;case`info`:return`border-primary/70`}}function dM(e){switch(e){case`error`:return`text-destructive`;case`warn`:return`text-muted-foreground`;case`debug`:return`text-muted-foreground`;case`info`:return`text-primary`}}function fM(e){if(e.entry.kind===`reasoning`)return(0,U.jsxs)(`article`,{className:`max-w-205 justify-self-start text-muted-foreground`,"data-entry-id":String(e.entry.entryId),children:[(0,U.jsx)(`div`,{className:`mb-1 text-xs font-semibold uppercase text-muted-foreground`,children:`Reasoning`}),(0,U.jsx)(Yv,{text:e.entry.text})]});if(e.entry.kind===`tool`)return(0,U.jsx)(pM,{entry:e.entry,decidingApprovals:e.decidingApprovals,answeringQuestions:e.answeringQuestions,onApprovalDecision:e.onApprovalDecision,onQuestionAnswer:e.onQuestionAnswer});let t=e.entry.role===`assistant`?e.entry.traceId:void 0;return(0,U.jsxs)(`article`,{className:q(`max-w-[min(82ch,100%)] self-start`,e.entry.role===`assistant`&&`justify-self-start text-foreground`,e.entry.role===`user`&&`w-fit max-w-[min(64ch,82%)] justify-self-end rounded-sm bg-primary/10 px-4 py-2.5 text-foreground shadow-sm shadow-primary/10`),"data-entry-id":String(e.entry.entryId),children:[(0,U.jsx)(Yv,{text:e.entry.text}),t===void 0?null:(0,U.jsxs)(Qt,{className:`group mt-3 h-auto min-h-0 max-w-full gap-2 rounded-sm border-0 bg-transparent px-0 py-1 font-mono text-xs font-semibold text-muted-foreground shadow-none transition duration-200 hover:bg-transparent hover:text-primary`,type:`button`,variant:`ghost`,onClick:()=>e.onOpenTrace(t),children:[(0,U.jsx)(`span`,{className:`grid h-5 w-5 shrink-0 place-items-center bg-primary text-background [&_svg]:h-3 [&_svg]:w-3`,children:(0,U.jsx)(V,{"aria-hidden":`true`})}),(0,U.jsx)(`span`,{className:`font-sans text-[11px] font-semibold uppercase tracking-[0.16em] text-primary`,children:`Trace`}),(0,U.jsx)(`span`,{className:`min-w-0 truncate border-l border-border/80 pl-2 text-muted-foreground transition-colors group-hover:text-primary`,children:t})]})]})}function pM(e){let[t,n]=(0,w.useState)(e.entry.approval?.status!==`pending`&&e.entry.question?.status!==`pending`),r=e.entry.approval,i=e.entry.question,a=e.entry.childEvents??[],o=e.entry.args!==void 0||e.entry.result!==void 0||a.length>0||r!==void 0||i!==void 0,s=r?.status===`pending`,c=i?.status===`pending`,l=r!==void 0&&e.decidingApprovals.has(r.id),u=i!==void 0&&e.answeringQuestions.has(i.id);return(0,U.jsxs)(`article`,{className:`w-full justify-self-start overflow-hidden rounded-sm border border-border/80 bg-card/90 text-foreground shadow-sm shadow-black/20`,"data-entry-id":String(e.entry.entryId),children:[(0,U.jsxs)(`div`,{className:q(`flex min-w-0 items-center gap-2 px-3 py-2.5`,!t&&o&&`border-b border-border/80`),children:[(0,U.jsxs)(Qt,{"aria-expanded":!t,className:`h-auto min-h-0 min-w-0 flex-1 justify-between rounded-none border-0 bg-transparent p-0 text-left text-inherit shadow-none hover:bg-transparent hover:text-inherit`,type:`button`,variant:`ghost`,onClick:()=>n(e=>!e),children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`grid h-6 w-4 shrink-0 place-items-center text-primary`,children:(0,U.jsx)(H,{className:`h-3.5 w-3.5`,"aria-hidden":`true`})}),(0,U.jsx)(`strong`,{className:`min-w-0 truncate text-sm font-semibold text-foreground`,children:e.entry.toolName})]}),s?null:(0,U.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] font-medium text-muted-foreground`,children:t?`Show`:`Hide`})]}),s&&r!==void 0?(0,U.jsx)(yM,{compact:!0,disabled:l,onDecision:t=>e.onApprovalDecision(r.id,t)}):null,c?(0,U.jsx)(Uc,{className:`rounded-sm border-primary/25 bg-primary/10 px-1.5 py-0.5 text-[10px] uppercase text-primary`,children:`Waiting for input`}):null,s||c?(0,U.jsx)(Qt,{"aria-expanded":!t,className:`h-7 min-h-7 px-2 text-[11px] font-medium`,size:`sm`,type:`button`,variant:`ghost`,onClick:()=>n(e=>!e),children:t?`Show`:`Hide`}):null]}),t||!o?null:(0,U.jsxs)(`div`,{className:`grid gap-3 p-3`,children:[r===void 0?null:(0,U.jsx)(vM,{approval:r,disabled:l,onDecision:t=>e.onApprovalDecision(r.id,t)}),i===void 0?null:(0,U.jsx)(hM,{disabled:u,question:i,onAnswer:t=>e.onQuestionAnswer(i.id,t)}),i!==void 0||e.entry.args===void 0?null:(0,U.jsx)(Xv,{title:`Input`,value:e.entry.args}),a.length===0?null:(0,U.jsx)(mM,{events:a}),i!==void 0||e.entry.result===void 0?null:(0,U.jsx)(Xv,{title:`Output`,value:e.entry.result})]})]})}function mM(e){return(0,U.jsxs)(`div`,{className:`rounded-sm border border-border/80 bg-background/65`,children:[(0,U.jsx)(`div`,{className:`border-b border-border/80 bg-muted/20 px-3 py-2 font-mono text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:`Subagent activity`}),(0,U.jsx)(`div`,{className:`grid gap-3 p-3`,children:e.events.map(e=>{let t=e.agentName??e.agentId;return e.kind===`message`||e.kind===`reasoning`?(0,U.jsxs)(`div`,{className:`grid gap-1 rounded-sm border border-border/80 bg-card/90 p-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(Uc,{className:`rounded-sm border-border bg-muted px-1.5 py-0.5 text-[10px] uppercase text-muted-foreground`,children:e.kind===`reasoning`?`Reasoning`:`Response`}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-semibold text-muted-foreground`,children:t})]}),(0,U.jsx)(Yv,{text:e.text})]},`${e.kind}-${e.agentId}-${e.text}`):(0,U.jsxs)(`div`,{className:`grid gap-2 rounded-sm border border-border/80 bg-card/90 p-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(Uc,{className:`rounded-sm border-primary/25 bg-primary/10 px-1.5 py-0.5 text-[10px] uppercase text-primary`,children:`Tool`}),(0,U.jsxs)(`span`,{className:`min-w-0 truncate text-xs font-semibold text-muted-foreground`,children:[t,` / `,e.toolName]})]}),e.args===void 0?null:(0,U.jsx)(Xv,{title:`Input`,value:e.args}),e.result===void 0?null:(0,U.jsx)(Xv,{title:`Output`,value:e.result})]},`${e.kind}-${e.agentId}-${e.toolName}-${e.callId??e.args??e.result??``}`)})})]})}function hM(e){let[t,n]=(0,w.useState)({}),[r,i]=(0,w.useState)(0),a=e.question.status===`pending`,o=e.question.questions.length,s=e.question.questions.map(e=>{let n=t[e.id],r=n?.customValue?.trim()??``,i=r.length>0?r:n?.answer;return{questionId:e.id,answer:i?.trim()??``,...n?.choice===void 0?{}:{choice:n.choice},...r.length>0?{custom:!0}:{}}}),c=o===0?0:Math.min(r,o-1),l=e.question.questions[c],u=s[c]?.answer??``,d=s.filter(e=>e.answer.length>0).length,f=u.length>0,p=a&&s.every(e=>e.answer.length>0),m=c===0,h=c>=o-1;if(l===void 0)return(0,U.jsx)(`div`,{className:`rounded-sm border border-border bg-background p-4 text-sm font-medium text-muted-foreground`,children:`No questions`});let g=()=>i(e=>Math.max(0,e-1)),_=()=>i(t=>Math.min(e.question.questions.length-1,t+1)),v=(e,t)=>n(n=>({...n,[e]:t}));return(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsx)(gM,{disabled:e.disabled||!a,index:c,total:o,question:l,value:t[l.id],answer:e.question.answers?.find(e=>e.questionId===l.id),onChange:e=>v(l.id,e),...h?{}:{onAdvance:_}},l.id),a?(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 border-t border-border pt-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 font-mono text-[11px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:[d,`/`,o,` answered`]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[m?null:(0,U.jsx)(Qt,{type:`button`,variant:`secondary`,onClick:g,children:`Back`}),h?(0,U.jsx)(Qt,{className:`h-9 min-h-9 px-4`,disabled:e.disabled||!p,type:`button`,onClick:()=>e.onAnswer(s),children:`Submit answers`}):(0,U.jsx)(Qt,{className:`h-9 min-h-9 px-4`,disabled:e.disabled||!f,type:`button`,onClick:_,children:`Next question`})]})]}):o>1?(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 border-t border-border pt-3`,children:[(0,U.jsx)(`div`,{className:`min-w-0 font-mono text-[11px] font-semibold uppercase tracking-[0.2em] text-primary`,children:`Answered`}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,U.jsx)(Qt,{disabled:m,type:`button`,variant:`secondary`,onClick:g,children:`Back`}),(0,U.jsx)(Qt,{disabled:h,type:`button`,variant:`secondary`,onClick:_,children:`Next`})]})]}):null]})}function gM(e){let t=e.answer?.answer,n=_M(e.value),r=t===void 0?n.length>0?`Ready`:`Waiting`:`Answered`;return(0,U.jsxs)(`section`,{className:`grid gap-4 rounded-sm border border-border/80 bg-background/70 p-4`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-2`,children:[(0,U.jsxs)(`div`,{className:`font-mono text-[11px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:[`Question `,e.index+1,` of `,e.total]}),(0,U.jsx)(`h3`,{className:`m-0 text-base font-semibold leading-7 text-foreground [overflow-wrap:anywhere]`,children:e.question.question})]}),(0,U.jsx)(`span`,{className:q(`shrink-0 font-mono text-[11px] font-semibold uppercase tracking-[0.18em]`,r===`Answered`&&`text-primary`,r===`Ready`&&`text-foreground`,r===`Waiting`&&`text-muted-foreground`),children:r})]}),t===void 0?null:(0,U.jsx)(`div`,{className:`rounded-sm border border-primary/20 bg-primary/10 px-3 py-2 text-sm font-medium text-foreground`,children:t}),t===void 0&&e.question.choices.length>0?(0,U.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.question.choices.map(t=>{let n=e.value?.choice===t.value;return(0,U.jsx)(Qt,{className:q(`h-8 min-h-8 rounded-sm px-3 text-xs`,n&&`border-primary`),disabled:e.disabled,size:`sm`,type:`button`,variant:n?`default`:`secondary`,onClick:()=>{e.onChange({answer:t.value,choice:t.value,customValue:e.value?.customValue??``}),e.onAdvance?.()},children:t.label},t.value)})}):null,t===void 0?(0,U.jsx)(Vc,{className:`min-h-24 text-sm`,disabled:e.disabled,placeholder:`Type a custom answer`,rows:3,value:e.value?.customValue??``,onChange:t=>e.onChange({...e.value,customValue:t.currentTarget.value})}):null]})}function _M(e){let t=e?.customValue?.trim()??``;return t.length>0?t:e?.answer?.trim()??``}function vM(e){let t=e.approval.status===`pending`;return(0,U.jsxs)(`div`,{className:`grid gap-3 rounded-sm border border-border/80 bg-muted/35 p-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`text-xs font-semibold uppercase text-muted-foreground`,children:`Approval`}),(0,U.jsx)(`div`,{className:`mt-0.5 text-sm font-medium text-foreground`,children:Wv(e.approval)})]}),t?(0,U.jsx)(yM,{disabled:e.disabled,onDecision:e.onDecision}):null]}),e.approval.reason===void 0?null:(0,U.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground [overflow-wrap:anywhere]`,children:e.approval.reason})]})}function yM(e){return(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,U.jsx)(Qt,{className:q(e.compact?`h-7 min-h-7 px-2 text-xs`:`h-8 min-h-8`),disabled:e.disabled,size:`sm`,type:`button`,onClick:()=>e.onDecision(!0),children:`Approve`}),(0,U.jsx)(Qt,{className:q(e.compact?`h-7 min-h-7 px-2 text-xs`:`h-8 min-h-8`),disabled:e.disabled,size:`sm`,type:`button`,variant:`secondary`,onClick:()=>e.onDecision(!1),children:`Reject`})]})}function bM(e){let t=(0,w.useRef)(null),n=(0,w.useRef)(!0);(0,w.useEffect)(()=>{let e=t.current;e===null||!n.current||(e.scrollTop=e.scrollHeight)});function r(){let e=t.current;e!==null&&(n.current=e.scrollHeight-e.scrollTop-e.clientHeight<24)}return(0,U.jsxs)(`aside`,{className:`grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden border-l border-border/80 bg-background/70 max-xl:hidden`,children:[(0,U.jsxs)(`header`,{className:`grid min-h-12 min-w-0 gap-1 border-b border-border/80 bg-card/35 px-4 py-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,U.jsx)(`h2`,{className:`m-0 text-sm font-semibold leading-tight text-foreground`,children:`Session logs`}),(0,U.jsx)(`span`,{className:`font-mono text-[10px] font-semibold tabular-nums text-muted-foreground`,children:e.logs.length})]}),(0,U.jsx)(`p`,{className:`m-0 truncate font-mono text-[11px] font-medium text-muted-foreground`,children:e.selectedSessionId.length===0?`No active session`:e.selectedSessionId})]}),(0,U.jsxs)(`div`,{className:`min-h-0 min-w-0 overflow-x-auto overflow-y-auto`,ref:t,onScroll:r,children:[e.selectedSessionId.length===0?(0,U.jsx)(`div`,{className:`grid h-full min-h-80 place-items-center text-center text-sm font-medium text-muted-foreground`,children:`Start or open a session to view runtime logs.`}):null,e.selectedSessionId.length>0&&e.loading&&e.logs.length===0?(0,U.jsx)(`div`,{className:`px-2 py-3 text-sm font-medium text-muted-foreground`,children:`Loading logs`}):null,e.selectedSessionId.length>0&&!e.loading&&e.logs.length===0?(0,U.jsx)(`div`,{className:`px-2 py-3 text-sm font-medium text-muted-foreground`,children:`No logs yet`}):null,(0,U.jsx)(`div`,{className:`grid min-w-full border-t border-border/65 font-mono`,children:e.logs.map(e=>(0,U.jsx)(xM,{log:e},e.id))})]})]})}function xM(e){let t=Object.entries(e.log.metadata??{}).slice(0,6).map(([e,t])=>`${e}=${CM(t)}`).join(` `),n=[SM(e.log.timestamp),e.log.level.toUpperCase().padEnd(5,` `),`${e.log.category}/${e.log.event}`,e.log.message,t].filter(e=>e.trim().length>0).join(` `);return(0,U.jsxs)(`article`,{className:q(`w-max min-w-full whitespace-nowrap border-l-2 px-3 py-1 text-[11px] leading-5 transition duration-200 hover:bg-accent/45`,wM(e.log.level)),title:n,children:[(0,U.jsx)(`time`,{className:`text-muted-foreground`,children:SM(e.log.timestamp)}),(0,U.jsx)(`span`,{className:q(`ml-3 font-semibold`,TM(e.log.level)),children:e.log.level.toUpperCase().padEnd(5,` `)}),(0,U.jsxs)(`span`,{className:`ml-3 text-muted-foreground`,children:[e.log.category,`/`,e.log.event]}),(0,U.jsx)(`span`,{className:`ml-3 font-medium text-foreground`,children:e.log.message}),(0,U.jsx)(`span`,{className:`ml-3 text-muted-foreground/85`,children:t}),(0,U.jsx)(`span`,{className:`sr-only`,children:n})]})}function SM(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function CM(e){return e===null?`null`:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?`[${e.length}]`:typeof e==`object`&&e?`{...}`:``}function wM(e){switch(e){case`error`:return`border-destructive`;case`warn`:return`border-yellow-500`;case`debug`:return`border-muted-foreground/45`;case`info`:return`border-primary/70`}}function TM(e){switch(e){case`error`:return`text-destructive`;case`warn`:return`text-yellow-500`;case`debug`:return`text-muted-foreground`;case`info`:return`text-primary`}}function EM(e,t){return w.useReducer((e,n)=>t[e][n]??e,e)}var DM=e=>{let{present:t,children:n}=e,r=OM(t),i=typeof n==`function`?n({present:r.isPresent}):w.Children.only(n),a=ue(r.ref,AM(i));return typeof n==`function`||r.isPresent?w.cloneElement(i,{ref:a}):null};DM.displayName=`Presence`;function OM(e){let[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),a=w.useRef(`none`),[o,s]=EM(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return w.useEffect(()=>{let e=kM(r.current);a.current=o===`mounted`?e:`none`},[o]),Zn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=kM(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Zn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=kM(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=kM(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:w.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function kM(e){return e?.animationName||`none`}function AM(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jM=`Dialog`,[MM,NM]=rn(jM),[PM,FM]=MM(jM),IM=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),c=w.useRef(null),[l,u]=Ha({prop:r,defaultProp:i??!1,onChange:a,caller:jM});return(0,U.jsx)(PM,{scope:t,triggerRef:s,contentRef:c,contentId:er(),titleId:er(),descriptionId:er(),open:l,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};IM.displayName=jM;var LM=`DialogTrigger`,RM=w.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=FM(LM,n),a=ue(t,i.triggerRef);return(0,U.jsx)(hn.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":iN(i.open),...r,ref:a,onClick:tn(e.onClick,i.onOpenToggle)})});RM.displayName=LM;var zM=`DialogPortal`,[BM,VM]=MM(zM,{forceMount:void 0}),HM=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=FM(zM,t);return(0,U.jsx)(BM,{scope:t,forceMount:n,children:w.Children.map(r,e=>(0,U.jsx)(DM,{present:n||a.open,children:(0,U.jsx)(Ba,{asChild:!0,container:i,children:e})}))})};HM.displayName=zM;var UM=`DialogOverlay`,WM=w.forwardRef((e,t)=>{let n=VM(UM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=FM(UM,e.__scopeDialog);return a.modal?(0,U.jsx)(DM,{present:r||a.open,children:(0,U.jsx)(KM,{...i,ref:t})}):null});WM.displayName=UM;var GM=on(`DialogOverlay.RemoveScroll`),KM=w.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=FM(UM,n);return(0,U.jsx)(fs,{as:GM,allowPinchZoom:!0,shards:[i.contentRef],children:(0,U.jsx)(hn.div,{"data-state":iN(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),qM=`DialogContent`,JM=w.forwardRef((e,t)=>{let n=VM(qM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=FM(qM,e.__scopeDialog);return(0,U.jsx)(DM,{present:r||a.open,children:a.modal?(0,U.jsx)(YM,{...i,ref:t}):(0,U.jsx)(XM,{...i,ref:t})})});JM.displayName=qM;var YM=w.forwardRef((e,t)=>{let n=FM(qM,e.__scopeDialog),r=w.useRef(null),i=ue(t,n.contentRef,r);return w.useEffect(()=>{let e=r.current;if(e)return ro(e)},[]),(0,U.jsx)(ZM,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tn(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:tn(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:tn(e.onFocusOutside,e=>e.preventDefault())})}),XM=w.forwardRef((e,t)=>{let n=FM(qM,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return(0,U.jsx)(ZM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),ZM=w.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=FM(qM,n),c=w.useRef(null),l=ue(t,c);return Nn(),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(zn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,U.jsx)(Tn,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":iN(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(cN,{titleId:s.titleId}),(0,U.jsx)(uN,{contentRef:c,descriptionId:s.descriptionId})]})]})}),QM=`DialogTitle`,$M=w.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=FM(QM,n);return(0,U.jsx)(hn.h2,{id:i.titleId,...r,ref:t})});$M.displayName=QM;var eN=`DialogDescription`,tN=w.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=FM(eN,n);return(0,U.jsx)(hn.p,{id:i.descriptionId,...r,ref:t})});tN.displayName=eN;var nN=`DialogClose`,rN=w.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=FM(nN,n);return(0,U.jsx)(hn.button,{type:`button`,...r,ref:t,onClick:tn(e.onClick,()=>i.onOpenChange(!1))})});rN.displayName=nN;function iN(e){return e?`open`:`closed`}var aN=`DialogTitleWarning`,[oN,sN]=nn(aN,{contentName:qM,titleName:QM,docsSlug:`dialog`}),cN=({titleId:e})=>{let t=sN(aN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
84
-
85
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
86
-
87
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},lN=`DialogDescriptionWarning`,uN=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sN(lN).contentName}}.`;return w.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},dN=IM,fN=HM,pN=WM,mN=JM,hN=$M,gN=tN,_N=dN;function vN({className:e,children:t,...n}){return(0,U.jsxs)(fN,{children:[(0,U.jsx)(pN,{className:`fixed inset-0 z-50 bg-background/80 backdrop-blur-sm`}),(0,U.jsx)(mN,{className:q(`fixed left-1/2 top-1/2 z-50 grid w-[min(420px,calc(100vw-32px))] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-sm border border-border bg-popover p-5 text-popover-foreground shadow-2xl shadow-black/40`,e),...n,children:t})]})}function yN({className:e,...t}){return(0,U.jsx)(`div`,{className:q(`grid gap-1.5`,e),...t})}function bN({className:e,...t}){return(0,U.jsx)(`div`,{className:q(`flex justify-end gap-2`,e),...t})}function xN({className:e,...t}){return(0,U.jsx)(hN,{className:q(`text-base font-bold`,e),...t})}function SN({className:e,...t}){return(0,U.jsx)(gN,{className:q(`text-sm leading-6 text-muted-foreground`,e),...t})}function CN(e){return e.sessionsEnabled?(0,U.jsx)(`section`,{className:`grid min-h-0 w-full overflow-auto`,"aria-label":`Sessions`,children:(0,U.jsxs)(`div`,{className:`min-w-225 border-b border-border/80 bg-card/80 shadow-sm`,children:[(0,U.jsxs)(`div`,{className:`sticky top-0 z-10 grid min-h-11 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px_72px] items-center gap-4 border-b border-border/80 bg-card/95 px-6 font-mono text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground backdrop-blur`,children:[(0,U.jsx)(`span`,{children:`Session`}),(0,U.jsx)(`span`,{children:`Agent`}),(0,U.jsx)(`span`,{children:`Messages`}),(0,U.jsx)(`span`,{children:`Updated`}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Actions`})]}),e.sessionLoadState===`loading`&&e.sessions.length===0?(0,U.jsx)(`div`,{className:`px-5 py-4 text-sm font-medium text-muted-foreground`,children:`Loading sessions`}):null,e.sessionLoadState===`idle`&&e.sessions.length===0?(0,U.jsx)(`div`,{className:`px-5 py-4 text-sm font-medium text-muted-foreground`,children:`No sessions`}):null,e.sessions.map(t=>(0,U.jsxs)(`div`,{className:q(`grid min-h-14 w-full min-w-0 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px_72px] items-center gap-4 border-b border-border/75 px-6 text-left text-muted-foreground transition duration-200 hover:border-primary/20 hover:bg-accent/80 hover:text-accent-foreground`,t.id===e.selectedSessionId&&`border-l border-l-primary bg-primary/10 text-primary`),children:[(0,U.jsxs)(Qt,{className:`col-span-4 grid h-full min-h-14 min-w-0 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px] items-center justify-start gap-4 rounded-none border-0 bg-transparent p-0 text-left text-inherit shadow-none hover:bg-transparent hover:text-inherit`,type:`button`,variant:`ghost`,onClick:()=>e.onOpenSession(t.id),children:[(0,U.jsxs)(`span`,{className:`grid min-w-0 gap-0.5`,children:[(0,U.jsx)(`strong`,{className:`min-w-0 truncate text-sm font-medium text-foreground`,children:t.title??`Untitled chat`}),(0,U.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs font-medium text-muted-foreground`,children:t.id})]}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium`,children:Bv(e.agents,t.agentId)}),(0,U.jsxs)(`span`,{className:`text-xs font-medium tabular-nums text-muted-foreground`,children:[t.messageCount,` messages`]}),(0,U.jsx)(`time`,{className:`text-xs font-medium text-muted-foreground`,children:Fv(t.updatedAt)})]}),(0,U.jsxs)(`span`,{className:`flex items-center justify-end gap-1`,children:[(0,U.jsx)(Qt,{"aria-label":`View tracing for ${t.title??`Untitled chat`}`,className:`h-7 min-h-7 w-7 border-0 bg-transparent p-0 text-muted-foreground opacity-80 hover:bg-transparent hover:text-primary hover:opacity-100 [&_svg]:h-3.5 [&_svg]:w-3.5`,size:`icon`,type:`button`,variant:`ghost`,onClick:n=>{n.stopPropagation(),e.onViewSessionTracing(t.id)},children:(0,U.jsx)(k,{"aria-hidden":`true`})}),(0,U.jsx)(Qt,{"aria-label":`Delete ${t.title??`Untitled chat`}`,className:`h-7 min-h-7 w-7 border-0 bg-transparent p-0 text-muted-foreground opacity-80 hover:bg-transparent hover:text-destructive hover:opacity-100 [&_svg]:h-3.5 [&_svg]:w-3.5`,size:`icon`,type:`button`,variant:`ghost`,onClick:n=>{n.stopPropagation(),e.onDeleteSession(t)},children:(0,U.jsx)(ae,{"aria-hidden":`true`})})]})]},t.id))]})}):(0,U.jsx)(`div`,{className:`w-full rounded-sm border border-dashed border-border p-8 text-sm font-medium text-muted-foreground`,children:`Sessions are disabled`})}function wN(e){let t=e.session?.title??`Untitled chat`;return(0,U.jsx)(_N,{open:e.session!==void 0,onOpenChange:e.onOpenChange,children:(0,U.jsxs)(vN,{children:[(0,U.jsxs)(yN,{children:[(0,U.jsx)(xN,{children:`Delete session`}),(0,U.jsxs)(SN,{children:[`Delete "`,t,`" and its traces. This cannot be undone.`]})]}),(0,U.jsxs)(bN,{children:[(0,U.jsx)(Qt,{type:`button`,variant:`ghost`,onClick:()=>e.onOpenChange(!1),children:`Cancel`}),(0,U.jsx)(Qt,{type:`button`,variant:`destructive`,onClick:()=>{e.session!==void 0&&e.onConfirm(e.session)},children:`Delete`})]})]})})}var TN=document.getElementById(`anvia-ui`),EN=TN?.dataset.uiPath??`/ui`,DN=TN?.dataset.uiCompatPath??`/ui`,ON=`${FN(EN)||FN(DN)||`/ui`}/assets/logo.png`;function kN(){let e=FN(EN),t=FN(DN),n=window.location.pathname.replace(/\/+$/,``);return t.length>0&&(n===t||n.startsWith(`${t}/`))?AN(n===t?[]:n.slice(t.length+1).split(`/`).filter(e=>e.length>0).map(e=>decodeURIComponent(e))):e.length===0&&n.length>0?AN(n.slice(1).split(`/`).filter(e=>e.length>0).map(e=>decodeURIComponent(e))):n===e||!n.startsWith(`${e}/`)?{page:`playground`}:AN(n.slice(e.length+1).split(`/`).filter(e=>e.length>0).map(e=>decodeURIComponent(e)))}function AN(e){let[t,n,r]=e;return t===`tracing`?n===`sessions`?{page:`tracing`,...r===void 0?{}:{traceSessionId:r}}:{page:`tracing`,...n===void 0?{}:{traceId:n}}:t===`sessions`?{page:`sessions`}:t===`agents`?{page:`agents`}:t===`tools`?{page:`tools`}:t===`mcps`?{page:`mcps`}:t===`pipelines`?{page:`pipelines`}:t===`knowledge`?{page:`knowledge`}:t===`playground`?{page:`playground`,...n===void 0?{}:{sessionId:n}}:t!==void 0&&n===void 0?{page:`playground`,sessionId:t}:{page:`playground`}}function jN(e){let t=FN(EN),n=FN(DN)||`/ui`;if(t.length===0&&(e===`sessions`||e===`agents`||e===`tools`||e===`mcps`||e===`pipelines`||e===`knowledge`)){IN(`${n}/${e}`);return}IN(e===`playground`?`${t}/playground`:`${t}/${e}`)}function MN(e){let t=FN(EN);IN(e===void 0?`${t}/playground`:`${t}/playground/${encodeURIComponent(e)}`)}function NN(e){IN(`${FN(EN)}/tracing/${encodeURIComponent(e)}`)}function PN(e){IN(`${FN(EN)}/tracing/sessions/${encodeURIComponent(e)}`)}function FN(e){return e===`/`?``:e.replace(/\/+$/,``)}function IN(e){let t=`${e}${window.location.search}${window.location.hash}`;`${window.location.pathname}${window.location.search}${window.location.hash}`!==t&&window.history.pushState({},``,t)}var LN=0;function RN(e){LN=e}function zN(){LN=0}function BN(e){return e.filter(e=>e.kind===`message`&&e.text.trim().length>0).map(e=>({role:e.role,content:[{type:`text`,text:e.text}]}))}function VN(e){return e.currentTarget.value}function HN(e){e!==null&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)}function UN(){let e=LN;return LN+=1,e}function WN(e){return e.reduce((e,t)=>Math.max(e,t.entryId+1),0)}function GN(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if(i!==void 0&&!(i.kind!==`tool`||i.toolName!==t||i.result!==void 0)&&(n===void 0||i.callId===n))return r}return-1}function KN(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if(i!==void 0&&!(i.kind!==`tool`||i.toolName!==t)&&(n===void 0||i.callId===n))return r}return-1}function qN(e){return typeof e==`string`?e:Pv(e)?typeof e.text==`string`?e.text:typeof e.content==`string`?e.content:Array.isArray(e.content)?e.content.map(JN).filter(Boolean).join(`
88
- `):``:``}function JN(e){return typeof e==`string`?e:Pv(e)?typeof e.text==`string`?e.text:e.type===`tool_call`&&Pv(e.function)?`${String(e.function.name??`tool`)}(${Gv(e.function.arguments)})`:e.type===`tool_result`&&Array.isArray(e.content)?e.content.map(JN).filter(Boolean).join(`
89
- `):typeof e.type==`string`?e.type:``:``}async function YN(e,t){let n=e.getReader(),r=new TextDecoder,i=``;for(;;){let e=await n.read();if(e.done)break;i+=r.decode(e.value,{stream:!0});let a=i.split(`
90
- `);i=a.pop()??``;for(let e of a)e.trim().length>0&&await t(JSON.parse(e))}i+=r.decode(),i.trim().length>0&&await t(JSON.parse(i))}function XN(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>e())})})}function ZN(e){let t=QN(e.icon);return(0,U.jsxs)(Qt,{className:q(`h-8 min-h-8 w-full justify-start gap-3 rounded-sm border border-transparent bg-transparent px-2 text-sm font-medium text-sidebar-foreground/62 shadow-none hover:border-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-foreground [&_svg]:h-3.5 [&_svg]:w-3.5`,e.active&&`border-sidebar-border bg-sidebar-accent text-sidebar-accent-foreground hover:border-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`),variant:`ghost`,type:`button`,disabled:e.disabled,onClick:e.onClick,children:[(0,U.jsx)(t,{}),(0,U.jsx)(`span`,{children:e.label})]})}function QN(e){switch(e){case`activity`:return k;case`bot`:return M;case`database`:return F;case`list`:return te;case`message`:return ne;case`plug`:return B;case`shield`:return ie;case`wrench`:return H;case`workflow`:return oe}}function $N(e){let t=e.agents.find(t=>t.id===e.selectedAgentId)??e.agents[0],n=e.summary?.tools??[];return(0,U.jsxs)(`section`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background/55`,"aria-label":`Tools`,children:[(0,U.jsx)(`header`,{className:`border-b border-border/80 bg-background/70 px-6 py-5 backdrop-blur`,children:(0,U.jsxs)(`div`,{className:`mx-auto grid max-w-[1500px] grid-cols-[minmax(0,1fr)_auto] items-end gap-4 max-md:grid-cols-1`,children:[(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-2`,children:[(0,U.jsx)(`div`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.24em] text-primary`,children:`Agent capabilities`}),(0,U.jsx)(`h1`,{className:`m-0 text-2xl font-semibold leading-none tracking-tight text-foreground`,children:`Tools`}),(0,U.jsx)(`p`,{className:`m-0 max-w-[62ch] text-sm leading-6 text-muted-foreground`,children:`Tool definitions registered on Studio agents, including approval policy and input schema.`})]}),e.agents.length>1?(0,U.jsxs)(Ic,{value:t?.id??``,onValueChange:e.onSelectAgent,children:[(0,U.jsx)(Rc,{className:`h-9 min-h-9 w-64 rounded-sm border-border bg-card/80 font-mono text-xs max-md:w-full`,children:(0,U.jsx)(Lc,{placeholder:`Agent`})}),(0,U.jsx)(zc,{align:`end`,children:e.agents.map(e=>(0,U.jsx)(Bc,{value:e.id,children:e.name??e.id},e.id))})]}):null]})}),(0,U.jsx)(`div`,{className:`min-h-0 overflow-auto px-6 py-6`,children:(0,U.jsx)(`div`,{className:`mx-auto grid max-w-[1500px] gap-4`,children:e.enabled?e.loading?(0,U.jsx)(nP,{title:`Loading tools`,message:`Reading registered tool metadata.`}):n.length===0?(0,U.jsx)(nP,{title:`No tools`,message:`The selected agent has no registered tools.`}):(0,U.jsxs)(`div`,{className:`grid overflow-hidden border border-border/80 bg-card/55 shadow-sm`,children:[(0,U.jsxs)(`div`,{className:`grid min-h-10 grid-cols-[minmax(260px,0.75fr)_minmax(0,1fr)] items-center border-b border-border/80 bg-muted/20 px-4 font-mono text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground max-lg:hidden`,children:[(0,U.jsx)(`span`,{children:`Definition`}),(0,U.jsx)(`span`,{children:`Parameter schema`})]}),n.map(e=>(0,U.jsx)(eP,{tool:e},`${e.source}:${e.name}`))]}):(0,U.jsx)(nP,{title:`Tools unavailable`,message:`No registered Studio agent exposes static or dynamic tools.`})})})]})}function eP(e){let t=aP(e.tool.parameters);return(0,U.jsxs)(`article`,{className:`grid grid-cols-[minmax(300px,0.75fr)_minmax(0,1fr)] border-b border-border/70 last:border-b-0 max-lg:grid-cols-1`,children:[(0,U.jsxs)(`div`,{className:`grid content-start gap-4 border-r border-border/70 p-4 max-lg:border-b max-lg:border-r-0`,children:[(0,U.jsxs)(`div`,{className:`grid gap-1`,children:[(0,U.jsx)(`h2`,{className:`m-0 truncate font-mono text-[15px] font-semibold text-foreground`,children:e.tool.name}),(0,U.jsx)(`span`,{className:`truncate font-mono text-[11px] font-medium text-muted-foreground`,children:e.tool.agentId})]}),(0,U.jsx)(`p`,{className:`m-0 max-w-[62ch] text-sm leading-6 text-muted-foreground`,children:e.tool.description}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2`,children:[(0,U.jsx)(Uc,{className:rP(e.tool.source),children:e.tool.source}),(0,U.jsxs)(Uc,{className:q(e.tool.approval.required?`border-primary/35 bg-primary/10 text-primary`:`border-border/80 bg-muted/55 text-muted-foreground`),children:[`approval `,e.tool.approval.required?`required`:`none`]}),(0,U.jsxs)(Uc,{className:`border-border/80 bg-transparent text-muted-foreground`,children:[t,` `,t===1?`field`:`fields`]})]}),e.tool.approval.reason===void 0?null:(0,U.jsx)(`p`,{className:`m-0 border-l border-primary/40 pl-3 text-xs leading-5 text-muted-foreground`,children:e.tool.approval.reason})]}),(0,U.jsx)(tP,{value:e.tool.parameters})]})}function tP(e){return(0,U.jsxs)(`section`,{className:`grid min-w-0 content-start bg-background/35`,children:[(0,U.jsxs)(`div`,{className:`flex min-h-9 items-center justify-between gap-3 border-b border-border/70 px-4`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:`JSON schema`}),(0,U.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:iP(e.value)})]}),(0,U.jsx)(`div`,{className:`min-w-0 overflow-x-auto`,children:(0,U.jsx)(`pre`,{className:`m-0 max-h-96 min-w-max p-4 font-mono text-[12px] leading-5 text-foreground`,children:(0,U.jsx)(`code`,{children:oP(e.value)})})})]})}function nP(e){return(0,U.jsx)(`div`,{className:`grid min-h-80 place-items-center border border-dashed border-border/80 bg-card/35 px-6 text-center`,children:(0,U.jsxs)(`div`,{className:`grid max-w-md gap-2`,children:[(0,U.jsx)(`h2`,{className:`m-0 text-base font-semibold text-foreground`,children:e.title}),(0,U.jsx)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground`,children:e.message})]})})}function rP(e){return e===`dynamic`?`border-primary/35 bg-primary/10 text-primary`:`border-border/80 bg-muted/55 text-muted-foreground`}function iP(e){if(typeof e!=`object`||!e||Array.isArray(e))return`value`;let t=e.type;return typeof t==`string`?t:`object`}function aP(e){if(typeof e!=`object`||!e||Array.isArray(e))return 0;let t=e.properties;return typeof t==`object`&&t&&!Array.isArray(t)?Object.keys(t).length:0}function oP(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function sP(e,t){return w.useReducer((e,n)=>t[e][n]??e,e)}var cP=`ScrollArea`,[lP,uP]=rn(cP),[dP,fP]=lP(cP),pP=w.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=w.useState(null),[l,u]=w.useState(null),[d,f]=w.useState(null),[p,m]=w.useState(null),[h,g]=w.useState(null),[_,v]=w.useState(0),[y,b]=w.useState(0),[x,S]=w.useState(!1),[C,T]=w.useState(!1),E=ue(t,e=>c(e)),D=mn(i);return(0,U.jsx)(dP,{scope:n,type:r,dir:D,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:b,children:(0,U.jsx)(hn.div,{dir:D,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":y+`px`,...e.style}})})});pP.displayName=cP;var mP=`ScrollAreaViewport`,hP=w.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=fP(mP,n),s=ue(t,w.useRef(null),o.onViewportChange);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,U.jsx)(hn.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,U.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});hP.displayName=mP;var gP=`ScrollAreaScrollbar`,_P=w.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=fP(gP,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return w.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,U.jsx)(vP,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,U.jsx)(yP,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,U.jsx)(bP,{...r,ref:t,forceMount:n}):i.type===`always`?(0,U.jsx)(xP,{...r,ref:t}):null});_P.displayName=gP;var vP=w.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=fP(gP,e.__scopeScrollArea),[a,o]=w.useState(!1);return w.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,U.jsx)(DM,{present:n||a,children:(0,U.jsx)(bP,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),yP=w.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=fP(gP,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=VP(()=>c(`SCROLL_END`),100),[s,c]=sP(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return w.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),w.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,U.jsx)(DM,{present:n||s!==`hidden`,children:(0,U.jsx)(xP,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:tn(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:tn(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),bP=w.forwardRef((e,t)=>{let n=fP(gP,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=w.useState(!1),s=e.orientation===`horizontal`,c=VP(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return HP(n.viewport,c),HP(n.content,c),(0,U.jsx)(DM,{present:r||a,children:(0,U.jsx)(xP,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),xP=w.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=fP(gP,e.__scopeScrollArea),a=w.useRef(null),o=w.useRef(0),[s,c]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=PP(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return IP(e,o.current,s,t)}return n===`horizontal`?(0,U.jsx)(SP,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=LP(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,U.jsx)(CP,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=LP(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),SP=w.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=fP(gP,e.__scopeScrollArea),[o,s]=w.useState(),c=w.useRef(null),l=ue(t,c,a.onScrollbarXChange);return w.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,U.jsx)(EP,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":FP(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),zP(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:NP(o.paddingLeft),paddingEnd:NP(o.paddingRight)}})}})}),CP=w.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=fP(gP,e.__scopeScrollArea),[o,s]=w.useState(),c=w.useRef(null),l=ue(t,c,a.onScrollbarYChange);return w.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,U.jsx)(EP,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":FP(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),zP(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:NP(o.paddingTop),paddingEnd:NP(o.paddingBottom)}})}})}),[wP,TP]=lP(gP),EP=w.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=fP(gP,n),[m,h]=w.useState(null),g=ue(t,e=>h(e)),_=w.useRef(null),v=w.useRef(``),y=p.viewport,b=r.content-r.viewport,x=_n(u),S=_n(c),C=VP(d,10);function T(e){_.current&&l({x:e.clientX-_.current.left,y:e.clientY-_.current.top})}return w.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&x(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b,x]),w.useEffect(S,[r,S]),HP(m,C),HP(p.content,C),(0,U.jsx)(wP,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:_n(a),onThumbPointerUp:_n(o),onThumbPositionChange:S,onThumbPointerDown:_n(s),children:(0,U.jsx)(hn.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:tn(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:tn(e.onPointerMove,T),onPointerUp:tn(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})}),DP=`ScrollAreaThumb`,OP=w.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=TP(DP,e.__scopeScrollArea);return(0,U.jsx)(DM,{present:n||i.hasThumb,children:(0,U.jsx)(kP,{ref:t,...r})})}),kP=w.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=fP(DP,n),o=TP(DP,n),{onThumbPositionChange:s}=o,c=ue(t,e=>o.onThumbChange(e)),l=w.useRef(void 0),u=VP(()=>{l.current&&=(l.current(),void 0)},100);return w.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=BP(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,U.jsx)(hn.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:tn(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:tn(e.onPointerUp,o.onThumbPointerUp)})});OP.displayName=DP;var AP=`ScrollAreaCorner`,jP=w.forwardRef((e,t)=>{let n=fP(AP,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,U.jsx)(MP,{...e,ref:t}):null});jP.displayName=AP;var MP=w.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=fP(AP,n),[a,o]=w.useState(0),[s,c]=w.useState(0),l=!!(a&&s);return HP(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),HP(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,U.jsx)(hn.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function NP(e){return e?parseInt(e,10):0}function PP(e,t){let n=e/t;return isNaN(n)?0:n}function FP(e){let t=PP(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function IP(e,t,n,r=`ltr`){let i=FP(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return RP([c,l],d)(e)}function LP(e,t,n=`ltr`){let r=FP(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=en(e,n===`ltr`?[0,o]:[o*-1,0]);return RP([0,o],[0,s])(c)}function RP(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function zP(e,t){return e>0&&e<t}var BP=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function VP(e,t){let n=_n(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function HP(e,t){let n=_n(t);Zn(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var UP=pP,WP=hP,GP=jP;function KP({className:e,children:t,...n}){return(0,U.jsxs)(UP,{className:q(`relative overflow-hidden`,e),...n,children:[(0,U.jsx)(WP,{className:`h-full w-full rounded-[inherit]`,children:t}),(0,U.jsx)(qP,{}),(0,U.jsx)(GP,{})]})}function qP({className:e,orientation:t=`vertical`,...n}){return(0,U.jsx)(_P,{orientation:t,className:q(`flex touch-none select-none transition-colors`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent p-px`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent p-px`,e),...n,children:(0,U.jsx)(OP,{className:`relative flex-1 rounded-full bg-muted-foreground/40`})})}function JP(e){if(!e.tracesEnabled)return(0,U.jsx)(`div`,{className:`w-full rounded-sm border border-dashed border-border p-8 text-sm font-medium text-muted-foreground`,children:`Tracing is disabled`});let t=e.selectedTraceId.length===0?void 0:e.traces.find(t=>t.id===e.selectedTraceId),n=t===void 0||e.traceSessionDetailId!==t.sessionId?[]:e.traces.filter(e=>e.sessionId===t.sessionId);return(0,U.jsx)(`section`,{className:`grid h-full min-h-0 w-full content-stretch`,"aria-label":`Tracing`,children:e.selectedTraceId.length===0?(0,U.jsx)(YP,{agents:e.agents,traces:e.traces,traceLoadState:e.traceLoadState,onSelectTrace:e.onSelectTrace}):(0,U.jsx)(XP,{selectedTrace:t,selectedSessionTraces:n,selectedTraceId:e.selectedTraceId,traceLoadState:e.traceLoadState,onBack:()=>e.onSelectTrace(``),onShowSessionTraces:e.onShowSessionTraces})})}function YP(e){return(0,U.jsx)(Yc,{className:`min-h-0 overflow-hidden rounded-none border-x-0 border-t-0 border-border/80 bg-card/80`,"aria-label":`Traces`,children:(0,U.jsx)(KP,{className:`h-full min-h-0`,children:(0,U.jsxs)(`div`,{className:`min-w-280`,children:[(0,U.jsxs)(`div`,{className:`sticky top-0 z-10 grid min-h-11 grid-cols-[minmax(220px,1.3fr)_150px_120px_120px_120px_120px_110px_90px] items-center gap-4 border-b border-border/80 bg-card/95 px-6 font-mono text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground backdrop-blur`,children:[(0,U.jsx)(`span`,{children:`Trace`}),(0,U.jsx)(`span`,{children:`Session`}),(0,U.jsx)(`span`,{children:`Agent`}),(0,U.jsx)(`span`,{children:`Status`}),(0,U.jsx)(`span`,{children:`Started`}),(0,U.jsx)(`span`,{children:`Duration`}),(0,U.jsx)(`span`,{children:`First delta`}),(0,U.jsx)(`span`,{children:`Events`})]}),e.traceLoadState===`loading`&&e.traces.length===0?(0,U.jsx)(`div`,{className:`px-5 py-4 text-sm font-medium text-muted-foreground`,children:`Loading traces`}):null,e.traceLoadState===`idle`&&e.traces.length===0?(0,U.jsx)(`div`,{className:`px-5 py-4 text-sm font-medium text-muted-foreground`,children:`No traces found`}):null,e.traces.map(t=>(0,U.jsxs)(Qt,{className:`grid h-auto min-h-14 w-full grid-cols-[minmax(220px,1.3fr)_150px_120px_120px_120px_120px_110px_90px] items-center justify-start gap-4 whitespace-normal rounded-none border-0 border-b border-border/75 bg-transparent px-6 py-2.5 text-left text-muted-foreground shadow-none transition duration-200 hover:bg-accent/70 hover:text-accent-foreground`,type:`button`,variant:`ghost`,onClick:()=>e.onSelectTrace(t.id),children:[(0,U.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs font-medium text-muted-foreground`,children:t.id}),(0,U.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs font-medium`,children:t.sessionId}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium`,children:Vv(e.agents,t)}),(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-xs font-medium capitalize`,children:[(0,U.jsx)(`span`,{className:q(`h-2.5 w-2.5 shrink-0 rounded-full`,gF(t.status))}),(0,U.jsx)(`span`,{className:`min-w-0 truncate`,children:t.status})]}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium`,children:Lv(t.startedAt)}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium`,children:Uv(Rv(t.durationMs))}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium`,children:Uv(Rv(mF(t.observations)))}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium tabular-nums`,children:t.observationCount})]},t.id))]})})})}function XP(e){return(0,U.jsxs)(`div`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden`,children:[(0,U.jsxs)(`header`,{className:`grid min-h-16 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 overflow-hidden border-b border-border/80 bg-card/70 px-6 py-3 shadow-sm`,children:[(0,U.jsx)(Qt,{"aria-label":`Back to traces`,className:`h-8 min-h-8 w-8 text-muted-foreground hover:text-foreground`,size:`icon`,type:`button`,variant:`ghost`,onClick:e.onBack,children:(0,U.jsx)(A,{"aria-hidden":`true`})}),(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,U.jsx)(`strong`,{className:`min-w-0 truncate text-sm font-semibold text-foreground`,children:e.selectedTrace?.name??`Trace detail`}),(0,U.jsx)(`span`,{className:`flex min-w-0 items-center gap-2 overflow-hidden text-xs font-medium text-muted-foreground`,children:e.selectedTrace===void 0?e.traceLoadState===`loading`?`Loading trace`:`Trace not found`:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:q(`h-2 w-2 shrink-0 rounded-full`,gF(e.selectedTrace.status))}),(0,U.jsx)(`span`,{className:`shrink-0 capitalize`,children:e.selectedTrace.status}),(0,U.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:`/`}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[`Session`,` `,(0,U.jsx)(`span`,{className:`font-mono font-semibold`,children:e.selectedTrace.sessionId})]})]})})]}),(0,U.jsx)(`span`,{className:`hidden max-w-[42vw] truncate rounded-sm bg-muted px-2 py-1 font-mono text-xs font-medium text-muted-foreground md:block`,children:e.selectedTraceId})]}),(0,U.jsx)(`div`,{className:`min-h-0 min-w-0 overflow-hidden`,children:e.selectedTrace===void 0?(0,U.jsx)(Yc,{className:`grid h-full place-items-center rounded-sm border-border bg-card p-6 text-sm font-medium text-muted-foreground`,children:e.traceLoadState===`loading`?`Loading trace`:`Trace not found`}):(0,U.jsx)(ZP,{traces:e.selectedSessionTraces.length>0?e.selectedSessionTraces:[e.selectedTrace],onShowSessionTraces:e.onShowSessionTraces})})]})}function ZP(e){let t=(0,w.useMemo)(()=>[...e.traces].sort((e,t)=>Date.parse(e.startedAt)-Date.parse(t.startedAt)),[e.traces]),n=t[0]?.id??``,[r,i]=(0,w.useState)(n),[a,o]=(0,w.useState)(`trace`);(0,w.useEffect)(()=>{i(n),o(`trace`)},[n]);let s=t.find(e=>e.id===r)??t[0],c=s===void 0?[]:uF(s),l=(e,t)=>{i(e),o(t)};return s===void 0?(0,U.jsx)(`section`,{className:`grid h-full min-h-0 w-full place-items-center text-sm font-medium text-muted-foreground`,"aria-label":`Traces`,children:`No trace selected`}):(0,U.jsx)(`section`,{className:`grid h-full min-h-0 w-full content-stretch overflow-hidden`,"aria-label":`Traces`,children:(0,U.jsxs)(`div`,{className:`grid h-full min-h-0 grid-cols-[320px_minmax(0,1fr)] overflow-hidden max-md:grid-cols-1`,children:[(0,U.jsxs)(`nav`,{className:`grid min-h-0 auto-rows-min content-start overflow-auto border-r border-border/80 bg-card/35 max-md:max-h-80 max-md:border-b max-md:border-r-0`,"aria-label":`Trace timeline`,children:[(0,U.jsxs)(`div`,{className:`sticky top-0 z-30 flex min-h-11 items-center justify-between border-b border-border/80 bg-card/90 px-5 text-xs font-medium text-muted-foreground backdrop-blur`,children:[(0,U.jsx)(`span`,{children:`Search`}),(0,U.jsx)(`strong`,{className:`text-foreground`,children:`Timeline`})]}),t.map(e=>{let t=s.id===e.id,n=uF(e);return(0,U.jsxs)(`div`,{className:`contents`,children:[(0,U.jsx)(QP,{active:t&&a===`trace`,ancestorLevels:[],hasChildren:!0,isLastSibling:!0,level:0,tone:`trace`,title:e.name??`support-ticket-summary`,subtitle:Rv(e.durationMs),onSelect:()=>l(e.id,`trace`)}),(0,U.jsx)(QP,{active:t&&a===`agent`,ancestorLevels:[],hasChildren:n.length>0,isLastSibling:!0,level:1,tone:`agent`,title:`agent.run`,subtitle:Rv(e.durationMs),onSelect:()=>l(e.id,`agent`)}),n.map(r=>(0,U.jsxs)(`div`,{className:`contents`,children:[(0,U.jsx)(QP,{active:t&&a===`turn:${r.turn}`,ancestorLevels:[],hasChildren:r.observations.length>0,isLastSibling:r.turn===n.at(-1)?.turn,level:2,tone:`turn`,title:`turn.${r.turn}`,subtitle:Rv(r.durationMs),onSelect:()=>l(e.id,`turn:${r.turn}`)}),(0,U.jsx)($P,{activeKey:a,isLastTurn:r.turn===n.at(-1)?.turn,observations:r.observations,onSelect:t=>l(e.id,`observation:${t}`),traceActive:t})]},`${e.id}:turn:${r.turn}`))]},e.id)})]}),(0,U.jsx)(tF,{trace:s,turns:c,activeKey:a,onShowSessionTraces:e.onShowSessionTraces})]})})}function QP(e){let t=e=>22+e*22;return(0,U.jsxs)(Qt,{className:q(`relative grid h-auto min-h-0 w-full min-w-0 grid-cols-[20px_minmax(0,1fr)] items-start justify-start gap-2 whitespace-normal rounded-none border-0 bg-transparent px-3 py-2.5 text-left text-muted-foreground shadow-none transition duration-200 hover:bg-accent/70 hover:text-accent-foreground`,e.active&&`bg-primary/10 text-primary hover:bg-primary/10 hover:text-primary`),type:`button`,variant:`ghost`,onClick:e.onSelect,style:{paddingLeft:`${12+e.level*22}px`},children:[e.ancestorLevels.map(e=>(0,U.jsx)(`span`,{className:`pointer-events-none absolute inset-y-0 w-px bg-muted-foreground/35`,style:{left:`${t(e)}px`},"aria-hidden":`true`},`ancestor-line-${e}`)),e.level>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`pointer-events-none absolute top-0 w-px bg-muted-foreground/35`,style:{left:`${t(e.level-1)}px`,height:`18px`},"aria-hidden":`true`}),e.isLastSibling?null:(0,U.jsx)(`span`,{className:`pointer-events-none absolute bottom-0 w-px bg-muted-foreground/35`,style:{left:`${t(e.level-1)}px`,top:`18px`},"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`pointer-events-none absolute h-px bg-muted-foreground/35`,style:{left:`${t(e.level-1)}px`,top:`18px`,width:`22px`},"aria-hidden":`true`})]}):null,e.hasChildren?(0,U.jsx)(`span`,{className:`pointer-events-none absolute bottom-0 w-px bg-muted-foreground/35`,style:{left:`${t(e.level)}px`,top:`18px`},"aria-hidden":`true`}):null,(0,U.jsx)(`span`,{className:q(`relative z-10 grid h-5 w-5 place-items-center rounded-sm bg-transparent [&_svg]:h-3 [&_svg]:w-3 [&_svg]:opacity-100`,vF(e.tone)),children:(0,U.jsx)(_F,{tone:e.tone})}),(0,U.jsxs)(`span`,{className:`grid min-w-0 gap-0.5`,children:[(0,U.jsx)(`strong`,{className:`min-w-0 truncate text-sm font-medium leading-5 text-current`,children:e.title}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium text-muted-foreground`,children:e.subtitle})]})]})}function $P(e){let t=dF(e.observations);return(0,U.jsx)(U.Fragment,{children:t.map((n,r)=>(0,U.jsx)(eF,{activeKey:e.activeKey,ancestorLevels:e.isLastTurn?[]:[1],isLastSibling:r===t.length-1,level:3,node:n,onSelect:e.onSelect,traceActive:e.traceActive},n.observation.id))})}function eF(e){let t=yF(e.node.observation),n=e.isLastSibling?e.ancestorLevels:[...e.ancestorLevels,e.level];return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(QP,{active:e.traceActive&&e.activeKey===`observation:${e.node.observation.id}`,ancestorLevels:e.ancestorLevels,hasChildren:e.node.children.length>0,isLastSibling:e.isLastSibling,level:e.level,tone:e.node.observation.kind,title:pF(e.node.observation),subtitle:t.length>0?`${Rv(e.node.observation.durationMs)} · ${t}`:Rv(e.node.observation.durationMs),onSelect:()=>e.onSelect(e.node.observation.id)}),e.node.children.map((t,r)=>(0,U.jsx)(eF,{activeKey:e.activeKey,ancestorLevels:n,isLastSibling:r===e.node.children.length-1,level:e.level+1,node:t,onSelect:e.onSelect,traceActive:e.traceActive},t.observation.id))]})}function tF(e){let t=fF(e.trace,e.turns,e.activeKey);return(0,U.jsxs)(`section`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background`,"aria-label":`Trace detail`,children:[(0,U.jsx)(`header`,{className:`border-b border-border/80 bg-card/45 px-6 py-5`,children:(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-5`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,U.jsx)(`span`,{className:q(`grid h-8 w-8 shrink-0 place-items-center bg-primary text-primary-foreground [&_svg]:h-4 [&_svg]:w-4 [&_svg]:opacity-100`,t.tone!==`trace`&&`bg-muted text-foreground`,vF(t.tone)),children:(0,U.jsx)(_F,{tone:t.tone})}),(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,U.jsx)(`h2`,{className:`m-0 min-w-0 truncate text-2xl font-semibold leading-none tracking-[-0.01em] text-foreground`,children:t.title}),(0,U.jsx)(`div`,{className:`font-mono text-xs font-medium text-muted-foreground`,children:t.startedAt})]})]}),t.usage.length>0?(0,U.jsx)(`div`,{className:`shrink-0 font-mono text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:t.usage}):null]}),(0,U.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(150px,1fr))] gap-px overflow-hidden border border-border/80 bg-border/80`,children:[(0,U.jsx)(nF,{label:`Duration`,value:Rv(t.durationMs)}),t.firstDeltaMs===void 0?null:(0,U.jsx)(nF,{label:`First delta`,value:Rv(t.firstDeltaMs)}),(0,U.jsxs)(`button`,{className:`grid min-w-0 gap-1 bg-background px-4 py-3 text-left transition duration-200 hover:bg-accent hover:text-accent-foreground`,type:`button`,onClick:()=>e.onShowSessionTraces(e.trace.sessionId),children:[(0,U.jsx)(`span`,{className:`font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Session`}),(0,U.jsx)(`span`,{className:`min-w-0 truncate font-mono text-sm font-semibold text-current`,children:e.trace.sessionId})]})]})]})}),(0,U.jsx)(`div`,{className:`min-w-0 overflow-auto`,children:(0,U.jsxs)(`div`,{className:`grid min-w-0 content-start gap-6 p-6`,children:[t.input===void 0?null:(0,U.jsx)(rF,{title:`Input`,value:t.input}),t.output===void 0?null:(0,U.jsx)(rF,{title:`Output`,value:t.output,tone:`success`}),t.error===void 0?null:(0,U.jsx)(rF,{title:`Error`,value:t.error,tone:`error`}),(0,U.jsx)(rF,{title:`Metadata`,value:t.metadata,compact:!0})]})})]})}function nF(e){return(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-1 bg-background px-4 py-3`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:e.label}),(0,U.jsx)(`span`,{className:`min-w-0 truncate font-mono text-sm font-semibold text-foreground`,children:e.value})]})}function rF(e){let t=iF(e.title,e.value);return(0,U.jsxs)(`section`,{className:`grid min-w-0 gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,U.jsx)(`h3`,{className:`m-0 text-lg font-semibold leading-tight text-foreground`,children:e.title}),(0,U.jsx)(`span`,{className:`h-px flex-1 bg-border/80`,"aria-hidden":`true`})]}),(0,U.jsx)(`div`,{className:`grid min-w-0 gap-3`,children:t.map(t=>(0,U.jsxs)(`article`,{className:q(`grid min-w-0 gap-3 bg-card/65 px-4 py-4`,e.compact&&`grid-cols-[150px_minmax(0,1fr)] items-start gap-4 max-lg:grid-cols-1`,e.tone===`success`&&`bg-primary/[0.08]`,e.tone===`error`&&`bg-destructive/10`),children:[(0,U.jsx)(`span`,{className:`font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:t.label}),(0,U.jsx)(`p`,{className:q(`m-0 whitespace-pre-wrap text-[15px] leading-7 text-foreground [overflow-wrap:anywhere]`,e.compact&&`font-mono text-[13px] leading-6`,e.tone===`success`&&`text-primary`,e.tone===`error`&&`text-destructive`),children:t.text})]},`${t.label}-${t.text}`))})]})}function iF(e,t){let n=aF(t,e);if(n.length>0)return n;if(!Pv(t))return[{label:e,text:lF(t)}];let r=[];for(let[e,n]of Object.entries(t)){let t=aF(n,e);if(t.length>0){r.push(...t);continue}r.push({label:sF(e),text:lF(n)})}return r.length>0?r:[{label:e,text:`Empty object`}]}function aF(e,t){if(typeof e==`string`)return[{label:`Value`,text:e}];if(Array.isArray(e))return e.map((e,n)=>({label:oF(e,n,t),text:qN(e)||Gv(e)})).filter(e=>e.text.length>0);if(!Pv(e))return[];let n=Array.isArray(e.chatHistory)?e.chatHistory:void 0;if(n!==void 0){let t=cF(e);return t.push(...aF(n,`chatHistory`)),t}if(Array.isArray(e.prompt))return aF(e.prompt,`prompt`);let r=[];r.push(...cF(e));let i=Array.isArray(e.history)?e.history:[];i.length>0&&r.push(...aF(i,`history`));let a=qN(e.prompt);return a.length>0&&r.push({label:i.length>0?`Current prompt`:`Prompt`,text:a}),r}function oF(e,t,n){if(Pv(e)){let t=typeof e.type==`string`?e.type:void 0;if(n===`choice`){if(t===`text`)return`Assistant output`;if(t===`reasoning`)return`Reasoning`}if(t===`reasoning`)return`Reasoning`;if(typeof e.role==`string`)return sF(e.role);if(t!==void 0)return sF(t)}return`${n===void 0?`Item`:`${sF(n)} item`} ${t+1}`}function sF(e){return e.replace(/[_-]+/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).trim().replace(/\b\w/g,e=>e.toUpperCase())}function cF(e){let t=e.instructions;return typeof t!=`string`||t.trim().length===0?[]:[{label:`System prompt`,text:t}]}function lF(e){if(e===void 0)return`undefined`;if(e===null)return`null`;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e,null,2)}catch{return String(e)}}function uF(e){let t=new Map;for(let n of e.observations){let e=Number.isFinite(n.turn)?n.turn:t.size+1;t.set(e,[...t.get(e)??[],n])}return[...t.entries()].sort(([e],[t])=>e-t).map(([e,t])=>({turn:e,observations:t,durationMs:t.reduce((e,t)=>e+(t.durationMs??0),0)}))}function dF(e){let t=new Map;for(let n of e)t.set(n.id,{observation:n,children:[]});let n=[];for(let r of e){let e=t.get(r.id);if(e===void 0)continue;let i=r.parentObservationId,a=i===void 0?void 0:t.get(i);a===void 0?n.push(e):a.children.push(e)}return n}function fF(e,t,n){if(n===`agent`)return{title:`agent.run`,tone:`agent`,startedAt:Iv(e.startedAt),durationMs:e.durationMs,firstDeltaMs:mF(e.observations),usage:zv(e.usage),input:e.input,output:e.output,error:e.error,metadata:e.metadata??{}};if(n.startsWith(`turn:`)){let r=Number(n.slice(5)),i=t.find(e=>e.turn===r);return{title:`turn.${Number.isFinite(r)?r:1}`,tone:`turn`,startedAt:Iv(i?.observations[0]?.startedAt??e.startedAt),durationMs:i?.durationMs,firstDeltaMs:mF(i?.observations??[]),usage:bF(i?.observations??[]),input:i?.observations[0]?.input,output:i?.observations.at(-1)?.output,metadata:{turn:r,observations:i?.observations.length??0}}}if(n.startsWith(`observation:`)){let t=n.slice(12),r=e.observations.find(e=>e.id===t);if(r!==void 0)return{title:pF(r),tone:r.kind,startedAt:Iv(r.startedAt),durationMs:r.durationMs,firstDeltaMs:hF(r.metadata),usage:yF(r),input:r.input,output:r.output,error:r.error,metadata:{status:r.status,parentObservationId:r.parentObservationId??null,turn:r.turn,startedAt:r.startedAt,endedAt:r.endedAt??null,...r.metadata??{}}}}return{title:e.name??`support-ticket-summary`,tone:`trace`,startedAt:Iv(e.startedAt),durationMs:e.durationMs,firstDeltaMs:mF(e.observations),usage:zv(e.usage),input:e.input,output:e.output,error:e.error,metadata:e.metadata??{}}}function pF(e){return e.kind===`agent`?e.name:e.kind===`tool`?`tool.${e.name}`:e.name}function mF(e){for(let t of e){let e=hF(t.metadata);if(e!==void 0)return e}}function hF(e){if(!(!Pv(e)||typeof e.firstDeltaMs!=`number`))return e.firstDeltaMs}function gF(e){switch(e){case`success`:return`bg-primary`;case`error`:return`bg-destructive`;case`running`:return`bg-chart-2`}}function _F(e){switch(e.tone){case`trace`:return(0,U.jsx)(V,{"aria-hidden":`true`});case`agent`:return(0,U.jsx)(M,{"aria-hidden":`true`});case`turn`:return(0,U.jsx)(L,{"aria-hidden":`true`});case`generation`:return(0,U.jsx)(ee,{"aria-hidden":`true`});case`tool`:return(0,U.jsx)(H,{"aria-hidden":`true`})}}function vF(e){switch(e){case`trace`:return`bg-primary text-background`;case`agent`:return`bg-chart-2 text-background`;case`turn`:return`bg-chart-4 text-background`;case`generation`:return`bg-chart-1 text-background`;case`tool`:return`bg-chart-5 text-background`}}function yF(e){return!Pv(e.output)||!Pv(e.output.usage)?``:xF(e.output.usage)}function bF(e){return e.map(yF).filter(e=>e.length>0).join(` + `)}function xF(e){let t=typeof e.inputTokens==`number`?e.inputTokens:0,n=typeof e.outputTokens==`number`?e.outputTokens:0,r=typeof e.totalTokens==`number`?e.totalTokens:t+n;return r===0?``:`${t} -> ${n} (Σ ${r})`}function SF(){document.documentElement.classList.add(`dark`)}async function CF(e,t){let n=``;try{let t=await e.json();typeof t==`object`&&t&&`error`in t&&typeof t.error==`object`&&t.error!==null&&`message`in t.error&&typeof t.error.message==`string`&&(n=`: ${t.error.message}`)}catch{}return`${t} with HTTP ${e.status}${n}`}function wF(){let e=kN(),[t,n]=(0,w.useState)(),[r,i]=(0,w.useState)(``),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(``),[d,f]=(0,w.useState)(``),[p,m]=(0,w.useState)([]),[h,g]=(0,w.useState)([]),[_,v]=(0,w.useState)([]),[y,b]=(0,w.useState)(),[x,S]=(0,w.useState)([]),[C,T]=(0,w.useState)([]),[E,D]=(0,w.useState)([]),[O,k]=(0,w.useState)(``),[A,M]=(0,w.useState)(`"Hello from Studio"`),[N,P]=(0,w.useState)(``),[ee,F]=(0,w.useState)(``),[I,L]=(0,w.useState)(()=>e.page),[te,ne]=(0,w.useState)(()=>e.traceId??``),[R,B]=(0,w.useState)(()=>e.traceSessionId),[re,V]=(0,w.useState)(),[ie,oe]=(0,w.useState)(`Loading`),[,H]=(0,w.useState)(``),[se,ce]=(0,w.useState)(`idle`),[le,ue]=(0,w.useState)(()=>new Set),[de,fe]=(0,w.useState)(()=>new Set),[pe,me]=(0,w.useState)(`idle`),[he,ge]=(0,w.useState)(`idle`),[_e,ve]=(0,w.useState)(`idle`),[ye,be]=(0,w.useState)(),[xe,Se]=(0,w.useState)(`idle`),[Ce,we]=(0,w.useState)(),[Te,Ee]=(0,w.useState)(`idle`),[De,Oe]=(0,w.useState)(),[ke,Ae]=(0,w.useState)(`idle`),[je,Me]=(0,w.useState)(`idle`),[Ne,Pe]=(0,w.useState)(`idle`),[Fe,Ie]=(0,w.useState)(`idle`),[Le,Re]=(0,w.useState)(`idle`),ze=(0,w.useRef)(null),Be=(0,w.useCallback)(async()=>{oe(`Loading`),H(``);try{let e=await fetch(`/config`);if(e.status===401){oe(`Authentication required`);return}if(!e.ok)throw Error(`Config failed with HTTP ${e.status}`);let t=await e.json();n(t),i(e=>e||t.agents[0]?.id||``),o(e=>e||t.agents[0]?.id||``),c(e=>e||t.agents[0]?.id||``),u(e=>e||t.pipelines[0]?.id||``),oe(`Connected`)}catch(e){H(Jv(e)),oe(`Config error`)}},[]);(0,w.useEffect)(()=>{Be()},[Be]);let Ve=t?.capabilities.sessions?.enabled===!0,He=t?.capabilities.traces?.enabled===!0,Ue=t?.capabilities.knowledge?.enabled===!0,We=t?.capabilities.mcps?.enabled===!0,Ge=t?.capabilities.tools?.enabled===!0,Ke=t?.capabilities.pipelines?.enabled===!0;(0,w.useEffect)(()=>{SF()},[]);let qe=(0,w.useCallback)(async()=>{if(!Ve){m([]);return}try{let e=await fetch(`/sessions?limit=100`);if(!e.ok)throw Error(`Sessions failed with HTTP ${e.status}`);m((await e.json()).sessions)}catch(e){H(Jv(e))}},[Ve]);(0,w.useEffect)(()=>{qe()},[qe]);let Je=(0,w.useCallback)(async e=>{if(!Ve)return v([]),[];ge(`loading`);try{let t=new URLSearchParams({limit:`1000`}),n=await fetch(`/sessions/${encodeURIComponent(e)}/logs?${t}`);if(!n.ok)throw Error(`Session logs failed with HTTP ${n.status}`);let r=await n.json();return v(r.logs),r.logs}catch(e){return H(Jv(e)),v([]),[]}finally{ge(`idle`)}},[Ve]);async function Ye(e){let t=kt?.id??r,n=await fetch(`/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agentId:t,title:e,metadata:{source:`anvia-studio`}})});if(!n.ok)throw Error(await CF(n,`Session create failed`));let i=await n.json();return f(i.id),m(e=>[i,...e.filter(e=>e.id!==i.id)]),MN(i.id),await Je(i.id),i}let Xe=(0,w.useCallback)(async()=>{if(!He){g([]);return}ve(`loading`);try{let e=new URLSearchParams({limit:`50`}),t=await fetch(`/traces?${e.toString()}`);if(!t.ok)throw Error(`Traces failed with HTTP ${t.status}`);let n=await t.json(),r=await Promise.all(n.traces.map(async e=>{let t=await fetch(`/traces/${encodeURIComponent(e.id)}`);if(!t.ok)throw Error(`Trace load failed with HTTP ${t.status}`);return await t.json()}));if(te.length>0&&!r.some(e=>e.id===te)){let e=await fetch(`/traces/${encodeURIComponent(te)}`);if(e.ok){g([await e.json(),...r]);return}}g(r)}catch(e){H(Jv(e))}finally{ve(`idle`)}},[te,He]),Ze=(0,w.useCallback)(async(e,t={})=>{if(He){ve(`loading`);try{let n=new URLSearchParams({limit:`50`,sessionId:e}),r=await fetch(`/traces?${n.toString()}`);if(!r.ok)throw Error(`Session traces failed with HTTP ${r.status}`);let i=await r.json(),a=[...await Promise.all(i.traces.map(async e=>{let t=await fetch(`/traces/${encodeURIComponent(e.id)}`);if(!t.ok)throw Error(`Trace load failed with HTTP ${t.status}`);return await t.json()}))].sort((e,t)=>Date.parse(e.startedAt)-Date.parse(t.startedAt));g(a);let o=a[0]?.id;if(o===void 0){ne(``),B(e),t.updatePath!==!1&&PN(e);return}L(`tracing`),ne(o),B(e),t.updatePath!==!1&&PN(e)}catch(e){H(Jv(e))}finally{ve(`idle`)}}},[He]),Qe=(0,w.useCallback)(async e=>{if(!He)return[];let t=new URLSearchParams({limit:`100`}),n=await fetch(`/sessions/${encodeURIComponent(e)}/traces?${t}`);return n.ok?(await n.json()).traces:[]},[He]);(0,w.useEffect)(()=>{I!==`tracing`||R!==void 0||Xe()},[I,Xe,R]);let $e=(0,w.useCallback)(async()=>{if(!Ue){be(void 0);return}Se(`loading`);try{let e=await fetch(`/knowledge?limit=25`);if(!e.ok)throw Error(`Knowledge failed with HTTP ${e.status}`);be(await e.json())}catch(e){H(Jv(e))}finally{Se(`idle`)}},[Ue]);(0,w.useEffect)(()=>{I===`knowledge`&&$e()},[I,$e]);let et=(0,w.useCallback)(async e=>{if(!We||e.length===0){we(void 0);return}Ee(`loading`);try{let t=await fetch(`/agents/${encodeURIComponent(e)}/mcps`);if(!t.ok)throw Error(`MCPs failed with HTTP ${t.status}`);we(await t.json())}catch(e){H(Jv(e)),we(void 0)}finally{Ee(`idle`)}},[We]);(0,w.useEffect)(()=>{I===`mcps`&&et(a||r)},[I,et,a,r]);let tt=(0,w.useCallback)(async e=>{if(!Ge||e.length===0){Oe(void 0);return}Ae(`loading`);try{let t=await fetch(`/agents/${encodeURIComponent(e)}/tools`);if(!t.ok)throw Error(`Tools failed with HTTP ${t.status}`);Oe(await t.json())}catch(e){H(Jv(e)),Oe(void 0)}finally{Ae(`idle`)}},[Ge]);(0,w.useEffect)(()=>{I===`tools`&&tt(s||r)},[I,tt,r,s]);let nt=(0,w.useCallback)(async e=>{if(!Ke||e.length===0)return S([]),[];Pe(`loading`);try{let t=new URLSearchParams({limit:`1000`}),n=await fetch(`/pipelines/${encodeURIComponent(e)}/logs?${t}`);if(!n.ok)throw Error(`Pipeline logs failed with HTTP ${n.status}`);let r=await n.json();return S(r.logs),r.logs}catch(e){return H(Jv(e)),S([]),[]}finally{Pe(`idle`)}},[Ke]),rt=(0,w.useCallback)(async e=>{if(!Ke||e.length===0)return T([]),[];Ie(`loading`);try{let t=new URLSearchParams({limit:`50`}),n=await fetch(`/pipelines/${encodeURIComponent(e)}/runs?${t}`);if(!n.ok)throw Error(`Pipeline runs failed with HTTP ${n.status}`);let r=await n.json();return T(r.runs),r.runs}catch(e){return H(Jv(e)),T([]),[]}finally{Ie(`idle`)}},[Ke]),it=(0,w.useCallback)(async e=>{if(!Ke||e.length===0){b(void 0),S([]),T([]);return}Me(`loading`),H(``);try{let t=await fetch(`/pipelines/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Pipeline load failed with HTTP ${t.status}`);u(e),b(await t.json()),await Promise.all([nt(e),rt(e)])}catch(e){H(Jv(e)),b(void 0)}finally{Me(`idle`)}},[nt,rt,Ke]);(0,w.useEffect)(()=>{if(I!==`pipelines`)return;let e=l||t?.pipelines[0]?.id||``;e.length>0&&it(e)},[I,t?.pipelines,it,l]);let at=(0,w.useCallback)(async(e,t={})=>{if(se!==`running`){me(`loading`),H(``);try{let n=await fetch(`/sessions/${encodeURIComponent(e)}`);if(!n.ok)throw Error(`Session load failed with HTTP ${n.status}`);let r=await n.json(),[a]=await Promise.all([Qe(r.id),Je(r.id)]);RN(WN(r.transcript)),i(r.agentId),f(r.id),D(AF(r.transcript,a)),t.updatePath!==!1&&(L(`playground`),MN(r.id)),oe(`Connected`)}catch(e){H(Jv(e))}finally{me(`idle`)}}},[se,Qe,Je]),ot=(0,w.useCallback)((e={})=>{se!==`running`&&(zN(),f(``),v([]),D([]),k(``),L(`playground`),H(``),e.updatePath!==!1&&MN(void 0),requestAnimationFrame(()=>HN(ze.current)))},[se]),st=(0,w.useCallback)(e=>{se===`running`||e===r||(i(e),zN(),f(``),v([]),D([]),k(``),L(`playground`),H(``),MN(void 0),requestAnimationFrame(()=>HN(ze.current)))},[se,r]);async function ct(e){if(se!==`running`){H(``);try{let t=await fetch(`/sessions/${encodeURIComponent(e.id)}`,{method:`DELETE`});if(!t.ok)throw Error(`Session delete failed with HTTP ${t.status}`);m(t=>t.filter(t=>t.id!==e.id)),g(t=>t.filter(t=>t.sessionId!==e.id)),d===e.id&&(zN(),f(``),v([]),D([]),k(``),I===`playground`&&MN(void 0)),oe(`Connected`)}catch(e){H(Jv(e))}finally{V(void 0)}}}(0,w.useEffect)(()=>{if(!Ve)return;let e=kN();if(L(e.page),ne(e.traceId??``),B(e.traceSessionId),e.page===`tracing`&&e.traceSessionId!==void 0){Ze(e.traceSessionId,{updatePath:!1});return}e.page!==`playground`||e.sessionId===void 0||e.sessionId===d||at(e.sessionId,{updatePath:!1})},[d,Ve,at,Ze]),(0,w.useEffect)(()=>{function e(){let e=kN();if(L(e.page),ne(e.traceId??``),B(e.traceSessionId),e.page===`tracing`&&e.traceSessionId!==void 0){Ze(e.traceSessionId,{updatePath:!1});return}if(e.page===`playground`){if(e.sessionId===void 0){ot({updatePath:!1});return}at(e.sessionId,{updatePath:!1})}}return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[at,Ze,ot]);async function lt(e){let t=e.trim(),n=kt?.id??r;if(!(t.length===0||n.length===0||se===`running`)){ce(`running`),L(`playground`),H(``),k(``),requestAnimationFrame(()=>HN(ze.current)),D(e=>[...e,{entryId:UN(),kind:`message`,role:`user`,text:t}]);try{let e=Ve&&d.length===0?(await Ye(qv(t))).id:d,r=Ve?void 0:BN(E),i=await fetch(`/agents/${encodeURIComponent(n)}/runs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({message:t,...e.length===0?{}:{sessionId:e},...r===void 0?{}:{history:r},stream:!0,metadata:{source:`anvia-studio`}})});if(i.status===401)throw Error(`Authentication required`);if(!i.ok||i.body===null)throw Error(`Run failed with HTTP ${i.status}`);if(await YN(i.body,async e=>{dt(e)&&await XN()}),await qe(),e.length>0){f(e);let[t]=await Promise.all([Qe(e),Je(e)]);D(e=>AF(e,t))}oe(`Connected`)}catch(e){let t=Jv(e);H(t),mt(`\n${t}`)}finally{ce(`idle`)}}}async function ut(){let e=l||t?.pipelines[0]?.id||``;if(e.length===0||Le===`running`)return;let n;try{n=JSON.parse(A)}catch{H(`Pipeline input must be valid JSON`);return}Re(`running`),P(``),F(``),H(``);try{let t=await fetch(`/pipelines/${encodeURIComponent(e)}/runs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({input:n,stream:!0,metadata:{source:`anvia-studio`}})});if(!t.ok||t.body===null)throw Error(await CF(t,`Pipeline run failed`));await YN(t.body,async e=>{if(EF(e)){e.log.runId!==void 0&&F(t=>t||e.log.runId||``),pt(e.log),await XN();return}if(DF(e)){P(JSON.stringify(e.output,null,2)),await XN();return}if(OF(e))throw Error(JSON.stringify(e.error))}),await Promise.all([nt(e),rt(e)]),oe(`Connected`)}catch(e){H(Jv(e))}finally{Re(`idle`)}}function dt(e){return e.type===`text_delta`?(mt(e.delta),!0):e.type===`reasoning_delta`?(yt(e.delta,e.id),!0):e.type===`tool_call`?(bt(e.toolCall.function.name,Gv(e.toolCall.function.arguments),e.toolCall.callId??e.toolCall.id),!0):e.type===`tool_result`?(xt({toolName:e.toolName,callId:e.toolCallId,args:e.args,result:e.result}),!0):e.type===`agent_tool_event`?(St(e),!0):e.type===`tool_approval_request`||e.type===`tool_approval_result`?(W(e.approval),!0):e.type===`tool_question_request`||e.type===`tool_question_result`?(gt(e.question),!0):e.type===`session_log`?(ft(e.log),!0):e.type===`final`&&e.trace?.traceId!==void 0?(ht(e.trace.traceId),!0):(e.type===`error`&&H(JSON.stringify(e.error)),!1)}function ft(e){v(t=>t.some(t=>t.id===e.id)?t:[...t,e].sort((e,t)=>e.sequence-t.sequence))}function pt(e){S(t=>t.some(t=>t.id===e.id)?t:[...t,e].sort((e,t)=>e.sequence-t.sequence))}function mt(e){D(t=>{let n=[...t],r=n.at(-1);return r?.kind===`message`&&r.role===`assistant`?n[n.length-1]={...r,text:`${r.text}${e}`}:n.push({entryId:UN(),kind:`message`,role:`assistant`,text:e}),n})}function ht(e){D(t=>{let n=[...t];for(let t=n.length-1;t>=0;--t){let r=n[t];if(r?.kind===`message`&&r.role===`assistant`){n[t]={...r,traceId:e};break}}return n})}function W(e){D(t=>{let n=[...t],r=KN(n,e.toolName,e.callId);if(r<0)return n.push({entryId:UN(),kind:`tool`,toolName:e.toolName,...e.callId===void 0?{}:{callId:e.callId},approval:{id:e.id,status:e.status,requestedAt:e.requestedAt,...e.resolvedAt===void 0?{}:{resolvedAt:e.resolvedAt},...e.reason===void 0?{}:{reason:e.reason}}}),n;let i=n[r];return i!==void 0&&i.kind===`tool`&&(n[r]={...i,approval:{id:e.id,status:e.status,requestedAt:e.requestedAt,...e.resolvedAt===void 0?{}:{resolvedAt:e.resolvedAt},...e.reason===void 0?{}:{reason:e.reason}}}),n})}function gt(e){D(t=>{let n=[...t],r=KN(n,e.toolName,e.callId);if(r<0)return n.push({entryId:UN(),kind:`tool`,toolName:e.toolName,...e.callId===void 0?{}:{callId:e.callId},question:{id:e.id,status:e.status,requestedAt:e.requestedAt,...e.answeredAt===void 0?{}:{answeredAt:e.answeredAt},questions:e.questions,...e.answers===void 0?{}:{answers:e.answers}}}),n;let i=n[r];return i!==void 0&&i.kind===`tool`&&(n[r]={...i,question:{id:e.id,status:e.status,requestedAt:e.requestedAt,...e.answeredAt===void 0?{}:{answeredAt:e.answeredAt},questions:e.questions,...e.answers===void 0?{}:{answers:e.answers}}}),n})}async function _t(e,t){if(!le.has(e)){ue(t=>new Set(t).add(e)),H(``);try{let n=await fetch(`/approvals/${encodeURIComponent(e)}/decision`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({approved:t})});if(!n.ok)throw Error(`Approval decision failed with HTTP ${n.status}`);W(await n.json())}catch(e){H(Jv(e))}finally{ue(t=>{let n=new Set(t);return n.delete(e),n})}}}async function vt(e,t){if(!de.has(e)){fe(t=>new Set(t).add(e)),H(``);try{let n=await fetch(`/questions/${encodeURIComponent(e)}/answer`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({answers:t})});if(!n.ok)throw Error(`Question answer failed with HTTP ${n.status}`);gt(await n.json())}catch(e){H(Jv(e))}finally{fe(t=>{let n=new Set(t);return n.delete(e),n})}}}function yt(e,t){D(n=>{let r=[...n],i=r.at(-1);return i?.kind===`reasoning`&&(i.reasoningId??``)===(t??``)?r[r.length-1]={...i,text:`${i.text}${e}`}:r.push({entryId:UN(),kind:`reasoning`,...t===void 0?{}:{reasoningId:t},text:e}),r})}function bt(e,t,n){D(r=>[...r,{entryId:UN(),kind:`tool`,toolName:e,...n===void 0?{}:{callId:n},...t.length===0?{}:{args:t}}])}function xt(e){D(t=>{let n=[...t],r=GN(n,e.toolName,e.callId);if(r>=0){let t=n[r];if(t!==void 0&&t.kind===`tool`)return n[r]={...t,args:t.args??e.args,result:e.result},n}return n.push({entryId:UN(),kind:`tool`,toolName:e.toolName,...e.callId===void 0?{}:{callId:e.callId},args:e.args,result:e.result}),n})}function St(e){let t=Ct(e);t!==void 0&&D(n=>{let r=[...n],i=GN(r,e.toolName,e.toolCallId);if(i<0)return r.push({entryId:UN(),kind:`tool`,toolName:e.toolName,...e.toolCallId===void 0?{}:{callId:e.toolCallId},childEvents:[t]}),r;let a=r[i];if(a===void 0||a.kind!==`tool`)return r;let o=[...a.childEvents??[]];return wt(o,t),r[i]={...a,childEvents:o},r})}function Ct(e){let t=e.event;if(t.type===`text_delta`)return{kind:`message`,agentId:e.agentId,...e.agentName===void 0?{}:{agentName:e.agentName},text:t.delta};if(t.type===`reasoning_delta`)return{kind:`reasoning`,agentId:e.agentId,...e.agentName===void 0?{}:{agentName:e.agentName},...t.id===void 0?{}:{reasoningId:t.id},text:t.delta};if(t.type===`tool_call`)return{kind:`tool`,agentId:e.agentId,...e.agentName===void 0?{}:{agentName:e.agentName},toolName:t.toolCall.function.name,...t.toolCall.callId===void 0&&t.toolCall.id===void 0?{}:{callId:t.toolCall.callId??t.toolCall.id},args:Gv(t.toolCall.function.arguments)};if(t.type===`tool_result`)return{kind:`tool`,agentId:e.agentId,...e.agentName===void 0?{}:{agentName:e.agentName},toolName:t.toolName,...t.toolCallId===void 0?{}:{callId:t.toolCallId},args:t.args,result:t.result};if(t.type===`error`)return{kind:`message`,agentId:e.agentId,...e.agentName===void 0?{}:{agentName:e.agentName},text:`Error: ${Jv(t.error)}`}}function wt(e,t){if(t.kind===`message`){let n=e.at(-1);n?.kind===`message`&&n.agentId===t.agentId?e[e.length-1]={...n,text:`${n.text}${t.text}`}:e.push(t);return}if(t.kind===`reasoning`){let n=e.at(-1);n?.kind===`reasoning`&&n.agentId===t.agentId&&(n.reasoningId??``)===(t.reasoningId??``)?e[e.length-1]={...n,text:`${n.text}${t.text}`}:e.push(t);return}let n=Tt(e,t);if(n<0){e.push(t);return}let r=e[n];r?.kind===`tool`&&(e[n]={...r,...r.args!==void 0||t.args===void 0?{}:{args:t.args},...t.result===void 0?{}:{result:t.result}})}function Tt(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(!(r?.kind!==`tool`||r.agentId!==t.agentId||r.toolName!==t.toolName||r.result!==void 0)&&(t.callId===void 0||r.callId===t.callId))return n}return-1}function G(e){k(VN(e)),HN(e.currentTarget)}function Et(e){e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),lt(O))}let Dt=t?.agents??[],Ot=t?.pipelines??[],kt=Dt.find(e=>e.id===r)??Dt[0]??void 0,At=kt?.quickPrompts??[],jt=E.length>0;function Mt(e){if(L(e),e===`pipelines`){let e=l||Ot[0]?.id||``;e.length>0&&(u(e),it(e))}if(e===`tracing`){ne(``),B(void 0),jN(`tracing`);return}if(ne(``),B(void 0),e===`playground`&&d.length>0){MN(d);return}jN(e)}function K(e){if(L(`tracing`),ne(e),B(void 0),e.length===0){jN(`tracing`);return}NN(e)}return(0,U.jsxs)(`div`,{className:`grid min-h-[100dvh] overflow-hidden bg-background text-foreground lg:grid-cols-[228px_minmax(0,1fr)]`,children:[(0,U.jsxs)(`aside`,{className:`flex min-h-[100dvh] flex-col border-r border-sidebar-border bg-sidebar/95 text-sidebar-foreground shadow-xl shadow-black/20`,children:[(0,U.jsx)(`div`,{className:`flex h-15 items-center border-b border-sidebar-border/80 px-4`,children:(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,U.jsx)(`img`,{className:`h-7 w-7 shrink-0 object-contain`,src:ON,alt:``}),(0,U.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,U.jsx)(`span`,{className:`anvia-wordmark text-[1.08rem] font-semibold tracking-normal text-sidebar-foreground`,children:`Anvia Studio`})})]})}),(0,U.jsxs)(`nav`,{className:`grid gap-1 border-b border-sidebar-border/80 px-3 py-3`,"aria-label":`Main`,children:[(0,U.jsx)(`div`,{className:`px-2 pb-1 font-mono text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:`Workspace`}),(0,U.jsx)(ZN,{active:I===`playground`,icon:`message`,label:`Chat`,onClick:()=>Mt(`playground`)}),(0,U.jsx)(ZN,{active:I===`pipelines`,icon:`workflow`,label:`Pipelines`,disabled:!Ke,onClick:()=>Mt(`pipelines`)}),(0,U.jsx)(ZN,{active:I===`sessions`,icon:`list`,label:`Sessions`,onClick:()=>Mt(`sessions`)}),(0,U.jsx)(ZN,{active:I===`tracing`,icon:`activity`,label:`Traces`,onClick:()=>Mt(`tracing`)})]}),(0,U.jsxs)(`nav`,{className:`grid gap-1 border-b border-sidebar-border/80 px-3 py-3`,"aria-label":`Studio`,children:[(0,U.jsx)(`div`,{className:`px-2 pb-1 font-mono text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:`Inspect`}),(0,U.jsx)(ZN,{active:I===`agents`,icon:`bot`,label:`Studio`,onClick:()=>Mt(`agents`)}),(0,U.jsx)(ZN,{active:I===`tools`,icon:`wrench`,label:`Tools`,onClick:()=>Mt(`tools`)}),(0,U.jsx)(ZN,{active:I===`mcps`,icon:`plug`,label:`MCPs`,onClick:()=>Mt(`mcps`)}),(0,U.jsx)(ZN,{active:I===`knowledge`,icon:`database`,label:`Knowledge`,onClick:()=>Mt(`knowledge`)})]}),(0,U.jsxs)(`nav`,{className:`grid min-h-0 gap-1 overflow-auto border-b border-sidebar-border/80 px-3 py-3`,"aria-label":`Recent sessions`,children:[(0,U.jsx)(`div`,{className:`px-2 pb-1 font-mono text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:`Recent`}),p.slice(0,8).map(e=>(0,U.jsxs)(`div`,{className:q(`group grid min-h-9 min-w-0 grid-cols-[minmax(0,1fr)_24px] items-center gap-1 rounded-sm border border-transparent pr-1 transition duration-200 hover:border-sidebar-border hover:bg-sidebar-accent`,e.id===d&&`border-sidebar-border bg-sidebar-accent`),children:[(0,U.jsxs)(Qt,{className:q(`grid h-auto min-h-8 min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2 rounded-sm border-0 bg-transparent px-2 py-1 text-left text-sidebar-foreground/72 shadow-none hover:bg-transparent hover:text-sidebar-foreground`,e.id===d&&`text-sidebar-accent-foreground`),type:`button`,variant:`ghost`,onClick:()=>void at(e.id),children:[(0,U.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium`,children:e.title??`Untitled chat`}),(0,U.jsx)(`time`,{className:`font-mono text-[10px] font-medium tabular-nums text-muted-foreground`,children:Fv(e.updatedAt)})]}),(0,U.jsx)(Qt,{"aria-label":`Delete ${e.title??`Untitled chat`}`,className:`h-6 min-h-6 w-6 border-0 bg-transparent p-0 text-muted-foreground opacity-55 shadow-none hover:bg-transparent hover:text-destructive hover:opacity-100 group-hover:opacity-100 [&_svg]:h-3.5 [&_svg]:w-3.5`,size:`icon`,type:`button`,variant:`ghost`,disabled:se===`running`,onClick:()=>V(e),children:(0,U.jsx)(ae,{"aria-hidden":`true`})})]},e.id))]}),(0,U.jsxs)(`div`,{className:`mt-auto border-t border-sidebar-border/80 px-3 py-3`,children:[(0,U.jsxs)(`nav`,{className:`grid gap-1`,"aria-label":`Anvia links`,children:[(0,U.jsx)(TF,{href:`https://anvia.dev/docs`,label:`Anvia Docs`}),(0,U.jsx)(TF,{href:`https://anvia.dev`,label:`Anvia Web`})]}),(0,U.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:ie})]})]}),(0,U.jsxs)(`main`,{className:`grid h-[100dvh] min-w-0 grid-rows-[52px_minmax(0,1fr)] overflow-hidden bg-background/80`,children:[(0,U.jsx)(`header`,{className:`grid min-h-13 border-b border-border/80 bg-background/88 backdrop-blur`,children:(0,U.jsxs)(`div`,{className:`grid min-h-13 grid-cols-[minmax(0,1fr)_auto] items-center gap-3 px-6`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-sm font-medium`,children:[(0,U.jsx)(`span`,{className:`text-primary`,children:I===`playground`?`Agents`:`Studio`}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`/`}),(0,U.jsx)(`span`,{className:`truncate`,children:kt?.name??kt?.id??`Agent`})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(Qt,{className:`h-8 min-h-8 border-transparent bg-transparent px-3 font-mono text-xs text-muted-foreground hover:bg-muted hover:text-foreground`,type:`button`,variant:`secondary`,onClick:()=>Mt(`sessions`),children:`Sessions`}),(0,U.jsxs)(Qt,{className:`h-8 min-h-8 gap-1.5 rounded-sm border-0 bg-primary px-3 font-mono text-xs text-primary-foreground hover:bg-primary/90`,type:`button`,onClick:()=>ot(),children:[(0,U.jsx)(z,{"aria-hidden":`true`}),`New session`]})]})]})}),I===`playground`?(0,U.jsxs)(`section`,{className:`grid min-h-0 min-w-0 max-w-full grid-cols-[minmax(0,1fr)_minmax(0,460px)] overflow-hidden bg-background/45 max-xl:grid-cols-1`,children:[(0,U.jsxs)(`div`,{className:`grid min-h-0 min-w-0 grid-rows-[minmax(0,1fr)_auto] overflow-hidden`,children:[(0,U.jsx)(`section`,{className:`min-h-0 overflow-auto px-6 py-6`,children:(0,U.jsxs)(`div`,{className:`mx-auto grid min-h-full w-full max-w-235 content-start items-start gap-6 pb-8`,children:[jt?null:(0,U.jsx)(`div`,{className:`grid min-h-96 place-items-center text-sm font-medium text-muted-foreground`,children:(0,U.jsxs)(`div`,{className:`grid max-w-xl gap-4 text-center`,children:[(0,U.jsx)(`div`,{className:`mx-auto h-px w-28 bg-primary/45`}),(0,U.jsx)(`h1`,{className:`m-0 text-4xl font-semibold leading-tight text-foreground text-balance`,children:`What should this agent work on?`}),(0,U.jsx)(`p`,{className:`m-0 text-base leading-7 text-muted-foreground text-pretty`,children:`Choose a prompt below or write a task. Studio will stream the response, tool calls, approvals, and trace data here.`})]})}),E.map(e=>(0,U.jsx)(fM,{entry:e,decidingApprovals:le,answeringQuestions:de,onApprovalDecision:(e,t)=>void _t(e,t),onQuestionAnswer:(e,t)=>void vt(e,t),onOpenTrace:K},e.entryId))]})}),(0,U.jsxs)(`form`,{className:`grid gap-3 bg-gradient-to-t from-background via-background/95 to-background/0 px-6 pb-6 pt-2`,onSubmit:e=>{e.preventDefault(),lt(O)},children:[jt||At.length===0?null:(0,U.jsx)(`div`,{className:`mx-auto grid w-full max-w-235 grid-cols-3 gap-2 max-md:grid-cols-1`,children:At.map(e=>(0,U.jsx)(Qt,{className:`h-auto min-h-16 justify-start whitespace-normal rounded-sm border border-border/80 bg-card/85 px-3 py-2.5 text-left text-sm font-medium leading-5 text-foreground shadow-sm hover:border-primary/45 hover:bg-primary/10 hover:text-primary`,type:`button`,variant:`ghost`,disabled:se===`running`||r.length===0,onClick:()=>void lt(e),children:(0,U.jsx)(`span`,{className:`min-w-0 whitespace-normal wrap-break-words`,children:e})},e))}),(0,U.jsxs)(`div`,{className:`mx-auto grid w-full max-w-235 gap-2 rounded-md border border-border/80 bg-card/95 p-2.5 shadow-xl shadow-black/35 backdrop-blur focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/25`,children:[(0,U.jsx)(Vc,{className:`min-h-16 min-w-0 resize-none rounded-sm border-0 bg-transparent px-3 py-3 text-[15px] leading-7 text-foreground shadow-none outline-none ring-0 placeholder:text-muted-foreground/70 focus:border-transparent focus:ring-0`,ref:ze,rows:1,value:O,onChange:G,onKeyDown:Et,placeholder:`Ask anything...`}),(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2`,children:[(0,U.jsx)(`div`,{className:`flex min-w-0 items-center gap-2`,children:(0,U.jsx)(Qt,{"aria-label":`Attach context`,className:`h-8 min-h-8 w-8 rounded-sm border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,size:`icon`,type:`button`,variant:`secondary`,children:(0,U.jsx)(z,{"aria-hidden":`true`})})}),(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[Dt.length>1?(0,U.jsxs)(Ic,{value:kt?.id??r,onValueChange:st,disabled:se===`running`,children:[(0,U.jsx)(Rc,{"aria-label":`Select agent`,className:`hidden h-8 min-h-8 w-auto max-w-64 gap-2 border-0 bg-transparent px-2 py-1 font-mono text-xs font-medium text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground sm:flex`,children:(0,U.jsx)(Lc,{placeholder:`Agent`})}),(0,U.jsx)(zc,{align:`end`,children:Dt.map(e=>(0,U.jsx)(Bc,{value:e.id,children:e.name??e.id},e.id))})]}):(0,U.jsx)(`span`,{className:`hidden max-w-60 truncate rounded-sm px-2 py-1 font-mono text-xs font-medium text-muted-foreground sm:block`,children:kt?.name??kt?.id??`Agent`}),(0,U.jsx)(Qt,{"aria-label":se===`running`?`Running`:`Send message`,className:`h-9 min-h-9 w-9 rounded-sm border-primary bg-primary text-primary-foreground hover:bg-primary/90`,size:`icon`,type:`submit`,disabled:se===`running`||r.length===0,children:(0,U.jsx)(j,{})})]})]})]})]})]}),(0,U.jsx)(bM,{logs:_,selectedSessionId:d,loading:he===`loading`})]}):null,I===`tracing`?(0,U.jsx)(JP,{agents:Dt,traces:h,tracesEnabled:He,traceLoadState:_e,selectedTraceId:te,traceSessionDetailId:R,onRefresh:()=>void Xe(),onSelectTrace:K,onShowSessionTraces:e=>void Ze(e)}):null,I===`sessions`?(0,U.jsx)(CN,{agents:Dt,sessions:p,sessionsEnabled:Ve,sessionLoadState:pe,selectedSessionId:d,onOpenSession:e=>void at(e),onViewSessionTracing:e=>void Ze(e),onDeleteSession:V}):null,I===`agents`?(0,U.jsx)(Wc,{agents:Dt,selectedAgentId:r}):null,I===`tools`?(0,U.jsx)($N,{agents:Dt,selectedAgentId:s||kt?.id||r,summary:De,enabled:Ge,loading:ke===`loading`,onSelectAgent:e=>{c(e),tt(e)}}):null,I===`pipelines`?(0,U.jsx)(zj,{pipelines:Ot,selectedPipelineId:l,detail:y,logs:x,activeRunId:ee,runs:C,enabled:Ke,detailLoading:je===`loading`,logsLoading:Ne===`loading`,runsLoading:Fe===`loading`,runState:Le,runInput:A,runOutput:N,onSelectPipeline:e=>{u(e),P(``),F(``),it(e)},onRunInputChange:M,onRun:()=>void ut()}):null,I===`mcps`?(0,U.jsx)(sy,{agents:Dt,selectedAgentId:a||kt?.id||r,summary:Ce,enabled:We,loading:Te===`loading`,onSelectAgent:e=>{o(e),et(e)}}):null,I===`knowledge`?(0,U.jsx)(iy,{enabled:Ue,summary:ye,loading:xe===`loading`,onOpenTrace:K,onRefresh:()=>void $e()}):null]}),(0,U.jsx)(wN,{session:re,onOpenChange:e=>{e||V(void 0)},onConfirm:e=>void ct(e)})]})}function TF(e){return(0,U.jsxs)(`a`,{className:`flex h-8 min-h-8 items-center justify-between rounded-sm border border-transparent px-2 font-mono text-[11px] font-semibold text-sidebar-foreground/62 transition duration-200 hover:border-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-foreground`,href:e.href,target:`_blank`,rel:`noreferrer`,children:[(0,U.jsx)(`span`,{children:e.label}),(0,U.jsx)(I,{"aria-hidden":`true`,className:`h-3 w-3 text-muted-foreground`})]})}function EF(e){return kF(e)&&e.type===`pipeline_log`&&kF(e.log)}function DF(e){return kF(e)&&e.type===`pipeline_final`&&`output`in e}function OF(e){return kF(e)&&e.type===`error`}function kF(e){return typeof e==`object`&&!!e}function AF(e,t){let n=[...t].sort((e,t)=>Date.parse(e.startedAt)-Date.parse(t.startedAt)).map(e=>e.id),r=0,i,a=e.map(e=>e.kind===`message`&&e.role===`assistant`?jF(e):e);function o(){if(i===void 0)return;let e=n[r];r+=1,e!==void 0&&(a[i]={...a[i],traceId:e}),i=void 0}for(let[e,t]of a.entries()){if(t.kind===`message`&&t.role===`user`){o();continue}t.kind===`message`&&t.role===`assistant`&&(i=e)}return o(),a}function jF(e){let{traceId:t,...n}=e;return n}var MF=document.getElementById(`anvia-ui`);MF!==null&&(0,se.createRoot)(MF).render((0,U.jsx)(wF,{}));
91
- //# sourceMappingURL=index-D7QvySKU.js.map