@anvia/studio 0.7.39 → 0.7.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/assets/{chunk-HU55YP24-CBgJL7lU.js → chunk-TIV3WFSR-BCFNcVBW.js} +1 -1
- package/dist/ui/assets/{chunk-HU55YP24-CBgJL7lU.js.map → chunk-TIV3WFSR-BCFNcVBW.js.map} +1 -1
- package/dist/ui/assets/{evals-page-ZafLbMa9.js → evals-page-TgqTalZG.js} +2 -2
- package/dist/ui/assets/{evals-page-ZafLbMa9.js.map → evals-page-TgqTalZG.js.map} +1 -1
- package/dist/ui/assets/{index-CQMsit3S.js → index-CaB9mtgz.js} +6 -6
- package/dist/ui/assets/{index-CQMsit3S.js.map → index-CaB9mtgz.js.map} +1 -1
- package/dist/ui/assets/{knowledge-page-BLE67U5p.js → knowledge-page-G2p0MC9Q.js} +2 -2
- package/dist/ui/assets/{knowledge-page-BLE67U5p.js.map → knowledge-page-G2p0MC9Q.js.map} +1 -1
- package/dist/ui/assets/{mcps-page-C9ADX2M3.js → mcps-page-BTofFyB1.js} +2 -2
- package/dist/ui/assets/{mcps-page-C9ADX2M3.js.map → mcps-page-BTofFyB1.js.map} +1 -1
- package/dist/ui/assets/{memory-page-CmnMwpO7.js → memory-page-Dyv23uzY.js} +2 -2
- package/dist/ui/assets/{memory-page-CmnMwpO7.js.map → memory-page-Dyv23uzY.js.map} +1 -1
- package/dist/ui/assets/{pipelines-page-C5ISm26N.js → pipelines-page-DdItgiZv.js} +2 -2
- package/dist/ui/assets/{pipelines-page-C5ISm26N.js.map → pipelines-page-DdItgiZv.js.map} +1 -1
- package/dist/ui/assets/{sandboxes-page-BH5jccv5.js → sandboxes-page-DqkqS92e.js} +2 -2
- package/dist/ui/assets/{sandboxes-page-BH5jccv5.js.map → sandboxes-page-DqkqS92e.js.map} +1 -1
- package/dist/ui/assets/{sessions-page-BPhKzIiR.js → sessions-page-kJcWll7-.js} +2 -2
- package/dist/ui/assets/{sessions-page-BPhKzIiR.js.map → sessions-page-kJcWll7-.js.map} +1 -1
- package/dist/ui/assets/{status-page-DXPhVzkB.js → status-page-RKMaWBCx.js} +2 -2
- package/dist/ui/assets/{status-page-DXPhVzkB.js.map → status-page-RKMaWBCx.js.map} +1 -1
- package/dist/ui/assets/{tool-runner-B3XxR_Bx.js → tool-runner-9bssZrO4.js} +2 -2
- package/dist/ui/assets/{tool-runner-B3XxR_Bx.js.map → tool-runner-9bssZrO4.js.map} +1 -1
- package/dist/ui/assets/{tools-page-Glm51tOW.js → tools-page-Mu5-Dl6L.js} +2 -2
- package/dist/ui/assets/{tools-page-Glm51tOW.js.map → tools-page-Mu5-Dl6L.js.map} +1 -1
- package/dist/ui/assets/{trace-browser-BmN37sWv.js → trace-browser-BT1WTtkX.js} +2 -2
- package/dist/ui/assets/{trace-browser-BmN37sWv.js.map → trace-browser-BT1WTtkX.js.map} +1 -1
- package/dist/ui/assets/{transcript-item-BwDIsmS7.js → transcript-item-B0HTdQVL.js} +2 -2
- package/dist/ui/assets/{transcript-item-BwDIsmS7.js.map → transcript-item-B0HTdQVL.js.map} +1 -1
- package/dist/ui/index.html +2 -2
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agents-page-DQSUqZIF.js","assets/utils-BN2yP0LH.js","assets/badge-DFrH2vyb.js","assets/evals-page-
|
|
2
|
-
import{a as e,i as t,n,r,s as i,t as a}from"./utils-BN2yP0LH.js";import{f as o,i as s,m as c,s as l}from"./format-D43vTqrO.js";import{c as u,i as d,n as f,o as p,r as m,s as h,t as g}from"./chunk-HU55YP24-CBgJL7lU.js";(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 _=e((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}}}})),v=e(((e,t)=>{t.exports=_()})),y=e((e=>{var n=t();function r(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 i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(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=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.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,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,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=l(t.as,t.crossOrigin);a.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??a.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=l(n,t.crossOrigin);a.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=l(t.as,t.crossOrigin);a.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 a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),b=e(((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=y()})),x=e((e=>{var n=v(),r=t(),i=b();function a(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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(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 c(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 l(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 u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(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 p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case x:return`Profiler`;case y:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var P=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function L(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function R(e,t){re++,ne[re]=e.current,e.current=t}var ae=ie(null),oe=ie(null),z=ie(null),se=ie(null);function ce(e,t){switch(R(z,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(ae),R(ae,e)}function le(){L(ae),L(oe),L(z)}function ue(e){e.memoizedState!==null&&R(se,e);var t=ae.current,n=Hd(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function de(e){oe.current===e&&(L(ae),L(oe)),se.current===e&&(L(se),Qf._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agents-page-DQSUqZIF.js","assets/utils-BN2yP0LH.js","assets/badge-DFrH2vyb.js","assets/evals-page-TgqTalZG.js","assets/knowledge-page-G2p0MC9Q.js","assets/renderers-Cr02ATaq.js","assets/format-D43vTqrO.js","assets/mcps-page-BTofFyB1.js","assets/tool-runner-9bssZrO4.js","assets/memory-page-Dyv23uzY.js","assets/chunk-TIV3WFSR-BCFNcVBW.js","assets/pipelines-page-DdItgiZv.js","assets/pipelines-page-DLioOiRN.css","assets/sessions-page-kJcWll7-.js","assets/sandboxes-page-DqkqS92e.js","assets/status-page-RKMaWBCx.js","assets/tools-page-Mu5-Dl6L.js","assets/trace-browser-BT1WTtkX.js","assets/transcript-item-B0HTdQVL.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,i as t,n,r,s as i,t as a}from"./utils-BN2yP0LH.js";import{f as o,i as s,m as c,s as l}from"./format-D43vTqrO.js";import{c as u,i as d,n as f,o as p,r as m,s as h,t as g}from"./chunk-TIV3WFSR-BCFNcVBW.js";(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 _=e((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}}}})),v=e(((e,t)=>{t.exports=_()})),y=e((e=>{var n=t();function r(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 i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(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=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.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,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,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=l(t.as,t.crossOrigin);a.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??a.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=l(n,t.crossOrigin);a.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=l(t.as,t.crossOrigin);a.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 a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),b=e(((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=y()})),x=e((e=>{var n=v(),r=t(),i=b();function a(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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(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 c(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 l(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 u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(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 p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case x:return`Profiler`;case y:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var P=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function L(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function R(e,t){re++,ne[re]=e.current,e.current=t}var ae=ie(null),oe=ie(null),z=ie(null),se=ie(null);function ce(e,t){switch(R(z,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(ae),R(ae,e)}function le(){L(ae),L(oe),L(z)}function ue(e){e.memoizedState!==null&&R(se,e);var t=ae.current,n=Hd(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function de(e){oe.current===e&&(L(ae),L(oe)),se.current===e&&(L(se),Qf._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!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(`
|
|
5
5
|
`),l=s.split(`
|
|
@@ -8,11 +8,11 @@ import{a as e,i as t,n,r,s as i,t as a}from"./utils-BN2yP0LH.js";import{f as o,i
|
|
|
8
8
|
Error generating stack: `+e.message+`
|
|
9
9
|
`+e.stack}}var ye=Object.prototype.hasOwnProperty,be=n.unstable_scheduleCallback,xe=n.unstable_cancelCallback,Se=n.unstable_shouldYield,Ce=n.unstable_requestPaint,we=n.unstable_now,Te=n.unstable_getCurrentPriorityLevel,Ee=n.unstable_ImmediatePriority,De=n.unstable_UserBlockingPriority,Oe=n.unstable_NormalPriority,ke=n.unstable_LowPriority,Ae=n.unstable_IdlePriority,je=n.log,Me=n.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(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 We(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=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(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 Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(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 qe(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(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-Ie(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&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(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 tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function rt(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,ot=`__reactProps$`+it,st=`__reactContainer$`+it,ct=`__reactEvents$`+it,lt=`__reactListeners$`+it,ut=`__reactHandles$`+it,dt=`__reactResources$`+it,ft=`__reactMarker$`+it;function pt(e){delete e[at],delete e[ot],delete e[ct],delete e[lt],delete e[ut]}function mt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[at])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function ht(e){if(e=e[at]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function _t(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function vt(e){e[ft]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=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]*$`),wt={},Tt={};function Et(e){return ye.call(Tt,e)?!0:ye.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(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 Ot(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 kt(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 At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(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 Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ft(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 It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(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=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(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=``+At(s):e.removeAttribute(`name`)}function zt(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)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(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),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(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=``+At(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 Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(P(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=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 Kt(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||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(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 i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Kt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(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 Yt=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`]]),Xt=/^[\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 Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=ht(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(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="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ot]||null;if(!i)throw Error(a(90));Rt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(bu(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ot]||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(a(231,t,typeof n));return n}var cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,`passive`,{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return pn=i.slice(e,1<r?1-r:void 0)}function hn(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 gn(){return!0}function _n(){return!1}function vn(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)?gn:_n,this.isPropagationStopped=_n,this}return p(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=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},B=vn(yn),bn=p({},yn,{view:0,detail:0}),xn=vn(bn),Sn,Cn,wn,Tn=p({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==wn&&(wn&&e.type===`mousemove`?(Sn=e.screenX-wn.screenX,Cn=e.screenY-wn.screenY):Cn=Sn=0,wn=e),Sn)},movementY:function(e){return`movementY`in e?e.movementY:Cn}}),En=vn(Tn),Dn=vn(p({},Tn,{dataTransfer:0})),On=vn(p({},bn,{relatedTarget:0})),kn=vn(p({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),An=vn(p({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),jn=vn(p({},yn,{data:0})),Mn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Nn={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`},Pn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Fn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pn[e])?!!t[e]:!1}function In(){return Fn}var Ln=vn(p({},bn,{key:function(e){if(e.key){var t=Mn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Nn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Rn=vn(p({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zn=vn(p({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Bn=vn(p({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vn=vn(p({},Tn,{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})),Hn=vn(p({},yn,{newState:0,oldState:0})),Un=[9,13,27,32],Wn=cn&&`CompositionEvent`in window,Gn=null;cn&&`documentMode`in document&&(Gn=document.documentMode);var Kn=cn&&`TextEvent`in window&&!Gn,qn=cn&&(!Wn||Gn&&8<Gn&&11>=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=mn(),pn=fn=dn=null,Qn=!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 qn&&t.locale!==`ko`?null:t.data;default:return null}}var tr={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 nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!tr[e.type]:t===`textarea`}function rr(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Ed(t,`onChange`),0<t.length&&(n=new B(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ir=null,ar=null;function or(e){yd(e,0)}function sr(e){if(Pt(gt(e)))return e}function cr(e,t){if(e===`change`)return t}var lr=!1;if(cn){var ur;if(cn){var dr=`oninput`in document;if(!dr){var fr=document.createElement(`div`);fr.setAttribute(`oninput`,`return;`),dr=typeof fr.oninput==`function`}ur=dr}else ur=!1;lr=ur&&(!document.documentMode||9<document.documentMode)}function pr(){ir&&(ir.detachEvent(`onpropertychange`,mr),ar=ir=null)}function mr(e){if(e.propertyName===`value`&&sr(ar)){var t=[];rr(t,ar,e,en(e)),on(or,t)}}function hr(e,t,n){e===`focusin`?(pr(),ir=t,ar=n,ir.attachEvent(`onpropertychange`,mr)):e===`focusout`&&pr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return sr(ar)}function _r(e,t){if(e===`click`)return sr(t)}function vr(e,t){if(e===`input`||e===`change`)return sr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function xr(e,t){if(br(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(!ye.call(t,i)||!br(e[i],t[i]))return!1}return!0}function Sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cr(e,t){var n=Sr(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=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(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=Ft(e.document)}return t}function Er(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 Dr=cn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==Ft(r)||(r=Or,`selectionStart`in r&&Er(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}),Ar&&xr(Ar,r)||(Ar=r,r=Ed(kr,`onSelect`),0<r.length&&(t=new B(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};cn&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),Hr=Lr(`transitionstart`),Ur=Lr(`transitioncancel`),Wr=Lr(`transitionend`),Gr=new Map,Kr=`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(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),xt(t,[e])}var Jr=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)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[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&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(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-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<du)throw du=0,fu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(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 oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(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 li(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 ui(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=oi(31,n,t,i),e.elementType=k,e.lanes=o,e;case _:return di(n.children,i,o,t);case y:s=8,i|=24;break;case x:return e=oi(12,n,t,i|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,i),e.elementType=T,e.lanes=o,e;case E:return e=oi(19,n,t,i),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(a(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Ie(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(a(519));function Ii(e){throw Hi(gi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[ot]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Ut(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&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:ji=ji.return}}function zi(e){if(e!==ji)return!1;if(!V)return Ri(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Mi&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Mi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Mi=uf(e)}else t===27?(t=Mi,Zd(e.type)?(e=lf,lf=null,Mi=e):Mi=t):Mi=ji?cf(e.stateNode.nextSibling):null;return!0}function Bi(){Mi=ji=null,V=!1}function Vi(){var e=Ni;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=ie(null),Wi=null,Gi=null;function Ki(e,t,n){R(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,L(Ui)}function Ji(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 Yi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ji(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ji(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Xi(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;br(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===se.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(a(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=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()})}},ra=n.unstable_scheduleCallback,ia=n.unstable_NormalPriority,aa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=dd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ha=F.S;F.S=function(e,t){eu=we(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=ie(null);function _a(){var e=ga.current;return e===null?q.pooledCache:e}function va(e,t){t===null?R(ga,ga.current):R(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(a(460)),xa=Error(a(474)),Sa=Error(a(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(Qt,Qt);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(a(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,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(a(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(a(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(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 i(e,t){return e=ci(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=fi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===O&&Ea(a)===t.type)?(t=i(t,n.props),Na(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),Na(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=mi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=di(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=ui(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case g:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=Ea(t),f(e,t,n)}if(P(t)||M(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===C)return f(e,ea(e,t),n);Pa(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 h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case O:return n=Ea(n),p(e,t,n,r)}if(P(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===C)return p(e,t,ea(e,n),r);Pa(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 h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ea(r),m(e,t,n,r,i)}if(P(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,Ma(r),i);if(r.$$typeof===C)return m(e,t,n,ea(t,r),i);Pa(t,r)}return null}function v(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),V&&Ei(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 V&&Ei(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)}),V&&Ei(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(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(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),V&&Ei(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return V&&Ei(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,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(i,e)}),V&&Ei(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ea(l)===r.type){n(e,r.sibling),c=i(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Na(c,o),c.return=e,e=c)}return s(e);case g: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=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ea(o),b(e,r,o,c)}if(P(o))return v(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ma(o),c);if(o.$$typeof===C)return b(e,r,ea(e,o),c);Pa(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=i(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=b(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Ua(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,Qe(e,n)}}function Wa(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 Ga=!1;function Ka(){if(Ga){var e=da;if(e!==null)throw e}}function qa(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!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,m=f!==s.lane;if(m?(Y&f)===f:(r&f)===f){f!==0&&f===ua&&(Ga=!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=p({},d,f);break a;case 2:Ra=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ja(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ya(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ja(n[e],t)}var Xa=ie(null),Za=ie(0);function Qa(e,t){e=Ul,R(Za,e),R(Xa,t),Ul=e|t.baseLanes}function $a(){R(Za,Ul),R(Xa,Xa.current)}function eo(){Ul=Za.current,L(Xa),L(Za)}var to=ie(null),no=null;function ro(e){var t=e.alternate;R(co,co.current&1),R(to,e),no===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(no=e)}function io(e){R(co,co.current),R(to,e),no===null&&(no=e)}function ao(e){e.tag===22?(R(co,co.current),R(to,e),no===null&&(no=e)):oo(e)}function oo(){R(co,co.current),R(to,to.current)}function so(e){L(to),no===e&&(no=null),L(co)}var co=ie(0);function lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(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 uo=0,H=null,U=null,fo=null,po=!1,mo=!1,ho=!1,go=0,_o=0,vo=null,yo=0;function bo(){throw Error(a(321))}function xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,a){return uo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Rs:zs,ho=!1,a=n(r,i),ho=!1,mo&&(a=wo(t,n,r,i)),Co(e),a}function Co(e){F.H=Ls;var t=U!==null&&U.next!==null;if(uo=0,fo=U=H=null,po=!1,_o=0,vo=null,t)throw Error(a(300));e===null||G||(e=e.dependencies,e!==null&&Zi(e)&&(G=!0))}function wo(e,t,n,r){H=e;var i=0;do{if(mo&&(vo=null),_o=0,mo=!1,25<=i)throw Error(a(301));if(i+=1,fo=U=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=Bs,o=t(n,r)}while(mo);return o}function To(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?jo(t):t,e=e.useState()[0],(U===null?null:U.memoizedState)!==e&&(H.flags|=1024),t}function Eo(){var e=go!==0;return go=0,e}function Do(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Oo(e){if(po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}po=!1}uo=0,fo=U=H=null,mo=!1,_o=go=0,vo=null}function ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fo===null?H.memoizedState=fo=e:fo=fo.next=e,fo}function W(){if(U===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=U.next;var t=fo===null?H.memoizedState:fo.next;if(t!==null)fo=t,U=e;else{if(e===null)throw H.alternate===null?Error(a(467)):Error(a(310));U=e,e={memoizedState:U.memoizedState,baseState:U.baseState,baseQueue:U.baseQueue,queue:U.queue,next:null},fo===null?H.memoizedState=fo=e:fo=fo.next=e}return fo}function Ao(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function jo(e){var t=_o;return _o+=1,vo===null&&(vo=[]),e=Ta(vo,e,t),t=H,(fo===null?t.memoizedState:fo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Rs:zs),e}function Mo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return jo(e);if(e.$$typeof===C)return $i(e)}throw Error(a(438,String(e)))}function No(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.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=Ao(),H.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 Po(e,t){return typeof t==`function`?t(e):t}function Fo(e){return Io(W(),U,e)}function Io(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(uo&f)===f:(Y&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===ua&&(d=!0);else if((uo&p)===p){u=u.next,p===ua&&(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,H.lanes|=p,Gl|=p;f=u.action,ho&&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,H.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!br(o,e.memoizedState)&&(G=!0,d&&(n=da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Lo(e){var t=W(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);br(o,t.memoizedState)||(G=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ro(e,t,n){var r=H,i=W(),o=V;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!br((U||i).memoizedState,n);if(s&&(i.memoizedState=n,G=!0),i=i.queue,ls(Vo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||fo!==null&&fo.memoizedState.tag&1){if(r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,i,n,t),null),q===null)throw Error(a(349));o||uo&127||zo(r,t,n)}return n}function zo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=Ao(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Bo(e,t,n,r){t.value=n,t.getSnapshot=r,Ho(t)&&Uo(e)}function Vo(e,t,n){return n(function(){Ho(t)&&Uo(e)})}function Ho(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function Uo(e){var t=ti(e,2);t!==null&&hu(t,e,2)}function Wo(e){var t=ko();if(typeof e==`function`){var n=e;if(e=n(),ho){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:e},t}function Go(e,t,n,r){return e.baseState=n,Io(e,U,typeof r==`function`?r:Po)}function Ko(e,t,n,r,i){if(Ps(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,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,qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function qo(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),Jo(e,t,s)}catch(n){Xo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Jo(e,t,a)}catch(n){Xo(e,t,n)}}function Jo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Yo(e,t,n)},function(n){return Xo(e,t,n)}):Yo(e,t,n)}function Yo(e,t,n){t.status=`fulfilled`,t.value=n,Zo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,qo(e,n)))}function Xo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Zo(t),t=t.next;while(t!==r)}e.action=null}function Zo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qo(e,t){return t}function $o(e,t){if(V){var n=q.formState;if(n!==null){a:{var r=H;if(V){if(Mi){b:{for(var i=Mi,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:t},n.queue=r,n=js.bind(null,H,r),r.dispatch=n,r=Wo(!1),a=Ns.bind(null,H,!1,r.queue),r=ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ko.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function es(e){return ts(W(),U,e)}function ts(e,t,n){if(t=Io(e,t,Qo)[0],e=Fo(Po)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=jo(t)}catch(e){throw e===ba?Sa:e}else r=t;t=W();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,is(9,{destroy:void 0},ns.bind(null,i,n),null)),[r,a,e]}function ns(e,t){e.action=t}function rs(e){var t=W(),n=U;if(n!==null)return ts(t,n,e);W(),t=t.memoizedState,n=W();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function is(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=Ao(),H.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function as(){return W().memoizedState}function os(e,t,n,r){var i=ko();H.flags|=e,i.memoizedState=is(1|t,{destroy:void 0},n,r===void 0?null:r)}function ss(e,t,n,r){var i=W();r=r===void 0?null:r;var a=i.memoizedState.inst;U!==null&&r!==null&&xo(r,U.memoizedState.deps)?i.memoizedState=is(t,a,n,r):(H.flags|=e,i.memoizedState=is(1|t,a,n,r))}function cs(e,t){os(8390656,8,e,t)}function ls(e,t){ss(2048,8,e,t)}function us(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=Ao(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ds(e){var t=W().memoizedState;return us({ref:t,nextImpl:e}),function(){if(K&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function fs(e,t){return ss(4,2,e,t)}function ps(e,t){return ss(4,4,e,t)}function ms(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 hs(e,t,n){n=n==null?null:n.concat([e]),ss(4,4,ms.bind(null,t,e),n)}function gs(){}function _s(e,t){var n=W();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vs(e,t){var n=W();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&xo(t,r[1]))return r[0];if(r=e(),ho){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function ys(e,t,n){return n===void 0||uo&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),H.lanes|=e,Gl|=e,n)}function bs(e,t,n,r){return br(n,t)?n:Xa.current===null?!(uo&42)||uo&1073741824&&!(Y&261930)?(G=!0,e.memoizedState=n):(e=mu(),H.lanes|=e,Gl|=e,t):(e=ys(e,n,r),br(e,t)||(G=!0),e)}function xs(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,Ns(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,ma(c,r),pu(e)):Ms(e,t,r,pu(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=ws(e).queue;xs(e,i,t,te,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},pu())}function Es(){return $i(Qf)}function Ds(){return W().memoizedState}function Os(){return W().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Va(n);var r=Ha(t,e,n);r!==null&&(hu(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=ei(e,t,n,r),n!==null&&(hu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,pu())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(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,br(s,o))return $r(e,t,i,0),q===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return hu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(a(479))}else t=ei(e,n,r,2),t!==null&&hu(t,e,2)}function Ps(e){var t=e.alternate;return e===H||t!==null&&t===H}function Fs(e,t){mo=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var Ls={readContext:$i,use:Mo,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo};Ls.useEffectEvent=bo;var Rs={readContext:$i,use:Mo,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(ho){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(ho){Fe(!0);try{n(t)}finally{Fe(!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=As.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,n=js.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(ko(),e,t)},useTransition:function(){var e=Wo(!1);return e=xs.bind(null,H,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,i=ko();if(V){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),q===null)throw Error(a(349));Y&127||zo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,cs(Vo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=q.identifierPrefix;if(V){var n=Ti,r=wi;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Es,useFormState:$o,useActionState:$o,useOptimistic:function(e){var t=ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ns.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:No,useCacheRefresh:function(){return ko().memoizedState=ks.bind(null,H)},useEffectEvent:function(e){var t=ko(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},zs={readContext:$i,use:Mo,useCallback:_s,useContext:$i,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Fo,useRef:as,useState:function(){return Fo(Po)},useDebugValue:gs,useDeferredValue:function(e,t){return bs(W(),U.memoizedState,e,t)},useTransition:function(){var e=Fo(Po)[0],t=W().memoizedState;return[typeof e==`boolean`?e:jo(e),t]},useSyncExternalStore:Ro,useId:Ds,useHostTransitionStatus:Es,useFormState:es,useActionState:es,useOptimistic:function(e,t){return Go(W(),U,e,t)},useMemoCache:No,useCacheRefresh:Os};zs.useEffectEvent=ds;var Bs={readContext:$i,use:Mo,useCallback:_s,useContext:$i,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Lo,useRef:as,useState:function(){return Lo(Po)},useDebugValue:gs,useDeferredValue:function(e,t){var n=W();return U===null?ys(n,e,t):bs(n,U.memoizedState,e,t)},useTransition:function(){var e=Lo(Po)[0],t=W().memoizedState;return[typeof e==`boolean`?e:jo(e),t]},useSyncExternalStore:Ro,useId:Ds,useHostTransitionStatus:Es,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){var n=W();return U===null?(n.baseState=e,[e,n.queue.dispatch]):Go(n,U,e,t)},useMemoCache:No,useCacheRefresh:Os};Bs.useEffectEvent=ds;function Vs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(hu(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(hu(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(hu(t,e,n),Ua(t,e,n))}};function Us(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?!xr(n,r)||!xr(i,a):!0}function Ws(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&&Hs.enqueueReplaceState(t,t.state,null)}function Gs(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=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ks(e){Jr(e)}function qs(e){console.error(e)}function Js(e){Jr(e)}function Ys(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Xs(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 Zs(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Qs(e){return e=Va(e),e.tag=3,e}function $s(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(){Xs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Xs(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ec(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,i,!0),n=to.current,n!==null){switch(n.tag){case 31:case 13:return no===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===Ca?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,i)),!1}throw Error(a(435,n.tag))}return Gu(e,r,i),Du(),!1}if(V)return t=to.current,t===null?(r!==Fi&&(t=Error(a(423),{cause:r}),Hi(gi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=gi(r,n),i=Zs(e.stateNode,r,i),Wa(e,i),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Fi&&(e=Error(a(422),{cause:r}),Hi(gi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=gi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Zs(n.stateNode,r,e),Wa(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`&&(ru===null||!ru.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Qs(i),$s(i,e,n,r),Wa(n,i),!1}n=n.return}while(n!==null);return!1}var tc=Error(a(461)),G=!1;function nc(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function rc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Qi(t),r=So(e,t,n,o,a,i),s=Eo(),e!==null&&!G?(Do(e,t,i),Dc(e,t,i)):(V&&s&&Oi(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?xr:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(xr(a,r)&&e.ref===t.ref)if(G=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(G=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function oc(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 cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?$a():Qa(t,a),ao(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),$a(),oo(t)):(va(t,a.cachePool),Qa(t,a),oo(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),$a(),ao(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Ia(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,so(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(io(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(io(t),i)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(G||Xi(e,t,n,!1),i=(n&e.childLanes)!==0,G||i){if(r=q,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),hu(r,e,s),tc;Du(),t=uc(e,t,n)}else e=o.treeContext,Mi=cf(s.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=lc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(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(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return Qi(t),n=So(e,t,n,r,void 0,i),r=Eo(),e!==null&&!G?(Do(e,t,i),Dc(e,t,i)):(V&&r&&Oi(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=wo(t,r,n,i),Co(e),r=Eo(),e!==null&&!G?(Do(e,t,a),Dc(e,t,a)):(V&&r&&Oi(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Hs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Vs(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&&Hs.enqueueReplaceState(a,a.state,null),qa(t,r,a,i),Ka(),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=Gs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=$i(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)&&Ws(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,qa(t,r,a,i),Ka(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Vs(t,n,d,r),l=t.memoizedState),(c=Ra||Us(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,Ba(e,t),o=t.memoizedProps,u=Gs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=$i(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)&&Ws(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,qa(t,r,a,i),Ka();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Vs(t,n,s,r),p=t.memoizedState),(u=Ra||Us(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(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,fc(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=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Bi(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:ya()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function bc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(co.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(V){if(i?ro(t):oo(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(oo(t),i=t.mode,c=Sc({mode:`hidden`,children:c},i),r=di(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(null,r)):(ro(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ro(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(oo(t),c=r.fallback,i=t.mode,r=Sc({mode:`visible`,children:r.children},i),c=di(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=sc(null,r)):(oo(t),t.child=e.child,t.flags|=128,t=null);else if(ro(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(G||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,G||s){if(s=q,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),hu(s,e,r),tc;af(c)||Du(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=cf(c.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=xc(t,r.children),t.flags|=4096);return t}return i?(oo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,i,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(i=c.cachePool,i===null?i=ya():(l=aa._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(e.child,r)):(ro(t),n=e.child,e=n.sibling,n=ci(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 xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Ia(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function Tc(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 Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=co.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(co,o),nc(e,t,r,n),r=V?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(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&&lo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(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&&lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Xi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Zi(e))):!0}function kc(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,io(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ro(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(ro(t),t.flags|=128,null);ro(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(co,co.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)G=!0;else{if(!Oc(e,n)&&!(t.flags&128))return G=!1,kc(e,t,n);G=!!(e.flags&131072)}else G=!1,V&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Gs(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=rc(null,t,e,r,n);break a}else if(i===D){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(a(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Gs(r,t.pendingProps),hc(e,t,r,i,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Ba(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),Ka(),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=gc(e,t,r,n);break a}else if(r!==i){i=gi(Error(a(424)),t),Hi(i),t=gc(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(Mi=cf(e.firstChild),ji=t,V=!0,Ni=null,Pi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===i){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Bd(z.current).createElement(n),r[at]=t,r[ot]=e,Pd(r,n,e),vt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&V&&(r=t.stateNode=ff(t.type,t.pendingProps,z.current),ji=t,Pi=!0,i=Mi,Zd(t.type)?(lf=i,Mi=cf(r.firstChild)):Mi=i),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((i=r=Mi)&&(r=tf(r,t.type,t.pendingProps,Pi),r===null?i=!1:(t.stateNode=r,ji=t,Mi=cf(r.firstChild),Pi=!1,i=!0)),i||Ii(t)),ue(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(i,o)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=So(e,t,To,null,null,n),Qf._currentValue=i),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=nf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Ii(t)),null;case 13:return bc(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Qi(t),i=$i(i),r=r(i),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(i=_a(),i===null&&(i=q,o=oa(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},za(t),Ki(t,aa,i)):((e.lanes&n)!==0&&(Ba(e,t),qa(t,null,null,n),Ka()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Ki(t,aa,r),r!==i.cache&&Yi(t,[aa],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ki(t,aa,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function jc(e){e.flags|=4}function Mc(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(wu())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Da=Ca,xa}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,Yl|=t)}function Fc(e,t){if(!V)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 Ic(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 Lc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),Ic(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(Ic(t),Mc(t,i,null,r,n)):(Ic(t),Nc(t,o))):o?o===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,i,e,r,n)),null;case 27:if(de(t),n=z.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ic(t),null}e=ae.current,zi(t)?Li(t,e):(e=ff(i,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(de(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ic(t),null}if(o=ae.current,zi(t))Li(t,o);else{var s=Bd(z.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);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(i,{is:r.is}):s.createElement(i)}}o[at]=t,o[ot]=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(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=z.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ji,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ii(t,!0)}else e=Bd(e).createTextNode(r),e[at]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[at]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(so(t),t):(so(t),null);if(t.flags&128)throw Error(a(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=zi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[at]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),i=!1}else i=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(so(t),t):(so(t),null)}return so(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return le(),e===null&&Sd(t.stateNode.containerInfo),Ic(t),null;case 10:return qi(t.type),Ic(t),null;case 19:if(L(co),r=t.memoizedState,r===null)return Ic(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Fc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=lo(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return R(co,co.current&1|2),V&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>tu&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304)}else{if(!i)if(e=lo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!V)return Ic(t),null}else 2*we()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Fc(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?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=co.current,R(co,i?n&1|2:n&1),V&&Ei(t,r.treeForkCount),e);case 22:case 23:return so(t),eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&L(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),Ic(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Rc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(so(t),t.alternate===null)throw Error(a(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(so(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(co),null;case 4:return le(),null;case 10:return qi(t.type),null;case 22:case 23:return so(t),eo(),e!==null&&L(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function zc(e,t){switch(ki(t),t.tag){case 3:qi(aa),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&so(t);break;case 13:so(t);break;case 19:L(co);break;case 10:qi(t.type);break;case 22:case 23:so(t),eo(),e!==null&&L(ga);break;case 24:qi(aa)}}function Bc(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){Z(t,t.return,e)}}function Vc(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){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ya(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(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){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(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){Z(e,t,n)}else n.current=null}function Kc(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){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ot]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(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&&Zd(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 Xc(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=Qt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(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&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[at]=e,t[ot]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=Tr(e),Er(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 i=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||i!==0&&f.nodeType!==3||(c=s+i),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===i&&(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(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,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++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Gs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(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(a(163))}if(e=t.sibling,e!==null){e.return=t.return,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Gs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(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{Ya(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pt(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 sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;Zd(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(a(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(a(160));ul(o,s,i),sl=null,cl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(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 i=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(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,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[ft]||o[at]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Pd(o,r,n),o[at]=e,vt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).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=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,i).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=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[at]=e,vt(o),r=o}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){i=e.stateNode;try{Wt(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,qc(e,i,n===null?i:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=gl,gl=gf(t.containerInfo),hl(t,e),gl=i,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||i,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||$c||el||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)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){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(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,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Zc(e,Yc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(a(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(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:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(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++)Ja(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(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&&sa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(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&&sa(e)));break;case 12:if(i&2048){Tl(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){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(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:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(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:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(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:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Ll={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:F.T===null?nt():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||V){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=262144),Jl=e}else Jl=536870912;return e=to.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),Ye(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ge(e,t),i=r?Au(e,t):Ou(e,t,!0),o=r;do{if(i===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){i=Ou(e,t,!1),o=!1;continue}if(i===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;i=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,i=4;break a}o=Zl,Zl=i,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=$l+300-we(),10<i)){if(yu(r,t,Jl,!Bl),We(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),i);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(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:Qt},jl(t,a,d);var m=(a&62914560)===a?$l-we():(a&4194048)===a?eu-we():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(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(!br(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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Gi=Wi=null,Oo(e),Aa=null,ja=0,e=J;for(;e!==null;)zc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=ci(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Ge(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ie(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Qr(),n}function Cu(e,t){H=null,F.H=Ls,t===ba||t===Sa?(t=Oa(),X=3):t===xa?(t=Oa(),X=4):X=t===tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Ys(e,gi(t,e.current)))}function wu(){var e=to.current;return e===null?!0:(Y&4194048)===Y?no===null:(Y&62914560)===Y||Y&536870912?e===no:!1}function Tu(){var e=F.H;return F.H=Ls,e===null?Ls:e}function Eu(){var e=F.A;return F.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&to.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:to.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,K=r,F.H=i,F.A=a,J===null&&(q=null,Y=0,Qr()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),i=Eu();q!==e||Y!==t?(nu=null,tu=we()+500,Su(e,t)):Vl=Ge(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(wa(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:wa(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(a(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Gi=Wi=null,F.H=r,F.A=i,K=n,J===null?(q=null,Y=0,Qr(),Wl):0}function ju(){for(;J!==null&&!Se();)Mu(J)}function Mu(e){var t=Ac(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Oo(t);default:zc(n,t),t=J=li(t,Ul),t=Ac(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Gi=Wi=null,Oo(t),Aa=null,ja=0;var i=t.return;try{if(ec(e,i,t,n,Y)){Wl=1,Ys(e,gi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Ys(e,gi(n,e.current)),J=null;return}t.flags&32768?(V||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=to.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Lc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=Zr,Xe(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=i,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Oe,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,i=I.p,I.p=2,s=K,K|=4;try{il(e,t,n)}finally{K=s,I.p=i,F.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,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=K;K|=4;try{_l(t,e);var a=zd,o=Tr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&wr(s.ownerDocument.documentElement,s)){if(c!==null&&Er(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 _=Cr(s,h),v=Cr(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}}sp=!!Rd,zd=Rd=null}finally{K=i,I.p=r,F.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,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=K;K|=4;try{al(e,t.alternate,t)}finally{K=i,I.p=r,F.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Ce();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),tt(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,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}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=tt(su),r=F.T,i=I.p;try{I.p=32>n?32:n,F.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(a(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{I.p=i,F.T=r,Vu(e,t)}}function Wu(e,t,n){t=gi(n,t),t=Zs(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Ye(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=gi(n,e),n=Qs(2),r=Ha(t,n,2),r!==null&&($s(n,r,t,e),Ye(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;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)||(Hl=!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,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>we()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=qe()),e=ti(e,t),e!==null&&(Ye(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return be(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;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-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=We(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=we(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ke(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=We(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),tt(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=cd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=We(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,we()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?be(Ee,ad):od()})}function dd(){if(nd===0){var e=ua;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+e)}function pd(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 md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ot]||null).action),o=r.submitter;o&&(t=(t=o[ot]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new B(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Cs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Cs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Kr.length;hd++){var gd=Kr[hd];qr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),xt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),xt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(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){Jr(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){Jr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[ct];n===void 0&&(n=t[ct]=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,yt.forEach(function(t){t!==`selectionchange`&&(vd.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(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!ln||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 o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=mt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}on(function(){var r=a,i=en(n),o=[];a:{var c=Gr.get(e);if(c!==void 0){var l=B,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Ln;break;case`focusin`:u=`focus`,l=On;break;case`focusout`:u=`blur`,l=On;break;case`beforeblur`:case`afterblur`:l=On;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=En;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Dn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=zn;break;case Rr:case zr:case Br:l=kn;break;case Wr:l=Bn;break;case`scroll`:case`scrollend`:l=xn;break;case`wheel`:l=Vn;break;case`copy`:case`cut`:case`paste`:l=An;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Rn;break;case`toggle`:case`beforetoggle`:l=Hn}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=sn(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),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==$t&&(u=n.relatedTarget||n.fromElement)&&(mt(u)||u[st]))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?mt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=En,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Rn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:gt(l),h=u==null?c:gt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,mt(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(o,c,l,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(c=r?gt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=cr;else if(nr(c))if(lr)v=vr;else{v=gr;var y=hr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Jt(r.elementType)&&(v=cr):v=_r;if(v&&=v(e,r)){rr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?gt(r):window,e){case`focusin`:(nr(y)||y.contentEditable===`true`)&&(Or=y,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(o,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(o,n,i)}var b;if(Wn)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 Qn?Xn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(qn&&n.locale!==`ko`&&(Qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Qn&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,Qn=!0)),y=Ed(r,x),0<y.length&&(x=new jn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Zn(n),b!==null&&(x.data=b)))),(b=Kn?$n(e,n):er(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new jn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,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=sn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=sn(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=sn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=sn(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,`
|
|
10
10
|
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Ot(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=Zt(``+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`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(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=Zt(``+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`:Q(`beforetoggle`,e),Q(`toggle`,e),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(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=Yt.get(n)||n,Dt(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:qt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[ot]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Dt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!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`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,o,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=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(a(137,t));break;default:$(e,t,r,d,n,null)}}zt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:$(e,t,s,c,n,null)}Ut(e,r,i,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:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,u,r,n,null)}return;default:if(Jt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(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 i=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)||$(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`:i=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(a(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Rt(e,s,c,l,u,d,o,i);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)||$(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&$(e,t,s,i,r,o)}Ht(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:$(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:$(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)&&$(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(a(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(Jt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(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||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[ft])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=I.d;I.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=ht(e);t!==null&&t.tag===5&&t.type===`form`?Ts(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Lt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Lt(r)+`"][href="`+Lt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),vt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=_t(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);vt(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),vt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),vt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=z.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=_t(i).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=Af(n.href);var o=_t(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=_t(i).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(a(444,e))}}function Af(e){return`href="`+Lt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(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}),Pd(t,`link`,n),vt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Lt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,vt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),vt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,vt(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,vt(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),vt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[ft]||a[at]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,vt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),vt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(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=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.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=Jf.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 Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function $f(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=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(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 ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function tp(e){return e?(e=ii,e):ii}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(hu(n,e,t),Ua(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=et(t);var n=ti(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=ht(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=we()+500,id(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=en(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=mt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(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 fp=e,null}function mp(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(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(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=ht(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=mt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,rt(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,rt(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$t=r,n.target.dispatchEvent(r),$t=null}else return t=ht(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,t){e.blockedOn===t&&(e.blockedOn=null,hp||(hp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){jp===e&&(jp=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(pp(r||n)===null)continue;break}var a=ht(n);a!==null&&(e.splice(t,3),t-=3,Cs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.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[ot]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ot]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){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 Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[st]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.7`)throw Error(a(527,Lp,`19.2.7`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ne=zp.inject(Rp),Pe=zp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Ks,s=qs,c=Js;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,s,c,Pp),e[st]=t.current,Sd(e),new Fp(t)}})),S=e(((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=x()}))(),C=i(t(),1),w=typeof window<`u`?C.useLayoutEffect:C.useEffect;function T(e){let t=C.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function E(e,t,n={},r={}){C.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function D(e){let t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}function O(e){return e[e.length-1]}function k(e){return typeof e==`function`}function A(e,t){return k(e)?e(t):e}var j=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;function N(e){for(let t in e)if(j.call(e,t))return!0;return!1}var ee=()=>Object.create(null),P=(e,t)=>F(e,t,ee);function F(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=re(e)&&re(i);if(!a&&!(te(e)&&te(i)))return i;let o=a?e:I(e);if(!o)return i;let s=a?i:I(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:j.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=F(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function I(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!M.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!M.call(e,t))return!1;r.push(t)}return r}function te(e){if(!ne(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ne(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ne(e){return Object.prototype.toString.call(e)===`[object Object]`}function re(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ie(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!ie(e[r],t[r],n))return!1;return!0}if(te(e)&&te(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!ie(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!ie(e[o],t[o],n)))return!1;return i===a}return!1}function L(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function R(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}var ae=/[\x00-\x1f\x7f"<>`{}]/g;function oe(e){return e.replace(ae,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function z(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return oe(t)}var se=[`http:`,`https:`,`mailto:`,`tel:`];function ce(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function le(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=z(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=z(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ue(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function de(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function fe(){throw Error(`Invariant failed`)}function pe(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var me=4,he=5;function ge(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function _e(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ge(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function ve(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=_e(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=xe(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=xe(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=Se(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=Se(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=Se(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=xe(n.fullPath??n.from);e.kind=he,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=xe(n.fullPath??n.from);e.kind=me,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)ve(e,t,r,s,i,a,o)}function ye(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function be(e){if(e.pathless)for(let t of e.pathless)be(t);if(e.static)for(let t of e.static.values())be(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())be(t);if(e.dynamic?.length){e.dynamic.sort(ye);for(let t of e.dynamic)be(t)}if(e.optional?.length){e.optional.sort(ye);for(let t of e.optional)be(t)}if(e.wildcard?.length){e.wildcard.sort(ye);for(let t of e.wildcard)be(t)}}function xe(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Se(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Ce(e,t){let n=xe(`/`),r=new Uint16Array(6);for(let t of e)ve(!1,r,t,1,n,0);be(n),t.masksTree=n,t.flatCache=pe(1e3)}function we(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=ke(e,t.masksTree);return t.flatCache.set(e,r),r}function Te(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=xe(`/`),ve(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ke(r,o,n)}function Ee(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ke(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=je(a.route)),t.matchCache.set(r,a),a}function De(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function Oe(e,t=!1,n){let r=xe(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return ve(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&fe(),a[e.id]=e,s!==0&&e.path){let t=De(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),be(r),{processedTree:{segmentTree:r,singleCache:pe(1e3),matchCache:pe(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function ke(e,t,n=!1){let r=e.split(`/`),i=Ne(e,r,t,n);if(!i)return null;let[a]=Ae(e,r,i);return{route:i.node.route,rawParams:a}}function Ae(e,t,n){let r=Me(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===me)break;if(u.kind===he){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function je(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Me(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ne(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!O(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!Le(l,n))continue;if(i.parse){if(!Ie(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==me&&Le(c,n)&&(c=n);let v=u===o;if(v&&(i.route&&(!a||i.kind===me||i.kind===2)&&Le(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[u],b;if(v&&i.index){let n={node:i.index,index:u,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(Ie(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&Fe(p,o))return n;Le(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:u,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:u+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+Pe(o,u),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,depth:f+1,statics:p,dynamics:m+Pe(o,u),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+Pe(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+Pe(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:u,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Pe(e,t){return 2**(e-t-1)}function Fe(e,t){return e===2**(t-1)-1}function Ie(e,t,n){let r,i;try{[r,i]=Ae(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Le(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===me)>(e.node.kind===me)||t.node.kind===me==(e.node.kind===me)&&t.depth>e.depth))):!0}function Re(e){return ze(e.filter(e=>e!==void 0).join(`/`))}function ze(e){return e.replace(/\/{2,}/g,`/`)}function Be(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Ve(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function He(e){return Ve(Be(e))}function Ue(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function We(e,t,n){return Ue(e,n)===Ue(t,n)}function Ge({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&O(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(O(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=ze(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function Ke(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function qe(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Ye(e,n)).join(`/`):Ye(r,n):r}function Je({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=_e(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=qe(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=qe(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=qe(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Ye(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function Xe(e){return e?.isNotFound===!0}function Ze(){try{return sessionStorage}catch{return}}var Qe=`tsr-scroll-restoration-v1_3`,$e=Ze();function et(){try{return JSON.parse($e?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function tt(){try{$e?.setItem(Qe,JSON.stringify(nt))}catch{}}var nt=et(),rt=`data-scroll-restoration-id`,it=e=>e.state.__TSR_key||e.href;function at(e){let t=e.getAttribute(rt);if(t)return`[${rt}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var ot=!1,st=`window`;function ct(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function lt(e){let t=new Set;for(let n of e){if(n===st)continue;let e=ct(n);e&&t.add(e)}return t}function ut(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||it,a=new Set,o=e=>{let t=nt[e]||={};for(let e of a)e===document?t[st]={scrollX,scrollY}:e.isConnected&&(t[at(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,ot=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{ot||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),tt()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=nt[d];if(e){let t=nt[u];for(let n in e){if(n===st){if(s)continue}else{let e=ct(n);if(!e||s&&o&&(l??=lt(o),l.has(e)))continue}t||=nt[u]={},t[n]??=e[n]}}}ot=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=lt(o));let t=e&&i&&c,s=r.restoring?nt[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===st){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=ct(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{ot=!1}}))}function dt(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function ft(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function pt(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=ft(r):Array.isArray(t)?t.push(ft(r)):n[e]=[t,ft(r)]}return n}var mt=gt(JSON.parse),ht=_t(JSON.stringify,JSON.parse);function gt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=pt(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function _t(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=dt(e,r);return t?`?${t}`:``}}var vt=`__root__`;function yt(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function bt(e){return e instanceof Response&&!!e.options}function xt(e){return{input:({url:t})=>{for(let n of e)t=Ct(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=wt(e[n],t);return t}}}function St(e){let t=He(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Re([`/`,t,e.pathname]),e)}}function Ct(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function wt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Tt(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>Et(o,_.get())),x=r(()=>Et(s,v.get())),S=r(()=>Et(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=pe(64);function O(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let k={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:O,setMatches:A,setPending:j,setCached:M};A(e.matches),a?.(k);function A(e){Dt(e,o,_,n,i)}function j(e){Dt(e,s,v,n,i)}function M(e){Dt(e,c,y,n,i)}return k}function Et(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function Dt(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}de(n.get(),a)||n.set(a)})}var Ot=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},kt=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),At=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),jt=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Mt=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},Nt=(e,t,n)=>{if(!(!bt(n)&&!Xe(n)))throw bt(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:bt(n)?`redirected`:Xe(n)?`notFound`:r.status===`pending`?`success`:r.status,context:jt(e,t.index),isFetching:!1,error:n})),Xe(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),bt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Pt=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Ft=(e,t,n)=>{let r=jt(e,n);e.updateMatch(t,e=>({...e,context:r}))},It=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,Nt(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,Nt(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!bt(n)&&!Xe(n)&&(e.serialError??=n)},Lt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!At(e,t)&&(n.options.loader||n.options.beforeLoad||Jt(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Ot(e)},i);r._nonReactive.pendingTimeout=t}},Rt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Lt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&Nt(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},zt=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=L(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&It(e,n,o),s&&It(e,n,s),Lt(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=L();let f={...jt(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,g=At(e,t),_={search:p,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(bt(r)||Xe(r))&&(u(),It(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},y;try{if(y=r.options.beforeLoad(_),R(y))return u(),y.catch(t=>{It(e,n,t)}).then(v)}catch(t){u(),It(e,n,t)}v(y)},Bt=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>zt(e,n,t,i),s=()=>{if(Pt(e,n))return;let t=Rt(e,n,i);return R(t)?t.then(o):o()};return a()},Vt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Ht=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=jt(e,r),d=At(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Ut=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{qt(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Ht(e,t,n,r,i)),l=!!s&&R(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;Nt(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:jt(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:jt(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,Xe(t)&&await i.options.notFoundComponent?.preload?.(),Nt(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,Nt(e,e.router.getMatch(n),t)}!bt(o)&&!Xe(o)&&await qt(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:jt(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),Nt(e,r,t)}},Wt=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(Ht(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Ut(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){bt(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Ut(e,t,i,n,d):Ft(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Pt(e,i)){if(!e.router.getMatch(i))return e.matches[n];Ft(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=At(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&Nt(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=L(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function Gt(e){let t=e,n=[];kt(t.router)&&Ot(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Bt(t,e);R(n)&&await n}catch(e){if(bt(e))throw e;if(Xe(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?Mt(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(Wt(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(bt(e))throw e;Xe(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=Mt(t,l);e===void 0&&fe();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await qt(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await qt(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=Vt(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=Ot(t);if(R(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Kt(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function qt(e,t=Yt){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===Yt?(()=>{if(e._componentsPromise===void 0){let t=Kt(e,Yt);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Kt(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Jt(e){for(let t of Yt)if(e.options[t]?.preload)return!0;return!1}var Yt=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`],Xt=`__TSR_index`,Zt=`popstate`,Qt=`beforeunload`;function $t(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=rn(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Xt];i=en(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Xt];i=en(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Xt]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function en(e,t){t||={};let n=an();return{...t,key:n,__TSR_key:n,[Xt]:e}}function tn(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>rn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=an();t.history.replaceState({[Xt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=rn(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[Xt]-l.state[Xt],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=$t({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Qt,S,{capture:!0}),t.removeEventListener(Zt,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Qt,S,{capture:!0}),t.addEventListener(Zt,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function nn(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function rn(e,t){let n=nn(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=an();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[Xt]:0,key:a,__TSR_key:a}}}function an(){return(Math.random()+1).toString(36).substring(7)}function on(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var sn=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Ke(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tn()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=pe(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Tt(un(this.latestLocation),e),ut(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=He(o);t&&t!==`/`&&e.push(St({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:xt(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Oe(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&Ce(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:le(e).path,external:!1,searchStr:o,search:P(t?.search,i),hash:le(r.slice(1)).path,state:F(t?.state,a)}}let o=new URL(i,this.origin),s=Ct(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:le(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:P(t?.search,c),hash:le(s.hash.slice(1)).path,state:F(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Ge({base:e,to:t.includes(`//`)?ze(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>fn({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,A(t.params,s)),d=this.routesByPath[Ve(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&N(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:le(Je({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,dn(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=pn({search:m,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),m=P(o,m);let h=this.options.stringifySearch(m),g=t.hash===!0?n.hash:t.hash?A(t.hash,n.hash):void 0,_=g?`#${g}`:``,v=t.state===!0?n.state:t.state?A(t.state,n.state):{};v=F(n.state,v);let y=`${p}${h}${_}`,b,x,S=!1;if(this.rewrite){let e=new URL(y,this.origin),t=wt(this.rewrite,e);b=e.href.replace(e.origin,``),t.origin===this.origin?x=t.pathname+t.search+t.hash:(x=t.href,S=!0)}else b=ue(y),x=b;return{publicHref:x,href:b,pathname:p,search:m,searchStr:h,state:v,hash:g??``,external:S,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=we(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,A(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=ie(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=Ve(this.latestLocation.href)===Ve(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=L(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=rn(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Ct(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(ce(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t&&(this._scroll.hash=t===`PUSH`||t===`REPLACE`);let n=this.latestLocation,r=on(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Gt({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){bt(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):Xe(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(on(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&ce(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=qt,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await Gt({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(bt(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});Xe(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=Te(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!ie(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?ie(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ht,parseSearch:e.parseSearch??mt,protocolAllowlist:e.protocolAllowlist??se}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=je(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:Ve(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?hn(this.options.notFoundMode,a):void 0,c=Array(a.length),l=new Map;for(let e of this.stores.matchStores.values())e.routeId&&l.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],u,d,f;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=dn(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof cn||(r=new cn(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,m=p?JSON.stringify(p):``,{interpolatedPath:h,usedParams:g}=Je({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),_=r.id+h+m,v=this.getMatch(_),y=l.get(r.id),b=v?._strictParams??g,x;if(!v)try{gn(r,b)}catch(e){if(x=Xe(e)||bt(e)?e:new ln(e.message,{cause:e}),t?.throwOnError)throw x}Object.assign(i,b);let S=y?`stay`:`enter`,C;if(v)C={...v,cause:S,params:y?.params??i,_strictParams:b,search:P(y?y.search:v.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Jt(r)?`pending`:`success`;C={id:_,ssr:r.options.ssr,index:n,routeId:r.id,params:y?.params??i,_strictParams:b,pathname:h,updatedAt:Date.now(),search:y?P(y.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:x,__routeContext:void 0,_nonReactive:{loadPromise:L()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:S,loaderDeps:y?F(y.loaderDeps,p):p,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(C.globalNotFound=s===r.id),C.searchError=f;let w=this.getParentContext(o);C.context={...w,...C.__routeContext,...C.__beforeLoadContext},c[n]=C}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=l.get(n.routeId);if(n.params=o?P(o.params,i):i,!a){let i=c[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let t=O(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];let{matchedRoutes:r,routeParams:i}=this.getMatchedRoutes(e.pathname),a=O(r),o={...e.search};for(let e of r)try{Object.assign(o,dn(e.options.validateSearch,o))}catch{}let s=t&&this.stores.matchStores.get(t)?.get(),c=s&&s.routeId===a.id&&s.pathname===e.pathname,l;if(c)l=s.params;else{let e=Object.assign(Object.create(null),i);for(let t of r)try{gn(t,e)}catch{}l=e}let u={matchedRoutes:r,fullPath:a.fullPath,search:o,params:l};return this.lightweightCache.set(e,[t,u]),u}},cn=class extends Error{},ln=class extends Error{};function un(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function dn(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new cn(`Async validation not supported`);if(n.issues)throw new cn(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function fn({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=Ve(e),a,o=Ee(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function pn({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return mn(n)(e,t,r??!1)}function mn(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=dn(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=A(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function hn(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return vt}function gn(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var _n=`Error preloading route! ☝️`,vn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=vt:this.parentRoute||fe();let r=n?vt:t?.path;r&&r!==`/`&&(r=Be(r));let i=t?.id||r,a=n?vt:Re([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Re([`/`,a]));let o=a===`__root__`?`/`:Re([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=Ve(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>yt({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},yn=class extends vn{constructor(e){super(e)}},B=r();function bn(e){let t=e.errorComponent??Sn;return(0,B.jsx)(xn,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var xn=class extends C.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Sn({error:e}){let[t,n]=C.useState(!1);return(0,B.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,B.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,B.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,B.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,B.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,B.jsx)(`div`,{children:(0,B.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,B.jsx)(`code`,{children:e.message}):null})}):null]})}function Cn({children:e,fallback:t=null}){return wn()?(0,B.jsx)(C.Fragment,{children:e}):(0,B.jsx)(C.Fragment,{children:t})}function wn(){return C.useSyncExternalStore(Tn,()=>!0,()=>!1)}function Tn(){return()=>{}}var En=C.createContext(null);function Dn(e){return C.useContext(En)}var On=C.createContext(void 0),kn=C.createContext(void 0),An=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(An||{});function jn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Mn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Nn=[],Pn=0,{link:Fn,unlink:In,propagate:Ln,checkDirty:Rn,shallowPropagate:zn}=jn({update(e){return e._update()},notify(e){Nn[Vn++]=e,e.flags&=~An.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=An.Mutable|An.Dirty,Gn(e))}}),Bn=0,Vn=0,Hn,Un=0;function Wn(e){try{++Un,e()}finally{--Un||Kn()}}function Gn(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=In(n,e)}function Kn(){if(!(Un>0)){for(;Bn<Vn;){let e=Nn[Bn];Nn[Bn++]=void 0,e.notify()}Bn=0,Vn=0}}function qn(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?An.None:An.Mutable,get(){return Hn!==void 0&&Fn(i,Hn,Pn),i._snapshot},subscribe(e){let t=Mn(e),n={current:!1},r=Jn(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Hn,o=t?.compare??Object.is;if(n)Hn=i,++Pn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=An.Mutable|An.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Hn=a,n&&(i.flags&=~An.RecursedCheck),Gn(i)}}};return n?(i.flags=An.Mutable|An.Dirty,i.get=function(){let e=i.flags;if(e&An.Dirty||e&An.Pending&&Rn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&zn(e)}}else e&An.Pending&&(i.flags=e&~An.Pending);return Hn!==void 0&&Fn(i,Hn,Pn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Ln(e),zn(e),Kn())}},i}function Jn(e){let t=()=>{let t=Hn;Hn=n,++Pn,n.depsTail=void 0,n.flags=An.Watching|An.RecursedCheck;try{return e()}finally{Hn=t,n.flags&=~An.RecursedCheck,Gn(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:An.Watching|An.RecursedCheck,notify(){let e=this.flags;e&An.Dirty||e&An.Pending&&Rn(this.deps,this)?t():this.flags=An.Watching},stop(){this.flags=An.None,this.depsTail=void 0,Gn(this)}};return t(),n}var Yn=e((e=>{var n=t();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.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),Xn=e(((e,t)=>{t.exports=Yn()})),Zn=e((e=>{var n=t(),r=Xn();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=n.useRef,c=n.useEffect,l=n.useMemo,u=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Qn=e(((e,t)=>{t.exports=Zn()})),$n=i(Qn(),1);function er(e,t){return e===t}function tr(e,t,n=er){let r=(0,C.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,C.useCallback)(()=>e?.get(),[e]);return(0,$n.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var nr={get(){},subscribe(){return{unsubscribe(){}}}};function rr(e,t){let n=C.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=F(n.current,i):i}}function ir(e){let t=Dn(),n=C.useContext(e.from?kn:On),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),i=rr(e,t),a=tr(r??nr,e=>e?i(e):nr);if(a!==nr)return a;(e.shouldThrow??!0)&&fe()}function ar(e){return ir({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function or(e){let{select:t,...n}=e;return ir({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function sr(e){return ir({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function cr(e){return ir({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function lr(e){let t=Dn();return C.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function ur(e){let t=Dn(),n=lr(),r=C.useRef(null);return w(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function dr(e){return ir({...e,select:t=>e.select?e.select(t.context):t.context})}var fr=i(b(),1);function pr(e,t){let n=Dn(),r=D(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:w,onMouseEnter:T,onMouseLeave:O,onTouchStart:k,ignoreBlocker:j,params:M,search:N,hash:ee,state:P,mask:F,reloadDocument:I,unsafeRelative:te,from:ne,_fromLocation:re,...L}=e,R=wn(),ae=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),oe=tr(n.stores.location,e=>e,(e,t)=>e.href===t.href),z=C.useMemo(()=>{let e={_fromLocation:oe,...ae};return n.buildLocation(e)},[n,oe,ae]),se=z.maskedLocation?z.maskedLocation.publicHref:z.publicHref,le=z.maskedLocation?z.maskedLocation.external:z.external,ue=C.useMemo(()=>Sr(se,le,n.history,v),[v,le,se,n.history]),de=C.useMemo(()=>{if(ue?.external)return ce(ue.href,n.protocolAllowlist)?void 0:ue.href;if(!Cr(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),ce(s,n.protocolAllowlist)?void 0:s}catch{}},[s,ue,n.protocolAllowlist]),fe=C.useMemo(()=>{if(de)return!1;if(o?.exact){if(!We(oe.pathname,z.pathname,n.basepath))return!1}else{let e=Ue(oe.pathname,n.basepath),t=Ue(z.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!ie(oe.search,z.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?R&&oe.hash===z.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,oe,de,R,z.hash,z.pathname,z.search,n.basepath]),pe=fe?A(i,{})??hr:mr,me=fe?mr:A(a,{})??mr,he=[b,pe.className,me.className].filter(Boolean).join(` `),ge=(y||pe.style||me.style)&&{...y,...pe.style,...me.style},[_e,ve]=C.useState(!1),ye=C.useRef(!1),be=e.reloadDocument||de?!1:c??n.options.defaultPreload,xe=l??n.options.defaultPreloadDelay??0,Se=C.useCallback(()=>{n.preloadRoute({...ae,_builtLocation:z}).catch(e=>{console.warn(e),console.warn(_n)})},[n,ae,z]);E(r,C.useCallback(e=>{e?.isIntersecting&&Se()},[Se]),br,{disabled:!!v||be!==`viewport`}),C.useEffect(()=>{ye.current||!v&&be===`render`&&(Se(),ye.current=!0)},[v,Se,be]);let Ce=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;if(!v&&!Tr(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,fr.flushSync)(()=>{ve(!0)});let t=n.subscribe(`onResolved`,()=>{t(),ve(!1)});n.navigate({...ae,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:j})}};if(de)return{...L,ref:r,href:de,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...w&&{onFocus:w},...T&&{onMouseEnter:T},...O&&{onMouseLeave:O},...k&&{onTouchStart:k}};let we=e=>{if(v||be!==`intent`)return;if(!xe){Se();return}let t=e.currentTarget;if(yr.has(t))return;let n=setTimeout(()=>{yr.delete(t),Se()},xe);yr.set(t,n)},Te=e=>{v||be!==`intent`||Se()},Ee=e=>{if(v||!be||!xe)return;let t=e.currentTarget,n=yr.get(t);n&&(clearTimeout(n),yr.delete(t))};return{...L,...pe,...me,href:ue?.href,ref:r,onClick:xr([x,Ce]),onBlur:xr([S,Ee]),onFocus:xr([w,we]),onMouseEnter:xr([T,we]),onMouseLeave:xr([O,Ee]),onTouchStart:xr([k,Te]),disabled:!!v,target:_,...ge&&{style:ge},...he&&{className:he},...v&&gr,...fe&&_r,...R&&_e&&vr}}var mr={},hr={className:`active`},gr={role:`link`,"aria-disabled":!0},_r={"data-status":`active`,"aria-current":`page`},vr={"data-transitioning":`transitioning`},yr=new WeakMap,br={rootMargin:`100px`},xr=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Sr(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Cr(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var wr=C.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=pr(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return C.createElement(`a`,t,o)}return C.createElement(n,a,o)});function Tr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Er=class extends vn{constructor(e){super(e),this.useMatch=e=>ir({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>dr({...e,from:this.id}),this.useSearch=e=>cr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>sr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>or({...e,from:this.id}),this.useLoaderData=e=>ar({...e,from:this.id}),this.useNavigate=()=>lr({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,B.jsx)(wr,{ref:t,from:this.fullPath,...e}))}};function Dr(e){return new Er(e)}var Or=class extends yn{constructor(e){super(e),this.useMatch=e=>ir({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>dr({...e,from:this.id}),this.useSearch=e=>cr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>sr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>or({...e,from:this.id}),this.useLoaderData=e=>ar({...e,from:this.id}),this.useNavigate=()=>lr({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,B.jsx)(wr,{ref:t,from:this.fullPath,...e}))}};function kr(e){return new Or(e)}function Ar(e){let t=Dn(),n=`not-found-${tr(t.stores.location,e=>e.pathname)}-${tr(t.stores.status,e=>e)}`;return(0,B.jsx)(bn,{getResetKey:()=>n,onCatch:(t,n)=>{if(Xe(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Xe(t))return e.fallback?.(t);throw t},children:e.children})}function jr(){return(0,B.jsx)(`p`,{children:`Not Found`})}function Mr(e){return(0,B.jsx)(B.Fragment,{children:e.children})}function Nr(e,t,n){return t.options.notFoundComponent?(0,B.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,B.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,B.jsx)(jr,{})}var Pr=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,Fr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ir=C.memo(function({matchId:e}){let t=Dn(),n=t.stores.matchStores.get(e);n||fe();let r=tr(t.stores.loadedAt,e=>e),i=tr(n,e=>e,Pr);return(0,B.jsx)(Lr,{router:t,matchId:e,resetKey:r,matchState:C.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Lr({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,B.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?C.Suspense:Mr,f=s?bn:Mr,p=l?Ar:Mr;return(0,B.jsxs)(i.isRoot?i.options.shellComponent??Mr:Mr,{children:[(0,B.jsx)(On.Provider,{value:t,children:(0,B.jsx)(d,{fallback:o,children:(0,B.jsx)(f,{getResetKey:()=>n,errorComponent:s||Sn,onCatch:(e,t)=>{if(Xe(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,B.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return C.createElement(l,e)},children:u||r._displayPending?(0,B.jsx)(Cn,{fallback:o,children:(0,B.jsx)(zr,{matchId:t})}):(0,B.jsx)(zr,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Rr,{}),(e.options.scrollRestoration,null)]}):null]})}function Rr(){let e=Dn(),t=C.useRef();return w(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...on(e.stores.location.get(),r??n)}),t.current=n},[tr(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var zr=C.memo(function({matchId:e}){let t=Dn(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||fe();let i=tr(r,e=>e),a=i.routeId,o=t.routesById[a],s=C.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=C.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,B.jsx)(e,{},s):(0,B.jsx)(Br,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=L();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return Xe(i.error)||fe(),Nr(t,o,i.error);if(i.status===`redirected`)throw bt(i.error)||fe(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Br=C.memo(function(){let e=Dn(),t=C.useContext(On),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=tr(a,e=>[e?.routeId,e?.globalNotFound??!1],Fr),i=tr(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,B.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||fe(),Nr(e,a,void 0);if(!i)return null;let s=(0,B.jsx)(Ir,{matchId:i});return n===`__root__`?(0,B.jsx)(C.Suspense,{fallback:o,children:s}):s});function Vr(){let e=Dn(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=tr(e.stores.isLoading,e=>e),a=tr(e.stores.hasPending,e=>e),o=T(i),s=i||n||a,c=T(s),l=i||a,u=T(l);return e.startTransition=e=>{r(!0),C.startTransition(()=>{e(),r(!1)})},C.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ve(e.latestLocation.publicHref)!==Ve(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),w(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),w(()=>{o&&!i&&e.emit({type:`onLoad`,...on(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),w(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...on(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),w(()=>{if(c&&!s){let t=on(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),Wn(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function Hr(){let e=Dn(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,B.jsx)(t,{}):null,r=(0,B.jsxs)(typeof document<`u`&&e.ssr?Mr:C.Suspense,{fallback:n,children:[(0,B.jsx)(Vr,{}),(0,B.jsx)(Ur,{})]});return e.options.InnerWrap?(0,B.jsx)(e.options.InnerWrap,{children:r}):r}function Ur(){let e=Dn(),t=tr(e.stores.firstId,e=>e),n=tr(e.stores.loadedAt,e=>e),r=t?(0,B.jsx)(Ir,{matchId:t}):null;return(0,B.jsx)(On.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,B.jsx)(bn,{getResetKey:()=>n,errorComponent:Sn,onCatch:void 0,children:r})})}var Wr=e=>({createMutableStore:qn,createReadonlyStore:qn,batch:Wn}),Gr=e=>new Kr(e),Kr=class extends sn{constructor(e){super(e,Wr)}};function qr({router:e,children:t,...n}){N(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,B.jsx)(En.Provider,{value:e,children:t});return e.options.Wrap?(0,B.jsx)(e.options.Wrap,{children:r}):r}function Jr({router:e,...t}){return(0,B.jsx)(qr,{router:e,...t,children:(0,B.jsx)(Hr,{})})}var Yr=`studioModel`,Xr=`.png,.jpg,.jpeg,.webp,.gif,.pdf,.txt,.md,.csv,.json`;function Zr(e){return ei(e)&&e.type===`pipeline_log`&&ei(e.log)}function Qr(e){return ei(e)&&e.type===`pipeline_final`&&`output`in e}function $r(e){return ei(e)&&e.type===`error`}function ei(e){return typeof e==`object`&&!!e}function ti(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];function o(){if(i===void 0)return;let e=n[r];r+=1;let t=a[i];t?.kind===`message`&&t.role===`assistant`&&t.traceId===void 0&&e!==void 0&&(a[i]={...t,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 ni(e){let t=e.metadata?.[Yr];return typeof t==`string`?t:``}function ri(e,t){return t.length>0&&e.some(e=>e.ref===t)}function ii(e){let t=e.providerName??e.providerId,n=e.name??e.id,r=e.modalities?.input.filter(e=>e!==`text`).map(e=>e.slice(0,3)).join(`/`);return r===void 0||r.length===0?`${t} / ${n}`:`${t} / ${n} (${r})`}async function ai(e){let t=e.type||di(e.name),n=t.startsWith(`image/`)?`image`:`document`;if(!ui(t,e.name))throw Error(`Unsupported attachment type: ${e.name}`);return{id:globalThis.crypto.randomUUID(),name:e.name,mediaType:t,kind:n,data:await oi(e),size:e.size}}function oi(e){return new Promise((t,n)=>{let r=new FileReader;r.onerror=()=>n(r.error??Error(`Failed to read ${e.name}`)),r.onload=()=>{let i=r.result;if(typeof i!=`string`){n(Error(`Failed to read ${e.name}`));return}t(i.slice(i.indexOf(`,`)+1))},r.readAsDataURL(e)})}function si(e,t){let n=[];e.length>0&&n.push({type:`text`,text:e});for(let e of t){if(e.kind===`image`){n.push({type:`image`,source:{type:`base64`,data:e.data,mediaType:e.mediaType}});continue}n.push({type:`document`,source:{type:`base64`,data:e.data,mediaType:e.mediaType,filename:e.name}})}return n}function ci(e,t){return{id:pi(`msg`),role:`user`,parts:si(e,t).map(e=>e.type===`text`?{id:pi(`part`),type:`text`,text:e.text}:{id:pi(`part`),type:`data`,name:e.type,data:e})}}function li(e){return e.map(e=>({kind:e.kind,name:e.name,mediaType:e.mediaType,data:e.data}))}function ui(e,t){return e.startsWith(`image/`)||e===`application/pdf`||e.startsWith(`text/`)||[`application/json`,`text/markdown`,`text/csv`].includes(e)||/\.(md|csv|json|txt)$/i.test(t)}function di(e){return/\.png$/i.test(e)?`image/png`:/\.jpe?g$/i.test(e)?`image/jpeg`:/\.webp$/i.test(e)?`image/webp`:/\.gif$/i.test(e)?`image/gif`:/\.pdf$/i.test(e)?`application/pdf`:/\.md$/i.test(e)?`text/markdown`:/\.csv$/i.test(e)?`text/csv`:/\.json$/i.test(e)?`application/json`:`text/plain`}var fi=0;function pi(e){let t=globalThis.crypto?.randomUUID?.();return t===void 0?(fi+=1,`${e}_${fi.toString(36)}`):`${e}_${t}`}var mi=`anvia-studio-theme`;function hi(){if(typeof window>`u`)return`dark`;try{let e=window.localStorage.getItem(mi);return e===`light`||e===`dark`?e:`dark`}catch{return`dark`}}function gi(e){typeof document>`u`||(document.documentElement.classList.toggle(`dark`,e===`dark`),document.documentElement.style.colorScheme=e)}function _i(e){try{window.localStorage.setItem(mi,e)}catch{}}var vi=hi();gi(vi);function yi(){let[e,t]=(0,C.useState)(()=>vi);return(0,C.useEffect)(()=>{gi(e),_i(e)},[e]),{theme:e,toggleTheme:()=>t(e=>e===`dark`?`light`:`dark`)}}function bi(e){let{enabled:t,onError:n,selectedAgentId:r}=e,[i,a]=(0,C.useState)(),[o,c]=(0,C.useState)(``);return(0,C.useEffect)(()=>{if(!t||r===void 0){a(void 0),c(``);return}let e=r,i=!1;async function o(){try{let t=await fetch(`/agents/${encodeURIComponent(e)}/models`);if(!t.ok)throw Error(`Agent models failed with HTTP ${t.status}`);let n=await t.json();if(i)return;a(n),c(e=>ri(n.models,e)?e:n.defaultModel??n.models[0]?.ref??``)}catch(e){i||(a(void 0),c(``),n(s(e)))}}return o(),()=>{i=!0}},[t,n,r]),{selectedAgentModels:i!==void 0&&i.agentId===r?i.models:[],selectedModelRef:o,setSelectedModelRef:c}}function xi(e){let t=[];for(let n of e){let e=ki(n.parts);if(n.role===`system`){e.length>0&&t.push(f.system(e,Ci(n.metadata)));continue}if(n.role===`user`){let e=[];for(let t of n.parts){if(t.type===`text`){e.push(d.text(t.text));continue}if(t.type===`attachment`){e.push(ji(t.attachment));continue}if(t.type===`data`&&Ii(t.data)){e.push(t.data);continue}throw TypeError(`User UI messages can only be converted from text, attachment, or image/document data parts.`)}e.length>0&&t.push(f.user(e,Ci(n.metadata)));continue}if(n.role===`assistant`){let e=[],r=[];for(let t of n.parts){if(t.type===`text`&&t.text.length>0){e.push(g.text(t.text));continue}if(t.type===`reasoning`&&t.text.length>0){e.push(g.reasoning(t.text,t.reasoningId));continue}t.type===`tool`&&(t.state===`input-streaming`||t.state===`input-available`||t.state===`output-available`)&&(e.push(g.toolCall(t.toolCallId,t.toolName,t.input??{},t.callId)),t.state===`output-available`&&r.push(m.toolResult(t.toolCallId,Ai(t.output),{callId:t.callId,toolName:t.toolName})))}e.length>0&&t.push(f.assistant(e,{id:n.id,...Ci(n.metadata)})),r.length>0&&t.push(f.tool(r));continue}let r=[];for(let e of n.parts)e.type!==`tool`||e.state!==`output-available`||r.push(m.toolResult(e.toolCallId,Ai(e.output),{callId:e.callId,toolName:e.toolName}));r.length>0&&t.push(f.tool(r,Ci(n.metadata)))}return t}function Si(e){let t=[],n={byToolCallId:new Map,byCallId:new Map};for(let r of e){if(r.role===`system`){t.push({id:Vi(`msg`),role:`system`,parts:[{id:Vi(`part`),type:`text`,text:r.content}],...wi(r.metadata)});continue}if(r.role===`user`){let e=[];for(let t of r.content)t.type===`text`?e.push({id:Vi(`part`),type:`text`,text:t.text}):e.push({id:Vi(`part`),type:`attachment`,attachment:Mi(t)});t.push({id:Vi(`msg`),role:`user`,parts:e,...wi(r.metadata)});continue}if(r.role===`assistant`){let e=[];for(let t of r.content){if(t.type===`text`){e.push({id:Vi(`part`),type:`text`,text:t.text});continue}if(t.type===`reasoning`){let n={id:Vi(`part`),type:`reasoning`,text:h(t)};t.id!==void 0&&(n.reasoningId=t.id),e.push(n);continue}if(t.type===`tool_call`){let n={id:zi(t.id),type:`tool`,toolName:t.function.name,toolCallId:t.id,state:`input-available`,input:t.function.arguments};t.callId!==void 0&&(n.callId=t.callId),e.push(n);continue}e.push({id:Vi(`part`),type:`data`,name:t.type,data:t})}let i=t.length;t.push({id:r.id??Vi(`msg`),role:`assistant`,parts:e,...wi(r.metadata)}),Ti(e,i,n);continue}let e=[];for(let i of r.content){let a={id:zi(i.id),type:`tool`,toolName:Oi(i,t,n),toolCallId:i.id,state:`output-available`,output:Fi(i.content)};i.callId!==void 0&&(a.callId=i.callId),!(r.metadata===void 0&&Ei(t,n,a))&&e.push(a)}e.length>0&&t.push({id:Vi(`msg`),role:`tool`,parts:e,...wi(r.metadata)})}return t}function Ci(e){if(e===void 0)return{};if(!p(e))throw TypeError(`UI message metadata must be a strict JSON value.`);return{metadata:e}}function wi(e){if(e===void 0)return{};if(!p(e))throw TypeError(`Core message metadata must be a strict JSON value.`);return{metadata:e}}function Ti(e,t,n){for(let[r,i]of e.entries()){if(i.type!==`tool`)continue;let e={messageIndex:t,partIndex:r};n.byToolCallId.set(i.toolCallId,e),i.callId!==void 0&&n.byCallId.set(i.callId,e)}}function Ei(e,t,n){if(n.type!==`tool`)return!1;let r=Di(n.toolCallId,n.callId,t);if(r===void 0)return!1;let i=e[r.messageIndex],a=i?.parts[r.partIndex];if(i===void 0||a?.type!==`tool`)return!1;let o={...a,toolName:n.toolName===`tool`?a.toolName:n.toolName,state:`output-available`};n.output!==void 0&&(o.output=n.output),a.callId===void 0&&n.callId!==void 0&&(o.callId=n.callId,t.byCallId.set(n.callId,r));let s=[...i.parts];return s[r.partIndex]=o,e[r.messageIndex]={...i,parts:s},!0}function Di(e,t,n){return(t===void 0?void 0:n.byCallId.get(t))??n.byToolCallId.get(e)}function Oi(e,t,n){if(e.toolName!==void 0)return e.toolName;let r=Di(e.id,e.callId,n),i=r===void 0?void 0:t[r.messageIndex]?.parts[r.partIndex];return i?.type===`tool`?i.toolName:`tool`}function ki(e){return e.flatMap(e=>e.type===`text`?[e.text]:[]).join(``)}function Ai(e){return[{type:`text`,text:u(e??null)}]}function ji(e){if(e.type===`image`||V(e)){if(e.url!==void 0)return d.imageUrl(e.url,Ni(e));if(e.data!==void 0&&e.mediaType!==void 0)return d.imageBase64(e.data,e.mediaType,Ni(e));throw TypeError(`Image attachments require a url or base64 data with mediaType.`)}if(e.text!==void 0){let t={type:`text`,text:e.text};return e.mediaType!==void 0&&(t.mediaType=e.mediaType),e.name!==void 0&&(t.filename=e.name),{type:`document`,source:t}}let t=e.mediaType??`application/octet-stream`;if(e.url!==void 0)return d.documentUrl(e.url,t,Pi(e));if(e.data!==void 0)return d.documentBase64(e.data,t,Pi(e));throw TypeError(`Document attachments require a url, base64 data, or text.`)}function Mi(e){if(e.type===`image`){let t={id:Vi(`attachment`),type:`image`};return e.detail!==void 0&&(t.detail=e.detail),e.source.type===`url`?t.url=e.source.url:(t.data=e.source.data,t.mediaType=e.source.mediaType),t}let t={id:Vi(`attachment`),type:`document`};return e.source.type===`url`?(t.url=e.source.url,t.mediaType=e.source.mediaType,e.source.filename!==void 0&&(t.name=e.source.filename)):e.source.type===`base64`?(t.data=e.source.data,t.mediaType=e.source.mediaType,e.source.filename!==void 0&&(t.name=e.source.filename)):(t.text=e.source.text,e.source.mediaType!==void 0&&(t.mediaType=e.source.mediaType),e.source.filename!==void 0&&(t.name=e.source.filename)),t}function V(e){return e.type===`file`&&e.mediaType?.startsWith(`image/`)===!0}function Ni(e){return e.detail===void 0?{}:{detail:e.detail}}function Pi(e){return e.name===void 0?{}:{filename:e.name}}function Fi(e){return e.length===1&&e[0]?.type===`text`?e[0].text:e}function Ii(e){return Hi(e)?e.type===`text`?typeof e.text==`string`:e.type===`image`?Li(e):e.type===`document`?Ri(e):!1:!1}function Li(e){return Hi(e.source)?e.source.type===`url`?typeof e.source.url==`string`:e.source.type===`base64`?typeof e.source.data==`string`&&typeof e.source.mediaType==`string`:!1:!1}function Ri(e){return Hi(e.source)?e.source.type===`url`?typeof e.source.url==`string`&&typeof e.source.mediaType==`string`:e.source.type===`base64`?typeof e.source.data==`string`&&typeof e.source.mediaType==`string`:e.source.type===`text`?typeof e.source.text==`string`&&(e.source.mediaType===void 0||typeof e.source.mediaType==`string`):!1:!1}function zi(e){return`tool_${e}`}var Bi=0;function Vi(e){let t=globalThis.crypto?.randomUUID?.();return t===void 0?(Bi+=1,`${e}_${Bi.toString(36)}`):`${e}_${t}`}function Hi(e){return typeof e==`object`&&!!e}async function*Ui(e){let t=e.getReader(),n=new TextDecoder,r=``;try{for(;;){let e=await t.read();if(e.done===!0)break;r+=n.decode(e.value,{stream:!0});let i=r.split(/\r?\n/);r=i.pop()??``;for(let e of i){let t=e.trim();t.length>0&&(yield JSON.parse(t))}}r+=n.decode();let e=r.trim();e.length>0&&(yield JSON.parse(e))}finally{t.releaseLock()}}async function*Wi(e){let t=e.getReader(),n=new TextDecoder,r=``,i=Gi();try{for(;;){let e=await t.read();if(e.done===!0)break;r+=n.decode(e.value,{stream:!0});let a=r.split(/\r?\n/);r=a.pop()??``;for(let e of a){let t=Ki(e,i);i=t.event,t.complete===!0&&t.data!==void 0&&(yield JSON.parse(t.data))}}if(r+=n.decode(),r.length>0){let e=Ki(r,i);i=e.event,e.complete===!0&&e.data!==void 0&&(yield JSON.parse(e.data))}let e=qi(i);e!==void 0&&(yield JSON.parse(e))}finally{t.releaseLock()}}function Gi(){return{data:[]}}function Ki(e,t){if(e===``){let e=qi(t);return e===void 0?{event:Gi(),complete:!0}:{event:Gi(),complete:!0,data:e}}if(e.startsWith(`:`))return{event:t};let n=e.indexOf(`:`),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n+1).replace(/^ /,``);return r===`data`&&t.data.push(i),{event:t}}function qi(e){if(e.data.length!==0)return e.data.join(`
|
|
11
|
-
`)}var Ji=class extends Error{constructor(e,t){super(`Event stream request failed with status ${e.status}`),this.response=e,this.body=t,this.name=`EventStreamHttpError`}response;body};async function*Yi(e,t={}){let n=t.fetch??globalThis.fetch;if(n===void 0)throw Error(`fetchEventStream requires a fetch implementation`);let r=await n(e,Xi(t));if(!r.ok)throw new Ji(r,await r.text());if(r.body===null)throw Error(`Event stream response does not include a body`);if((t.format??Zi(r.headers.get(`content-type`)))===`sse`){yield*Wi(r.body);return}yield*Ui(r.body)}function Xi(e){let{format:t,fetch:n,...r}=e;return r}function Zi(e){return e?.toLowerCase().includes(`text/event-stream`)?`sse`:`jsonl`}function Qi(e){if(la(e)&&!(e.type!==`tool_approval_request`&&e.type!==`tool_approval_result`))return sa(e.approval)?e.approval:void 0}function $i(e){if(la(e)&&!(e.type!==`tool_question_request`&&e.type!==`tool_question_result`))return ca(e.question)?e.question:void 0}async function ea(e,t){let n=ra(t.endpoint,`decideApproval`),r=t.fetch??globalThis.fetch;if(r===void 0)throw Error(`humanInput approval decisions require a fetch implementation`);let i={approved:e.approved};e.reason!==void 0&&(i.reason=e.reason);let a=await r(ia(n,`approvals/${e.approvalId}/decision`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(i)});if(!a.ok)throw Error(`Tool approval decision failed with status ${a.status}`);return oa(a)}async function ta(e,t){let n=ra(t.endpoint,`answerQuestion`),r=t.fetch??globalThis.fetch;if(r===void 0)throw Error(`humanInput question answers require a fetch implementation`);let i=await r(ia(n,`questions/${e.questionId}/answer`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({answers:e.answers})});if(!i.ok)throw Error(`Tool question answer failed with status ${i.status}`);return oa(i)}function na(e,t){let n=e.findIndex(e=>e.id===t.id);if(n===-1)return[...e,t];let r=[...e];return r[n]=t,r}function ra(e,t){if(e===void 0)throw Error(`humanInput.${t} requires endpoint or a custom handler`);return e}function ia(e,t){let n=t.replace(/^\/+/,``);if(e instanceof URL){let t=new URL(e.toString());return t.pathname=aa(t.pathname,n),t}if(/^[a-z][a-z\d+\-.]*:\/\//i.test(e)){let t=new URL(e);return t.pathname=aa(t.pathname,n),t.toString()}return aa(e,n)}function aa(e,t){let n=e.replace(/\/+$/,``),r=t.replace(/^\/+/,``);return n.length===0?`/${r}`:`${n}/${r}`}async function oa(e){let t=await e.text();if(t.trim().length!==0)return JSON.parse(t)}function sa(e){return la(e)&&typeof e.id==`string`&&typeof e.toolName==`string`&&typeof e.status==`string`}function ca(e){return la(e)&&typeof e.id==`string`&&typeof e.toolName==`string`&&typeof e.status==`string`&&Array.isArray(e.questions)}function la(e){return typeof e==`object`&&!!e}function ua(e){return{async*send(t,n={}){let r=typeof e.endpoint==`function`?e.endpoint(t):e.endpoint,i=ha(await fa(e.headers,t),n.headers),a=e.method??`POST`,o=await pa(e.body,t,i,a),s={};Object.assign(s,e.init),s.method=a,s.headers=i,s.format=e.format??`jsonl`,o!==void 0&&(s.body=o),n.signal!==void 0&&(s.signal=n.signal),e.fetch!==void 0&&(s.fetch=e.fetch);for await(let t of Yi(r,s))yield e.mapEvent===void 0?t:e.mapEvent(t)}}}function da(e){return ua(e)}async function fa(e,t){return typeof e==`function`?e(t):e}async function pa(e,t,n,r){if(e!==void 0)return e(t);if(ma(r))return n.has(`content-type`)||n.set(`content-type`,`application/json`),JSON.stringify(t)}function ma(e){let t=e.toUpperCase();return t!==`GET`&&t!==`HEAD`}function ha(...e){let t=new Headers;for(let n of e)n!==void 0&&new Headers(n).forEach((e,n)=>{t.set(n,e)});return t}var ga=`anvia:chat-resume:`;function _a(e){let t=Sa(e),n=xa(e);if(t===void 0||n===void 0)return;let r;try{r=t.getItem(n)}catch{return}if(r!==null)try{let e=JSON.parse(r);return Ca(e)?e:void 0}catch{return}}function va(e,t){let n=Sa(e),r=xa(e);if(!(n===void 0||r===void 0))try{n.setItem(r,JSON.stringify(t))}catch{}}function ya(e){let t=Sa(e),n=xa(e);if(!(t===void 0||n===void 0))try{t.removeItem(n)}catch{}}function ba(e){return Ta(e)?e.type===`stream_start`&&typeof e.streamId==`string`&&e.eventId===0||e.type===`stream_event`&&typeof e.streamId==`string`&&typeof e.eventId==`number`&&`event`in e?!0:e.type===`stream_end`&&typeof e.streamId==`string`&&typeof e.eventId==`number`&&typeof e.status==`string`:!1}function xa(e){if(e!==void 0)return`${ga}${e.key}`}function Sa(e){if(e===void 0)return;if(typeof e.storage==`object`)return e.storage;let t=e.storage??`sessionStorage`;if(globalThis.window!==void 0)try{return t===`localStorage`?window.localStorage:window.sessionStorage}catch{return}}function Ca(e){return Ta(e)&&e.version===1&&typeof e.streamId==`string`&&typeof e.lastEventId==`number`&&Number.isFinite(e.lastEventId)&&e.lastEventId>=0&&Array.isArray(e.messages)&&e.messages.every(wa)}function wa(e){return Ta(e)&&typeof e.id==`string`&&typeof e.role==`string`&&Array.isArray(e.parts)}function Ta(e){return typeof e==`object`&&!!e}function Ea(e){if(Xa(e))return e;let t=typeof e==`string`?e:e.text??``,n=typeof e==`string`?[]:e.attachments??[];if(t.trim().length===0&&n.length===0)return;let r=[];t.trim().length>0&&r.push({id:Ya(`part`),type:`text`,text:t});for(let e of n){let t=Da(e);r.push({id:Ya(`part`),type:`attachment`,attachment:t})}let i={id:typeof e==`string`||e.id===void 0?Ya(`msg`):e.id,role:`user`,parts:r};return typeof e!=`string`&&e.metadata!==void 0&&(i.metadata=e.metadata),i}function Da(e){return{...e,id:e.id??Ya(`attachment`)}}function Oa(e,t){if(t.type===`message_start`){let n=e.findIndex(e=>e.id===t.message.id);if(n===-1)return[...e,t.message];let r=[...e];return r[n]=t.message,r}if(t.type===`text_delta`)return za(e,t.messageId,{id:t.partId,type:`text`,text:t.delta});if(t.type===`reasoning_delta`)return za(e,t.messageId,{id:t.partId,type:`reasoning`,text:t.delta});if(t.type===`tool_update`)return za(e,t.messageId,t.part);if(t.type===`error`){let n=Ya(`msg`);return[...e,{id:n,role:`assistant`,parts:[{id:Ya(`part`),type:`error`,error:t.error}]}]}if(t.type===`message_end`){let{metadata:n}=t;return n===void 0?e:e.map(e=>e.id===t.messageId?{...e,metadata:n}:e)}return e}function ka(e,t){let n=Za(t);if(n!==void 0)return Oa(e,n);if(!(!po(t)||typeof t.type!=`string`)){if(t.type===`text_delta`&&typeof t.delta==`string`)return Pa(e,t.delta);if(t.type===`reasoning_delta`&&typeof t.delta==`string`)return Fa(e,t.delta,typeof t.id==`string`?t.id:void 0);if(t.type===`tool_call_delta`&&typeof t.id==`string`){let n=no(t),r={id:U(t.id,n),type:`tool`,toolName:typeof t.name==`string`?t.name:``,toolCallId:t.id,state:`input-streaming`};return typeof t.callId==`string`&&(r.callId=t.callId),n!==void 0&&(r.turn=n),typeof t.argumentsDelta==`string`&&(r.input=t.argumentsDelta),Ba(e,r)}if(t.type===`tool_call`&&to(t.toolCall)){let n=no(t),r={id:U(t.toolCall.id,n),type:`tool`,toolName:t.toolCall.function.name,toolCallId:t.toolCall.id,state:`input-available`,input:t.toolCall.function.arguments};return typeof t.toolCall.callId==`string`&&(r.callId=t.toolCall.callId),n!==void 0&&(r.turn=n),Ba(e,r)}if(t.type===`tool_result`){let n=typeof t.toolCallId==`string`?t.toolCallId:void 0,r=typeof t.internalCallId==`string`?t.internalCallId:void 0,i=n??r;if(i===void 0||typeof t.toolName!=`string`)return;let a=no(t),o={id:U(i,a),type:`tool`,toolName:t.toolName,toolCallId:i,state:`output-available`,output:`structuredResult`in t&&t.structuredResult!==void 0?so(t.structuredResult):so(t.result)};return n!==void 0&&(o.callId=n),a!==void 0&&(o.turn=a),Ba(e,o,[n,r],oo(t.args))}if(t.type===`message_id`&&typeof t.id==`string`)return Ga(e,{providerMessageId:t.id});if(t.type===`final`){let n=La(t);if(n!==void 0){let r=Ra(e,n);return typeof t.runId==`string`?Ga(r,{runId:t.runId}):r}if(po(t.response)&&Array.isArray(t.response.choice)){let n=ro(t.response.choice),r=n.length>0?Ia(e,n):e,i=t.response.messageId;return typeof i==`string`?Ga(r,{providerMessageId:i}):r}if(typeof t.output==`string`){let n=t.output.length>0?Ia(e,t.output):e;return typeof t.runId==`string`?Ga(n,{runId:t.runId}):n}}if(t.type===`error`&&`error`in t)return Wa(e,io(t.error))}}function Aa(e){let t=[...e].reverse().find(e=>e.role===`assistant`);return t===void 0?``:ja(t)}function ja(e){return e.parts.flatMap(e=>e.type===`text`?[e.text]:[]).join(``)}function Ma(e){let t=e.parts.at(-1);if(t?.type===`text`)return t.id;let n=e.parts.filter(e=>e.type===`text`).length;return n===0?`${e.id}_text`:`${e.id}_text_${n+1}`}function Na(e,t){if(t!==void 0)return`${e.id}_reasoning_${t}`;let n=e.parts.at(-1);if(n?.type===`reasoning`&&n.reasoningId===void 0)return n.id;let r=e.parts.filter(e=>e.type===`reasoning`).length;return r===0?`${e.id}_reasoning`:`${e.id}_reasoning_${r+1}`}function Pa(e,t){let n=qa(e),r=n[n.length-1];return r===void 0?n:za(n,r.id,{id:Ma(r),type:`text`,text:t})}function Fa(e,t,n){let r=qa(e),i=r[r.length-1];if(i===void 0)return r;let a={id:Na(i,n),type:`reasoning`,text:t};return n!==void 0&&(a.reasoningId=n),za(r,i.id,a)}function Ia(e,t){let n=qa(e),r=n[n.length-1];return r===void 0?n:n.map(e=>e.id===r.id?{...e,parts:Ka(e,t)}:e)}function La(e){if(!(!Array.isArray(e.messages)||e.messages.length===0))try{return Si(e.messages)}catch{return}}function Ra(e,t){if(e.length===0||t.length===0)return t;let n=fo(e,e=>e.role===`user`);if(n===-1)return t;let r=t[0];if(r?.role!==`user`)return[...e.slice(0,n+1),...t];let i=e[n];return i===void 0||ja(i)!==ja(r)?t:[...e.slice(0,n),{...r,id:i.id},...t.slice(1)]}function za(e,t,n){return(e.find(e=>e.id===t)===void 0?[...e,{id:t,role:`assistant`,parts:[]}]:e).map(e=>{if(e.id!==t)return e;let r=e.parts.findIndex(e=>e.id===n.id);if(r===-1)return{...e,parts:[...e.parts,n]};let i=[...e.parts],a=i[r];return a?.type===`text`&&n.type===`text`||a?.type===`reasoning`&&n.type===`reasoning`?i[r]={...a,text:`${a.text}${n.text}`}:a?.type===`tool`&&n.type===`tool`?i[r]=Ha(a,n):i[r]=n,{...e,parts:i}})}function Ba(e,t,n=[],r){let i=qa(e),a=i[i.length-1];if(a===void 0)return i;let o=Va(a,t,n,r),s=t;if(o!==void 0){s={...t,id:o.id,toolCallId:o.toolCallId};let e=o.callId??t.callId;e!==void 0&&(s.callId=e)}return za(i,a.id,s)}function Va(e,t,n,r){let i=new Set([t.toolCallId,t.callId,...n].filter(e=>e!==void 0&&e.length>0)),a=e.parts.find(e=>e.type===`tool`&&Ua(e,t)&&(e.id===t.id||i.has(e.toolCallId)||e.callId!==void 0&&i.has(e.callId)));if(a!==void 0||r===void 0)return a;let o=e.parts.filter(e=>e.type===`tool`&&Ua(e,t)&&e.toolName===t.toolName&&e.state!==`output-available`&&e.state!==`error`&&co(e.input??{},r));return o.length===1?o[0]:void 0}function Ha(e,t){let n={...e,...t};return t.toolName.length===0&&(n.toolName=e.toolName),t.callId===void 0&&e.callId!==void 0&&(n.callId=e.callId),t.input===void 0&&e.input!==void 0?n.input=e.input:typeof e.input==`string`&&typeof t.input==`string`&&(n.input=`${e.input}${t.input}`),t.output===void 0&&e.output!==void 0&&(n.output=e.output),t.error===void 0&&e.error!==void 0&&(n.error=e.error),n}function Ua(e,t){return t.turn===void 0?e.turn===void 0:e.turn===t.turn}function Wa(e,t){let n=Ya(`msg`);return[...e,{id:n,role:`assistant`,parts:[{id:Ya(`part`),type:`error`,error:t}]}]}function Ga(e,t){let n=qa(e),r=n[n.length-1];return r===void 0?n:n.map(e=>e.id===r.id?{...e,metadata:uo(e.metadata,t)}:e)}function Ka(e,t){let n=e.parts.findIndex(e=>e.type===`text`);if(n===-1)return[...e.parts,{id:`${e.id}_text`,type:`text`,text:t}];let r=[...e.parts],i=r[n];return i?.type===`text`&&(r[n]={...i,text:t}),r}function qa(e){return e.at(-1)?.role===`assistant`?e:[...e,{id:Ya(`msg`),role:`assistant`,parts:[]}]}var Ja=0;function Ya(e){let t=globalThis.crypto?.randomUUID?.();return t===void 0?(Ja+=1,`${e}_${Ja.toString(36)}`):`${e}_${t}`}function Xa(e){return typeof e!=`string`&&`role`in e&&Array.isArray(e.parts)}function Za(e){if(!(!po(e)||typeof e.type!=`string`)&&(e.type===`message_start`&&Qa(e.message)||(e.type===`text_delta`||e.type===`reasoning_delta`)&&typeof e.messageId==`string`&&typeof e.partId==`string`&&typeof e.delta==`string`||e.type===`tool_update`&&typeof e.messageId==`string`&&typeof e.partId==`string`&&$a(e.part)||e.type===`message_end`&&typeof e.messageId==`string`||e.type===`error`&&eo(e.error)))return e}function Qa(e){return po(e)&&typeof e.id==`string`&&typeof e.role==`string`&&Array.isArray(e.parts)}function $a(e){return po(e)&&typeof e.id==`string`&&typeof e.type==`string`}function eo(e){return po(e)&&typeof e.message==`string`}function to(e){return po(e)&&typeof e.id==`string`&&po(e.function)&&typeof e.function.name==`string`&&`arguments`in e.function}function no(e){return typeof e.turn==`number`&&Number.isFinite(e.turn)?e.turn:void 0}function ro(e){return e.flatMap(e=>po(e)&&e.type===`text`&&typeof e.text==`string`?[e.text]:[]).join(`
|
|
11
|
+
`)}var Ji=class extends Error{constructor(e,t){super(`Event stream request failed with status ${e.status}`),this.response=e,this.body=t,this.name=`EventStreamHttpError`}response;body};async function*Yi(e,t={}){let n=t.fetch??globalThis.fetch;if(n===void 0)throw Error(`fetchEventStream requires a fetch implementation`);let r=await n(e,Xi(t));if(!r.ok)throw new Ji(r,await r.text());if(r.body===null)throw Error(`Event stream response does not include a body`);if((t.format??Zi(r.headers.get(`content-type`)))===`sse`){yield*Wi(r.body);return}yield*Ui(r.body)}function Xi(e){let{format:t,fetch:n,...r}=e;return r}function Zi(e){return e?.toLowerCase().includes(`text/event-stream`)?`sse`:`jsonl`}function Qi(e){if(la(e)&&!(e.type!==`tool_approval_request`&&e.type!==`tool_approval_result`))return sa(e.approval)?e.approval:void 0}function $i(e){if(la(e)&&!(e.type!==`tool_question_request`&&e.type!==`tool_question_result`))return ca(e.question)?e.question:void 0}async function ea(e,t){let n=ra(t.endpoint,`decideApproval`),r=t.fetch??globalThis.fetch;if(r===void 0)throw Error(`humanInput approval decisions require a fetch implementation`);let i={approved:e.approved};e.reason!==void 0&&(i.reason=e.reason);let a=await r(ia(n,`approvals/${e.approvalId}/decision`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(i)});if(!a.ok)throw Error(`Tool approval decision failed with status ${a.status}`);return oa(a)}async function ta(e,t){let n=ra(t.endpoint,`answerQuestion`),r=t.fetch??globalThis.fetch;if(r===void 0)throw Error(`humanInput question answers require a fetch implementation`);let i=await r(ia(n,`questions/${e.questionId}/answer`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({answers:e.answers})});if(!i.ok)throw Error(`Tool question answer failed with status ${i.status}`);return oa(i)}function na(e,t){let n=e.findIndex(e=>e.id===t.id);if(n===-1)return[...e,t];let r=[...e];return r[n]=t,r}function ra(e,t){if(e===void 0)throw Error(`humanInput.${t} requires endpoint or a custom handler`);return e}function ia(e,t){let n=t.replace(/^\/+/,``);if(e instanceof URL){let t=new URL(e.toString());return t.pathname=aa(t.pathname,n),t}if(/^[a-z][a-z\d+\-.]*:\/\//i.test(e)){let t=new URL(e);return t.pathname=aa(t.pathname,n),t.toString()}return aa(e,n)}function aa(e,t){let n=e.replace(/\/+$/,``),r=t.replace(/^\/+/,``);return n.length===0?`/${r}`:`${n}/${r}`}async function oa(e){let t=await e.text();if(t.trim().length!==0)return JSON.parse(t)}function sa(e){return la(e)&&typeof e.id==`string`&&typeof e.toolName==`string`&&typeof e.status==`string`}function ca(e){return la(e)&&typeof e.id==`string`&&typeof e.toolName==`string`&&typeof e.status==`string`&&Array.isArray(e.questions)}function la(e){return typeof e==`object`&&!!e}function ua(e){return{async*send(t,n={}){let r=typeof e.endpoint==`function`?e.endpoint(t):e.endpoint,i=ha(await fa(e.headers,t),n.headers),a=e.method??`POST`,o=await pa(e.body,t,i,a),s={};Object.assign(s,e.init),s.method=a,s.headers=i,s.format=e.format??`jsonl`,o!==void 0&&(s.body=o),n.signal!==void 0&&(s.signal=n.signal),e.fetch!==void 0&&(s.fetch=e.fetch);for await(let t of Yi(r,s))yield e.mapEvent===void 0?t:e.mapEvent(t)}}}function da(e){return ua(e)}async function fa(e,t){return typeof e==`function`?e(t):e}async function pa(e,t,n,r){if(e!==void 0)return e(t);if(ma(r))return n.has(`content-type`)||n.set(`content-type`,`application/json`),JSON.stringify(t)}function ma(e){let t=e.toUpperCase();return t!==`GET`&&t!==`HEAD`}function ha(...e){let t=new Headers;for(let n of e)n!==void 0&&new Headers(n).forEach((e,n)=>{t.set(n,e)});return t}var ga=`anvia:chat-resume:`;function _a(e){let t=Sa(e),n=xa(e);if(t===void 0||n===void 0)return;let r;try{r=t.getItem(n)}catch{return}if(r!==null)try{let e=JSON.parse(r);return Ca(e)?e:void 0}catch{return}}function va(e,t){let n=Sa(e),r=xa(e);if(!(n===void 0||r===void 0))try{n.setItem(r,JSON.stringify(t))}catch{}}function ya(e){let t=Sa(e),n=xa(e);if(!(t===void 0||n===void 0))try{t.removeItem(n)}catch{}}function ba(e){return Ta(e)?e.type===`stream_start`&&typeof e.streamId==`string`&&e.eventId===0||e.type===`stream_event`&&typeof e.streamId==`string`&&typeof e.eventId==`number`&&`event`in e?!0:e.type===`stream_end`&&typeof e.streamId==`string`&&typeof e.eventId==`number`&&typeof e.status==`string`:!1}function xa(e){if(e!==void 0)return`${ga}${e.key}`}function Sa(e){if(e===void 0)return;if(typeof e.storage==`object`)return e.storage;let t=e.storage??`sessionStorage`;if(globalThis.window!==void 0)try{return t===`localStorage`?window.localStorage:window.sessionStorage}catch{return}}function Ca(e){return Ta(e)&&e.version===1&&typeof e.streamId==`string`&&typeof e.lastEventId==`number`&&Number.isFinite(e.lastEventId)&&e.lastEventId>=0&&Array.isArray(e.messages)&&e.messages.every(wa)}function wa(e){return Ta(e)&&typeof e.id==`string`&&typeof e.role==`string`&&Array.isArray(e.parts)}function Ta(e){return typeof e==`object`&&!!e}function Ea(e){if(Xa(e))return e;let t=typeof e==`string`?e:e.text??``,n=typeof e==`string`?[]:e.attachments??[];if(t.trim().length===0&&n.length===0)return;let r=[];t.trim().length>0&&r.push({id:Ya(`part`),type:`text`,text:t});for(let e of n){let t=Da(e);r.push({id:Ya(`part`),type:`attachment`,attachment:t})}let i={id:typeof e==`string`||e.id===void 0?Ya(`msg`):e.id,role:`user`,parts:r};return typeof e!=`string`&&e.metadata!==void 0&&(i.metadata=e.metadata),i}function Da(e){return{...e,id:e.id??Ya(`attachment`)}}function Oa(e,t){if(t.type===`message_start`){let n=e.findIndex(e=>e.id===t.message.id);if(n===-1)return[...e,t.message];let r=[...e];return r[n]=t.message,r}if(t.type===`text_delta`)return za(e,t.messageId,{id:t.partId,type:`text`,text:t.delta});if(t.type===`reasoning_delta`)return za(e,t.messageId,{id:t.partId,type:`reasoning`,text:t.delta});if(t.type===`tool_update`)return za(e,t.messageId,t.part);if(t.type===`error`){let n=Ya(`msg`);return[...e,{id:n,role:`assistant`,parts:[{id:Ya(`part`),type:`error`,error:t.error}]}]}if(t.type===`message_end`){let{metadata:n}=t;return n===void 0?e:e.map(e=>e.id===t.messageId?{...e,metadata:n}:e)}return e}function ka(e,t){let n=Za(t);if(n!==void 0)return Oa(e,n);if(!(!po(t)||typeof t.type!=`string`)){if(t.type===`text_delta`&&typeof t.delta==`string`)return Pa(e,t.delta);if(t.type===`reasoning_delta`&&typeof t.delta==`string`)return Fa(e,t.delta,typeof t.id==`string`?t.id:void 0);if(t.type===`tool_call_delta`&&typeof t.id==`string`){let n=no(t),r={id:U(t.id,n),type:`tool`,toolName:typeof t.name==`string`?t.name:``,toolCallId:t.id,state:`input-streaming`};return typeof t.callId==`string`&&(r.callId=t.callId),n!==void 0&&(r.turn=n),typeof t.argumentsDelta==`string`&&(r.input=t.argumentsDelta),Ba(e,r,{replaceInput:t.argumentsMode===`replace`})}if(t.type===`tool_call`&&to(t.toolCall)){let n=no(t),r={id:U(t.toolCall.id,n),type:`tool`,toolName:t.toolCall.function.name,toolCallId:t.toolCall.id,state:`input-available`,input:t.toolCall.function.arguments};return typeof t.toolCall.callId==`string`&&(r.callId=t.toolCall.callId),n!==void 0&&(r.turn=n),Ba(e,r)}if(t.type===`tool_result`){let n=typeof t.toolCallId==`string`?t.toolCallId:void 0,r=typeof t.internalCallId==`string`?t.internalCallId:void 0,i=n??r;if(i===void 0||typeof t.toolName!=`string`)return;let a=no(t),o={id:U(i,a),type:`tool`,toolName:t.toolName,toolCallId:i,state:`output-available`,output:`structuredResult`in t&&t.structuredResult!==void 0?so(t.structuredResult):so(t.result)};n!==void 0&&(o.callId=n),a!==void 0&&(o.turn=a);let s={aliases:[n,r]},c=oo(t.args);return c!==void 0&&(s.inputMatch=c),Ba(e,o,s)}if(t.type===`message_id`&&typeof t.id==`string`)return Ga(e,{providerMessageId:t.id});if(t.type===`final`){let n=La(t);if(n!==void 0){let r=Ra(e,n);return typeof t.runId==`string`?Ga(r,{runId:t.runId}):r}if(po(t.response)&&Array.isArray(t.response.choice)){let n=ro(t.response.choice),r=n.length>0?Ia(e,n):e,i=t.response.messageId;return typeof i==`string`?Ga(r,{providerMessageId:i}):r}if(typeof t.output==`string`){let n=t.output.length>0?Ia(e,t.output):e;return typeof t.runId==`string`?Ga(n,{runId:t.runId}):n}}if(t.type===`error`&&`error`in t)return Wa(e,io(t.error))}}function Aa(e){let t=[...e].reverse().find(e=>e.role===`assistant`);return t===void 0?``:ja(t)}function ja(e){return e.parts.flatMap(e=>e.type===`text`?[e.text]:[]).join(``)}function Ma(e){let t=e.parts.at(-1);if(t?.type===`text`)return t.id;let n=e.parts.filter(e=>e.type===`text`).length;return n===0?`${e.id}_text`:`${e.id}_text_${n+1}`}function Na(e,t){if(t!==void 0)return`${e.id}_reasoning_${t}`;let n=e.parts.at(-1);if(n?.type===`reasoning`&&n.reasoningId===void 0)return n.id;let r=e.parts.filter(e=>e.type===`reasoning`).length;return r===0?`${e.id}_reasoning`:`${e.id}_reasoning_${r+1}`}function Pa(e,t){let n=qa(e),r=n[n.length-1];return r===void 0?n:za(n,r.id,{id:Ma(r),type:`text`,text:t})}function Fa(e,t,n){let r=qa(e),i=r[r.length-1];if(i===void 0)return r;let a={id:Na(i,n),type:`reasoning`,text:t};return n!==void 0&&(a.reasoningId=n),za(r,i.id,a)}function Ia(e,t){let n=qa(e),r=n[n.length-1];return r===void 0?n:n.map(e=>e.id===r.id?{...e,parts:Ka(e,t)}:e)}function La(e){if(!(!Array.isArray(e.messages)||e.messages.length===0))try{return Si(e.messages)}catch{return}}function Ra(e,t){if(e.length===0||t.length===0)return t;let n=fo(e,e=>e.role===`user`);if(n===-1)return t;let r=t[0];if(r?.role!==`user`)return[...e.slice(0,n+1),...t];let i=e[n];return i===void 0||ja(i)!==ja(r)?t:[...e.slice(0,n),{...r,id:i.id},...t.slice(1)]}function za(e,t,n,r={}){return(e.find(e=>e.id===t)===void 0?[...e,{id:t,role:`assistant`,parts:[]}]:e).map(e=>{if(e.id!==t)return e;let i=e.parts.findIndex(e=>e.id===n.id);if(i===-1)return{...e,parts:[...e.parts,n]};let a=[...e.parts],o=a[i];return o?.type===`text`&&n.type===`text`||o?.type===`reasoning`&&n.type===`reasoning`?a[i]={...o,text:`${o.text}${n.text}`}:o?.type===`tool`&&n.type===`tool`?a[i]=Ha(o,n,r):a[i]=n,{...e,parts:a}})}function Ba(e,t,n={}){let r=qa(e),i=r[r.length-1];if(i===void 0)return r;let a=Va(i,t,n.aliases??[],n.inputMatch),o=t;if(a!==void 0){o={...t,id:a.id,toolCallId:a.toolCallId};let e=a.callId??t.callId;e!==void 0&&(o.callId=e)}return n.replaceInput===!0?za(r,i.id,o,{replaceToolInput:!0}):za(r,i.id,o)}function Va(e,t,n,r){let i=new Set([t.toolCallId,t.callId,...n].filter(e=>e!==void 0&&e.length>0)),a=e.parts.find(e=>e.type===`tool`&&Ua(e,t)&&(e.id===t.id||i.has(e.toolCallId)||e.callId!==void 0&&i.has(e.callId)));if(a!==void 0||r===void 0)return a;let o=e.parts.filter(e=>e.type===`tool`&&Ua(e,t)&&e.toolName===t.toolName&&e.state!==`output-available`&&e.state!==`error`&&co(e.input??{},r));return o.length===1?o[0]:void 0}function Ha(e,t,n={}){let r={...e,...t};return t.toolName.length===0&&(r.toolName=e.toolName),t.callId===void 0&&e.callId!==void 0&&(r.callId=e.callId),t.input===void 0&&e.input!==void 0?r.input=e.input:n.replaceToolInput!==!0&&typeof e.input==`string`&&typeof t.input==`string`&&(r.input=`${e.input}${t.input}`),t.output===void 0&&e.output!==void 0&&(r.output=e.output),t.error===void 0&&e.error!==void 0&&(r.error=e.error),r}function Ua(e,t){return t.turn===void 0?e.turn===void 0:e.turn===t.turn}function Wa(e,t){let n=Ya(`msg`);return[...e,{id:n,role:`assistant`,parts:[{id:Ya(`part`),type:`error`,error:t}]}]}function Ga(e,t){let n=qa(e),r=n[n.length-1];return r===void 0?n:n.map(e=>e.id===r.id?{...e,metadata:uo(e.metadata,t)}:e)}function Ka(e,t){let n=e.parts.findIndex(e=>e.type===`text`);if(n===-1)return[...e.parts,{id:`${e.id}_text`,type:`text`,text:t}];let r=[...e.parts],i=r[n];return i?.type===`text`&&(r[n]={...i,text:t}),r}function qa(e){return e.at(-1)?.role===`assistant`?e:[...e,{id:Ya(`msg`),role:`assistant`,parts:[]}]}var Ja=0;function Ya(e){let t=globalThis.crypto?.randomUUID?.();return t===void 0?(Ja+=1,`${e}_${Ja.toString(36)}`):`${e}_${t}`}function Xa(e){return typeof e!=`string`&&`role`in e&&Array.isArray(e.parts)}function Za(e){if(!(!po(e)||typeof e.type!=`string`)&&(e.type===`message_start`&&Qa(e.message)||(e.type===`text_delta`||e.type===`reasoning_delta`)&&typeof e.messageId==`string`&&typeof e.partId==`string`&&typeof e.delta==`string`||e.type===`tool_update`&&typeof e.messageId==`string`&&typeof e.partId==`string`&&$a(e.part)||e.type===`message_end`&&typeof e.messageId==`string`||e.type===`error`&&eo(e.error)))return e}function Qa(e){return po(e)&&typeof e.id==`string`&&typeof e.role==`string`&&Array.isArray(e.parts)}function $a(e){return po(e)&&typeof e.id==`string`&&typeof e.type==`string`}function eo(e){return po(e)&&typeof e.message==`string`}function to(e){return po(e)&&typeof e.id==`string`&&po(e.function)&&typeof e.function.name==`string`&&`arguments`in e.function}function no(e){return typeof e.turn==`number`&&Number.isFinite(e.turn)?e.turn:void 0}function ro(e){return e.flatMap(e=>po(e)&&e.type===`text`&&typeof e.text==`string`?[e.text]:[]).join(`
|
|
12
12
|
`)}function io(e){return e instanceof Error?{name:e.name,message:e.message}:{message:typeof e==`string`?e:ao(e)}}function ao(e){try{let t=JSON.stringify(e);return t===void 0?String(e):t}catch{return String(e)}}function oo(e){if(typeof e==`string`)try{return so(JSON.parse(e))}catch{return}if(e!==void 0)return so(e)}function so(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`||Array.isArray(e)||po(e)?e:ao(e)}function co(e,t){try{return JSON.stringify(lo(e))===JSON.stringify(lo(t))}catch{return!1}}function lo(e){return Array.isArray(e)?e.map(e=>lo(e)):H(e)?Object.fromEntries(Object.entries(e).filter(e=>e[1]!==void 0).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>[e,lo(t)])):e}function uo(e,t){return H(e)&&H(t)?{...e,...t}:t}function H(e){return po(e)&&!Array.isArray(e)}function U(e,t){return t===void 0?`tool_${e}`:`tool_${t}_${e}`}function fo(e,t){for(let n=e.length-1;n>=0;--n)if(t(e[n]))return n;return-1}function po(e){return typeof e==`object`&&!!e}function mo(e={}){let[t,n]=(0,C.useState)(()=>[...e.initialMessages??[]]),[r,i]=(0,C.useState)([]),[a,o]=(0,C.useState)(`idle`),[s,c]=(0,C.useState)(),[l,u]=(0,C.useState)([]),[d,f]=(0,C.useState)([]),[p,m]=(0,C.useState)(()=>new Set),[h,g]=(0,C.useState)(()=>new Set),[_,v]=(0,C.useState)(),[y,b]=(0,C.useState)(!1),x=(0,C.useRef)(void 0),S=(0,C.useRef)(t),w=(0,C.useRef)(l),T=(0,C.useRef)(d),E=(0,C.useRef)(p),D=(0,C.useRef)(h),O=(0,C.useRef)(void 0),k=(0,C.useRef)(0),A=(0,C.useRef)(!1),j=(0,C.useRef)(0);(0,C.useEffect)(()=>{S.current=t},[t]),(0,C.useEffect)(()=>{w.current=l},[l]),(0,C.useEffect)(()=>{T.current=d},[d]),(0,C.useEffect)(()=>{E.current=p},[p]),(0,C.useEffect)(()=>{D.current=h},[h]),(0,C.useEffect)(()=>()=>{x.current?.abort()},[]);let M=(0,C.useMemo)(()=>{if(e.transport!==void 0)return e.transport;if(e.endpoint!==void 0)return da({endpoint:e.endpoint,format:e.format??`jsonl`})},[e.transport,e.endpoint,e.format]),N=(0,C.useCallback)(e=>{let t=typeof e==`function`?e(S.current):e;S.current=t,n(t)},[]),ee=(0,C.useCallback)(e=>{O.current=e,v(e)},[]),P=(0,C.useCallback)(()=>{let t=O.current;t!==void 0&&va(e.resume,{version:1,streamId:t,lastEventId:k.current,messages:S.current})},[e.resume]),F=(0,C.useCallback)(()=>{k.current=0,ee(void 0),ya(e.resume)},[e.resume,ee]),I=(0,C.useCallback)(e=>{u(t=>{let n=na(t,e);return w.current=n,n})},[]),te=(0,C.useCallback)(e=>{f(t=>{let n=na(t,e);return T.current=n,n})},[]),ne=(0,C.useCallback)(()=>{j.current+=1,w.current=[],T.current=[],E.current=new Set,D.current=new Set,u([]),f([]),m(new Set),g(new Set)},[]),re=(0,C.useCallback)(t=>{let n=e.eventToUIEvent?.(t);if(n!==void 0){N(e=>Oa(e,n));return}if(!(e.eventToUIEvent!==void 0||e.eventToDelta!==void 0||e.eventToFinal!==void 0)){let e=!1;if(N(n=>{let r=ka(n,t);return r===void 0?n:(e=!0,r)}),e)return}let r=e.eventToDelta?.(t);r!==void 0&&r.length>0&&N(e=>Pa(e,r));let i=e.eventToFinal?.(t);i!==void 0&&N(e=>Ia(e,i))},[e,N]),ie=(0,C.useCallback)(t=>{let n=e.humanInput;if(n===void 0)return;let r=(n.eventToApproval??Qi)(t);r!==void 0&&I(r);let i=(n.eventToQuestion??$i)(t);i!==void 0&&te(i)},[e.humanInput,I,te]),L=(0,C.useCallback)(async(t,n={})=>{if(M===void 0)throw Error(`useChat requires either transport or endpoint`);x.current?.abort();let r=new AbortController;x.current=r;let a=e.createRequest??(e=>{let t={messages:e.coreMessages,stream:!0};return e.resume!==void 0&&(t.resume=e.resume),t});n.resume===void 0?F():(k.current=n.resume.after,ee(n.resume.streamId)),N(t),i([]),c(void 0),ne(),o(`streaming`),b(n.isResuming===!0);try{let s=a({messages:t,uiMessages:t,coreMessages:xi(t),resume:n.resume});for await(let t of M.send(s,{signal:r.signal})){if(x.current!==r||r.signal.aborted)return;if(ba(t)){if(t.type===`stream_start`){ee(t.streamId),P();continue}if(t.type===`stream_end`){k.current=t.eventId,F();continue}k.current=t.eventId;let n=t.event;if(i(e=>[...e,n]),ie(n),e.onEvent?.(n),x.current!==r||r.signal.aborted)return;re(n),P();continue}let n=t;if(i(e=>[...e,n]),ie(n),e.onEvent?.(n),x.current!==r||r.signal.aborted)return;re(n)}x.current===r&&!r.signal.aborted&&o(`idle`)}catch(t){if(go(t)){x.current===r&&o(`idle`);return}if(x.current!==r)return;c(t),o(`error`),e.onError?.(t)}finally{x.current===r&&(x.current=void 0,b(!1))}},[re,ie,ne,F,e,P,N,ee,M]),R=(0,C.useCallback)(async()=>{let t=_a(e.resume);t!==void 0&&await L(t.messages,{resume:{streamId:t.streamId,after:t.lastEventId},isResuming:!0})},[e.resume,L]);(0,C.useEffect)(()=>{e.resume?.auto===!1||A.current||(A.current=!0,R())},[e.resume?.auto,R]);let ae=(0,C.useCallback)(async e=>{let t=Ea(e);if(t===void 0)return;let n=S.current;await L([...x.current!==void 0&&n.at(-1)?.role===`assistant`?n.slice(0,-1):n,t])},[L]),oe=(0,C.useCallback)(async(e=``)=>{await ae(e)},[ae]),z=(0,C.useCallback)(async()=>{let e=ho(S.current);e!==-1&&await L(S.current.slice(0,e+1))},[L]),se=(0,C.useCallback)(()=>{x.current?.abort(),x.current=void 0,F(),o(`idle`),b(!1)},[F]),ce=(0,C.useCallback)(async(t,n,r)=>{let i=e.humanInput;if(i===void 0)throw Error(`useChat humanInput is not configured`);if(E.current.has(t))return;let a=j.current,o=new Set(E.current).add(t);E.current=o,m(o);try{let e=w.current.find(e=>e.id===t),o={approvalId:t,approved:n};r!==void 0&&(o.reason=r),e!==void 0&&(o.approval=e);let s=i.decideApproval===void 0?await ea(o,i):await i.decideApproval(o);s!==void 0&&j.current===a&&I(s)}finally{if(j.current===a){let e=new Set(E.current);e.delete(t),E.current=e,m(e)}}},[e.humanInput,I]),le=(0,C.useCallback)(async(e,t)=>{await ce(e,!0,t)},[ce]),ue=(0,C.useCallback)(async(e,t)=>{await ce(e,!1,t)},[ce]),de=(0,C.useCallback)(async(t,n)=>{let r=e.humanInput;if(r===void 0)throw Error(`useChat humanInput is not configured`);if(D.current.has(t))return;let i=j.current,a=new Set(D.current).add(t);D.current=a,g(a);try{let e=T.current.find(e=>e.id===t),a={questionId:t,answers:n};e!==void 0&&(a.question=e);let o=r.answerQuestion===void 0?await ta(a,r):await r.answerQuestion(a);o!==void 0&&j.current===i&&te(o)}finally{if(j.current===i){let e=new Set(D.current);e.delete(t),D.current=e,g(e)}}},[e.humanInput,te]),fe=(0,C.useCallback)((e=[])=>{x.current?.abort(),x.current=void 0,F(),N(e),i([]),ne(),c(void 0),o(`idle`),b(!1)},[ne,F,N]);return{messages:t,events:r,suggestions:e.suggestions??[],setMessages:N,sendMessage:ae,send:oe,regenerate:z,stop:se,reset:fe,status:a,error:s,text:Aa(t),streamId:_,isResuming:y,resume:R,humanInput:{approvals:{all:l,pending:l.filter(e=>e.status===`pending`)},questions:{all:d,pending:d.filter(e=>e.status===`pending`)}},decidingApprovals:new Set(p),answeringQuestions:new Set(h),approveTool:le,rejectTool:ue,answerToolQuestion:de}}function ho(e){for(let t=e.length-1;t>=0;--t)if(e[t]?.role===`user`)return t;return-1}function go(e){return e instanceof DOMException&&e.name===`AbortError`}var _o={baseCharsPerSecond:140,completionDrainMs:700,initialSampleSpreadMs:50,maxCommitFps:60,maxCompletionCharsPerFrame:30,maxCompletionCharsPerSecond:1600,maxElapsedMs:64,maxPendingChars:1e3,maxSourceSamples:64,maxStreamingCharsPerFrame:6,maxStreamingCharsPerSecond:360,sourceGapResetMs:180,sourceInterpolationMs:100,streamingBaseCharsPerSecond:200,streamingDrainMs:250,targetBufferMs:225};function vo(e,t,n){let r=[...e],i=W(r,n);return{displayedItems:r,drainDeadlineAtMs:null,isSourceStreaming:t.isStreaming,lastAdvanceAtMs:t.nowMs,playbackCursorChars:i,sourceSamples:[{atMs:t.nowMs,totalChars:i}],targetItems:r}}function yo(e,t,n,r){let i=[...t];if(!e.isSourceStreaming&&!n.isStreaming&&!Oo(e,r))return vo(i,n,r);let a=W(e.targetItems,r),o=W(i,r),s=Do(e.displayedItems,i,r);s=Eo(s,i,0,r);let c=e.sourceSamples;n.isStreaming&&(c=wo(c,a,o,n.nowMs));let l={...e,displayedItems:s,drainDeadlineAtMs:n.isStreaming||e.drainDeadlineAtMs!==null?n.isStreaming?null:e.drainDeadlineAtMs:n.nowMs+_o.completionDrainMs,isSourceStreaming:n.isStreaming,sourceSamples:c,targetItems:i};return l=To(l,r),!n.isStreaming&&!Oo(l,r)?{...l,displayedItems:i,drainDeadlineAtMs:null,playbackCursorChars:o}:(!n.isStreaming&&l.drainDeadlineAtMs===null&&(l={...l,drainDeadlineAtMs:n.nowMs+_o.completionDrainMs}),l)}function bo(e,t,n){let r=Math.min(Math.max(t-e.lastAdvanceAtMs,0),_o.maxElapsedMs),i=W(e.displayedItems,n),a=W(e.targetItems,n),o=Math.max(0,a-i),s=e.isSourceStreaming?Co(e.sourceSamples,t):a,c=Math.max(0,s-i),l=e.isSourceStreaming?Ao(c):jo(o,e.drainDeadlineAtMs,t),u=Math.min(s,Math.max(e.playbackCursorChars,i)+r/1e3*l),d=Math.max(0,Math.floor(u-i)),f=Math.min(d,e.isSourceStreaming?_o.maxStreamingCharsPerFrame:_o.maxCompletionCharsPerFrame),p=Eo(e.displayedItems,e.targetItems,f,n),m=W(p,n),h=ko(p,e.targetItems,n);return{...e,displayedItems:h?p:e.targetItems,drainDeadlineAtMs:!e.isSourceStreaming&&!h?null:e.drainDeadlineAtMs,lastAdvanceAtMs:t,playbackCursorChars:Math.max(u,m)}}function xo(e,t,n){let r=W(e.targetItems,n);return{...e,displayedItems:e.targetItems,drainDeadlineAtMs:null,lastAdvanceAtMs:t,playbackCursorChars:r,sourceSamples:[{atMs:t,totalChars:r}]}}function So(e,t){let n=Oo(e,t),r=e.isSourceStreaming||n,i=e.displayedItems.at(-1),a=r&&i!==void 0&&t.getText(i)!==void 0?t.getKey(i):null;return{hasPendingContent:n,isDraining:!e.isSourceStreaming&&n,items:e.displayedItems,liveItemKey:a}}function Co(e,t){let n=t-_o.targetBufferMs,r=e[0];if(r===void 0)return 0;if(n<=r.atMs)return r.totalChars;for(let t=1;t<e.length;t+=1){let r=e[t-1],i=e[t];if(r===void 0||i===void 0||n>i.atMs)continue;let a=Math.max(i.atMs-r.atMs,1),o=Math.min(Math.max((n-r.atMs)/a,0),1);return r.totalChars+(i.totalChars-r.totalChars)*o}return e.at(-1)?.totalChars??0}function wo(e,t,n,r){if(n===t)return[...e];if(n<t)return[{atMs:r-_o.initialSampleSpreadMs,totalChars:Math.min(t,n)},{atMs:r,totalChars:n}];let i=[...e],a=i.at(-1);return a===void 0?i.push({atMs:r-_o.initialSampleSpreadMs,totalChars:t}):r-a.atMs>_o.sourceGapResetMs&&i.push({atMs:r-_o.sourceInterpolationMs,totalChars:t}),i.push({atMs:r,totalChars:n}),i.slice(-_o.maxSourceSamples)}function To(e,t){let n=W(e.displayedItems,t),r=W(e.targetItems,t)-n-_o.maxPendingChars;if(r<=0)return e;let i=Eo(e.displayedItems,e.targetItems,r,t,!0),a=W(i,t);return{...e,displayedItems:i,playbackCursorChars:Math.max(e.playbackCursorChars,a)}}function Eo(e,t,n,r,i=!1){let a=[],o=Math.max(0,n);for(let n=0;n<t.length;n+=1){let s=t[n];if(s===void 0)continue;let c=e[n],l=c!==void 0&&r.getKey(c)===r.getKey(s),u=r.getText(s);if(u===void 0){if(l||n===a.length){a.push(s);continue}break}let d=l&&c!==void 0?r.getText(c)??``:``;if(d===u){a.push(s);continue}if(o<=0){(l||d.length>0)&&a.push(r.withText(s,d));break}let f=Math.min(u.length,d.length+o),p=i?No(u,f):Po(u,f),m=u.slice(0,p),h=Math.max(0,m.length-d.length);if(o=Math.max(0,o-h),p<u.length){a.push(r.withText(s,m));break}a.push(s)}return a}function Do(e,t,n){let r=[];for(let i=0;i<t.length;i+=1){let a=t[i],o=e[i];if(a===void 0||o===void 0||n.getKey(a)!==n.getKey(o))break;let s=n.getText(a),c=n.getText(o);if(s===void 0){if(r.push(a),c!==void 0)continue;continue}if(c===void 0){r.push(n.withText(a,``));break}if(s.startsWith(c)){r.push(c===s?a:n.withText(a,c));continue}let l=Mo(c,s);r.push(n.withText(a,s.slice(0,l)));break}return r}function Oo(e,t){return ko(e.displayedItems,e.targetItems,t)}function ko(e,t,n){return e.length===t.length?t.some((t,r)=>{let i=e[r];if(i===void 0||n.getKey(i)!==n.getKey(t))return!0;let a=n.getText(t),o=n.getText(i);return a===void 0?i!==t:o!==a}):!0}function W(e,t){return e.reduce((e,n)=>e+(t.getText(n)?.length??0),0)}function Ao(e){return Math.min(_o.maxStreamingCharsPerSecond,Math.max(_o.streamingBaseCharsPerSecond,e/(_o.streamingDrainMs/1e3)))}function jo(e,t,n){let r=Math.max((t??n)-n,1);return Math.min(_o.maxCompletionCharsPerSecond,Math.max(_o.baseCharsPerSecond,e/(r/1e3)))}function Mo(e,t){let n=Fo(e),r=Fo(t),i=Math.min(n.length,r.length),a=0;for(let e=0;e<i;e+=1){let t=n[e],i=r[e];if(t===void 0||t!==i)break;a+=t.length}return a}function No(e,t){let n=Po(e,t),r=Math.min(e.length,n+64);for(let t=n;t<r;t+=1){let n=e[t];if(n===`
|
|
13
13
|
`||(n===`.`||n===`!`||n===`?`)&&/\s/u.test(e[t+1]??``)||/\s/u.test(n??``))return Po(e,t+1)}return n}function Po(e,t){let n=Math.min(Math.max(t,0),e.length);if(n===0||n===e.length)return n;let r=Io();if(r!==void 0){let t=r.segment(e).containing(n-1);return t===void 0?e.length:t.index+t.segment.length}let i=e.charCodeAt(n-1);return i>=55296&&i<=56319?Math.min(e.length,n+1):n}function Fo(e){let t=Io();return t===void 0?[...e]:[...t.segment(e)].map(e=>e.segment)}function Io(){if(!(typeof Intl>`u`||typeof Intl.Segmenter!=`function`))return new Intl.Segmenter(void 0,{granularity:`grapheme`})}var Lo=typeof window>`u`?C.useEffect:C.useLayoutEffect;function Ro(e,t){let n=(0,C.useRef)(t.adapter);n.current=t.adapter;let r=(0,C.useRef)(void 0);r.current===void 0&&(r.current=zo());let i=(0,C.useRef)(void 0);i.current===void 0&&(i.current=vo(e,{isStreaming:t.isStreaming,nowMs:r.current},t.adapter));let a=(0,C.useRef)(t.resetKey),o=(0,C.useRef)(null),s=(0,C.useRef)(!0),[c,l]=(0,C.useState)(()=>So(i.current,t.adapter)),u=(0,C.useCallback)(()=>{let e=o.current;o.current=null,e!==null&&typeof window<`u`&&typeof window.cancelAnimationFrame==`function`&&window.cancelAnimationFrame(e)},[]),d=(0,C.useCallback)(e=>{let t=n.current;i.current=e;let r=So(e,t);l(e=>Bo(e,r,t)?e:r)},[]),f=(0,C.useCallback)(()=>{let e=i.current;e!==void 0&&(u(),d(xo(e,zo(),n.current)))},[u,d]),p=(0,C.useCallback)(function e(){if(!(o.current!==null||!s.current)){if(typeof window>`u`||typeof window.requestAnimationFrame!=`function`){f();return}o.current=window.requestAnimationFrame(t=>{o.current=null;let r=i.current;if(!s.current||r===void 0)return;let a=1e3/_o.maxCommitFps;if(t-r.lastAdvanceAtMs+.5<a){e();return}let c=bo(r,t,n.current),l=So(c,n.current);d(c),l.hasPendingContent&&e()})}},[d,f]);return(0,C.useEffect)(()=>(s.current=!0,()=>{s.current=!1,u()}),[u]),Lo(()=>{let n=zo(),r=a.current!==t.resetKey;a.current=t.resetKey;let o=r?vo(e,{isStreaming:t.isStreaming,nowMs:n},t.adapter):yo(i.current,e,{isStreaming:t.isStreaming,nowMs:n},t.adapter),s=typeof document<`u`&&document.visibilityState===`hidden`;(t.flushImmediately===!0||s)&&(o=xo(o,n,t.adapter));let c=So(o,t.adapter);d(o),c.hasPendingContent?p():u()},[u,d,e,t.adapter,t.flushImmediately,t.isStreaming,t.resetKey,p]),(0,C.useEffect)(()=>{if(typeof document>`u`)return;let e=()=>{document.visibilityState===`hidden`&&f()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[f]),{items:c.items,isAnimating:c.hasPendingContent,isDraining:c.isDraining,liveItemKey:c.liveItemKey,flush:f}}function zo(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function Bo(e,t,n){return e.hasPendingContent!==t.hasPendingContent||e.isDraining!==t.isDraining||e.liveItemKey!==t.liveItemKey||e.items.length!==t.items.length?!1:e.items.every((e,r)=>{let i=t.items[r];if(i===void 0||n.getKey(e)!==n.getKey(i))return!1;let a=n.getText(e),o=n.getText(i);return a===void 0?e===i:a===o})}async function Vo(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 Ho(e){return e instanceof Ji?e.response.status===401?`Authentication required`:`Run failed with HTTP ${e.response.status}`:s(e)}function Uo(e,t){let n=``;try{let t=JSON.parse(e.body);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.response.status}${n}`}function Wo(e){if(typeof e==`string`)return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}var Go=0;function Ko(e){Go=e}function qo(){Go=0}function Jo(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 Yo(e){return e.currentTarget.value}function Xo(e){e!==null&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)}function Zo(){let e=Go;return Go+=1,e}function Qo(e){return e.reduce((e,t)=>Math.max(e,t.entryId+1),0)}function $o(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 es(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 ts(e){return typeof e==`string`?e:c(e)?typeof e.text==`string`?e.text:typeof e.content==`string`?e.content:Array.isArray(e.content)?e.content.map(ns).filter(Boolean).join(`
|
|
14
14
|
`):``:``}function ns(e){return typeof e==`string`?e:c(e)?typeof e.text==`string`?e.text:e.type===`tool_call`&&c(e.function)?`${String(e.function.name??`tool`)}(${l(e.function.arguments)})`:e.type===`tool_result`&&Array.isArray(e.content)?e.content.map(ns).filter(Boolean).join(`
|
|
15
|
-
`):typeof e.type==`string`?e.type:``:``}function rs(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>e())})})}function is(e){let{attachments:t,messages:n,onActivePageChange:r,onAttachmentsChange:i,onBeforeRun:a,onError:c,onPromptChange:u,onRunStateChange:d,onSessionTraceSummariesChange:f,onStatus:p,promptRef:m,runState:h,selectedAgent:g,selectedAgentId:_,selectedModelRef:v,sessions:y,sessionsEnabled:b,traces:x,transcript:S}=e,w=(0,C.useRef)(void 0),T=(0,C.useRef)(void 0),E=(0,C.useRef)(!1),D=(0,C.useRef)(!1),O=(0,C.useRef)(void 0),k=(0,C.useRef)(Promise.resolve()),[A,j]=(0,C.useState)(void 0),M=mo({transport:da({endpoint:e=>`/agents/${encodeURIComponent(e.agentId)}/runs`,method:`POST`,format:`jsonl`,headers:{"content-type":`application/json`},body:e=>{let{agentId:t,...n}=e;return JSON.stringify(n)},mapEvent:e=>e}),createRequest:({coreMessages:e})=>{let t=w.current;if(t===void 0)throw Error(`Missing playground run request`);let n=t.useTextMessage?t.promptText:e.at(-1);if(n===void 0)throw Error(`Missing playground prompt message`);return as(t,n)},eventToDelta:()=>void 0,eventToFinal:()=>void 0,humanInput:{eventToApproval:e=>e.type===`tool_approval_request`||e.type===`tool_approval_result`?e.approval:void 0,eventToQuestion:e=>e.type===`tool_question_request`||e.type===`tool_question_result`?e.question:void 0,decideApproval:async e=>{let t=await fetch(`/approvals/${encodeURIComponent(e.approvalId)}/decision`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({approved:e.approved})});if(!t.ok)throw Error(`Approval decision failed with HTTP ${t.status}`);let n=await t.json();return os(S,n),n},answerQuestion:async e=>{let t=await fetch(`/questions/${encodeURIComponent(e.questionId)}/answer`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({answers:e.answers})});if(!t.ok)throw Error(`Question answer failed with HTTP ${t.status}`);let n=await t.json();return ss(S,n),n}},onEvent(e){D.current||I(e)&&(k.current=k.current.then(rs))},onError(e){if(E.current||D.current)return;D.current=!0,T.current=e;let t=Ho(e);c(t),S.appendAssistantError(t),te()}});async function N(e){let l=e.trim(),C=t,A=g?.id??_;if(l.length===0&&C.length===0||A.length===0||h===`running`||M.status===`streaming`)return;E.current=!1,D.current=!1,d(`running`),a(),r(`playground`),c(``),u(``),i([]),requestAnimationFrame(()=>Xo(m.current));let N=C.length===0?{text:l}:ci(l,C);S.setMessages(e=>{let t={entryId:Zo(),kind:`message`,role:`user`,text:l};return C.length>0&&(t.attachments=li(C)),[...e,t,{entryId:Zo(),kind:`message`,role:`assistant`,text:``,tone:`pending`}]});try{let e=b&&y.selectedSessionId.length===0,t=e?(await y.createSession(o(l),{updatePath:!1})).id:y.selectedSessionId,r=b?void 0:Jo(n);T.current=void 0,k.current=Promise.resolve();let i={source:`anvia-studio`};v.length>0&&(i.studioModel=v);let a={agentId:A,promptText:l,useTextMessage:C.length===0,stream:!0,metadata:i};t.length>0&&(a.sessionId=t),r!==void 0&&(a.history=r),v.length>0&&(a.model=v),w.current=a;let s=Date.now();if(O.current=s,j(s),await M.sendMessage(N),await k.current,T.current===void 0){if(await y.loadAllSessions(),t.length>0){y.setSelectedSessionId(t);let[n]=await Promise.all([x.loadSessionTraceSummaries(t),y.loadSessionLogs(t)]);f(n),S.setMessages(e=>ti(e,n)),e&&y.openSessionPath(t)}p(E.current?`Stopped`:`Connected`)}}catch(e){if(!E.current&&!D.current){D.current=!0;let t=s(e);c(t),S.appendAssistantError(t),te()}}finally{te(),w.current=void 0,M.reset(),d(`idle`)}}function ee(){if(M.status!==`streaming`||D.current)return;E.current=!0,D.current=!0;let e=ne();M.stop(),S.cancelPendingRun(e??0),p(`Stopping`)}function P(e,t){c(``),(t?M.approveTool(e):M.rejectTool(e)).catch(e=>c(s(e)))}function F(e,t){c(``),M.answerToolQuestion(e,t).catch(e=>c(s(e)))}function I(e){if(e.type===`text_delta`)return S.appendAssistantText(e.delta),!0;if(e.type===`reasoning_delta`)return S.appendReasoningText(e.delta,e.id),!0;if(e.type===`tool_call`)return S.appendToolCall(e.toolCall.function.name,l(e.toolCall.function.arguments),e.toolCall.callId??e.toolCall.id),!0;if(e.type===`tool_result`){let t={toolName:e.toolName,callId:e.toolCallId,args:e.args,result:e.result};return e.structuredResult!==void 0&&(t.structuredResult=e.structuredResult),S.appendToolResult(t),!0}if(e.type===`agent_tool_event`)return S.appendAgentToolEvent(e),!0;if(e.type===`tool_approval_request`||e.type===`tool_approval_result`)return S.updateToolApproval(e.approval),!0;if(e.type===`tool_question_request`||e.type===`tool_question_result`)return S.updateToolQuestion(e.question),!0;if(e.type===`session_log`)return y.appendSessionLogEntry(e.log),!0;if(e.type===`final`)return D.current=!0,e.trace?.traceId!==void 0&&S.assignAssistantTraceId(e.trace.traceId),S.clearPendingAssistant(),te(),!0;if(e.type===`error`){D.current=!0;let t=Wo(e.error);return T.current=e.error,c(t),S.appendAssistantError(t),te(),!0}return!1}function te(){let e=ne();e!==void 0&&S.completeRun(e)}function ne(){let e=O.current;if(e!==void 0)return O.current=void 0,j(void 0),Date.now()-e}return{answeringQuestions:new Set(M.answeringQuestions),decidingApprovals:new Set(M.decidingApprovals),isStreaming:M.status===`streaming`,workingStartedAt:A,answerToolQuestion:F,decideToolApproval:P,runPrompt:N,stopPrompt:ee}}function as(e,t){let n={agentId:e.agentId,message:t,stream:e.stream,metadata:e.metadata};return e.sessionId!==void 0&&(n.sessionId=e.sessionId),e.history!==void 0&&(n.history=e.history),e.model!==void 0&&(n.model=e.model),n}function os(e,t){let n=cs(t);n!==void 0&&e.updateToolApproval(n)}function ss(e,t){let n=ls(t);n!==void 0&&e.updateToolQuestion(n)}function cs(e){if(e.requestedAt===void 0)return;let t={id:e.id,toolName:e.toolName,status:e.status,requestedAt:e.requestedAt};return e.callId!==void 0&&(t.callId=e.callId),e.resolvedAt!==void 0&&(t.resolvedAt=e.resolvedAt),e.reason!==void 0&&(t.reason=e.reason),t}function ls(e){if(e.requestedAt===void 0)return;let t={id:e.id,toolName:e.toolName,status:e.status,requestedAt:e.requestedAt,questions:e.questions};return e.callId!==void 0&&(t.callId=e.callId),e.answeredAt!==void 0&&(t.answeredAt=e.answeredAt),e.cancelledAt!==void 0&&(t.cancelledAt=e.cancelledAt),e.answers!==void 0&&(t.answers=e.answers),t}function us(){let[e,t]=(0,C.useState)([]);return{messages:e,setMessages:t,appendAgentToolEvent:e=>t(t=>Cs(t,e)),appendAssistantError:e=>t(t=>ms(t,e)),appendAssistantText:e=>t(t=>ps(t,e)),appendReasoningText:(e,n)=>t(t=>bs(t,e,n)),appendToolCall:(e,n,r)=>t(t=>xs(t,e,n,r)),appendToolResult:e=>t(t=>Ss(t,e)),assignAssistantTraceId:e=>t(t=>hs(t,e)),cancelPendingRun:e=>t(t=>ds(t,new Date().toISOString(),e)),clearPendingAssistant:()=>t(e=>ws(e)),completeRun:e=>t(t=>fs(t,e)),updateToolApproval:e=>t(t=>gs(t,e)),updateToolQuestion:e=>t(t=>_s(t,e))}}function ds(e,t,n){let r=ws(e),i=-1;for(let e=r.length-1;e>=0;--e){let t=r[e];if(t?.kind===`message`&&t.role===`user`){i=e;break}}if(i<0)return fs(r,n);for(let e=i+1;e<r.length;e+=1){let n=r[e];if(n?.kind!==`tool`)continue;let i={...n};n.approval?.status===`pending`&&(i.approval={...n.approval,status:`cancelled`,resolvedAt:t,reason:`Run cancelled in Anvia Studio.`}),n.question?.status===`pending`&&(i.question={...n.question,status:`cancelled`,cancelledAt:t}),r[e]=i}return fs(r,n)}function fs(e,t){let n=[...e],r=Math.max(0,t);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t?.kind===`message`&&t.role===`assistant`){if(t.tone===`pending`){let{tone:i,...a}=t;n[e]={...a,durationMs:r}}else n[e]={...t,durationMs:r};return n}if(t?.kind===`message`&&t.role===`user`)break}return n.push({entryId:Zo(),kind:`message`,role:`assistant`,text:``,durationMs:r}),n}function ps(e,t){let n=[...e],r=n.at(-1);if(r?.kind===`message`&&r.role===`assistant`)if(r.tone===`pending`){let{tone:e,...i}=r;n[n.length-1]={...i,text:t}}else n[n.length-1]={...r,text:`${r.text}${t}`};else n.push({entryId:Zo(),kind:`message`,role:`assistant`,text:t});return n}function ms(e,t){let n=[...e],r=n.at(-1),i={entryId:r?.kind===`message`&&r.role===`assistant`&&r.tone===`pending`?r.entryId:Zo(),kind:`message`,role:`assistant`,text:t,tone:`error`};return r?.kind===`message`&&r.role===`assistant`&&r.tone===`pending`?(n[n.length-1]=i,n):[...n,i]}function hs(e,t){let n=[...e];for(let e=n.length-1;e>=0;--e){let r=n[e];if(r?.kind===`message`&&r.role===`assistant`){n[e]={...r,traceId:t};break}}return n}function gs(e,t){let n=ws(e),r=es(n,t.toolName,t.callId),i=vs(t);if(r<0){let e={entryId:Zo(),kind:`tool`,toolName:t.toolName,approval:i};return t.callId!==void 0&&(e.callId=t.callId),n.push(e),n}let a=n[r];return a!==void 0&&a.kind===`tool`&&(n[r]={...a,approval:i}),n}function _s(e,t){let n=ws(e),r=es(n,t.toolName,t.callId),i=ys(t);if(r<0){let e={entryId:Zo(),kind:`tool`,toolName:t.toolName,question:i};return t.callId!==void 0&&(e.callId=t.callId),n.push(e),n}let a=n[r];return a!==void 0&&a.kind===`tool`&&(n[r]={...a,question:i}),n}function vs(e){let t={id:e.id,status:e.status,requestedAt:e.requestedAt};return e.resolvedAt!==void 0&&(t.resolvedAt=e.resolvedAt),e.reason!==void 0&&(t.reason=e.reason),t}function ys(e){let t={id:e.id,status:e.status,requestedAt:e.requestedAt,questions:e.questions};return e.answeredAt!==void 0&&(t.answeredAt=e.answeredAt),e.answers!==void 0&&(t.answers=e.answers),t}function bs(e,t,n){let r=ws(e),i=r.at(-1);if(i?.kind===`reasoning`&&(i.reasoningId??``)===(n??``))r[r.length-1]={...i,text:`${i.text}${t}`};else{let e={entryId:Zo(),kind:`reasoning`,text:t};n!==void 0&&(e.reasoningId=n),r.push(e)}return r}function xs(e,t,n,r){let i={entryId:Zo(),kind:`tool`,toolName:t};return r!==void 0&&(i.callId=r),n.length>0&&(i.args=n),[...ws(e),i]}function Ss(e,t){let n=ws(e),r=$o(n,t.toolName,t.callId);if(r>=0){let e=n[r];if(e!==void 0&&e.kind===`tool`){let i={...e,args:e.args??t.args,result:t.result};return t.structuredResult!==void 0&&(i.structuredResult=t.structuredResult),n[r]=i,n}}let i={entryId:Zo(),kind:`tool`,toolName:t.toolName,args:t.args,result:t.result};return t.callId!==void 0&&(i.callId=t.callId),t.structuredResult!==void 0&&(i.structuredResult=t.structuredResult),n.push(i),n}function Cs(e,t){let n=Ts(t);if(n===void 0)return e;let r=ws(e),i=$o(r,t.toolName,t.toolCallId);if(i<0){let e={entryId:Zo(),kind:`tool`,toolName:t.toolName,childEvents:[n]};return t.toolCallId!==void 0&&(e.callId=t.toolCallId),r.push(e),r}let a=r[i];if(a===void 0||a.kind!==`tool`)return r;let o=[...a.childEvents??[]];return Es(o,n),r[i]={...a,childEvents:o},r}function ws(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n?.kind===`message`&&n.role===`assistant`&&n.tone===`pending`&&n.text.trim().length===0)return e.filter((e,n)=>n!==t)}return[...e]}function Ts(e){let t=e.event;if(t.type===`text_delta`){let n={kind:`message`,agentId:e.agentId,text:t.delta};return e.agentName!==void 0&&(n.agentName=e.agentName),n}if(t.type===`reasoning_delta`){let n={kind:`reasoning`,agentId:e.agentId,text:t.delta};return e.agentName!==void 0&&(n.agentName=e.agentName),t.id!==void 0&&(n.reasoningId=t.id),n}if(t.type===`tool_call`){let n={kind:`tool`,agentId:e.agentId,toolName:t.toolCall.function.name,args:l(t.toolCall.function.arguments)};e.agentName!==void 0&&(n.agentName=e.agentName);let r=t.toolCall.callId??t.toolCall.id;return r!==void 0&&(n.callId=r),n}if(t.type===`tool_result`){let n={kind:`tool`,agentId:e.agentId,toolName:t.toolName,args:t.args,result:t.result};return e.agentName!==void 0&&(n.agentName=e.agentName),t.toolCallId!==void 0&&(n.callId=t.toolCallId),t.structuredResult!==void 0&&(n.structuredResult=t.structuredResult),n}if(t.type===`error`){let n={kind:`message`,agentId:e.agentId,text:`Error: ${s(t.error)}`};return e.agentName!==void 0&&(n.agentName=e.agentName),n}}function Es(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=Ds(e,t);if(n<0){e.push(t);return}let r=e[n];if(r?.kind===`tool`){let i={...r};r.args===void 0&&t.args!==void 0&&(i.args=t.args),t.result!==void 0&&(i.result=t.result),e[n]=i}}function Ds(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 Os(e){let{currentAgentId:t,enabled:n,loadSessionTraceSummaries:r,runState:i,selectedModelRef:a,onError:o,onSessionCreated:c,onSessionDeleted:l,onSessionLoaded:u,onStatus:d}=e,[f,p]=(0,C.useState)(``),[m,h]=(0,C.useState)([]),[g,_]=(0,C.useState)([]),[v,y]=(0,C.useState)(`idle`),[b,x]=(0,C.useState)(`idle`),S=(0,C.useRef)(``),w=(0,C.useCallback)(async()=>{if(!n){h([]);return}try{let e=await fetch(`/sessions?limit=100`);if(!e.ok)throw Error(`Sessions failed with HTTP ${e.status}`);h((await e.json()).sessions)}catch(e){o(s(e))}},[n,o]);(0,C.useEffect)(()=>{w()},[w]);let T=(0,C.useCallback)(async e=>{if(!n)return _([]),[];x(`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 _(r.logs),r.logs}catch(e){return o(s(e)),_([]),[]}finally{x(`idle`)}},[n,o]),E=(0,C.useCallback)(async(e,n={})=>{let r={source:`anvia-studio`};a.length>0&&(r[Yr]=a);let i=await fetch(`/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agentId:t,title:e,metadata:r})});if(!i.ok)throw Error(await Vo(i,`Session create failed`));let o=await i.json();return p(o.id),h(e=>[o,...e.filter(e=>e.id!==o.id)]),n.updatePath!==!1&&c(o.id),await T(o.id),o},[t,T,c,a]),D=(0,C.useCallback)(async(e,t={})=>{if(i!==`running`){S.current=e,y(`loading`),o(``);try{let n=await fetch(`/sessions/${encodeURIComponent(e)}`);if(!n.ok)throw Error(`Session load failed with HTTP ${n.status}`);let i=await n.json(),[a]=await Promise.all([r(i.id),T(i.id)]);if(S.current!==e)return;p(i.id),u(i,a,t),d(`Connected`)}catch(t){S.current===e&&o(s(t))}finally{S.current===e&&y(`idle`)}}},[T,r,o,u,d,i]),O=(0,C.useCallback)(async e=>{if(i!==`running`){o(``);try{let t=await fetch(`/sessions/${encodeURIComponent(e.id)}`,{method:`DELETE`});if(!t.ok)throw Error(`Session delete failed with HTTP ${t.status}`);let n=f===e.id;h(t=>t.filter(t=>t.id!==e.id)),n&&(p(``),_([])),l(e.id,n),d(`Connected`)}catch(e){o(s(e))}}},[o,l,d,i,f]),k=(0,C.useCallback)(()=>{p(``),_([])},[]),A=(0,C.useCallback)(e=>{_(t=>t.some(t=>t.id===e.id)?t:[...t,e].sort((e,t)=>e.sequence-t.sequence))},[]);return(0,C.useMemo)(()=>({allSessions:m,selectedSessionId:f,sessionLogs:g,sessionLoadState:v,sessionLogLoadState:b,appendSessionLogEntry:A,clearSelectedSession:k,createSession:E,deleteSession:O,loadAllSessions:w,loadSession:D,loadSessionLogs:T,openSessionPath:c,setSelectedSessionId:p}),[m,A,k,E,O,w,D,T,c,f,v,b,g])}function ks(e,t){return!0}function As(e,t){return e}var js=document.getElementById(`anvia-ui`),Ms=js?.dataset.uiPath??`/ui`,Ns=js?.dataset.uiCompatPath??`/ui`,Ps=`${Is(Ms)||Is(Ns)||`/ui`}/assets/logo.png`,Fs=`static-context`;function Is(e){return e===`/`?``:e.replace(/\/+$/,``)}function Ls(e){let{activePage:t,enabled:n,onError:r,onNavigateTracing:i,onOpenTrace:a,onOpenTraceIndex:o,onOpenTraceSession:c}=e,[l,u]=(0,C.useState)([]),[d,f]=(0,C.useState)(()=>e.initialTraceId),[p,m]=(0,C.useState)(()=>e.initialTraceSessionId),[h,g]=(0,C.useState)(`idle`),_=(0,C.useCallback)(async()=>{if(!n){u([]);return}g(`loading`);try{let e=new URLSearchParams({include:`detail`,limit:`50`}),t=await fetch(`/traces?${e.toString()}`);if(!t.ok)throw Error(`Traces failed with HTTP ${t.status}`);let n=(await t.json()).traces;if(d.length>0&&!n.some(e=>e.id===d)){let e=await fetch(`/traces/${encodeURIComponent(d)}`);if(e.ok){u([await e.json(),...n]);return}}u(n)}catch(e){r(s(e))}finally{g(`idle`)}},[n,r,d]),v=(0,C.useCallback)(async(e,t={})=>{if(n){g(`loading`);try{let n=new URLSearchParams({include:`detail`,limit:`50`,sessionId:e}),r=await fetch(`/traces?${n.toString()}`);if(!r.ok)throw Error(`Session traces failed with HTTP ${r.status}`);let a=[...(await r.json()).traces].sort((e,t)=>Date.parse(e.startedAt)-Date.parse(t.startedAt));u(a);let o=a[0]?.id;if(o===void 0){f(``),m(e),t.updatePath!==!1&&c(e);return}i(),f(o),m(e),t.updatePath!==!1&&c(e)}catch(e){r(s(e))}finally{g(`idle`)}}},[n,r,i,c]),y=(0,C.useCallback)(async e=>{if(!n)return[];let t=new URLSearchParams({limit:`100`}),r=await fetch(`/sessions/${encodeURIComponent(e)}/traces?${t}`);return r.ok?(await r.json()).traces:[]},[n]);(0,C.useEffect)(()=>{t!==`tracing`||p!==void 0||_()},[t,_,p]);let b=(0,C.useCallback)((e,t)=>{f(e),m(t)},[]),x=(0,C.useCallback)(()=>{f(``),m(void 0)},[]),S=(0,C.useCallback)(e=>{if(i(),f(e),m(void 0),e.length===0){o();return}a(e)},[i,a,o]),w=(0,C.useCallback)(e=>{u(t=>t.filter(t=>t.sessionId!==e))},[]);return(0,C.useMemo)(()=>({traces:l,selectedTraceId:d,traceSessionDetailId:p,traceLoadState:h,clearTraceSelection:x,loadSessionTraceSummaries:y,loadTraces:_,removeSessionTraces:w,selectTrace:S,setTraceLocation:b,showSessionTraces:v}),[x,y,_,w,S,d,b,v,h,p,l])}var Rs=(0,C.createContext)(void 0);function zs(){let e=(0,C.useContext)(Rs);if(e===void 0)throw Error(`StudioConsoleContext is missing`);return e}var Bs=`modulepreload`,Vs=function(e){return`/ui/`+e},Hs={},Us=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Vs(t,n),t in Hs)return;Hs[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Bs,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ws=(0,C.lazy)(()=>Us(()=>import(`./agents-page-DQSUqZIF.js`).then(e=>({default:e.AgentsPage})),__vite__mapDeps([0,1,2]))),Gs=(0,C.lazy)(()=>Us(()=>import(`./evals-page-ZafLbMa9.js`).then(e=>({default:e.EvalsPage})),__vite__mapDeps([3,1]))),Ks=(0,C.lazy)(()=>Us(()=>import(`./knowledge-page-BLE67U5p.js`).then(e=>({default:e.KnowledgePage})),__vite__mapDeps([4,1,5,6,2]))),qs=(0,C.lazy)(()=>Us(()=>import(`./mcps-page-C9ADX2M3.js`).then(e=>({default:e.McpsPage})),__vite__mapDeps([7,1,2,8,5,6]))),Js=(0,C.lazy)(()=>Us(()=>import(`./memory-page-CmnMwpO7.js`).then(e=>({default:e.MemoryPage})),__vite__mapDeps([9,1,5,6,10,2]))),Ys=(0,C.lazy)(()=>Us(()=>import(`./pipelines-page-C5ISm26N.js`).then(e=>({default:e.PipelinesPage})),__vite__mapDeps([11,1,5,6,12]))),Xs=(0,C.lazy)(()=>Us(()=>import(`./sessions-page-BPhKzIiR.js`).then(e=>({default:e.SessionsPage})),__vite__mapDeps([13,1,6]))),Zs=(0,C.lazy)(()=>Us(()=>import(`./sandboxes-page-BH5jccv5.js`).then(e=>({default:e.SandboxesPage})),__vite__mapDeps([14,1,6]))),Qs=(0,C.lazy)(()=>Us(()=>import(`./sessions-page-BPhKzIiR.js`).then(e=>({default:e.DeleteSessionDialog})),__vite__mapDeps([13,1,6]))),$s=(0,C.lazy)(()=>Us(()=>import(`./status-page-DXPhVzkB.js`).then(e=>({default:e.StatusPage})),__vite__mapDeps([15,1,5,6,2]))),ec=(0,C.lazy)(()=>Us(()=>import(`./tools-page-Glm51tOW.js`).then(e=>({default:e.ToolsPage})),__vite__mapDeps([16,1,2,8,5,6]))),tc=(0,C.lazy)(()=>Us(()=>import(`./trace-browser-BmN37sWv.js`).then(e=>({default:e.TraceBrowser})),__vite__mapDeps([17,1,2,6])));function G(){return(0,B.jsx)(`section`,{className:`grid h-full min-h-0 place-items-center bg-background/45 text-sm font-medium text-muted-foreground`,children:`Loading`})}var nc=[[`path`,{d:`M4.31802 19.682C3 18.364 3 16.2426 3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 14L9.79289 11.2071C10.1834 10.8166 10.8166 10.8166 11.2071 11.2071L12.7929 12.7929C13.1834 13.1834 13.8166 13.1834 14.2071 12.7929L17 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],rc=[[`path`,{d:`M13 2H11C7.22876 2 5.34315 2 4.17157 3.17157C3 4.34315 3 6.22876 3 10V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10C21 6.22876 21 4.34315 19.8284 3.17157C18.6569 2 16.7712 2 13 2Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21 12H3`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M15 7H9`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M15 17H9`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}]],ic=[[`path`,{d:`M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],ac=[[`path`,{d:`M5.5 12.002H19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10.9999 18.002C10.9999 18.002 4.99998 13.583 4.99997 12.0019C4.99996 10.4208 11 6.00195 11 6.00195`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],oc=[[`path`,{d:`M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],sc=[[`path`,{d:`M11 6H15.5C17.9853 6 20 8.01472 20 10.5C20 12.9853 17.9853 15 15.5 15H4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.99998 12C6.99998 12 4.00001 14.2095 4 15C3.99999 15.7906 7 18 7 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],cc=[[`path`,{d:`M12 5.5V19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 11C18 11 13.5811 5.00001 12 5C10.4188 4.99999 6 11 6 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],lc=[[`path`,{d:`M19.5 12.0001V13.5001C19.5 17.6422 16.1421 21.0001 12 21.0001C7.85786 21.0001 4.5 17.6422 4.5 13.5001V8C4.5 5.23858 6.73858 3 9.5 3C12.2614 3 14.5 5.23858 14.5 8V13.5C14.5 14.8807 13.3807 16 12 16C10.6193 16 9.5 14.8807 9.5 13.5V9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],uc=[[`path`,{d:`M5.33333 3.00001C7.79379 2.99657 10.1685 3.88709 12 5.5V21C10.1685 19.3871 7.79379 18.4966 5.33333 18.5C3.77132 18.5 2.99032 18.5 2.64526 18.2792C2.4381 18.1466 2.35346 18.0619 2.22086 17.8547C2 17.5097 2 16.8941 2 15.6629V6.40322C2 4.97543 2 4.26154 2.54874 3.68286C3.09748 3.10418 3.65923 3.07432 4.78272 3.0146C4.965 3.00491 5.14858 3.00001 5.33333 3.00001Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18.6667 3.00001C16.2062 2.99657 13.8315 3.88709 12 5.5V21C13.8315 19.3871 16.2062 18.4966 18.6667 18.5C20.2287 18.5 21.0097 18.5 21.3547 18.2792C21.5619 18.1466 21.6465 18.0619 21.7791 17.8547C22 17.5097 22 16.8941 22 15.6629V6.40322C22 4.97543 22 4.26154 21.4513 3.68286C20.9025 3.10418 20.3408 3.07432 19.2173 3.0146C19.035 3.00491 18.8514 3.00001 18.6667 3.00001Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M19 7.32566C18.8893 7.32211 18.7782 7.32032 18.6667 7.32032C18.1048 7.31954 17.5475 7.36537 17 7.45576M19 11.0067C18.8893 11.0032 18.7782 11.0014 18.6667 11.0014C17.401 10.9996 16.158 11.2344 15 11.6824M19 14.501C18.8893 14.4975 18.7782 14.4957 18.6667 14.4957C17.401 14.4939 16.158 14.7287 15 15.1767`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M5 7.32566C5.11067 7.32211 5.22179 7.32032 5.33333 7.32032C5.89518 7.31954 6.45255 7.36537 7 7.45576M5 11.0067C5.11067 11.0032 5.22179 11.0014 5.33333 11.0014C6.599 10.9996 7.84198 11.2344 9 11.6824M5 14.501C5.11067 14.4975 5.22179 14.4957 5.33333 14.4957C6.599 14.4939 7.84198 14.7287 9 15.1767`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],dc=[[`path`,{d:`M18 6L6.00081 17.9992M17.9992 18L6 6.00085`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],fc=[[`path`,{d:`M4 15L4 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 9L12 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M22 22L2 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M20 13L20 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M5.60009 8.79993C5.23521 8.31419 4.6543 8 4 8C2.89543 8 2 8.89543 2 10C2 11.1046 2.89543 12 4 12C5.10457 12 6 11.1046 6 10C6 9.54973 5.8512 9.13421 5.60009 8.79993ZM5.60009 8.79993L10.3999 5.20007M10.3999 5.20007C10.7648 5.68581 11.3457 6 12 6C12.783 6 13.4609 5.55006 13.7892 4.89462M10.3999 5.20007C10.1488 4.86579 10 4.45027 10 4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4C14 4.32158 13.9241 4.62543 13.7892 4.89462M13.7892 4.89462L18.2108 7.10538M18.2108 7.10538C18.0759 7.37457 18 7.67842 18 8C18 9.10457 18.8954 10 20 10C21.1046 10 22 9.10457 22 8C22 6.89543 21.1046 6 20 6C19.217 6 18.5391 6.44994 18.2108 7.10538Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],pc=[[`path`,{d:`M2 10.5C2 9.72921 2.01346 8.97679 2.03909 8.2503C2.12282 5.87683 2.16469 4.69009 3.13007 3.71745C4.09545 2.74481 5.3157 2.6926 7.7562 2.58819C9.09517 2.5309 10.5209 2.5 12 2.5C13.4791 2.5 14.9048 2.5309 16.2438 2.58819C18.6843 2.6926 19.9046 2.74481 20.8699 3.71745C21.8353 4.69009 21.8772 5.87683 21.9609 8.2503C21.9865 8.97679 22 9.72921 22 10.5C22 11.2708 21.9865 12.0232 21.9609 12.7497C21.8772 15.1232 21.8353 16.3099 20.8699 17.2826C19.9046 18.2552 18.6843 18.3074 16.2437 18.4118C15.5098 18.4432 14.7498 18.4667 13.9693 18.4815C13.2282 18.4955 12.8576 18.5026 12.532 18.6266C12.2064 18.7506 11.9325 18.9855 11.3845 19.4553L9.20503 21.3242C9.07273 21.4376 8.90419 21.5 8.72991 21.5C8.32679 21.5 8 21.1732 8 20.7701V18.4219C7.91842 18.4186 7.83715 18.4153 7.75619 18.4118C5.31569 18.3074 4.09545 18.2552 3.13007 17.2825C2.16469 16.3099 2.12282 15.1232 2.03909 12.7497C2.01346 12.0232 2 11.2708 2 10.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.1257 10.5H12.0007M8.125 10.5H8M16.125 10.5H16M12.2507 10.5C12.2507 10.6381 12.1388 10.75 12.0007 10.75C11.8627 10.75 11.7507 10.6381 11.7507 10.5C11.7507 10.3619 11.8627 10.25 12.0007 10.25C12.1388 10.25 12.2507 10.3619 12.2507 10.5ZM8.25 10.5C8.25 10.6381 8.13807 10.75 8 10.75C7.86193 10.75 7.75 10.6381 7.75 10.5C7.75 10.3619 7.86193 10.25 8 10.25C8.13807 10.25 8.25 10.3619 8.25 10.5ZM16.25 10.5C16.25 10.6381 16.1381 10.75 16 10.75C15.8619 10.75 15.75 10.6381 15.75 10.5C15.75 10.3619 15.8619 10.25 16 10.25C16.1381 10.25 16.25 10.3619 16.25 10.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],mc=[[`path`,{d:`M5 13.2592L7.58583 15.9568C8.2525 16.6523 8.58583 17.0001 9.00004 17.0001C9.41425 17.0001 9.74759 16.6523 10.4143 15.9568L19 7.00006`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],hc=[[`path`,{d:`M7.5 7.5L8.72654 8.55719C9.24218 9.00163 9.5 9.22386 9.5 9.5C9.5 9.77614 9.24218 9.99836 8.72654 10.4428L7.5 11.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.5 12.5H15.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12 21C15.7497 21 17.6246 21 18.9389 20.0451C19.3634 19.7367 19.7367 19.3634 20.0451 18.9389C21 17.6246 21 15.7497 21 12C21 8.25027 21 6.3754 20.0451 5.06107C19.7367 4.6366 19.3634 4.26331 18.9389 3.95491C17.6246 3 15.7497 3 12 3C8.25027 3 6.3754 3 5.06107 3.95491C4.6366 4.26331 4.26331 4.6366 3.95491 5.06107C3 6.3754 3 8.25027 3 12C3 15.7497 3 17.6246 3.95491 18.9389C4.26331 19.3634 4.6366 19.7367 5.06107 20.0451C6.3754 21 8.25027 21 12 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],gc=[[`path`,{d:`M15 5H9C6.09433 5 4.64149 5 3.62036 5.73563C3.27976 5.981 2.981 6.27976 2.73563 6.62036C2 7.64149 2 9.09433 2 12C2 14.9057 2 16.3585 2.73563 17.3796C2.981 17.7202 3.27976 18.019 3.62036 18.2644C4.64149 19 6.09433 19 9 19H15C17.9057 19 19.3585 19 20.3796 18.2644C20.7202 18.019 21.019 17.7202 21.2644 17.3796C22 16.3585 22 14.9057 22 12C22 9.09433 22 7.64149 21.2644 6.62036C21.019 6.27976 20.7202 5.981 20.3796 5.73563C19.3585 5 17.9057 5 15 5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 9V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14 9V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M10 9V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M6 9V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],_c=[[`path`,{d:`M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],vc=[[`path`,{d:`M11 10.6667C11 10.6667 11.75 10.6667 12.5 12C12.5 12 14.8824 8.66667 17 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 11V9C7 5.70017 7 4.05025 8.02513 3.02513C9.05025 2 10.7002 2 14 2C17.2998 2 18.9497 2 19.9749 3.02513C21 4.05025 21 5.70017 21 9V11C21 14.2998 21 15.9497 19.9749 16.9749C18.9497 18 17.2998 18 14 18C10.7002 18 9.05025 18 8.02513 16.9749C7 15.9497 7 14.2998 7 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 6V15C3 18.2998 3 19.9497 4.02513 20.9749C5.05025 22 6.70017 22 10 22H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],yc=[[`path`,{d:`M4 12C4 8.22876 4 6.34315 5.17157 5.17157C6.34315 4 8.22876 4 12 4C15.7712 4 17.6569 4 18.8284 5.17157C20 6.34315 20 8.22876 20 12C20 15.7712 20 17.6569 18.8284 18.8284C17.6569 20 15.7712 20 12 20C8.22876 20 6.34315 20 5.17157 18.8284C4 17.6569 4 15.7712 4 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 2V4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14.5 2V4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M9.5 20V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M14.5 20V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M13 9L9 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M15 13L13 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`6`}],[`path`,{d:`M22 14.5L20 14.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`7`}],[`path`,{d:`M4 9.5L2 9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`8`}],[`path`,{d:`M4 14.5L2 14.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`9`}],[`path`,{d:`M22 9.5L20 9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`10`}]],bc=[[`path`,{d:`M10 8.00024C13.866 8.00024 17 6.6571 17 5.00024C17 3.34339 13.866 2.00024 10 2.00024C6.13401 2.00024 3 3.34339 3 5.00024C3 6.6571 6.13401 8.00024 10 8.00024Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 14.0002C6.13401 14.0002 3 12.6571 3 11.0002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M10 20.0002C6.13401 20.0002 3 18.6571 3 17.0002V5.00024`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M18 15.0001V10.6516C18 10.2918 17.7083 10.0001 17.3485 10.0002C17.1308 10.0003 16.9275 10.1091 16.8067 10.2903L13.1289 15.807C13.0449 15.9331 13 16.0812 13 16.2327C13 16.6567 13.3437 17.0003 13.7676 17.0003L16 17.0003L16 21.3488C16 21.7086 16.2917 22.0003 16.6515 22.0002C16.8692 22.0001 17.0725 21.8913 17.1933 21.7101L20.8711 16.1934C20.9551 16.0673 21 15.9192 21 15.7677C21 15.3437 20.6563 15.0001 20.2324 15.0001H18Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M6 10.4896V10.4996`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M6 16.4899V16.4999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],xc=[[`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 10.842C7.60158 11.0229 8.27434 11.1718 9 11.282`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M20 12C20 13.6569 16.4183 15 12 15C7.58172 15 4 13.6569 4 12`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M7 17.842C7.60158 18.0229 8.27434 18.1718 9 18.282`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M20 5V19C20 20.6569 16.4183 22 12 22C7.58172 22 4 20.6569 4 19V5`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],Sc=[[`path`,{d:`M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M9.5 16.5L9.5 10.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M14.5 16.5L14.5 10.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}]],Cc=[[`path`,{d:`M2.99969 17.0002C2.99969 17.9302 2.99969 18.3952 3.10192 18.7767C3.37932 19.8119 4.18796 20.6206 5.22324 20.898C5.60474 21.0002 6.06972 21.0002 6.99969 21.0002L16.9997 21.0002C17.9297 21.0002 18.3947 21.0002 18.7762 20.898C19.8114 20.6206 20.6201 19.8119 20.8975 18.7767C20.9997 18.3952 20.9997 17.9302 20.9997 17.0002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.4998 11.5002C16.4998 11.5002 13.1856 16.0002 11.9997 16.0002C10.8139 16.0002 7.49976 11.5002 7.49976 11.5002M11.9997 15.0002V3.00016`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],wc=[[`path`,{d:`M15 3H18C19.4142 3 20.1213 3 20.5607 3.43934C21 3.87868 21 4.58579 21 6V9M20 4L11 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20 13C20 16.7712 20 18.6569 18.8284 19.8284C17.6569 21 15.7712 21 12 21H11C7.22876 21 5.34315 21 4.17157 19.8284C3 18.6569 3 16.7712 3 13V12C3 8.22876 3 6.34315 4.17157 5.17157C5.34315 4 7.22876 4 11 4`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],Tc=[[`path`,{d:`M8 7L16 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 11L12 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ec=[[`path`,{d:`M2.5 20V8.87695C2.5 7.58945 2.5 6.9457 2.78533 6.47048C2.9541 6.18939 3.18939 5.9541 3.47048 5.78533C3.9457 5.5 4.59449 5.5 5.89206 5.5C6.52339 5.5 6.83906 5.5 7.12612 5.58819C7.31759 5.64702 7.49914 5.73428 7.66469 5.84705C7.91289 6.01611 8.10859 6.26074 8.5 6.75C8.89141 7.23926 9.08711 7.48389 9.33531 7.65295C9.50086 7.76572 9.68241 7.85298 9.87388 7.91181C10.1609 8 10.4742 8 11.1008 8H15C16.4045 8 17.1067 8 17.6111 8.33706C17.8295 8.48298 18.017 8.67048 18.1629 8.88886C18.5 9.39331 18.5 10.0955 18.5 11.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M4.42028 14.0144L3.63368 16.0144C2.65618 18.4998 2.16743 19.7425 2.7524 20.6213C3.33737 21.5 4.65337 21.5 7.28537 21.5H15.1903C16.4249 21.5 17.0422 21.5 17.5295 21.1795C18.0169 20.859 18.2702 20.2865 18.7769 19.1415L19.6618 17.1415C20.7866 14.5992 21.349 13.3281 20.7679 12.4141C20.1868 11.5 18.8163 11.5 16.0752 11.5H8.07196C6.78232 11.5 6.1375 11.5 5.63811 11.8439C5.13872 12.1877 4.89924 12.7966 4.42028 14.0144Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M11.5 4.51456C12.4151 3.28409 13.6662 2.55594 15.5125 2.50161C16.1155 2.48386 16.7152 2.61395 17.2682 2.85544C18.5748 3.42601 19.4185 4.15644 20 5.5L21.5 3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Dc=[[`circle`,{cx:`12`,cy:`14`,r:`2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.0007 20C21.2561 18.3287 22 16.2512 22 14C22 12.5778 21.7031 11.2249 21.1679 10M3.99927 20C2.74389 18.3287 2 16.2512 2 14C2 8.47715 6.47715 4 12 4C13.4222 4 14.7751 4.2969 16 4.83209`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13.5 12.5L19 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Oc=[[`path`,{d:`M7 19H13C15.8284 19 17.2426 19 18.1213 18.1213C19 17.2426 19 15.8284 19 13V10M19 10C19.7002 10 21.0085 11.9943 21.5 12.5M19 10C18.2998 10 16.9915 11.9943 16.5 12.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5 7L5 17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`5`,cy:`5`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`circle`,{cx:`19`,cy:`5`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],kc=[[`path`,{d:`M2 11.4C2 10.2417 2.24173 10 3.4 10H20.6C21.7583 10 22 10.2417 22 11.4V12.6C22 13.7583 21.7583 14 20.6 14H3.4C2.24173 14 2 13.7583 2 12.6V11.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 3.4C2 2.24173 2.24173 2 3.4 2H20.6C21.7583 2 22 2.24173 22 3.4V4.6C22 5.75827 21.7583 6 20.6 6H3.4C2.24173 6 2 5.75827 2 4.6V3.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 19.4C2 18.2417 2.24173 18 3.4 18H20.6C21.7583 18 22 18.2417 22 19.4V20.6C22 21.7583 21.7583 22 20.6 22H3.4C2.24173 22 2 21.7583 2 20.6V19.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],Ac=[[`path`,{d:`M12 3V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 18V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M21 12L18 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6 12L3 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M18.3635 5.63672L16.2422 7.75804`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M7.75804 16.2422L5.63672 18.3635`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M18.3635 18.3635L16.2422 16.2422`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`6`}],[`path`,{d:`M7.75804 7.75804L5.63672 5.63672`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`7`}]],jc=[[`path`,{d:`M21.5 14.0784C20.3003 14.7189 18.9301 15.0821 17.4751 15.0821C12.7491 15.0821 8.91792 11.2509 8.91792 6.52485C8.91792 5.06986 9.28105 3.69968 9.92163 2.5C5.66765 3.49698 2.5 7.31513 2.5 11.8731C2.5 17.1899 6.8101 21.5 12.1269 21.5C16.6849 21.5 20.503 18.3324 21.5 14.0784Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Mc=[[`path`,{d:`M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11 13.4625C14 14.955 17 12.8198 17 10.3934C17 7.96698 14.7614 6 12 6C9.23858 6 7 7.96698 7 10.3934C7 11.3826 7.37209 12.2955 8 13.0298M11 13.4625V9.90523M11 13.4625V15.8456C11 16.8264 11 17.3168 10.7732 17.5868C10.1251 18.3583 9 17.9399 8.5 17.2275`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Nc=[[`path`,{d:`M18.8906 12.846C18.5371 14.189 16.8667 15.138 13.5257 17.0361C10.296 18.8709 8.6812 19.7884 7.37983 19.4196C6.8418 19.2671 6.35159 18.9776 5.95624 18.5787C5 17.6139 5 15.7426 5 12C5 8.2574 5 6.3861 5.95624 5.42132C6.35159 5.02245 6.8418 4.73288 7.37983 4.58042C8.6812 4.21165 10.296 5.12907 13.5257 6.96393C16.8667 8.86197 18.5371 9.811 18.8906 11.154C19.0365 11.7084 19.0365 12.2916 18.8906 12.846Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Pc=[[`path`,{d:`M15.5 2V6M8.5 6V2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.00446 7.61331C5.93719 6.74273 6.63957 6 7.53014 6H16.4699C17.3604 6 18.0628 6.74273 17.9955 7.61331L17.8117 9.99197C17.6796 11.7019 17.1011 13.3498 16.132 14.7773L15.5312 15.6622C14.9638 16.4979 14.0077 17 12.9838 17H11.0162C9.99228 17 9.03617 16.4979 8.46881 15.6622L7.86803 14.7773C6.89885 13.3498 6.32041 11.7019 6.18827 9.99197L6.00446 7.61331Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12 17V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M11 9H13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Fc=[[`path`,{d:`M20.0092 2V5.13219C20.0092 5.42605 19.6418 5.55908 19.4537 5.33333C17.6226 3.2875 14.9617 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Ic=[[`path`,{d:`M12 4V2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20 22C20 17.5817 16.4183 14 12 14C7.58172 14 4 17.5817 4 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M9.375 8.25H9.25M9.5 8.25C9.5 8.38807 9.38807 8.5 9.25 8.5C9.11193 8.5 9 8.38807 9 8.25C9 8.11193 9.11193 8 9.25 8C9.38807 8 9.5 8.11193 9.5 8.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M14.875 8.25H14.75M15 8.25C15 8.38807 14.8881 8.5 14.75 8.5C14.6119 8.5 14.5 8.38807 14.5 8.25C14.5 8.11193 14.6119 8 14.75 8C14.8881 8 15 8.11193 15 8.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M15.1538 4H8.84615C7.59095 4 6.96334 4 6.47397 4.22025C5.91693 4.47095 5.47095 4.91693 5.22025 5.47397C5 5.96334 5 6.59095 5 7.84615C5 9.85448 5 10.8586 5.3524 11.6417C5.75353 12.5329 6.46709 13.2465 7.35835 13.6476C8.14135 14 9.14552 14 11.1538 14H12.8462C14.8545 14 15.8586 14 16.6417 13.6476C17.5329 13.2465 18.2465 12.5329 18.6476 11.6417C19 10.8586 19 9.85448 19 7.84615C19 6.59095 19 5.96334 18.7797 5.47397C18.529 4.91693 18.0831 4.47095 17.526 4.22025C17.0367 4 16.4091 4 15.1538 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Lc=[[`path`,{d:`M2.5 9H6.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.5 14H6.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.5 4H18.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M18.5355 17.0355L21.5 20M20 13.5C20 10.7386 17.7614 8.5 15 8.5C12.2386 8.5 10 10.7386 10 13.5C10 16.2614 12.2386 18.5 15 18.5C17.7614 18.5 20 16.2614 20 13.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Rc=[[`path`,{d:`M15.5 12C15.5 13.933 13.933 15.5 12 15.5C10.067 15.5 8.5 13.933 8.5 12C8.5 10.067 10.067 8.5 12 8.5C13.933 8.5 15.5 10.067 15.5 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21.011 14.0965C21.5329 13.9558 21.7939 13.8854 21.8969 13.7508C22 13.6163 22 13.3998 22 12.9669V11.0332C22 10.6003 22 10.3838 21.8969 10.2493C21.7938 10.1147 21.5329 10.0443 21.011 9.90358C19.0606 9.37759 17.8399 7.33851 18.3433 5.40087C18.4817 4.86799 18.5509 4.60156 18.4848 4.44529C18.4187 4.28902 18.2291 4.18134 17.8497 3.96596L16.125 2.98673C15.7528 2.77539 15.5667 2.66972 15.3997 2.69222C15.2326 2.71472 15.0442 2.90273 14.6672 3.27873C13.208 4.73448 10.7936 4.73442 9.33434 3.27864C8.95743 2.90263 8.76898 2.71463 8.60193 2.69212C8.43489 2.66962 8.24877 2.77529 7.87653 2.98663L6.15184 3.96587C5.77253 4.18123 5.58287 4.28891 5.51678 4.44515C5.45068 4.6014 5.51987 4.86787 5.65825 5.4008C6.16137 7.3385 4.93972 9.37763 2.98902 9.9036C2.46712 10.0443 2.20617 10.1147 2.10308 10.2492C2 10.3838 2 10.6003 2 11.0332V12.9669C2 13.3998 2 13.6163 2.10308 13.7508C2.20615 13.8854 2.46711 13.9558 2.98902 14.0965C4.9394 14.6225 6.16008 16.6616 5.65672 18.5992C5.51829 19.1321 5.44907 19.3985 5.51516 19.5548C5.58126 19.7111 5.77092 19.8188 6.15025 20.0341L7.87495 21.0134C8.24721 21.2247 8.43334 21.3304 8.6004 21.3079C8.76746 21.2854 8.95588 21.0973 9.33271 20.7213C10.7927 19.2644 13.2088 19.2643 14.6689 20.7212C15.0457 21.0973 15.2341 21.2853 15.4012 21.3078C15.5682 21.3303 15.7544 21.2246 16.1266 21.0133L17.8513 20.034C18.2307 19.8187 18.4204 19.711 18.4864 19.5547C18.5525 19.3984 18.4833 19.132 18.3448 18.5991C17.8412 16.6616 19.0609 14.6226 21.011 14.0965Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],zc=[[`path`,{d:`M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.36318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Bc=[[`path`,{d:`M4 12C4 8.72077 4 7.08116 4.81382 5.91891C5.1149 5.48891 5.48891 5.1149 5.91891 4.81382C7.08116 4 8.72077 4 12 4C15.2792 4 16.9188 4 18.0811 4.81382C18.5111 5.1149 18.8851 5.48891 19.1862 5.91891C20 7.08116 20 8.72077 20 12C20 15.2792 20 16.9188 19.1862 18.0811C18.8851 18.5111 18.5111 18.8851 18.0811 19.1862C16.9188 20 15.2792 20 12 20C8.72077 20 7.08116 20 5.91891 19.1862C5.48891 18.8851 5.1149 18.5111 4.81382 18.0811C4 16.9188 4 15.2792 4 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}]],Vc=[[`path`,{d:`M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 2C11.6227 2.33333 11.0945 3.2 12 4M12 20C12.3773 20.3333 12.9055 21.2 12 22M19.5 4.50271C18.9685 4.46982 17.9253 4.72293 18.0042 5.99847M5.49576 17.5C5.52865 18.0315 5.27555 19.0747 4 18.9958M5.00271 4.5C4.96979 5.03202 5.22315 6.0763 6.5 5.99729M18 17.5026C18.5315 17.4715 19.5747 17.7108 19.4958 18.9168M22 12C21.6667 11.6227 20.8 11.0945 20 12M4 11.5C3.66667 11.8773 2.8 12.4055 2 11.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],Hc=[[`path`,{d:`M13 11L18 6`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 7L17 5L19.5 3.5L20.5 4.5L19 7Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M4.02513 8.97487C3.01416 7.96391 2.75095 6.48836 3.23548 5.23548L4.65748 6.65748H6.65748V4.65748L5.23548 3.23548C6.48836 2.75095 7.96391 3.01416 8.97487 4.02513C9.98621 5.03647 10.2493 6.51274 9.76398 7.76593L16.2341 14.236C17.4873 13.7507 18.9635 14.0138 19.9749 15.0251C20.9858 16.0361 21.2491 17.5116 20.7645 18.7645L19.3425 17.3425L17.3425 17.3425V19.3425L18.7645 20.7645C17.5116 21.2491 16.0361 20.9858 15.0251 19.9749C14.0145 18.9643 13.7511 17.4895 14.2349 16.2369L7.76312 9.76507C6.51053 10.2489 5.03571 9.98546 4.02513 8.97487Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M12.203 14.5L6.59897 20.1041C6.07115 20.6319 5.2154 20.6319 4.68758 20.1041L3.89586 19.3124C3.36805 18.7846 3.36805 17.9288 3.89586 17.401L9.49994 11.7969`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Uc=[[`path`,{d:`M6 5.5C6 4.56538 6 4.09808 6.20096 3.75C6.33261 3.52197 6.52197 3.33261 6.75 3.20096C7.09808 3 7.56538 3 8.5 3H11.5C12.4346 3 12.9019 3 13.25 3.20096C13.478 3.33261 13.6674 3.52197 13.799 3.75C14 4.09808 14 4.56538 14 5.5C14 6.43462 14 6.90192 13.799 7.25C13.6674 7.47803 13.478 7.66739 13.25 7.79904C12.9019 8 12.4346 8 11.5 8H8.5C7.56538 8 7.09808 8 6.75 7.79904C6.52197 7.66739 6.33261 7.47803 6.20096 7.25C6 6.90192 6 6.43462 6 5.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 15.5C6 14.5654 6 14.0981 6.20096 13.75C6.33261 13.522 6.52197 13.3326 6.75 13.201C7.09808 13 7.56538 13 8.5 13H11.5C12.4346 13 12.9019 13 13.25 13.201C13.478 13.3326 13.6674 13.522 13.799 13.75C14 14.0981 14 14.5654 14 15.5C14 16.4346 14 16.9019 13.799 17.25C13.6674 17.478 13.478 17.6674 13.25 17.799C12.9019 18 12.4346 18 11.5 18H8.5C7.56538 18 7.09808 18 6.75 17.799C6.52197 17.6674 6.33261 17.478 6.20096 17.25C6 16.9019 6 16.4346 6 15.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M20.8398 17.1408C21.6133 16.3673 22 15.9806 22 15.5C22 15.0194 21.6133 14.6327 20.8398 13.8592L20.6408 13.6602C19.8673 12.8867 19.4806 12.5 19 12.5C18.5194 12.5 18.1327 12.8867 17.3592 13.6602L17.1602 13.8592C16.3867 14.6327 16 15.0194 16 15.5C16 15.9806 16.3867 16.3673 17.1602 17.1408L17.3592 17.3398C18.1327 18.1133 18.5194 18.5 19 18.5C19.4806 18.5 19.8673 18.1133 20.6408 17.3398L20.8398 17.1408Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6.006 5.5H2.00781M2.00781 5.5V2M2.00781 5.5V12C2.00781 13.1037 1.85651 14.4679 2.89627 15.1629C3.40049 15.5 4.1024 15.5 5.50623 15.5M14.0024 15.5H16.0015M19.0001 12.5V9.5C19.0001 7.61438 19.0001 6.67157 18.4146 6.08579C17.8291 5.5 16.8867 5.5 15.0019 5.5H14.0024`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M22.0001 22C21.0682 22 20.6023 22 20.2348 21.8695C19.7447 21.6955 19.3554 21.3618 19.1524 20.9417C19.0001 20.6267 19.0001 20.2273 19.0001 19.4286V19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Wc=[[`path`,{d:`M20.3584 13.3567C19.1689 14.546 16.9308 14.4998 13.4992 14.4998C11.2914 14.4998 9.50138 12.7071 9.50024 10.4993C9.50024 7.07001 9.454 4.83065 10.6435 3.64138C11.8329 2.45212 12.3583 2.50027 17.6274 2.50027C18.1366 2.49809 18.3929 3.11389 18.0329 3.47394L15.3199 6.18714C14.6313 6.87582 14.6294 7.99233 15.3181 8.68092C16.0068 9.36952 17.1234 9.36959 17.8122 8.68109L20.5259 5.96855C20.886 5.60859 21.5019 5.86483 21.4997 6.37395C21.4997 11.6422 21.5479 12.1675 20.3584 13.3567Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M13.5 14.5L7.32842 20.6716C6.22386 21.7761 4.433 21.7761 3.32843 20.6716C2.22386 19.567 2.22386 17.7761 3.32843 16.6716L9.5 10.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5.50896 18.5H5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,key:`2`}]];function Gc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Kc(...e){return t=>{let n=!1,r=e.map(e=>{let r=Gc(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():Gc(e[t],null)}}}}function qc(...e){return C.useCallback(Kc(...e),e)}function Jc(e){let t=C.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];nl(r)&&typeof ol==`function`&&(r=ol(r._payload)),C.Children.forEach(r,e=>{if(el(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;nl(n)&&typeof ol==`function`&&(n=ol(n._payload)),a=Zc(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=C.cloneElement(a,void 0,s):!o&&C.Children.count(r)===1&&C.isValidElement(r)&&(a=r);let c=a?$c(a):void 0,l=qc(n,c);if(!a){if(r||r===0)throw Error(o?al(e):il(e));return r}let u=Qc(i,a.props??{});return a.type!==C.Fragment&&(u.ref=n?l:c),C.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var Yc=Jc(`Slot`),Xc=Symbol.for(`radix.slottable`),Zc=(e,t)=>{if(`child`in e.props){let t=e.props.child;return C.isValidElement(t)?C.cloneElement(t,void 0,e.props.children(t.props.children)):null}return C.isValidElement(t)?t:null};function Qc(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 $c(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 el(e){return C.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Xc}var tl=Symbol.for(`react.lazy`);function nl(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===tl&&`_payload`in e&&rl(e._payload)}function rl(e){return typeof e==`object`&&!!e&&`then`in e}var il=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,al=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ol=C.use,sl=n(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg 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-foreground/45 bg-foreground text-background hover:bg-foreground/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 hover:border-muted-foreground/45 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 cl({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,B.jsx)(r?Yc:`button`,{className:a(sl({variant:t,size:n,className:e})),...i})}var ll={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`},ul=(0,C.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:i=``,altIcon:a,showAlt:o=!1,icon:s,primaryColor:c,secondaryColor:l,disableSecondaryOpacity:u=!1,...d},f)=>{let p=n===void 0?void 0:r?Number(n)*24/Number(t):n,m=p===void 0?{}:{strokeWidth:p,stroke:`currentColor`};return(0,C.createElement)(`svg`,{ref:f,...ll,width:t,height:t,color:c||e,className:i,...m,...d},[...o&&a?a:s].sort(([,e],[,t])=>{let n=e.opacity!==void 0;return t.opacity===void 0?n?-1:0:1}).map(([t,n])=>{let r=n.opacity!==void 0,i=r&&!u?n.opacity:void 0,a=l?{...n.stroke===void 0?{fill:r?l:c||e}:{stroke:r?l:c||e}}:{};return(0,C.createElement)(t,{...n,...m,...a,opacity:i,key:n.key})}))});ul.displayName=`HugeiconsIcon`;function dl({color:e=`currentColor`,strokeWidth:t=1.5,...n}){return(0,B.jsx)(ul,{color:e,strokeWidth:t,...n})}function fl(e){return e.flatMap(e=>e.sources.map((t,n)=>({key:`${e.agentId}:${hl(t,n)}`,agentId:e.agentId,agentName:e.agentName??e.agentId,source:ml(t,n)})))}var pl=[{id:`static-context`,label:`Static Context`},{id:`dynamic-context`,label:`Dynamic Context`},{id:`dynamic-tools`,label:`Dynamic Tools`},{id:`retrieval-log`,label:`Retrieval Log`}];function ml(e,t){return e.sourceId===void 0?{...e,sourceId:gl(e,t)}:e}function hl(e,t=0){return e.sourceId??gl(e,t)}function gl(e,t){switch(e.kind){case`static_context`:return`static-context`;case`dynamic_context`:return`dynamic-context-${e.registrationIndex??t}`;case`dynamic_tools`:return`dynamic-tools-${e.registrationIndex??t}`}}function _l(e){switch(e){case`static_context`:return`Static context`;case`dynamic_context`:return`Dynamic context`;case`dynamic_tools`:return`Dynamic tools`}}function vl(e){switch(e){case`static-context`:return`static_context`;case`dynamic-context`:return`dynamic_context`;case`dynamic-tools`:return`dynamic_tools`;case`retrieval-log`:return}}function yl(e){return pl.find(t=>t.id===e)?.label??`Knowledge`}function bl(e){let t=xl(e.icon);return(0,B.jsxs)(cl,{className:a(`studio-sidebar-nav-button h-9 min-h-9 w-full justify-start gap-3 rounded-lg bg-transparent px-2.5 py-0.5 text-base font-medium text-sidebar-foreground/62 shadow-none transition duration-200 hover:text-sidebar-foreground active:translate-y-px [&_svg]:h-[17px] [&_svg]:w-[17px]`,e.active&&`studio-sidebar-nav-button-active text-sidebar-accent-foreground`),variant:`ghost`,type:`button`,disabled:e.disabled,onClick:e.onClick,children:[(0,B.jsx)(dl,{icon:t}),(0,B.jsx)(`span`,{children:e.label})]})}function xl(e){switch(e){case`activity`:return nc;case`bot`:return Ic;case`book-open-text`:return uc;case`container`:return gc;case`database`:return xc;case`database-lightning`:return bc;case`gauge`:return Dc;case`list`:return kc;case`message`:return pc;case`plug`:return Pc;case`search-list`:return Lc;case`shield`:return zc;case`tools`:return Hc;case`wrench`:return Wc;case`workflow`:return Uc}}var Sl={"static-context":`book-open-text`,"dynamic-context":`database-lightning`,"dynamic-tools":`tools`,"retrieval-log":`search-list`};function Cl(e){return(0,B.jsxs)(`aside`,{className:`flex h-[100dvh] min-h-0 flex-col overflow-hidden border-r border-sidebar-border bg-sidebar text-sidebar-foreground`,children:[(0,B.jsx)(`div`,{className:`flex h-15 items-center px-4`,children:(0,B.jsxs)(`div`,{className:`studio-logo-lockup min-w-0`,children:[(0,B.jsx)(`img`,{className:`h-auto w-[92px] shrink-0 object-contain`,src:Ps,alt:`Anvia`}),(0,B.jsx)(`span`,{className:`studio-logo-badge`,children:`Studio`})]})}),(0,B.jsxs)(`nav`,{className:`grid gap-0.5 px-3 py-3`,"aria-label":`Main`,children:[(0,B.jsx)(`div`,{className:`px-2.5 pb-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground opacity-50`,children:`Workspace`}),(0,B.jsx)(bl,{active:e.activePage===`playground`,disabled:!e.hasAgents,icon:`message`,label:`Chat`,onClick:()=>e.onNavigate(`playground`)}),(0,B.jsx)(bl,{active:e.activePage===`pipelines`,disabled:!e.pipelinesEnabled,icon:`workflow`,label:`Pipelines`,onClick:()=>e.onNavigate(`pipelines`)}),(0,B.jsx)(bl,{active:e.activePage===`evals`,disabled:!e.evalsEnabled,icon:`gauge`,label:`Evals`,onClick:()=>e.onNavigate(`evals`)}),(0,B.jsx)(bl,{active:e.activePage===`sessions`,disabled:!e.sessionsEnabled,icon:`list`,label:`Sessions`,onClick:()=>e.onNavigate(`sessions`)}),(0,B.jsx)(bl,{active:e.activePage===`tracing`,disabled:!e.tracesEnabled,icon:`activity`,label:`Traces`,onClick:()=>e.onNavigate(`tracing`)})]}),(0,B.jsxs)(`nav`,{className:`grid gap-0.5 px-3 py-3`,"aria-label":`Studio`,children:[(0,B.jsx)(`div`,{className:`px-2.5 pb-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground opacity-50`,children:`Inspect`}),(0,B.jsx)(bl,{active:e.activePage===`agents`,icon:`bot`,label:`Studio`,onClick:()=>e.onNavigate(`agents`)}),(0,B.jsx)(bl,{active:e.activePage===`tools`,disabled:!e.toolsEnabled,icon:`wrench`,label:`Tools`,onClick:()=>e.onNavigate(`tools`)}),(0,B.jsx)(bl,{active:e.activePage===`sandboxes`,disabled:!e.sandboxesEnabled,icon:`container`,label:`Sandboxes`,onClick:()=>e.onNavigate(`sandboxes`)}),(0,B.jsx)(bl,{active:e.activePage===`mcps`,disabled:!e.mcpsEnabled,icon:`plug`,label:`MCPs`,onClick:()=>e.onNavigate(`mcps`)}),pl.map(t=>(0,B.jsx)(bl,{active:e.activePage===`knowledge`&&e.knowledgeTab===t.id,disabled:!e.knowledgeEnabled,icon:Sl[t.id],label:t.label,onClick:()=>e.onNavigateKnowledgeTab(t.id)},t.id)),(0,B.jsx)(bl,{active:e.activePage===`memory`,disabled:!e.memoryEnabled,icon:`database`,label:`Memory`,onClick:()=>e.onNavigate(`memory`)}),(0,B.jsx)(bl,{active:e.activePage===`status`,disabled:!e.statusEnabled,icon:`gauge`,label:`Status`,onClick:()=>e.onNavigate(`status`)})]}),(0,B.jsxs)(`div`,{className:`mt-auto px-3 py-3`,children:[(0,B.jsx)(`nav`,{className:`grid gap-1`,"aria-label":`Anvia links`,children:(0,B.jsx)(Tl,{href:`https://anvia.dev/docs`,label:`Anvia Docs`})}),(0,B.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:e.status})]})]})}function wl(e){return(0,B.jsx)(`header`,{className:`grid min-h-13 border-b border-border bg-background/88 backdrop-blur`,children:(0,B.jsxs)(`div`,{className:`grid min-h-13 grid-cols-[minmax(0,1fr)_auto] items-center gap-3 py-0 pl-4 pr-6`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-sm font-medium`,children:[(0,B.jsx)(`span`,{className:`text-foreground`,children:e.activePage===`playground`?`Agents`:`Studio`}),(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:`/`}),(0,B.jsx)(`span`,{className:`truncate`,children:e.selectedAgentLabel})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(cl,{"aria-label":e.theme===`dark`?`Switch to light theme`:`Switch to dark theme`,className:`h-8 min-h-8 w-8 border-0 bg-transparent p-0 text-muted-foreground shadow-none hover:bg-muted/45 hover:text-foreground`,title:e.theme===`dark`?`Switch to light theme`:`Switch to dark theme`,type:`button`,variant:`ghost`,size:`icon`,onClick:e.onToggleTheme,children:e.theme===`dark`?(0,B.jsx)(dl,{icon:Vc,"aria-hidden":`true`}):(0,B.jsx)(dl,{icon:jc,"aria-hidden":`true`})}),(0,B.jsx)(cl,{className:`h-8 min-h-8 rounded-lg border border-white bg-white px-3 text-xs text-black shadow-none [box-shadow:none] hover:border-white hover:bg-white/90 hover:text-black focus-visible:ring-0 active:bg-white/85 disabled:bg-muted disabled:text-muted-foreground`,type:`button`,variant:`ghost`,disabled:!e.sessionsEnabled,onClick:e.onNewSession,children:`New session`})]})]})})}function Tl(e){return(0,B.jsxs)(`a`,{className:`flex h-8 min-h-8 items-center justify-between rounded-lg px-2 text-xs font-semibold text-sidebar-foreground/62 transition duration-200 hover:bg-sidebar-accent hover:text-sidebar-foreground`,href:e.href,target:`_blank`,rel:`noreferrer`,children:[(0,B.jsx)(`span`,{children:e.label}),(0,B.jsx)(dl,{icon:wc,"aria-hidden":`true`,className:`h-3 w-3 text-muted-foreground`})]})}function El(){let e=zs();return(0,B.jsxs)(`div`,{className:`grid h-[100dvh] min-h-0 overflow-hidden bg-background text-foreground lg:grid-cols-[228px_minmax(0,1fr)]`,children:[(0,B.jsx)(Cl,{activePage:e.activePage,evalsEnabled:e.evalsEnabled,hasAgents:e.hasAgents,knowledgeEnabled:e.knowledgeEnabled,mcpsEnabled:e.mcpsEnabled,memoryEnabled:e.memoryEnabled,pipelinesEnabled:e.pipelinesEnabled,sandboxesEnabled:e.sandboxesEnabled,sessionsEnabled:e.sessionsEnabled,status:e.status,statusEnabled:e.statusEnabled,toolsEnabled:e.toolsEnabled,tracesEnabled:e.tracesEnabled,knowledgeTab:e.knowledgeTab,onNavigate:e.navigatePage,onNavigateKnowledgeTab:e.navigateKnowledgeTab}),(0,B.jsxs)(`main`,{className:`grid h-[100dvh] min-w-0 grid-rows-[52px_minmax(0,1fr)] overflow-hidden bg-background/80`,children:[(0,B.jsx)(wl,{activePage:e.activePage,selectedAgentLabel:e.activePage===`sandboxes`?`Sandboxes`:e.selectedAgent?.name??e.selectedAgent?.id??`Agent`,sessionsEnabled:e.sessionsEnabled,theme:e.theme,onNavigate:e.navigatePage,onNewSession:()=>e.startNewChat(),onToggleTheme:e.toggleTheme}),(0,B.jsx)(Br,{})]}),(0,B.jsx)(C.Suspense,{fallback:null,children:(0,B.jsx)(Qs,{session:e.deleteCandidate,onOpenChange:t=>{t||e.setDeleteCandidate(void 0)},onConfirm:t=>{e.sessions.deleteSession(t).finally(()=>{e.setDeleteCandidate(void 0)})}})})]})}function Dl(e){let t=zs(),{activateRoute:n}=t;return(0,C.useEffect)(()=>{n(e)},[n,e]),t}function Ol(e){switch(e){case`dynamic-context`:case`dynamic-tools`:case`retrieval-log`:case`static-context`:return e;default:return`static-context`}}function kl(){let e=Dl(`agents`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Ws,{agents:e.agents,selectedAgentId:e.selectedAgentId})})}function Al(e){let[t,n]=(0,C.useState)(``),[r,i]=(0,C.useState)(),[a,o]=(0,C.useState)(`idle`);async function c(){let n=t||e.evals[0]?.id||``;if(!(n.length===0||a===`running`)){o(`running`),i(void 0),e.onError(``);try{let t=await fetch(`/evals/${encodeURIComponent(n)}/runs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({})});if(!t.ok)throw Error(await Vo(t,`Eval run failed`));i(await t.json()),e.onStatus(`Connected`)}catch(t){e.onError(s(t))}finally{o(`idle`)}}}return(0,B.jsx)(Gs,{evals:e.evals,selectedEvalId:t,enabled:e.enabled,runState:a,result:r,onSelectEval:e=>{n(e),i(void 0)},onRun:()=>void c()})}function jl(){let e=Dl(`evals`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Al,{evals:e.evals,enabled:e.evalsEnabled,onError:e.setError,onStatus:e.setStatus})})}function Ml(e){let[t,n]=(0,C.useState)(``),[r,i]=(0,C.useState)(),[a,o]=(0,C.useState)(`idle`),c=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0){i(void 0);return}o(`loading`);try{let e=await fetch(`/agents/${encodeURIComponent(t)}/tools`);if(!e.ok)throw Error(`Tools failed with HTTP ${e.status}`);i(await e.json())}catch(t){e.onError(s(t)),i(void 0)}finally{o(`idle`)}},[e.enabled,e.onError]);return(0,C.useEffect)(()=>{e.active&&c(t||e.selectedAgentId)},[e.active,c,e.selectedAgentId,t]),(0,B.jsx)(ec,{agents:e.agents,selectedAgentId:t||e.selectedAgentId,summary:r,enabled:e.enabled,loading:a===`loading`,onSelectAgent:e=>{n(e),c(e)}})}function Nl(e){let[t,n]=(0,C.useState)(``),[r,i]=(0,C.useState)(),[a,o]=(0,C.useState)(`idle`),c=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0){i(void 0);return}o(`loading`);try{let e=await fetch(`/agents/${encodeURIComponent(t)}/mcps`);if(!e.ok)throw Error(`MCPs failed with HTTP ${e.status}`);i(await e.json())}catch(t){e.onError(s(t)),i(void 0)}finally{o(`idle`)}},[e.enabled,e.onError]);return(0,C.useEffect)(()=>{e.active&&c(t||e.selectedAgentId)},[e.active,c,t,e.selectedAgentId]),(0,B.jsx)(qs,{agents:e.agents,selectedAgentId:t||e.selectedAgentId,summary:r,enabled:e.enabled,loading:a===`loading`,onSelectAgent:e=>{n(e),c(e)}})}function Pl(e){let[t,n]=(0,C.useState)(),[r,i]=(0,C.useState)(`idle`),a=(0,C.useCallback)(async()=>{if(!e.enabled){n(void 0);return}i(`loading`);try{let e=await fetch(`/knowledge?limit=25`);if(!e.ok)throw Error(`Knowledge failed with HTTP ${e.status}`);n(await e.json())}catch(t){e.onError(s(t))}finally{i(`idle`)}},[e.enabled,e.onError]);return(0,C.useEffect)(()=>{e.active&&a()},[e.active,a]),(0,B.jsx)(Ks,{activeTab:e.activeTab,enabled:e.enabled,summary:t,loading:r===`loading`,onOpenTrace:e.onOpenTrace,onRefresh:()=>void a()})}function Fl(){let e=Dl(`knowledge`),{setKnowledgeTab:t}=e,n=Ol(sr({strict:!1}).tab);return(0,C.useEffect)(()=>{t(n)},[t,n]),(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Pl,{active:!0,activeTab:n,enabled:e.knowledgeEnabled,onError:e.setError,onOpenTrace:e.traces.selectTrace})})}function Il(){let e=Dl(`mcps`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Nl,{active:!0,agents:e.agents,enabled:e.mcpsEnabled,selectedAgentId:e.selectedAgent?.id||e.selectedAgentId,onError:e.setError})})}function Ll(){let e=Dl(`memory`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Js,{agents:e.agents,enabled:e.memoryEnabled})})}var Rl=ua({endpoint:e=>e.endpoint,method:`POST`,format:`jsonl`,headers:{"content-type":`application/json`},body:e=>JSON.stringify(e.body)});function K(e){let[t,n]=(0,C.useState)(``),[r,i]=(0,C.useState)(),[a,o]=(0,C.useState)([]),[c,l]=(0,C.useState)([]),[u,d]=(0,C.useState)(`"Hello from Studio"`),[f,p]=(0,C.useState)(``),[m,h]=(0,C.useState)(``),[g,_]=(0,C.useState)(`idle`),[v,y]=(0,C.useState)(`idle`),[b,x]=(0,C.useState)(`idle`),[S,w]=(0,C.useState)(`idle`),T=(0,C.useRef)(0),E=(0,C.useRef)(0),D=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0)return E.current+=1,o([]),[];let n=E.current+1;E.current=n,y(`loading`);try{let e=new URLSearchParams({limit:`1000`}),r=await fetch(`/pipelines/${encodeURIComponent(t)}/logs?${e}`);if(!r.ok)throw Error(`Pipeline logs failed with HTTP ${r.status}`);let i=await r.json();return E.current===n&&o(i.logs),i.logs}catch(t){return E.current===n&&(e.onError(s(t)),o([])),[]}finally{E.current===n&&y(`idle`)}},[e.enabled,e.onError]),O=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0)return l([]),[];x(`loading`);try{let e=new URLSearchParams({limit:`50`}),n=await fetch(`/pipelines/${encodeURIComponent(t)}/runs?${e}`);if(!n.ok)throw Error(`Pipeline runs failed with HTTP ${n.status}`);let r=await n.json();return l(r.runs),r.runs}catch(t){return e.onError(s(t)),l([]),[]}finally{x(`idle`)}},[e.enabled,e.onError]),k=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0){T.current+=1,i(void 0),o([]),l([]);return}let r=T.current+1;T.current=r,_(`loading`),e.onError(``);try{let e=await fetch(`/pipelines/${encodeURIComponent(t)}`);if(!e.ok)throw Error(`Pipeline load failed with HTTP ${e.status}`);let a=await e.json();if(T.current!==r)return;n(t),i(a),await Promise.all([D(t),O(t)])}catch(t){T.current===r&&(e.onError(s(t)),i(void 0))}finally{T.current===r&&_(`idle`)}},[D,O,e.enabled,e.onError]);(0,C.useEffect)(()=>{if(!e.active)return;let n=t||e.pipelines[0]?.id||``;n.length>0&&k(n)},[e.active,e.pipelines,k,t]);async function A(e){for await(let t of e){if(Zr(t)){t.log.runId!==void 0&&h(e=>e||t.log.runId||``),ee(t.log),await rs();continue}if(Qr(t)){p(J(t.output)),await rs();continue}if($r(t))throw Error(JSON.stringify(t.error))}}async function j(){let n=t||e.pipelines[0]?.id||``;if(n.length===0||S===`running`)return;let r;try{r=JSON.parse(u)}catch{e.onError(`Pipeline input must be valid JSON`);return}w(`running`),p(``),h(``),e.onError(``);try{await A(Rl.send({endpoint:`/pipelines/${encodeURIComponent(n)}/runs`,body:{input:r,stream:!0,metadata:{source:`anvia-studio`}}})),await Promise.all([D(n),O(n)]),e.onStatus(`Connected`)}catch(t){e.onError(q(t,`Pipeline run failed`))}finally{w(`idle`)}}async function M(n){let r=t||e.pipelines[0]?.id||``;if(!(r.length===0||n.length===0||S===`running`)){w(`running`),p(``),h(``),e.onError(``);try{await A(Rl.send({endpoint:`/pipelines/${encodeURIComponent(r)}/runs/${encodeURIComponent(n)}/replay`,body:{stream:!0,metadata:{source:`anvia-studio`}}})),await Promise.all([D(r),O(r)]),e.onStatus(`Connected`)}catch(t){e.onError(q(t,`Pipeline replay failed`))}finally{w(`idle`)}}}function N(e){n(e),p(``),h(``),k(e)}function ee(e){o(t=>t.some(t=>t.id===e.id)?t:[...t,e].sort((e,t)=>e.sequence-t.sequence))}return{selectedPipelineId:t,pipelineDetail:r,pipelineLogs:a,pipelineRuns:c,activePipelineRunId:m,pipelineRunInput:u,pipelineRunOutput:f,pipelineDetailLoadState:g,pipelineLogLoadState:v,pipelineRunLoadState:b,pipelineRunState:S,setPipelineRunInput:d,selectPipeline:N,runPipeline:j,replayPipelineRun:M}}function q(e,t){return e instanceof Ji?Uo(e,t):s(e)}function J(e){return typeof e==`string`?e:JSON.stringify(e,null,2)}function Y(e){let t=K({active:e.active,enabled:e.enabled,pipelines:e.pipelines,onError:e.onError,onStatus:e.onStatus});return(0,B.jsx)(Ys,{pipelines:e.pipelines,selectedPipelineId:t.selectedPipelineId,detail:t.pipelineDetail,logs:t.pipelineLogs,activeRunId:t.activePipelineRunId,runs:t.pipelineRuns,enabled:e.enabled,detailLoading:t.pipelineDetailLoadState===`loading`,logsLoading:t.pipelineLogLoadState===`loading`,runsLoading:t.pipelineRunLoadState===`loading`,runState:t.pipelineRunState,runInput:t.pipelineRunInput,runOutput:t.pipelineRunOutput,theme:e.theme,activeTab:e.activeTab,onSelectPipeline:t.selectPipeline,onRunInputChange:t.setPipelineRunInput,onRun:()=>void t.runPipeline(),onTabChange:e.onTabChange,onReplayRun:e=>void t.replayPipelineRun(e)})}function X(){let e=Dl(`pipelines`),[t,n]=(0,C.useState)(()=>zl());(0,C.useEffect)(()=>{function e(){n(zl())}return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]);let r=(0,C.useCallback)(e=>{n(e);let t=new URL(window.location.href);t.searchParams.set(`tab`,e);let r=`${t.pathname}${t.search}${t.hash}`;`${window.location.pathname}${window.location.search}${window.location.hash}`!==r&&window.history.pushState(null,``,r)},[]);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Y,{active:!0,activeTab:t,pipelines:e.pipelines,enabled:e.pipelinesEnabled,theme:e.theme,onError:e.setError,onStatus:e.setStatus,onTabChange:r})})}function zl(){return Bl(window.location.search)}function Bl(e){let t=new URLSearchParams(e).get(`tab`);return t===`metadata`||t===`runs`||t===`logs`?t:`input`}function Vl(e,[t,n]){return Math.min(n,Math.max(t,e))}var Hl=Object.defineProperty,Ul=(e,t)=>Hl(e,`name`,{value:t,configurable:!0}),Wl=!!(typeof window<`u`&&window.document&&window.document.createElement);function Gl(e,t,{checkForDefaultPrevented:n=!0}={}){return Ul(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ul(Gl,`composeEventHandlers`);function Kl(e){if(!Wl)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ul(Kl,`getOwnerWindow`);function ql(e){if(!Wl)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ul(ql,`getOwnerDocument`);function Jl(e,t=!1){let{activeElement:n}=ql(e);if(!n?.nodeName)return null;if(Yl(n)&&n.contentDocument)return Jl(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ql(n).getElementById(e);if(t)return t}}return n}Ul(Jl,`getActiveElement`);function Yl(e){return e.tagName===`IFRAME`}Ul(Yl,`isFrame`);function Xl(e,t=[]){let n=[];function r(t,r){let i=C.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=C.useMemo(()=>o,Object.values(o));return(0,B.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=C.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>C.createContext(e));return function(n){let r=n?.[e]||t;return C.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Zl(i,...t)]}function Zl(...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 C.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Ql(e){let t=e+`CollectionProvider`,[n,r]=Xl(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=C.useRef(null),a=C.useRef(new Map).current;return(0,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Jc(s),l=C.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,B.jsx)(c,{ref:qc(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Jc(u),p=C.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=C.useRef(null),s=qc(t,o),c=a(u,n);return C.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return C.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 $l=C.createContext(void 0);function eu(e){let t=C.useContext($l);return e||t||`ltr`}var tu=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Jc(`Primitive.${t}`),r=C.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function nu(e,t){e&&fr.flushSync(()=>e.dispatchEvent(t))}function ru(e){let t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>((...e)=>t.current?.(...e)),[])}var iu=Object.defineProperty,au=(e,t)=>iu(e,`name`,{value:t,configurable:!0}),ou=`dismissableLayer.update`,su=`dismissableLayer.pointerDownOutside`,cu=`dismissableLayer.focusOutside`,lu,uu=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),du=C.forwardRef(au(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=C.useContext(uu),[d,f]=C.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=C.useState({}),h=qc(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=C.useRef(!1),w=mu(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:C.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),T=hu(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=ru(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return C.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),C.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(lu=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),gu(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=lu))}},[d,p,n,u]),C.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),gu())},[d,u]),C.useEffect(()=>{let e=au(()=>m({}),`handleUpdate`);return document.addEventListener(ou,e),()=>document.removeEventListener(ou,e)},[]),(0,B.jsx)(tu.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Gl(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Gl(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Gl(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function fu(){let e=C.useContext(uu),[t,n]=C.useState(null);return C.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}au(fu,`useDismissableLayerSurface`);var pu=au(()=>!0,`IS_TRUE`);function mu(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=pu}=t,s=ru(e),c=C.useRef(!1),l=C.useRef(!1),u=C.useRef(new Map),d=C.useRef(()=>{});return C.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}au(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}au(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}au(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}au(p,`handleInteractionBubble`);let m=au(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||_u(su,s,p,{discrete:!0})};if(au(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:au(()=>c.current=!0,`onPointerDownCapture`)}}au(mu,`usePointerDownOutside`);function hu(e,t=globalThis?.document){let n=ru(e),r=C.useRef(!1);return C.useEffect(()=>{let e=au(e=>{e.target&&!r.current&&_u(cu,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:au(()=>r.current=!0,`onFocusCapture`),onBlurCapture:au(()=>r.current=!1,`onBlurCapture`)}}au(hu,`useFocusOutside`);function gu(){let e=new CustomEvent(ou);document.dispatchEvent(e)}au(gu,`dispatchUpdate`);function _u(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?nu(i,a):i.dispatchEvent(a)}au(_u,`handleAndDispatchCustomEvent`);var vu=0,yu=null;function bu(){C.useEffect(()=>{yu||={start:xu(),end:xu()};let{start:e,end:t}=yu;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),vu++,()=>{vu===1&&(yu?.start.remove(),yu?.end.remove(),yu=null),vu=Math.max(0,vu-1)}},[])}function xu(){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 Su=Object.defineProperty,Cu=(e,t)=>Su(e,`name`,{value:t,configurable:!0}),wu=`focusScope.autoFocusOnMount`,Tu=`focusScope.autoFocusOnUnmount`,Eu={bubbles:!1,cancelable:!0},Du=C.forwardRef(Cu(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=C.useState(null),l=ru(i),u=ru(a),d=C.useRef(null),f=qc(t,c),p=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Pu(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Pu(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Pu(s)};Cu(e,`handleFocusIn`),Cu(t,`handleFocusOut`),Cu(n,`handleMutations`),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]),C.useEffect(()=>{if(s){Fu.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(wu,Eu);s.addEventListener(wu,l),s.dispatchEvent(t),t.defaultPrevented||(Ou(Ru(Au(s)),{select:!0}),document.activeElement===e&&Pu(s))}return()=>{s.removeEventListener(wu,l),setTimeout(()=>{let t=new CustomEvent(Tu,Eu);s.addEventListener(Tu,u),s.dispatchEvent(t),t.defaultPrevented||Pu(e??document.body,{select:!0}),s.removeEventListener(Tu,u),Fu.remove(p)},0)}}},[s,l,u,p]);let m=C.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]=ku(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Pu(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Pu(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,B.jsx)(tu.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Ou(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Pu(r,{select:t}),document.activeElement!==n)return}Cu(Ou,`focusFirst`);function ku(e){let t=Au(e);return[ju(t,e),ju(t.reverse(),e)]}Cu(ku,`getTabbableEdges`);function Au(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Cu(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Cu(Au,`getTabbableCandidates`);function ju(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Mu(r,{upTo:t})))return r}Cu(ju,`findVisible`);function Mu(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}Cu(Mu,`isHidden`);function Nu(e){return e instanceof HTMLInputElement&&`select`in e}Cu(Nu,`isSelectableInput`);function Pu(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Nu(e)&&t&&e.select()}}Cu(Pu,`focus`);var Fu=Iu();function Iu(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Lu(e,t),e.unshift(t)},remove(t){e=Lu(e,t),e[0]?.resume()}}}Cu(Iu,`createFocusScopesStack`);function Lu(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Cu(Lu,`arrayRemove`);function Ru(e){return e.filter(e=>e.tagName!==`A`)}Cu(Ru,`removeLinks`);var zu=globalThis?.document?C.useLayoutEffect:()=>{},Bu=C.useId||(()=>void 0),Vu=0;function Hu(e){let[t,n]=C.useState(Bu());return zu(()=>{e||n(e=>e??String(Vu++))},[e]),e||(t?`radix-${t}`:``)}var Uu=[`top`,`right`,`bottom`,`left`],Wu=Math.min,Z=Math.max,Gu=Math.round,Ku=Math.floor,qu=e=>({x:e,y:e}),Ju={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Yu(e,t,n){return Z(e,Wu(t,n))}function Xu(e,t){return typeof e==`function`?e(t):e}function Zu(e){return e.split(`-`)[0]}function Qu(e){return e.split(`-`)[1]}function $u(e){return e===`x`?`y`:`x`}function ed(e){return e===`y`?`height`:`width`}function td(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function nd(e){return $u(td(e))}function rd(e,t,n){n===void 0&&(n=!1);let r=Qu(e),i=nd(e),a=ed(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=fd(o)),[o,fd(o)]}function id(e){let t=fd(e);return[ad(e),t,ad(t)]}function ad(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var od=[`left`,`right`],sd=[`right`,`left`],cd=[`top`,`bottom`],ld=[`bottom`,`top`];function ud(e,t,n){switch(e){case`top`:case`bottom`:return n?t?sd:od:t?od:sd;case`left`:case`right`:return t?cd:ld;default:return[]}}function dd(e,t,n,r){let i=Qu(e),a=ud(Zu(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ad)))),a}function fd(e){let t=Zu(e);return Ju[t]+e.slice(t.length)}function pd(e){return{top:0,right:0,bottom:0,left:0,...e}}function md(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:pd(e)}function hd(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 gd(e,t,n){let{reference:r,floating:i}=e,a=td(t),o=nd(t),s=ed(o),c=Zu(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(Qu(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 _d(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}=Xu(t,e),p=md(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=hd(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=hd(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 vd=50,yd=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:_d},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=gd(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<vd&&(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}=gd(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Q=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}=Xu(e,t)||{};if(l==null)return{};let d=md(u),f={x:n,y:r},p=nd(i),m=ed(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=Wu(d[_],T),D=Wu(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Yu(O,A,k),M=!c.arrow&&Qu(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}}}),bd=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}=Xu(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Zu(r),_=td(o),v=Zu(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[fd(o)]:id(o)),x=p!==`none`;!d&&x&&b.push(...dd(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=rd(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`&&_!==td(t))||T.every(e=>td(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=td(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 xd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sd(e){return Uu.some(t=>e[t]>=0)}var Cd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Xu(e,t);switch(i){case`referenceHidden`:{let e=xd(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Sd(e)}}}case`escaped`:{let e=xd(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Sd(e)}}}default:return{}}}}},wd=new Set([`left`,`top`]);async function Td(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Zu(n),s=Qu(n),c=td(n)===`y`,l=wd.has(o)?-1:1,u=a&&c?-1:1,d=Xu(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 Ed=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 Td(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}}}}},Dd=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}=Xu(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=td(Zu(i)),p=$u(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=Yu(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=Yu(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}}}}}},Od=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}=Xu(e,t),u={x:n,y:r},d=td(i),f=$u(d),p=u[f],m=u[d],h=Xu(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=wd.has(Zu(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}}}},kd=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}=Xu(e,t),u=await o.detectOverflow(t,l),d=Zu(i),f=Qu(i),p=td(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=Wu(h-u[g],v),x=Wu(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=Z(u.left,0),t=Z(u.right,0),n=Z(u.top,0),r=Z(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Z(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Z(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 Ad(){return typeof window<`u`}function jd(e){return Nd(e)?(e.nodeName||``).toLowerCase():`#document`}function Md(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $(e){return((Nd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Nd(e){return Ad()?e instanceof Node||e instanceof Md(e).Node:!1}function Pd(e){return Ad()?e instanceof Element||e instanceof Md(e).Element:!1}function Fd(e){return Ad()?e instanceof HTMLElement||e instanceof Md(e).HTMLElement:!1}function Id(e){return!Ad()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Md(e).ShadowRoot}function Ld(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Jd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Rd(e){return/^(table|td|th)$/.test(jd(e))}function zd(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Bd=/transform|translate|scale|rotate|perspective|filter/,Vd=/paint|layout|strict|content/,Hd=e=>!!e&&e!==`none`,Ud;function Wd(e){let t=Pd(e)?Jd(e):e;return Hd(t.transform)||Hd(t.translate)||Hd(t.scale)||Hd(t.rotate)||Hd(t.perspective)||!Kd()&&(Hd(t.backdropFilter)||Hd(t.filter))||Bd.test(t.willChange||``)||Vd.test(t.contain||``)}function Gd(e){let t=Xd(e);for(;Fd(t)&&!qd(t);){if(Wd(t))return t;if(zd(t))return null;t=Xd(t)}return null}function Kd(){return Ud??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ud}function qd(e){return/^(html|body|#document)$/.test(jd(e))}function Jd(e){return Md(e).getComputedStyle(e)}function Yd(e){return Pd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xd(e){if(jd(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Id(e)&&e.host||$(e);return Id(t)?t.host:t}function Zd(e){let t=Xd(e);return qd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fd(t)&&Ld(t)?t:Zd(t)}function Qd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Zd(e),i=r===e.ownerDocument?.body,a=Md(r);if(i){let e=$d(a);return t.concat(a,a.visualViewport||[],Ld(r)?r:[],e&&n?Qd(e):[])}else return t.concat(r,Qd(r,[],n))}function $d(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ef(e){let t=Jd(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Fd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Gu(n)!==a||Gu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function tf(e){return Pd(e)?e:e.contextElement}function nf(e){let t=tf(e);if(!Fd(t))return qu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ef(t),o=(a?Gu(n.width):n.width)/r,s=(a?Gu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var rf=qu(0);function af(e){let t=Md(e);return!Kd()||!t.visualViewport?rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function of(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Md(e)?!1:t}function sf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=tf(e),o=qu(1);t&&(r?Pd(r)&&(o=nf(r)):o=nf(e));let s=of(a,n,r)?af(a):qu(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=Md(a),t=r&&Pd(r)?Md(r):r,n=e,i=$d(n);for(;i&&r&&t!==n;){let e=nf(i),t=i.getBoundingClientRect(),r=Jd(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=Md(i),i=$d(n)}}return hd({width:u,height:d,x:c,y:l})}function cf(e,t){let n=Yd(e).scrollLeft;return t?t.left+n:sf($(e)).left+n}function lf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-cf(e,n),y:n.top+t.scrollTop}}function uf(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=$(r),s=t?zd(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=qu(1),u=qu(0),d=Fd(r);if((d||!d&&!a)&&((jd(r)!==`body`||Ld(o))&&(c=Yd(r)),d)){let e=sf(r);l=nf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?lf(o,c):qu(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 df(e){return Array.from(e.getClientRects())}function ff(e){let t=$(e),n=Yd(e),r=e.ownerDocument.body,i=Z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+cf(e),s=-n.scrollTop;return Jd(r).direction===`rtl`&&(o+=Z(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var pf=25;function mf(e,t){let n=Md(e),r=$(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Kd();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=cf(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<=pf&&(a-=o)}else l<=pf&&(a+=l);return{width:a,height:o,x:s,y:c}}function hf(e,t){let n=sf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Fd(e)?nf(e):qu(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gf(e,t,n){let r;if(t===`viewport`)r=mf(e,n);else if(t===`document`)r=ff($(e));else if(Pd(t))r=hf(t,n);else{let n=af(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return hd(r)}function _f(e,t){let n=Xd(e);return n===t||!Pd(n)||qd(n)?!1:Jd(n).position===`fixed`||_f(n,t)}function vf(e,t){let n=t.get(e);if(n)return n;let r=Qd(e,[],!1).filter(e=>Pd(e)&&jd(e)!==`body`),i=null,a=Jd(e).position===`fixed`,o=a?Xd(e):e;for(;Pd(o)&&!qd(o);){let t=Jd(o),n=Wd(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ld(o)&&!n&&_f(e,o))?r=r.filter(e=>e!==o):i=t,o=Xd(o)}return t.set(e,r),r}function yf(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?zd(t)?[]:vf(t,this._c):[].concat(n),r],o=gf(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=gf(t,a[e],i);s=Z(n.top,s),c=Wu(n.right,c),l=Wu(n.bottom,l),u=Z(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function bf(e){let{width:t,height:n}=ef(e);return{width:t,height:n}}function xf(e,t,n){let r=Fd(t),i=$(t),a=n===`fixed`,o=sf(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=qu(0);function l(){c.x=cf(i)}if(r||!r&&!a)if((jd(t)!==`body`||Ld(i))&&(s=Yd(t)),r){let e=sf(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?lf(i,s):qu(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 Sf(e){return Jd(e).position===`static`}function Cf(e,t){if(!Fd(e)||Jd(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return $(e)===n&&(n=n.ownerDocument.body),n}function wf(e,t){let n=Md(e);if(zd(e))return n;if(!Fd(e)){let t=Xd(e);for(;t&&!qd(t);){if(Pd(t)&&!Sf(t))return t;t=Xd(t)}return n}let r=Cf(e,t);for(;r&&Rd(r)&&Sf(r);)r=Cf(r,t);return r&&qd(r)&&Sf(r)&&!Wd(r)?n:r||Gd(e)||n}var Tf=async function(e){let t=this.getOffsetParent||wf,n=this.getDimensions,r=await n(e.floating);return{reference:xf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ef(e){return Jd(e).direction===`rtl`}var Df={convertOffsetParentRelativeRectToViewportRelativeRect:uf,getDocumentElement:$,getClippingRect:yf,getOffsetParent:wf,getElementRects:Tf,getClientRects:df,getDimensions:bf,getScale:nf,isElement:Pd,isRTL:Ef};function Of(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kf(e,t){let n=null,r,i=$(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=Ku(d),h=Ku(i.clientWidth-(u+f)),g=Ku(i.clientHeight-(d+p)),_=Ku(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Z(0,Wu(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&&!Of(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 Af(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=tf(e),u=i||a?[...l?Qd(l):[],...t?Qd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?kf(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?sf(e):null;c&&g();function g(){let t=sf(e);h&&!Of(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 jf=Ed,Mf=Dd,Nf=bd,Pf=kd,Ff=Cd,If=Q,Lf=Od,Rf=(e,t,n)=>{let r=new Map,i={platform:Df,...n},a={...i.platform,_c:r};return yd(e,t,{...i,platform:a})},zf=typeof document<`u`?C.useLayoutEffect:function(){};function Bf(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(!Bf(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)&&!Bf(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Vf(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hf(e,t){let n=Vf(e);return Math.round(t*n)/n}function Uf(e){let t=C.useRef(e);return zf(()=>{t.current=e}),t}function Wf(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]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);Bf(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=Uf(c),O=Uf(i),k=Uf(l),A=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Rf(S.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Bf(T.current,t)&&(T.current=t,fr.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);zf(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=C.useRef(!1);zf(()=>(j.current=!0,()=>{j.current=!1}),[]),zf(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),N=C.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Hf(N.floating,u.x),r=Hf(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Vf(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var Gf=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?{}:If({element:r.current,padding:i}).fn(n):r?If({element:r,padding:i}).fn(n):{}}}},Kf=(e,t)=>{let n=jf(e);return{name:n.name,fn:n.fn,options:[e,t]}},qf=(e,t)=>{let n=Mf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jf=(e,t)=>({fn:Lf(e).fn,options:[e,t]}),Yf=(e,t)=>{let n=Nf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xf=(e,t)=>{let n=Pf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zf=(e,t)=>{let n=Ff(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qf=(e,t)=>{let n=Gf(e);return{name:n.name,fn:n.fn,options:[e,t]}};function $f(e){let[t,n]=C.useState(void 0);return zu(()=>{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 ep=Object.defineProperty,tp=(e,t)=>ep(e,`name`,{value:t,configurable:!0}),np=`Popper`,[rp,ip]=Xl(np),[ap,op]=rp(np),sp=tp(e=>{let{__scopePopper:t,children:n}=e,[r,i]=C.useState(null),[a,o]=C.useState(void 0);return(0,B.jsx)(ap,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),cp=`PopperAnchor`,lp=C.forwardRef(tp(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=op(cp,n),o=C.useRef(null),s=a.onAnchorChange,c=qc(t,C.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=C.useRef(null);C.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&gp(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,B.jsx)(tu.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),up=`PopperContent`,[dp,fp]=rp(up),pp=C.forwardRef(tp(function(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=op(up,n),[_,v]=C.useState(null),y=qc(t,v),[b,x]=C.useState(null),S=$f(b),w=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(mp),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:ee,middlewareData:P}=Wf({strategy:`fixed`,placement:E,whileElementsMounted:tp((...e)=>Af(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Kf({mainAxis:i+T,alignmentAxis:o}),c&&qf({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Jf():void 0,...A}),c&&Yf({...A}),Xf({...A,apply:tp(({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`)},`apply`)}),b&&Qf({element:b,padding:s}),hp({arrowWidth:w,arrowHeight:T}),f&&Zf({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),F=g.setPlacementState;zu(()=>(F(N),()=>{F(void 0)}),[N,F]);let[I,te]=gp(N),ne=ru(m);zu(()=>{ee&&ne?.()},[ee,ne]);let re=P.arrow?.x,ie=P.arrow?.y,L=P.arrow?.centerOffset!==0,[R,ae]=C.useState();return zu(()=>{_&&ae(window.getComputedStyle(_).zIndex)},[_]),(0,B.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ee?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:R,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,B.jsx)(dp,{scope:n,placedSide:I,placedAlign:te,onArrowChange:x,arrowX:re,arrowY:ie,shouldHideArrow:L,children:(0,B.jsx)(tu.div,{"data-side":I,"data-align":te,...h,ref:y,style:{...h.style,animation:ee?h.style?.animation:`none`}})})})},`PopperContent`));function mp(e){return e!==null}tp(mp,`isNotNull`);var hp=tp(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]=gp(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}}}}),`transformOrigin`);function gp(e){let[t,n=`center`]=e.split(`-`);return[t,n]}tp(gp,`getSideAndAlignFromPlacement`);var _p=sp,vp=lp,yp=pp,bp=Object.defineProperty,xp=C.forwardRef(((e,t)=>bp(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=C.useState(!1);zu(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?fr.createPortal((0,B.jsx)(tu.div,{...r,ref:t}),o):null},`Portal`)),Sp=Object.defineProperty,Cp=(e,t)=>Sp(e,`name`,{value:t,configurable:!0});function wp(e,t){return C.useReducer((e,n)=>t[e][n]??e,e)}Cp(wp,`useStateMachine`);var Tp=Cp(e=>{let{present:t,children:n}=e,r=Ep(t),i=typeof n==`function`?n({present:r.isPresent}):C.Children.only(n),a=Op(r.ref,Ap(i));return typeof n==`function`||r.isPresent?C.cloneElement(i,{ref:a}):null},`Presence`);function Ep(e){let[t,n]=C.useState(),r=C.useRef(null),i=C.useRef(e),a=C.useRef(`none`),o=C.useRef(void 0),[s,c]=wp(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return C.useEffect(()=>{s===`mounted`?(a.current=o.current??kp(r.current),o.current=void 0):a.current=`none`},[s]),zu(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=kp(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),zu(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Cp(a=>{let o=kp(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Cp(e=>{e.target===t&&(a.current=kp(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:C.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=kp(t)}else r.current=null;n(e)},[])}}Cp(Ep,`usePresence`);function Dp(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Cp(Dp,`setRef`);function Op(...e){let t=C.useRef(e);return t.current=e,C.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Dp(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Dp(n[e],null)}}},[])}Cp(Op,`useStableComposedRefs`);function kp(e){return e?.animationName||`none`}Cp(kp,`getAnimationName`);function Ap(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)}Cp(Ap,`getElementRef`);var jp=C.useEffectEvent,Mp=C.useInsertionEffect;function Np(e){if(typeof jp==`function`)return jp(e);let t=C.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Mp==`function`?Mp(()=>{t.current=e}):zu(()=>{t.current=e}),C.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Pp=Object.defineProperty,Fp=(e,t)=>Pp(e,`name`,{value:t,configurable:!0}),Ip=C.useInsertionEffect||zu;function Lp({prop:e,defaultProp:t,onChange:n=Fp(()=>{},`onChange`),caller:r}){let[i,a,o]=Rp({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,C.useCallback(t=>{if(s){let n=zp(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Fp(Lp,`useControllableState`);function Rp({defaultProp:e,onChange:t}){let[n,r]=C.useState(e),i=C.useRef(n),a=C.useRef(t);return Ip(()=>{a.current=t},[t]),C.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Fp(Rp,`useUncontrolledState`);function zp(e){return typeof e==`function`}Fp(zp,`isFunction`);var Bp=Symbol(`RADIX:SYNC_STATE`);function Vp(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Np(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=C.useReducer((t,n)=>{if(n.type===Bp)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=C.useRef(p);C.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=C.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return C.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Bp,state:i})},[i,d.state,c]),[h,f]}Fp(Vp,`useControllableStateReducer`);function Hp(e){let t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Up=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`}),Wp=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Gp=new WeakMap,Kp=new WeakMap,qp={},Jp=0,Yp=function(e){return e&&(e.host||Yp(e.parentNode))},Xp=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Yp(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})},Zp=function(e,t,n,r){var i=Xp(t,Array.isArray(e)?e:[e]);qp[n]||(qp[n]=new WeakMap);var a=qp[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=(Gp.get(e)||0)+1,l=(a.get(e)||0)+1;Gp.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Kp.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(),Jp++,function(){o.forEach(function(e){var t=Gp.get(e)-1,i=a.get(e)-1;Gp.set(e,t),a.set(e,i),t||(Kp.has(e)||e.removeAttribute(r),Kp.delete(e)),i||e.removeAttribute(n)}),Jp--,Jp||(Gp=new WeakMap,Gp=new WeakMap,Kp=new WeakMap,qp={})}},Qp=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Wp(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Zp(r,i,n,`aria-hidden`)):function(){return null}},$p=function(){return $p=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},$p.apply(this,arguments)};function em(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 tm(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 nm=`right-scroll-bar-position`,rm=`width-before-scroll-bar`,im=`with-scroll-bars-hidden`,am=`--removed-body-scroll-bar-size`;function om(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function sm(e,t){var n=(0,C.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 cm=typeof window<`u`?C.useLayoutEffect:C.useEffect,lm=new WeakMap;function um(e,t){var n=sm(t||null,function(t){return e.forEach(function(e){return om(e,t)})});return cm(function(){var t=lm.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||om(e,null)}),i.forEach(function(e){r.has(e)||om(e,a)})}lm.set(n,e)},[e]),n}function dm(e){return e}function fm(e,t){t===void 0&&(t=dm);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 pm(e){e===void 0&&(e={});var t=fm(null);return t.options=$p({async:!0,ssr:!1},e),t}var mm=function(e){var t=e.sideCar,n=em(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 C.createElement(r,$p({},n))};mm.isSideCarExport=!0;function hm(e,t){return e.useMedium(t),mm}var gm=pm(),_m=function(){},vm=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:_m,onWheelCapture:_m,onTouchMoveCapture:_m}),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=em(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=um([n,t]),w=$p($p({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:gm,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),$p($p({},w),{ref:S})):C.createElement(v,$p({},w,{className:c,ref:S}),s))});vm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vm.classNames={fullWidth:rm,zeroRight:nm};var ym,bm=function(){if(ym)return ym;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function xm(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=bm();return t&&e.setAttribute(`nonce`,t),e}function Sm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cm(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var wm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xm())&&(Sm(t,n),Cm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tm=function(){var e=wm();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Em=function(){var e=Tm();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Dm={left:0,top:0,right:0,gap:0},Om=function(e){return parseInt(e||``,10)||0},km=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[Om(n),Om(r),Om(i)]},Am=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Dm;var t=km(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])}},jm=Em(),Mm=`data-scroll-locked`,Nm=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
15
|
+
`):typeof e.type==`string`?e.type:``:``}function rs(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>e())})})}function is(e){let{attachments:t,messages:n,onActivePageChange:r,onAttachmentsChange:i,onBeforeRun:a,onError:c,onPromptChange:u,onRunStateChange:d,onSessionTraceSummariesChange:f,onStatus:p,promptRef:m,runState:h,selectedAgent:g,selectedAgentId:_,selectedModelRef:v,sessions:y,sessionsEnabled:b,traces:x,transcript:S}=e,w=(0,C.useRef)(void 0),T=(0,C.useRef)(void 0),E=(0,C.useRef)(!1),D=(0,C.useRef)(!1),O=(0,C.useRef)(void 0),k=(0,C.useRef)(Promise.resolve()),[A,j]=(0,C.useState)(void 0),M=mo({transport:da({endpoint:e=>`/agents/${encodeURIComponent(e.agentId)}/runs`,method:`POST`,format:`jsonl`,headers:{"content-type":`application/json`},body:e=>{let{agentId:t,...n}=e;return JSON.stringify(n)},mapEvent:e=>e}),createRequest:({coreMessages:e})=>{let t=w.current;if(t===void 0)throw Error(`Missing playground run request`);let n=t.useTextMessage?t.promptText:e.at(-1);if(n===void 0)throw Error(`Missing playground prompt message`);return as(t,n)},eventToDelta:()=>void 0,eventToFinal:()=>void 0,humanInput:{eventToApproval:e=>e.type===`tool_approval_request`||e.type===`tool_approval_result`?e.approval:void 0,eventToQuestion:e=>e.type===`tool_question_request`||e.type===`tool_question_result`?e.question:void 0,decideApproval:async e=>{let t=await fetch(`/approvals/${encodeURIComponent(e.approvalId)}/decision`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({approved:e.approved})});if(!t.ok)throw Error(`Approval decision failed with HTTP ${t.status}`);let n=await t.json();return os(S,n),n},answerQuestion:async e=>{let t=await fetch(`/questions/${encodeURIComponent(e.questionId)}/answer`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({answers:e.answers})});if(!t.ok)throw Error(`Question answer failed with HTTP ${t.status}`);let n=await t.json();return ss(S,n),n}},onEvent(e){D.current||I(e)&&(k.current=k.current.then(rs))},onError(e){if(E.current||D.current)return;D.current=!0,T.current=e;let t=Ho(e);c(t),S.appendAssistantError(t),te()}});async function N(e){let l=e.trim(),C=t,A=g?.id??_;if(l.length===0&&C.length===0||A.length===0||h===`running`||M.status===`streaming`)return;E.current=!1,D.current=!1,d(`running`),a(),r(`playground`),c(``),u(``),i([]),requestAnimationFrame(()=>Xo(m.current));let N=C.length===0?{text:l}:ci(l,C);S.setMessages(e=>{let t={entryId:Zo(),kind:`message`,role:`user`,text:l};return C.length>0&&(t.attachments=li(C)),[...e,t,{entryId:Zo(),kind:`message`,role:`assistant`,text:``,tone:`pending`}]});try{let e=b&&y.selectedSessionId.length===0,t=e?(await y.createSession(o(l),{updatePath:!1})).id:y.selectedSessionId,r=b?void 0:Jo(n);T.current=void 0,k.current=Promise.resolve();let i={source:`anvia-studio`};v.length>0&&(i.studioModel=v);let a={agentId:A,promptText:l,useTextMessage:C.length===0,stream:!0,metadata:i};t.length>0&&(a.sessionId=t),r!==void 0&&(a.history=r),v.length>0&&(a.model=v),w.current=a;let s=Date.now();if(O.current=s,j(s),await M.sendMessage(N),await k.current,T.current===void 0){if(await y.loadAllSessions(),t.length>0){y.setSelectedSessionId(t);let[n]=await Promise.all([x.loadSessionTraceSummaries(t),y.loadSessionLogs(t)]);f(n),S.setMessages(e=>ti(e,n)),e&&y.openSessionPath(t)}p(E.current?`Stopped`:`Connected`)}}catch(e){if(!E.current&&!D.current){D.current=!0;let t=s(e);c(t),S.appendAssistantError(t),te()}}finally{te(),w.current=void 0,M.reset(),d(`idle`)}}function ee(){if(M.status!==`streaming`||D.current)return;E.current=!0,D.current=!0;let e=ne();M.stop(),S.cancelPendingRun(e??0),p(`Stopping`)}function P(e,t){c(``),(t?M.approveTool(e):M.rejectTool(e)).catch(e=>c(s(e)))}function F(e,t){c(``),M.answerToolQuestion(e,t).catch(e=>c(s(e)))}function I(e){if(e.type===`text_delta`)return S.appendAssistantText(e.delta),!0;if(e.type===`reasoning_delta`)return S.appendReasoningText(e.delta,e.id),!0;if(e.type===`tool_call`)return S.appendToolCall(e.toolCall.function.name,l(e.toolCall.function.arguments),e.toolCall.callId??e.toolCall.id),!0;if(e.type===`tool_result`){let t={toolName:e.toolName,callId:e.toolCallId,args:e.args,result:e.result};return e.structuredResult!==void 0&&(t.structuredResult=e.structuredResult),S.appendToolResult(t),!0}if(e.type===`agent_tool_event`)return S.appendAgentToolEvent(e),!0;if(e.type===`tool_approval_request`||e.type===`tool_approval_result`)return S.updateToolApproval(e.approval),!0;if(e.type===`tool_question_request`||e.type===`tool_question_result`)return S.updateToolQuestion(e.question),!0;if(e.type===`session_log`)return y.appendSessionLogEntry(e.log),!0;if(e.type===`final`)return D.current=!0,e.trace?.traceId!==void 0&&S.assignAssistantTraceId(e.trace.traceId),S.clearPendingAssistant(),te(),!0;if(e.type===`error`){D.current=!0;let t=Wo(e.error);return T.current=e.error,c(t),S.appendAssistantError(t),te(),!0}return!1}function te(){let e=ne();e!==void 0&&S.completeRun(e)}function ne(){let e=O.current;if(e!==void 0)return O.current=void 0,j(void 0),Date.now()-e}return{answeringQuestions:new Set(M.answeringQuestions),decidingApprovals:new Set(M.decidingApprovals),isStreaming:M.status===`streaming`,workingStartedAt:A,answerToolQuestion:F,decideToolApproval:P,runPrompt:N,stopPrompt:ee}}function as(e,t){let n={agentId:e.agentId,message:t,stream:e.stream,metadata:e.metadata};return e.sessionId!==void 0&&(n.sessionId=e.sessionId),e.history!==void 0&&(n.history=e.history),e.model!==void 0&&(n.model=e.model),n}function os(e,t){let n=cs(t);n!==void 0&&e.updateToolApproval(n)}function ss(e,t){let n=ls(t);n!==void 0&&e.updateToolQuestion(n)}function cs(e){if(e.requestedAt===void 0)return;let t={id:e.id,toolName:e.toolName,status:e.status,requestedAt:e.requestedAt};return e.callId!==void 0&&(t.callId=e.callId),e.resolvedAt!==void 0&&(t.resolvedAt=e.resolvedAt),e.reason!==void 0&&(t.reason=e.reason),t}function ls(e){if(e.requestedAt===void 0)return;let t={id:e.id,toolName:e.toolName,status:e.status,requestedAt:e.requestedAt,questions:e.questions};return e.callId!==void 0&&(t.callId=e.callId),e.answeredAt!==void 0&&(t.answeredAt=e.answeredAt),e.cancelledAt!==void 0&&(t.cancelledAt=e.cancelledAt),e.answers!==void 0&&(t.answers=e.answers),t}function us(){let[e,t]=(0,C.useState)([]);return{messages:e,setMessages:t,appendAgentToolEvent:e=>t(t=>Cs(t,e)),appendAssistantError:e=>t(t=>ms(t,e)),appendAssistantText:e=>t(t=>ps(t,e)),appendReasoningText:(e,n)=>t(t=>bs(t,e,n)),appendToolCall:(e,n,r)=>t(t=>xs(t,e,n,r)),appendToolResult:e=>t(t=>Ss(t,e)),assignAssistantTraceId:e=>t(t=>hs(t,e)),cancelPendingRun:e=>t(t=>ds(t,new Date().toISOString(),e)),clearPendingAssistant:()=>t(e=>ws(e)),completeRun:e=>t(t=>fs(t,e)),updateToolApproval:e=>t(t=>gs(t,e)),updateToolQuestion:e=>t(t=>_s(t,e))}}function ds(e,t,n){let r=ws(e),i=-1;for(let e=r.length-1;e>=0;--e){let t=r[e];if(t?.kind===`message`&&t.role===`user`){i=e;break}}if(i<0)return fs(r,n);for(let e=i+1;e<r.length;e+=1){let n=r[e];if(n?.kind!==`tool`)continue;let i={...n};n.approval?.status===`pending`&&(i.approval={...n.approval,status:`cancelled`,resolvedAt:t,reason:`Run cancelled in Anvia Studio.`}),n.question?.status===`pending`&&(i.question={...n.question,status:`cancelled`,cancelledAt:t}),r[e]=i}return fs(r,n)}function fs(e,t){let n=[...e],r=Math.max(0,t);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t?.kind===`message`&&t.role===`assistant`){if(t.tone===`pending`){let{tone:i,...a}=t;n[e]={...a,durationMs:r}}else n[e]={...t,durationMs:r};return n}if(t?.kind===`message`&&t.role===`user`)break}return n.push({entryId:Zo(),kind:`message`,role:`assistant`,text:``,durationMs:r}),n}function ps(e,t){let n=[...e],r=n.at(-1);if(r?.kind===`message`&&r.role===`assistant`)if(r.tone===`pending`){let{tone:e,...i}=r;n[n.length-1]={...i,text:t}}else n[n.length-1]={...r,text:`${r.text}${t}`};else n.push({entryId:Zo(),kind:`message`,role:`assistant`,text:t});return n}function ms(e,t){let n=[...e],r=n.at(-1),i={entryId:r?.kind===`message`&&r.role===`assistant`&&r.tone===`pending`?r.entryId:Zo(),kind:`message`,role:`assistant`,text:t,tone:`error`};return r?.kind===`message`&&r.role===`assistant`&&r.tone===`pending`?(n[n.length-1]=i,n):[...n,i]}function hs(e,t){let n=[...e];for(let e=n.length-1;e>=0;--e){let r=n[e];if(r?.kind===`message`&&r.role===`assistant`){n[e]={...r,traceId:t};break}}return n}function gs(e,t){let n=ws(e),r=es(n,t.toolName,t.callId),i=vs(t);if(r<0){let e={entryId:Zo(),kind:`tool`,toolName:t.toolName,approval:i};return t.callId!==void 0&&(e.callId=t.callId),n.push(e),n}let a=n[r];return a!==void 0&&a.kind===`tool`&&(n[r]={...a,approval:i}),n}function _s(e,t){let n=ws(e),r=es(n,t.toolName,t.callId),i=ys(t);if(r<0){let e={entryId:Zo(),kind:`tool`,toolName:t.toolName,question:i};return t.callId!==void 0&&(e.callId=t.callId),n.push(e),n}let a=n[r];return a!==void 0&&a.kind===`tool`&&(n[r]={...a,question:i}),n}function vs(e){let t={id:e.id,status:e.status,requestedAt:e.requestedAt};return e.resolvedAt!==void 0&&(t.resolvedAt=e.resolvedAt),e.reason!==void 0&&(t.reason=e.reason),t}function ys(e){let t={id:e.id,status:e.status,requestedAt:e.requestedAt,questions:e.questions};return e.answeredAt!==void 0&&(t.answeredAt=e.answeredAt),e.answers!==void 0&&(t.answers=e.answers),t}function bs(e,t,n){let r=ws(e),i=r.at(-1);if(i?.kind===`reasoning`&&(i.reasoningId??``)===(n??``))r[r.length-1]={...i,text:`${i.text}${t}`};else{let e={entryId:Zo(),kind:`reasoning`,text:t};n!==void 0&&(e.reasoningId=n),r.push(e)}return r}function xs(e,t,n,r){let i={entryId:Zo(),kind:`tool`,toolName:t};return r!==void 0&&(i.callId=r),n.length>0&&(i.args=n),[...ws(e),i]}function Ss(e,t){let n=ws(e),r=$o(n,t.toolName,t.callId);if(r>=0){let e=n[r];if(e!==void 0&&e.kind===`tool`){let i={...e,args:e.args??t.args,result:t.result};return t.structuredResult!==void 0&&(i.structuredResult=t.structuredResult),n[r]=i,n}}let i={entryId:Zo(),kind:`tool`,toolName:t.toolName,args:t.args,result:t.result};return t.callId!==void 0&&(i.callId=t.callId),t.structuredResult!==void 0&&(i.structuredResult=t.structuredResult),n.push(i),n}function Cs(e,t){let n=Ts(t);if(n===void 0)return e;let r=ws(e),i=$o(r,t.toolName,t.toolCallId);if(i<0){let e={entryId:Zo(),kind:`tool`,toolName:t.toolName,childEvents:[n]};return t.toolCallId!==void 0&&(e.callId=t.toolCallId),r.push(e),r}let a=r[i];if(a===void 0||a.kind!==`tool`)return r;let o=[...a.childEvents??[]];return Es(o,n),r[i]={...a,childEvents:o},r}function ws(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n?.kind===`message`&&n.role===`assistant`&&n.tone===`pending`&&n.text.trim().length===0)return e.filter((e,n)=>n!==t)}return[...e]}function Ts(e){let t=e.event;if(t.type===`text_delta`){let n={kind:`message`,agentId:e.agentId,text:t.delta};return e.agentName!==void 0&&(n.agentName=e.agentName),n}if(t.type===`reasoning_delta`){let n={kind:`reasoning`,agentId:e.agentId,text:t.delta};return e.agentName!==void 0&&(n.agentName=e.agentName),t.id!==void 0&&(n.reasoningId=t.id),n}if(t.type===`tool_call`){let n={kind:`tool`,agentId:e.agentId,toolName:t.toolCall.function.name,args:l(t.toolCall.function.arguments)};e.agentName!==void 0&&(n.agentName=e.agentName);let r=t.toolCall.callId??t.toolCall.id;return r!==void 0&&(n.callId=r),n}if(t.type===`tool_result`){let n={kind:`tool`,agentId:e.agentId,toolName:t.toolName,args:t.args,result:t.result};return e.agentName!==void 0&&(n.agentName=e.agentName),t.toolCallId!==void 0&&(n.callId=t.toolCallId),t.structuredResult!==void 0&&(n.structuredResult=t.structuredResult),n}if(t.type===`error`){let n={kind:`message`,agentId:e.agentId,text:`Error: ${s(t.error)}`};return e.agentName!==void 0&&(n.agentName=e.agentName),n}}function Es(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=Ds(e,t);if(n<0){e.push(t);return}let r=e[n];if(r?.kind===`tool`){let i={...r};r.args===void 0&&t.args!==void 0&&(i.args=t.args),t.result!==void 0&&(i.result=t.result),e[n]=i}}function Ds(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 Os(e){let{currentAgentId:t,enabled:n,loadSessionTraceSummaries:r,runState:i,selectedModelRef:a,onError:o,onSessionCreated:c,onSessionDeleted:l,onSessionLoaded:u,onStatus:d}=e,[f,p]=(0,C.useState)(``),[m,h]=(0,C.useState)([]),[g,_]=(0,C.useState)([]),[v,y]=(0,C.useState)(`idle`),[b,x]=(0,C.useState)(`idle`),S=(0,C.useRef)(``),w=(0,C.useCallback)(async()=>{if(!n){h([]);return}try{let e=await fetch(`/sessions?limit=100`);if(!e.ok)throw Error(`Sessions failed with HTTP ${e.status}`);h((await e.json()).sessions)}catch(e){o(s(e))}},[n,o]);(0,C.useEffect)(()=>{w()},[w]);let T=(0,C.useCallback)(async e=>{if(!n)return _([]),[];x(`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 _(r.logs),r.logs}catch(e){return o(s(e)),_([]),[]}finally{x(`idle`)}},[n,o]),E=(0,C.useCallback)(async(e,n={})=>{let r={source:`anvia-studio`};a.length>0&&(r[Yr]=a);let i=await fetch(`/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agentId:t,title:e,metadata:r})});if(!i.ok)throw Error(await Vo(i,`Session create failed`));let o=await i.json();return p(o.id),h(e=>[o,...e.filter(e=>e.id!==o.id)]),n.updatePath!==!1&&c(o.id),await T(o.id),o},[t,T,c,a]),D=(0,C.useCallback)(async(e,t={})=>{if(i!==`running`){S.current=e,y(`loading`),o(``);try{let n=await fetch(`/sessions/${encodeURIComponent(e)}`);if(!n.ok)throw Error(`Session load failed with HTTP ${n.status}`);let i=await n.json(),[a]=await Promise.all([r(i.id),T(i.id)]);if(S.current!==e)return;p(i.id),u(i,a,t),d(`Connected`)}catch(t){S.current===e&&o(s(t))}finally{S.current===e&&y(`idle`)}}},[T,r,o,u,d,i]),O=(0,C.useCallback)(async e=>{if(i!==`running`){o(``);try{let t=await fetch(`/sessions/${encodeURIComponent(e.id)}`,{method:`DELETE`});if(!t.ok)throw Error(`Session delete failed with HTTP ${t.status}`);let n=f===e.id;h(t=>t.filter(t=>t.id!==e.id)),n&&(p(``),_([])),l(e.id,n),d(`Connected`)}catch(e){o(s(e))}}},[o,l,d,i,f]),k=(0,C.useCallback)(()=>{p(``),_([])},[]),A=(0,C.useCallback)(e=>{_(t=>t.some(t=>t.id===e.id)?t:[...t,e].sort((e,t)=>e.sequence-t.sequence))},[]);return(0,C.useMemo)(()=>({allSessions:m,selectedSessionId:f,sessionLogs:g,sessionLoadState:v,sessionLogLoadState:b,appendSessionLogEntry:A,clearSelectedSession:k,createSession:E,deleteSession:O,loadAllSessions:w,loadSession:D,loadSessionLogs:T,openSessionPath:c,setSelectedSessionId:p}),[m,A,k,E,O,w,D,T,c,f,v,b,g])}function ks(e,t){return!0}function As(e,t){return e}var js=document.getElementById(`anvia-ui`),Ms=js?.dataset.uiPath??`/ui`,Ns=js?.dataset.uiCompatPath??`/ui`,Ps=`${Is(Ms)||Is(Ns)||`/ui`}/assets/logo.png`,Fs=`static-context`;function Is(e){return e===`/`?``:e.replace(/\/+$/,``)}function Ls(e){let{activePage:t,enabled:n,onError:r,onNavigateTracing:i,onOpenTrace:a,onOpenTraceIndex:o,onOpenTraceSession:c}=e,[l,u]=(0,C.useState)([]),[d,f]=(0,C.useState)(()=>e.initialTraceId),[p,m]=(0,C.useState)(()=>e.initialTraceSessionId),[h,g]=(0,C.useState)(`idle`),_=(0,C.useCallback)(async()=>{if(!n){u([]);return}g(`loading`);try{let e=new URLSearchParams({include:`detail`,limit:`50`}),t=await fetch(`/traces?${e.toString()}`);if(!t.ok)throw Error(`Traces failed with HTTP ${t.status}`);let n=(await t.json()).traces;if(d.length>0&&!n.some(e=>e.id===d)){let e=await fetch(`/traces/${encodeURIComponent(d)}`);if(e.ok){u([await e.json(),...n]);return}}u(n)}catch(e){r(s(e))}finally{g(`idle`)}},[n,r,d]),v=(0,C.useCallback)(async(e,t={})=>{if(n){g(`loading`);try{let n=new URLSearchParams({include:`detail`,limit:`50`,sessionId:e}),r=await fetch(`/traces?${n.toString()}`);if(!r.ok)throw Error(`Session traces failed with HTTP ${r.status}`);let a=[...(await r.json()).traces].sort((e,t)=>Date.parse(e.startedAt)-Date.parse(t.startedAt));u(a);let o=a[0]?.id;if(o===void 0){f(``),m(e),t.updatePath!==!1&&c(e);return}i(),f(o),m(e),t.updatePath!==!1&&c(e)}catch(e){r(s(e))}finally{g(`idle`)}}},[n,r,i,c]),y=(0,C.useCallback)(async e=>{if(!n)return[];let t=new URLSearchParams({limit:`100`}),r=await fetch(`/sessions/${encodeURIComponent(e)}/traces?${t}`);return r.ok?(await r.json()).traces:[]},[n]);(0,C.useEffect)(()=>{t!==`tracing`||p!==void 0||_()},[t,_,p]);let b=(0,C.useCallback)((e,t)=>{f(e),m(t)},[]),x=(0,C.useCallback)(()=>{f(``),m(void 0)},[]),S=(0,C.useCallback)(e=>{if(i(),f(e),m(void 0),e.length===0){o();return}a(e)},[i,a,o]),w=(0,C.useCallback)(e=>{u(t=>t.filter(t=>t.sessionId!==e))},[]);return(0,C.useMemo)(()=>({traces:l,selectedTraceId:d,traceSessionDetailId:p,traceLoadState:h,clearTraceSelection:x,loadSessionTraceSummaries:y,loadTraces:_,removeSessionTraces:w,selectTrace:S,setTraceLocation:b,showSessionTraces:v}),[x,y,_,w,S,d,b,v,h,p,l])}var Rs=(0,C.createContext)(void 0);function zs(){let e=(0,C.useContext)(Rs);if(e===void 0)throw Error(`StudioConsoleContext is missing`);return e}var Bs=`modulepreload`,Vs=function(e){return`/ui/`+e},Hs={},Us=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Vs(t,n),t in Hs)return;Hs[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Bs,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ws=(0,C.lazy)(()=>Us(()=>import(`./agents-page-DQSUqZIF.js`).then(e=>({default:e.AgentsPage})),__vite__mapDeps([0,1,2]))),Gs=(0,C.lazy)(()=>Us(()=>import(`./evals-page-TgqTalZG.js`).then(e=>({default:e.EvalsPage})),__vite__mapDeps([3,1]))),Ks=(0,C.lazy)(()=>Us(()=>import(`./knowledge-page-G2p0MC9Q.js`).then(e=>({default:e.KnowledgePage})),__vite__mapDeps([4,1,5,6,2]))),qs=(0,C.lazy)(()=>Us(()=>import(`./mcps-page-BTofFyB1.js`).then(e=>({default:e.McpsPage})),__vite__mapDeps([7,1,2,8,5,6]))),Js=(0,C.lazy)(()=>Us(()=>import(`./memory-page-Dyv23uzY.js`).then(e=>({default:e.MemoryPage})),__vite__mapDeps([9,1,5,6,10,2]))),Ys=(0,C.lazy)(()=>Us(()=>import(`./pipelines-page-DdItgiZv.js`).then(e=>({default:e.PipelinesPage})),__vite__mapDeps([11,1,5,6,12]))),Xs=(0,C.lazy)(()=>Us(()=>import(`./sessions-page-kJcWll7-.js`).then(e=>({default:e.SessionsPage})),__vite__mapDeps([13,1,6]))),Zs=(0,C.lazy)(()=>Us(()=>import(`./sandboxes-page-DqkqS92e.js`).then(e=>({default:e.SandboxesPage})),__vite__mapDeps([14,1,6]))),Qs=(0,C.lazy)(()=>Us(()=>import(`./sessions-page-kJcWll7-.js`).then(e=>({default:e.DeleteSessionDialog})),__vite__mapDeps([13,1,6]))),$s=(0,C.lazy)(()=>Us(()=>import(`./status-page-RKMaWBCx.js`).then(e=>({default:e.StatusPage})),__vite__mapDeps([15,1,5,6,2]))),ec=(0,C.lazy)(()=>Us(()=>import(`./tools-page-Mu5-Dl6L.js`).then(e=>({default:e.ToolsPage})),__vite__mapDeps([16,1,2,8,5,6]))),tc=(0,C.lazy)(()=>Us(()=>import(`./trace-browser-BT1WTtkX.js`).then(e=>({default:e.TraceBrowser})),__vite__mapDeps([17,1,2,6])));function G(){return(0,B.jsx)(`section`,{className:`grid h-full min-h-0 place-items-center bg-background/45 text-sm font-medium text-muted-foreground`,children:`Loading`})}var nc=[[`path`,{d:`M4.31802 19.682C3 18.364 3 16.2426 3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 14L9.79289 11.2071C10.1834 10.8166 10.8166 10.8166 11.2071 11.2071L12.7929 12.7929C13.1834 13.1834 13.8166 13.1834 14.2071 12.7929L17 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],rc=[[`path`,{d:`M13 2H11C7.22876 2 5.34315 2 4.17157 3.17157C3 4.34315 3 6.22876 3 10V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10C21 6.22876 21 4.34315 19.8284 3.17157C18.6569 2 16.7712 2 13 2Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21 12H3`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M15 7H9`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M15 17H9`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}]],ic=[[`path`,{d:`M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],ac=[[`path`,{d:`M5.5 12.002H19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10.9999 18.002C10.9999 18.002 4.99998 13.583 4.99997 12.0019C4.99996 10.4208 11 6.00195 11 6.00195`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],oc=[[`path`,{d:`M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],sc=[[`path`,{d:`M11 6H15.5C17.9853 6 20 8.01472 20 10.5C20 12.9853 17.9853 15 15.5 15H4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.99998 12C6.99998 12 4.00001 14.2095 4 15C3.99999 15.7906 7 18 7 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],cc=[[`path`,{d:`M12 5.5V19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 11C18 11 13.5811 5.00001 12 5C10.4188 4.99999 6 11 6 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],lc=[[`path`,{d:`M19.5 12.0001V13.5001C19.5 17.6422 16.1421 21.0001 12 21.0001C7.85786 21.0001 4.5 17.6422 4.5 13.5001V8C4.5 5.23858 6.73858 3 9.5 3C12.2614 3 14.5 5.23858 14.5 8V13.5C14.5 14.8807 13.3807 16 12 16C10.6193 16 9.5 14.8807 9.5 13.5V9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],uc=[[`path`,{d:`M5.33333 3.00001C7.79379 2.99657 10.1685 3.88709 12 5.5V21C10.1685 19.3871 7.79379 18.4966 5.33333 18.5C3.77132 18.5 2.99032 18.5 2.64526 18.2792C2.4381 18.1466 2.35346 18.0619 2.22086 17.8547C2 17.5097 2 16.8941 2 15.6629V6.40322C2 4.97543 2 4.26154 2.54874 3.68286C3.09748 3.10418 3.65923 3.07432 4.78272 3.0146C4.965 3.00491 5.14858 3.00001 5.33333 3.00001Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18.6667 3.00001C16.2062 2.99657 13.8315 3.88709 12 5.5V21C13.8315 19.3871 16.2062 18.4966 18.6667 18.5C20.2287 18.5 21.0097 18.5 21.3547 18.2792C21.5619 18.1466 21.6465 18.0619 21.7791 17.8547C22 17.5097 22 16.8941 22 15.6629V6.40322C22 4.97543 22 4.26154 21.4513 3.68286C20.9025 3.10418 20.3408 3.07432 19.2173 3.0146C19.035 3.00491 18.8514 3.00001 18.6667 3.00001Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M19 7.32566C18.8893 7.32211 18.7782 7.32032 18.6667 7.32032C18.1048 7.31954 17.5475 7.36537 17 7.45576M19 11.0067C18.8893 11.0032 18.7782 11.0014 18.6667 11.0014C17.401 10.9996 16.158 11.2344 15 11.6824M19 14.501C18.8893 14.4975 18.7782 14.4957 18.6667 14.4957C17.401 14.4939 16.158 14.7287 15 15.1767`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M5 7.32566C5.11067 7.32211 5.22179 7.32032 5.33333 7.32032C5.89518 7.31954 6.45255 7.36537 7 7.45576M5 11.0067C5.11067 11.0032 5.22179 11.0014 5.33333 11.0014C6.599 10.9996 7.84198 11.2344 9 11.6824M5 14.501C5.11067 14.4975 5.22179 14.4957 5.33333 14.4957C6.599 14.4939 7.84198 14.7287 9 15.1767`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],dc=[[`path`,{d:`M18 6L6.00081 17.9992M17.9992 18L6 6.00085`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],fc=[[`path`,{d:`M4 15L4 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 9L12 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M22 22L2 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M20 13L20 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M5.60009 8.79993C5.23521 8.31419 4.6543 8 4 8C2.89543 8 2 8.89543 2 10C2 11.1046 2.89543 12 4 12C5.10457 12 6 11.1046 6 10C6 9.54973 5.8512 9.13421 5.60009 8.79993ZM5.60009 8.79993L10.3999 5.20007M10.3999 5.20007C10.7648 5.68581 11.3457 6 12 6C12.783 6 13.4609 5.55006 13.7892 4.89462M10.3999 5.20007C10.1488 4.86579 10 4.45027 10 4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4C14 4.32158 13.9241 4.62543 13.7892 4.89462M13.7892 4.89462L18.2108 7.10538M18.2108 7.10538C18.0759 7.37457 18 7.67842 18 8C18 9.10457 18.8954 10 20 10C21.1046 10 22 9.10457 22 8C22 6.89543 21.1046 6 20 6C19.217 6 18.5391 6.44994 18.2108 7.10538Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],pc=[[`path`,{d:`M2 10.5C2 9.72921 2.01346 8.97679 2.03909 8.2503C2.12282 5.87683 2.16469 4.69009 3.13007 3.71745C4.09545 2.74481 5.3157 2.6926 7.7562 2.58819C9.09517 2.5309 10.5209 2.5 12 2.5C13.4791 2.5 14.9048 2.5309 16.2438 2.58819C18.6843 2.6926 19.9046 2.74481 20.8699 3.71745C21.8353 4.69009 21.8772 5.87683 21.9609 8.2503C21.9865 8.97679 22 9.72921 22 10.5C22 11.2708 21.9865 12.0232 21.9609 12.7497C21.8772 15.1232 21.8353 16.3099 20.8699 17.2826C19.9046 18.2552 18.6843 18.3074 16.2437 18.4118C15.5098 18.4432 14.7498 18.4667 13.9693 18.4815C13.2282 18.4955 12.8576 18.5026 12.532 18.6266C12.2064 18.7506 11.9325 18.9855 11.3845 19.4553L9.20503 21.3242C9.07273 21.4376 8.90419 21.5 8.72991 21.5C8.32679 21.5 8 21.1732 8 20.7701V18.4219C7.91842 18.4186 7.83715 18.4153 7.75619 18.4118C5.31569 18.3074 4.09545 18.2552 3.13007 17.2825C2.16469 16.3099 2.12282 15.1232 2.03909 12.7497C2.01346 12.0232 2 11.2708 2 10.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.1257 10.5H12.0007M8.125 10.5H8M16.125 10.5H16M12.2507 10.5C12.2507 10.6381 12.1388 10.75 12.0007 10.75C11.8627 10.75 11.7507 10.6381 11.7507 10.5C11.7507 10.3619 11.8627 10.25 12.0007 10.25C12.1388 10.25 12.2507 10.3619 12.2507 10.5ZM8.25 10.5C8.25 10.6381 8.13807 10.75 8 10.75C7.86193 10.75 7.75 10.6381 7.75 10.5C7.75 10.3619 7.86193 10.25 8 10.25C8.13807 10.25 8.25 10.3619 8.25 10.5ZM16.25 10.5C16.25 10.6381 16.1381 10.75 16 10.75C15.8619 10.75 15.75 10.6381 15.75 10.5C15.75 10.3619 15.8619 10.25 16 10.25C16.1381 10.25 16.25 10.3619 16.25 10.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],mc=[[`path`,{d:`M5 13.2592L7.58583 15.9568C8.2525 16.6523 8.58583 17.0001 9.00004 17.0001C9.41425 17.0001 9.74759 16.6523 10.4143 15.9568L19 7.00006`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],hc=[[`path`,{d:`M7.5 7.5L8.72654 8.55719C9.24218 9.00163 9.5 9.22386 9.5 9.5C9.5 9.77614 9.24218 9.99836 8.72654 10.4428L7.5 11.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.5 12.5H15.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12 21C15.7497 21 17.6246 21 18.9389 20.0451C19.3634 19.7367 19.7367 19.3634 20.0451 18.9389C21 17.6246 21 15.7497 21 12C21 8.25027 21 6.3754 20.0451 5.06107C19.7367 4.6366 19.3634 4.26331 18.9389 3.95491C17.6246 3 15.7497 3 12 3C8.25027 3 6.3754 3 5.06107 3.95491C4.6366 4.26331 4.26331 4.6366 3.95491 5.06107C3 6.3754 3 8.25027 3 12C3 15.7497 3 17.6246 3.95491 18.9389C4.26331 19.3634 4.6366 19.7367 5.06107 20.0451C6.3754 21 8.25027 21 12 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],gc=[[`path`,{d:`M15 5H9C6.09433 5 4.64149 5 3.62036 5.73563C3.27976 5.981 2.981 6.27976 2.73563 6.62036C2 7.64149 2 9.09433 2 12C2 14.9057 2 16.3585 2.73563 17.3796C2.981 17.7202 3.27976 18.019 3.62036 18.2644C4.64149 19 6.09433 19 9 19H15C17.9057 19 19.3585 19 20.3796 18.2644C20.7202 18.019 21.019 17.7202 21.2644 17.3796C22 16.3585 22 14.9057 22 12C22 9.09433 22 7.64149 21.2644 6.62036C21.019 6.27976 20.7202 5.981 20.3796 5.73563C19.3585 5 17.9057 5 15 5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 9V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14 9V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M10 9V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M6 9V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],_c=[[`path`,{d:`M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],vc=[[`path`,{d:`M11 10.6667C11 10.6667 11.75 10.6667 12.5 12C12.5 12 14.8824 8.66667 17 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 11V9C7 5.70017 7 4.05025 8.02513 3.02513C9.05025 2 10.7002 2 14 2C17.2998 2 18.9497 2 19.9749 3.02513C21 4.05025 21 5.70017 21 9V11C21 14.2998 21 15.9497 19.9749 16.9749C18.9497 18 17.2998 18 14 18C10.7002 18 9.05025 18 8.02513 16.9749C7 15.9497 7 14.2998 7 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 6V15C3 18.2998 3 19.9497 4.02513 20.9749C5.05025 22 6.70017 22 10 22H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],yc=[[`path`,{d:`M4 12C4 8.22876 4 6.34315 5.17157 5.17157C6.34315 4 8.22876 4 12 4C15.7712 4 17.6569 4 18.8284 5.17157C20 6.34315 20 8.22876 20 12C20 15.7712 20 17.6569 18.8284 18.8284C17.6569 20 15.7712 20 12 20C8.22876 20 6.34315 20 5.17157 18.8284C4 17.6569 4 15.7712 4 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 2V4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14.5 2V4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M9.5 20V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M14.5 20V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M13 9L9 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M15 13L13 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`6`}],[`path`,{d:`M22 14.5L20 14.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`7`}],[`path`,{d:`M4 9.5L2 9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`8`}],[`path`,{d:`M4 14.5L2 14.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`9`}],[`path`,{d:`M22 9.5L20 9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`10`}]],bc=[[`path`,{d:`M10 8.00024C13.866 8.00024 17 6.6571 17 5.00024C17 3.34339 13.866 2.00024 10 2.00024C6.13401 2.00024 3 3.34339 3 5.00024C3 6.6571 6.13401 8.00024 10 8.00024Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 14.0002C6.13401 14.0002 3 12.6571 3 11.0002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M10 20.0002C6.13401 20.0002 3 18.6571 3 17.0002V5.00024`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M18 15.0001V10.6516C18 10.2918 17.7083 10.0001 17.3485 10.0002C17.1308 10.0003 16.9275 10.1091 16.8067 10.2903L13.1289 15.807C13.0449 15.9331 13 16.0812 13 16.2327C13 16.6567 13.3437 17.0003 13.7676 17.0003L16 17.0003L16 21.3488C16 21.7086 16.2917 22.0003 16.6515 22.0002C16.8692 22.0001 17.0725 21.8913 17.1933 21.7101L20.8711 16.1934C20.9551 16.0673 21 15.9192 21 15.7677C21 15.3437 20.6563 15.0001 20.2324 15.0001H18Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M6 10.4896V10.4996`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M6 16.4899V16.4999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],xc=[[`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 10.842C7.60158 11.0229 8.27434 11.1718 9 11.282`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M20 12C20 13.6569 16.4183 15 12 15C7.58172 15 4 13.6569 4 12`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M7 17.842C7.60158 18.0229 8.27434 18.1718 9 18.282`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M20 5V19C20 20.6569 16.4183 22 12 22C7.58172 22 4 20.6569 4 19V5`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],Sc=[[`path`,{d:`M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M9.5 16.5L9.5 10.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M14.5 16.5L14.5 10.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}]],Cc=[[`path`,{d:`M2.99969 17.0002C2.99969 17.9302 2.99969 18.3952 3.10192 18.7767C3.37932 19.8119 4.18796 20.6206 5.22324 20.898C5.60474 21.0002 6.06972 21.0002 6.99969 21.0002L16.9997 21.0002C17.9297 21.0002 18.3947 21.0002 18.7762 20.898C19.8114 20.6206 20.6201 19.8119 20.8975 18.7767C20.9997 18.3952 20.9997 17.9302 20.9997 17.0002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.4998 11.5002C16.4998 11.5002 13.1856 16.0002 11.9997 16.0002C10.8139 16.0002 7.49976 11.5002 7.49976 11.5002M11.9997 15.0002V3.00016`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],wc=[[`path`,{d:`M15 3H18C19.4142 3 20.1213 3 20.5607 3.43934C21 3.87868 21 4.58579 21 6V9M20 4L11 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20 13C20 16.7712 20 18.6569 18.8284 19.8284C17.6569 21 15.7712 21 12 21H11C7.22876 21 5.34315 21 4.17157 19.8284C3 18.6569 3 16.7712 3 13V12C3 8.22876 3 6.34315 4.17157 5.17157C5.34315 4 7.22876 4 11 4`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],Tc=[[`path`,{d:`M8 7L16 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 11L12 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ec=[[`path`,{d:`M2.5 20V8.87695C2.5 7.58945 2.5 6.9457 2.78533 6.47048C2.9541 6.18939 3.18939 5.9541 3.47048 5.78533C3.9457 5.5 4.59449 5.5 5.89206 5.5C6.52339 5.5 6.83906 5.5 7.12612 5.58819C7.31759 5.64702 7.49914 5.73428 7.66469 5.84705C7.91289 6.01611 8.10859 6.26074 8.5 6.75C8.89141 7.23926 9.08711 7.48389 9.33531 7.65295C9.50086 7.76572 9.68241 7.85298 9.87388 7.91181C10.1609 8 10.4742 8 11.1008 8H15C16.4045 8 17.1067 8 17.6111 8.33706C17.8295 8.48298 18.017 8.67048 18.1629 8.88886C18.5 9.39331 18.5 10.0955 18.5 11.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M4.42028 14.0144L3.63368 16.0144C2.65618 18.4998 2.16743 19.7425 2.7524 20.6213C3.33737 21.5 4.65337 21.5 7.28537 21.5H15.1903C16.4249 21.5 17.0422 21.5 17.5295 21.1795C18.0169 20.859 18.2702 20.2865 18.7769 19.1415L19.6618 17.1415C20.7866 14.5992 21.349 13.3281 20.7679 12.4141C20.1868 11.5 18.8163 11.5 16.0752 11.5H8.07196C6.78232 11.5 6.1375 11.5 5.63811 11.8439C5.13872 12.1877 4.89924 12.7966 4.42028 14.0144Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M11.5 4.51456C12.4151 3.28409 13.6662 2.55594 15.5125 2.50161C16.1155 2.48386 16.7152 2.61395 17.2682 2.85544C18.5748 3.42601 19.4185 4.15644 20 5.5L21.5 3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Dc=[[`circle`,{cx:`12`,cy:`14`,r:`2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.0007 20C21.2561 18.3287 22 16.2512 22 14C22 12.5778 21.7031 11.2249 21.1679 10M3.99927 20C2.74389 18.3287 2 16.2512 2 14C2 8.47715 6.47715 4 12 4C13.4222 4 14.7751 4.2969 16 4.83209`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13.5 12.5L19 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Oc=[[`path`,{d:`M7 19H13C15.8284 19 17.2426 19 18.1213 18.1213C19 17.2426 19 15.8284 19 13V10M19 10C19.7002 10 21.0085 11.9943 21.5 12.5M19 10C18.2998 10 16.9915 11.9943 16.5 12.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5 7L5 17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`5`,cy:`5`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`circle`,{cx:`19`,cy:`5`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],kc=[[`path`,{d:`M2 11.4C2 10.2417 2.24173 10 3.4 10H20.6C21.7583 10 22 10.2417 22 11.4V12.6C22 13.7583 21.7583 14 20.6 14H3.4C2.24173 14 2 13.7583 2 12.6V11.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 3.4C2 2.24173 2.24173 2 3.4 2H20.6C21.7583 2 22 2.24173 22 3.4V4.6C22 5.75827 21.7583 6 20.6 6H3.4C2.24173 6 2 5.75827 2 4.6V3.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 19.4C2 18.2417 2.24173 18 3.4 18H20.6C21.7583 18 22 18.2417 22 19.4V20.6C22 21.7583 21.7583 22 20.6 22H3.4C2.24173 22 2 21.7583 2 20.6V19.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],Ac=[[`path`,{d:`M12 3V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 18V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M21 12L18 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6 12L3 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M18.3635 5.63672L16.2422 7.75804`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M7.75804 16.2422L5.63672 18.3635`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M18.3635 18.3635L16.2422 16.2422`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`6`}],[`path`,{d:`M7.75804 7.75804L5.63672 5.63672`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`7`}]],jc=[[`path`,{d:`M21.5 14.0784C20.3003 14.7189 18.9301 15.0821 17.4751 15.0821C12.7491 15.0821 8.91792 11.2509 8.91792 6.52485C8.91792 5.06986 9.28105 3.69968 9.92163 2.5C5.66765 3.49698 2.5 7.31513 2.5 11.8731C2.5 17.1899 6.8101 21.5 12.1269 21.5C16.6849 21.5 20.503 18.3324 21.5 14.0784Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Mc=[[`path`,{d:`M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11 13.4625C14 14.955 17 12.8198 17 10.3934C17 7.96698 14.7614 6 12 6C9.23858 6 7 7.96698 7 10.3934C7 11.3826 7.37209 12.2955 8 13.0298M11 13.4625V9.90523M11 13.4625V15.8456C11 16.8264 11 17.3168 10.7732 17.5868C10.1251 18.3583 9 17.9399 8.5 17.2275`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Nc=[[`path`,{d:`M18.8906 12.846C18.5371 14.189 16.8667 15.138 13.5257 17.0361C10.296 18.8709 8.6812 19.7884 7.37983 19.4196C6.8418 19.2671 6.35159 18.9776 5.95624 18.5787C5 17.6139 5 15.7426 5 12C5 8.2574 5 6.3861 5.95624 5.42132C6.35159 5.02245 6.8418 4.73288 7.37983 4.58042C8.6812 4.21165 10.296 5.12907 13.5257 6.96393C16.8667 8.86197 18.5371 9.811 18.8906 11.154C19.0365 11.7084 19.0365 12.2916 18.8906 12.846Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Pc=[[`path`,{d:`M15.5 2V6M8.5 6V2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.00446 7.61331C5.93719 6.74273 6.63957 6 7.53014 6H16.4699C17.3604 6 18.0628 6.74273 17.9955 7.61331L17.8117 9.99197C17.6796 11.7019 17.1011 13.3498 16.132 14.7773L15.5312 15.6622C14.9638 16.4979 14.0077 17 12.9838 17H11.0162C9.99228 17 9.03617 16.4979 8.46881 15.6622L7.86803 14.7773C6.89885 13.3498 6.32041 11.7019 6.18827 9.99197L6.00446 7.61331Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12 17V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M11 9H13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Fc=[[`path`,{d:`M20.0092 2V5.13219C20.0092 5.42605 19.6418 5.55908 19.4537 5.33333C17.6226 3.2875 14.9617 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Ic=[[`path`,{d:`M12 4V2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20 22C20 17.5817 16.4183 14 12 14C7.58172 14 4 17.5817 4 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M9.375 8.25H9.25M9.5 8.25C9.5 8.38807 9.38807 8.5 9.25 8.5C9.11193 8.5 9 8.38807 9 8.25C9 8.11193 9.11193 8 9.25 8C9.38807 8 9.5 8.11193 9.5 8.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M14.875 8.25H14.75M15 8.25C15 8.38807 14.8881 8.5 14.75 8.5C14.6119 8.5 14.5 8.38807 14.5 8.25C14.5 8.11193 14.6119 8 14.75 8C14.8881 8 15 8.11193 15 8.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M15.1538 4H8.84615C7.59095 4 6.96334 4 6.47397 4.22025C5.91693 4.47095 5.47095 4.91693 5.22025 5.47397C5 5.96334 5 6.59095 5 7.84615C5 9.85448 5 10.8586 5.3524 11.6417C5.75353 12.5329 6.46709 13.2465 7.35835 13.6476C8.14135 14 9.14552 14 11.1538 14H12.8462C14.8545 14 15.8586 14 16.6417 13.6476C17.5329 13.2465 18.2465 12.5329 18.6476 11.6417C19 10.8586 19 9.85448 19 7.84615C19 6.59095 19 5.96334 18.7797 5.47397C18.529 4.91693 18.0831 4.47095 17.526 4.22025C17.0367 4 16.4091 4 15.1538 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Lc=[[`path`,{d:`M2.5 9H6.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.5 14H6.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.5 4H18.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M18.5355 17.0355L21.5 20M20 13.5C20 10.7386 17.7614 8.5 15 8.5C12.2386 8.5 10 10.7386 10 13.5C10 16.2614 12.2386 18.5 15 18.5C17.7614 18.5 20 16.2614 20 13.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Rc=[[`path`,{d:`M15.5 12C15.5 13.933 13.933 15.5 12 15.5C10.067 15.5 8.5 13.933 8.5 12C8.5 10.067 10.067 8.5 12 8.5C13.933 8.5 15.5 10.067 15.5 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21.011 14.0965C21.5329 13.9558 21.7939 13.8854 21.8969 13.7508C22 13.6163 22 13.3998 22 12.9669V11.0332C22 10.6003 22 10.3838 21.8969 10.2493C21.7938 10.1147 21.5329 10.0443 21.011 9.90358C19.0606 9.37759 17.8399 7.33851 18.3433 5.40087C18.4817 4.86799 18.5509 4.60156 18.4848 4.44529C18.4187 4.28902 18.2291 4.18134 17.8497 3.96596L16.125 2.98673C15.7528 2.77539 15.5667 2.66972 15.3997 2.69222C15.2326 2.71472 15.0442 2.90273 14.6672 3.27873C13.208 4.73448 10.7936 4.73442 9.33434 3.27864C8.95743 2.90263 8.76898 2.71463 8.60193 2.69212C8.43489 2.66962 8.24877 2.77529 7.87653 2.98663L6.15184 3.96587C5.77253 4.18123 5.58287 4.28891 5.51678 4.44515C5.45068 4.6014 5.51987 4.86787 5.65825 5.4008C6.16137 7.3385 4.93972 9.37763 2.98902 9.9036C2.46712 10.0443 2.20617 10.1147 2.10308 10.2492C2 10.3838 2 10.6003 2 11.0332V12.9669C2 13.3998 2 13.6163 2.10308 13.7508C2.20615 13.8854 2.46711 13.9558 2.98902 14.0965C4.9394 14.6225 6.16008 16.6616 5.65672 18.5992C5.51829 19.1321 5.44907 19.3985 5.51516 19.5548C5.58126 19.7111 5.77092 19.8188 6.15025 20.0341L7.87495 21.0134C8.24721 21.2247 8.43334 21.3304 8.6004 21.3079C8.76746 21.2854 8.95588 21.0973 9.33271 20.7213C10.7927 19.2644 13.2088 19.2643 14.6689 20.7212C15.0457 21.0973 15.2341 21.2853 15.4012 21.3078C15.5682 21.3303 15.7544 21.2246 16.1266 21.0133L17.8513 20.034C18.2307 19.8187 18.4204 19.711 18.4864 19.5547C18.5525 19.3984 18.4833 19.132 18.3448 18.5991C17.8412 16.6616 19.0609 14.6226 21.011 14.0965Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],zc=[[`path`,{d:`M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.36318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Bc=[[`path`,{d:`M4 12C4 8.72077 4 7.08116 4.81382 5.91891C5.1149 5.48891 5.48891 5.1149 5.91891 4.81382C7.08116 4 8.72077 4 12 4C15.2792 4 16.9188 4 18.0811 4.81382C18.5111 5.1149 18.8851 5.48891 19.1862 5.91891C20 7.08116 20 8.72077 20 12C20 15.2792 20 16.9188 19.1862 18.0811C18.8851 18.5111 18.5111 18.8851 18.0811 19.1862C16.9188 20 15.2792 20 12 20C8.72077 20 7.08116 20 5.91891 19.1862C5.48891 18.8851 5.1149 18.5111 4.81382 18.0811C4 16.9188 4 15.2792 4 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}]],Vc=[[`path`,{d:`M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 2C11.6227 2.33333 11.0945 3.2 12 4M12 20C12.3773 20.3333 12.9055 21.2 12 22M19.5 4.50271C18.9685 4.46982 17.9253 4.72293 18.0042 5.99847M5.49576 17.5C5.52865 18.0315 5.27555 19.0747 4 18.9958M5.00271 4.5C4.96979 5.03202 5.22315 6.0763 6.5 5.99729M18 17.5026C18.5315 17.4715 19.5747 17.7108 19.4958 18.9168M22 12C21.6667 11.6227 20.8 11.0945 20 12M4 11.5C3.66667 11.8773 2.8 12.4055 2 11.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],Hc=[[`path`,{d:`M13 11L18 6`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 7L17 5L19.5 3.5L20.5 4.5L19 7Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M4.02513 8.97487C3.01416 7.96391 2.75095 6.48836 3.23548 5.23548L4.65748 6.65748H6.65748V4.65748L5.23548 3.23548C6.48836 2.75095 7.96391 3.01416 8.97487 4.02513C9.98621 5.03647 10.2493 6.51274 9.76398 7.76593L16.2341 14.236C17.4873 13.7507 18.9635 14.0138 19.9749 15.0251C20.9858 16.0361 21.2491 17.5116 20.7645 18.7645L19.3425 17.3425L17.3425 17.3425V19.3425L18.7645 20.7645C17.5116 21.2491 16.0361 20.9858 15.0251 19.9749C14.0145 18.9643 13.7511 17.4895 14.2349 16.2369L7.76312 9.76507C6.51053 10.2489 5.03571 9.98546 4.02513 8.97487Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M12.203 14.5L6.59897 20.1041C6.07115 20.6319 5.2154 20.6319 4.68758 20.1041L3.89586 19.3124C3.36805 18.7846 3.36805 17.9288 3.89586 17.401L9.49994 11.7969`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Uc=[[`path`,{d:`M6 5.5C6 4.56538 6 4.09808 6.20096 3.75C6.33261 3.52197 6.52197 3.33261 6.75 3.20096C7.09808 3 7.56538 3 8.5 3H11.5C12.4346 3 12.9019 3 13.25 3.20096C13.478 3.33261 13.6674 3.52197 13.799 3.75C14 4.09808 14 4.56538 14 5.5C14 6.43462 14 6.90192 13.799 7.25C13.6674 7.47803 13.478 7.66739 13.25 7.79904C12.9019 8 12.4346 8 11.5 8H8.5C7.56538 8 7.09808 8 6.75 7.79904C6.52197 7.66739 6.33261 7.47803 6.20096 7.25C6 6.90192 6 6.43462 6 5.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 15.5C6 14.5654 6 14.0981 6.20096 13.75C6.33261 13.522 6.52197 13.3326 6.75 13.201C7.09808 13 7.56538 13 8.5 13H11.5C12.4346 13 12.9019 13 13.25 13.201C13.478 13.3326 13.6674 13.522 13.799 13.75C14 14.0981 14 14.5654 14 15.5C14 16.4346 14 16.9019 13.799 17.25C13.6674 17.478 13.478 17.6674 13.25 17.799C12.9019 18 12.4346 18 11.5 18H8.5C7.56538 18 7.09808 18 6.75 17.799C6.52197 17.6674 6.33261 17.478 6.20096 17.25C6 16.9019 6 16.4346 6 15.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M20.8398 17.1408C21.6133 16.3673 22 15.9806 22 15.5C22 15.0194 21.6133 14.6327 20.8398 13.8592L20.6408 13.6602C19.8673 12.8867 19.4806 12.5 19 12.5C18.5194 12.5 18.1327 12.8867 17.3592 13.6602L17.1602 13.8592C16.3867 14.6327 16 15.0194 16 15.5C16 15.9806 16.3867 16.3673 17.1602 17.1408L17.3592 17.3398C18.1327 18.1133 18.5194 18.5 19 18.5C19.4806 18.5 19.8673 18.1133 20.6408 17.3398L20.8398 17.1408Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6.006 5.5H2.00781M2.00781 5.5V2M2.00781 5.5V12C2.00781 13.1037 1.85651 14.4679 2.89627 15.1629C3.40049 15.5 4.1024 15.5 5.50623 15.5M14.0024 15.5H16.0015M19.0001 12.5V9.5C19.0001 7.61438 19.0001 6.67157 18.4146 6.08579C17.8291 5.5 16.8867 5.5 15.0019 5.5H14.0024`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M22.0001 22C21.0682 22 20.6023 22 20.2348 21.8695C19.7447 21.6955 19.3554 21.3618 19.1524 20.9417C19.0001 20.6267 19.0001 20.2273 19.0001 19.4286V19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Wc=[[`path`,{d:`M20.3584 13.3567C19.1689 14.546 16.9308 14.4998 13.4992 14.4998C11.2914 14.4998 9.50138 12.7071 9.50024 10.4993C9.50024 7.07001 9.454 4.83065 10.6435 3.64138C11.8329 2.45212 12.3583 2.50027 17.6274 2.50027C18.1366 2.49809 18.3929 3.11389 18.0329 3.47394L15.3199 6.18714C14.6313 6.87582 14.6294 7.99233 15.3181 8.68092C16.0068 9.36952 17.1234 9.36959 17.8122 8.68109L20.5259 5.96855C20.886 5.60859 21.5019 5.86483 21.4997 6.37395C21.4997 11.6422 21.5479 12.1675 20.3584 13.3567Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M13.5 14.5L7.32842 20.6716C6.22386 21.7761 4.433 21.7761 3.32843 20.6716C2.22386 19.567 2.22386 17.7761 3.32843 16.6716L9.5 10.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5.50896 18.5H5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,key:`2`}]];function Gc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Kc(...e){return t=>{let n=!1,r=e.map(e=>{let r=Gc(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():Gc(e[t],null)}}}}function qc(...e){return C.useCallback(Kc(...e),e)}function Jc(e){let t=C.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];nl(r)&&typeof ol==`function`&&(r=ol(r._payload)),C.Children.forEach(r,e=>{if(el(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;nl(n)&&typeof ol==`function`&&(n=ol(n._payload)),a=Zc(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=C.cloneElement(a,void 0,s):!o&&C.Children.count(r)===1&&C.isValidElement(r)&&(a=r);let c=a?$c(a):void 0,l=qc(n,c);if(!a){if(r||r===0)throw Error(o?al(e):il(e));return r}let u=Qc(i,a.props??{});return a.type!==C.Fragment&&(u.ref=n?l:c),C.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var Yc=Jc(`Slot`),Xc=Symbol.for(`radix.slottable`),Zc=(e,t)=>{if(`child`in e.props){let t=e.props.child;return C.isValidElement(t)?C.cloneElement(t,void 0,e.props.children(t.props.children)):null}return C.isValidElement(t)?t:null};function Qc(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 $c(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 el(e){return C.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Xc}var tl=Symbol.for(`react.lazy`);function nl(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===tl&&`_payload`in e&&rl(e._payload)}function rl(e){return typeof e==`object`&&!!e&&`then`in e}var il=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,al=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ol=C.use,sl=n(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg 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-foreground/45 bg-foreground text-background hover:bg-foreground/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 hover:border-muted-foreground/45 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 cl({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,B.jsx)(r?Yc:`button`,{className:a(sl({variant:t,size:n,className:e})),...i})}var ll={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`},ul=(0,C.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:i=``,altIcon:a,showAlt:o=!1,icon:s,primaryColor:c,secondaryColor:l,disableSecondaryOpacity:u=!1,...d},f)=>{let p=n===void 0?void 0:r?Number(n)*24/Number(t):n,m=p===void 0?{}:{strokeWidth:p,stroke:`currentColor`};return(0,C.createElement)(`svg`,{ref:f,...ll,width:t,height:t,color:c||e,className:i,...m,...d},[...o&&a?a:s].sort(([,e],[,t])=>{let n=e.opacity!==void 0;return t.opacity===void 0?n?-1:0:1}).map(([t,n])=>{let r=n.opacity!==void 0,i=r&&!u?n.opacity:void 0,a=l?{...n.stroke===void 0?{fill:r?l:c||e}:{stroke:r?l:c||e}}:{};return(0,C.createElement)(t,{...n,...m,...a,opacity:i,key:n.key})}))});ul.displayName=`HugeiconsIcon`;function dl({color:e=`currentColor`,strokeWidth:t=1.5,...n}){return(0,B.jsx)(ul,{color:e,strokeWidth:t,...n})}function fl(e){return e.flatMap(e=>e.sources.map((t,n)=>({key:`${e.agentId}:${hl(t,n)}`,agentId:e.agentId,agentName:e.agentName??e.agentId,source:ml(t,n)})))}var pl=[{id:`static-context`,label:`Static Context`},{id:`dynamic-context`,label:`Dynamic Context`},{id:`dynamic-tools`,label:`Dynamic Tools`},{id:`retrieval-log`,label:`Retrieval Log`}];function ml(e,t){return e.sourceId===void 0?{...e,sourceId:gl(e,t)}:e}function hl(e,t=0){return e.sourceId??gl(e,t)}function gl(e,t){switch(e.kind){case`static_context`:return`static-context`;case`dynamic_context`:return`dynamic-context-${e.registrationIndex??t}`;case`dynamic_tools`:return`dynamic-tools-${e.registrationIndex??t}`}}function _l(e){switch(e){case`static_context`:return`Static context`;case`dynamic_context`:return`Dynamic context`;case`dynamic_tools`:return`Dynamic tools`}}function vl(e){switch(e){case`static-context`:return`static_context`;case`dynamic-context`:return`dynamic_context`;case`dynamic-tools`:return`dynamic_tools`;case`retrieval-log`:return}}function yl(e){return pl.find(t=>t.id===e)?.label??`Knowledge`}function bl(e){let t=xl(e.icon);return(0,B.jsxs)(cl,{className:a(`studio-sidebar-nav-button h-9 min-h-9 w-full justify-start gap-3 rounded-lg bg-transparent px-2.5 py-0.5 text-base font-medium text-sidebar-foreground/62 shadow-none transition duration-200 hover:text-sidebar-foreground active:translate-y-px [&_svg]:h-[17px] [&_svg]:w-[17px]`,e.active&&`studio-sidebar-nav-button-active text-sidebar-accent-foreground`),variant:`ghost`,type:`button`,disabled:e.disabled,onClick:e.onClick,children:[(0,B.jsx)(dl,{icon:t}),(0,B.jsx)(`span`,{children:e.label})]})}function xl(e){switch(e){case`activity`:return nc;case`bot`:return Ic;case`book-open-text`:return uc;case`container`:return gc;case`database`:return xc;case`database-lightning`:return bc;case`gauge`:return Dc;case`list`:return kc;case`message`:return pc;case`plug`:return Pc;case`search-list`:return Lc;case`shield`:return zc;case`tools`:return Hc;case`wrench`:return Wc;case`workflow`:return Uc}}var Sl={"static-context":`book-open-text`,"dynamic-context":`database-lightning`,"dynamic-tools":`tools`,"retrieval-log":`search-list`};function Cl(e){return(0,B.jsxs)(`aside`,{className:`flex h-[100dvh] min-h-0 flex-col overflow-hidden border-r border-sidebar-border bg-sidebar text-sidebar-foreground`,children:[(0,B.jsx)(`div`,{className:`flex h-15 items-center px-4`,children:(0,B.jsxs)(`div`,{className:`studio-logo-lockup min-w-0`,children:[(0,B.jsx)(`img`,{className:`h-auto w-[92px] shrink-0 object-contain`,src:Ps,alt:`Anvia`}),(0,B.jsx)(`span`,{className:`studio-logo-badge`,children:`Studio`})]})}),(0,B.jsxs)(`nav`,{className:`grid gap-0.5 px-3 py-3`,"aria-label":`Main`,children:[(0,B.jsx)(`div`,{className:`px-2.5 pb-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground opacity-50`,children:`Workspace`}),(0,B.jsx)(bl,{active:e.activePage===`playground`,disabled:!e.hasAgents,icon:`message`,label:`Chat`,onClick:()=>e.onNavigate(`playground`)}),(0,B.jsx)(bl,{active:e.activePage===`pipelines`,disabled:!e.pipelinesEnabled,icon:`workflow`,label:`Pipelines`,onClick:()=>e.onNavigate(`pipelines`)}),(0,B.jsx)(bl,{active:e.activePage===`evals`,disabled:!e.evalsEnabled,icon:`gauge`,label:`Evals`,onClick:()=>e.onNavigate(`evals`)}),(0,B.jsx)(bl,{active:e.activePage===`sessions`,disabled:!e.sessionsEnabled,icon:`list`,label:`Sessions`,onClick:()=>e.onNavigate(`sessions`)}),(0,B.jsx)(bl,{active:e.activePage===`tracing`,disabled:!e.tracesEnabled,icon:`activity`,label:`Traces`,onClick:()=>e.onNavigate(`tracing`)})]}),(0,B.jsxs)(`nav`,{className:`grid gap-0.5 px-3 py-3`,"aria-label":`Studio`,children:[(0,B.jsx)(`div`,{className:`px-2.5 pb-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground opacity-50`,children:`Inspect`}),(0,B.jsx)(bl,{active:e.activePage===`agents`,icon:`bot`,label:`Studio`,onClick:()=>e.onNavigate(`agents`)}),(0,B.jsx)(bl,{active:e.activePage===`tools`,disabled:!e.toolsEnabled,icon:`wrench`,label:`Tools`,onClick:()=>e.onNavigate(`tools`)}),(0,B.jsx)(bl,{active:e.activePage===`sandboxes`,disabled:!e.sandboxesEnabled,icon:`container`,label:`Sandboxes`,onClick:()=>e.onNavigate(`sandboxes`)}),(0,B.jsx)(bl,{active:e.activePage===`mcps`,disabled:!e.mcpsEnabled,icon:`plug`,label:`MCPs`,onClick:()=>e.onNavigate(`mcps`)}),pl.map(t=>(0,B.jsx)(bl,{active:e.activePage===`knowledge`&&e.knowledgeTab===t.id,disabled:!e.knowledgeEnabled,icon:Sl[t.id],label:t.label,onClick:()=>e.onNavigateKnowledgeTab(t.id)},t.id)),(0,B.jsx)(bl,{active:e.activePage===`memory`,disabled:!e.memoryEnabled,icon:`database`,label:`Memory`,onClick:()=>e.onNavigate(`memory`)}),(0,B.jsx)(bl,{active:e.activePage===`status`,disabled:!e.statusEnabled,icon:`gauge`,label:`Status`,onClick:()=>e.onNavigate(`status`)})]}),(0,B.jsxs)(`div`,{className:`mt-auto px-3 py-3`,children:[(0,B.jsx)(`nav`,{className:`grid gap-1`,"aria-label":`Anvia links`,children:(0,B.jsx)(Tl,{href:`https://anvia.dev/docs`,label:`Anvia Docs`})}),(0,B.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:e.status})]})]})}function wl(e){return(0,B.jsx)(`header`,{className:`grid min-h-13 border-b border-border bg-background/88 backdrop-blur`,children:(0,B.jsxs)(`div`,{className:`grid min-h-13 grid-cols-[minmax(0,1fr)_auto] items-center gap-3 py-0 pl-4 pr-6`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-sm font-medium`,children:[(0,B.jsx)(`span`,{className:`text-foreground`,children:e.activePage===`playground`?`Agents`:`Studio`}),(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:`/`}),(0,B.jsx)(`span`,{className:`truncate`,children:e.selectedAgentLabel})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(cl,{"aria-label":e.theme===`dark`?`Switch to light theme`:`Switch to dark theme`,className:`h-8 min-h-8 w-8 border-0 bg-transparent p-0 text-muted-foreground shadow-none hover:bg-muted/45 hover:text-foreground`,title:e.theme===`dark`?`Switch to light theme`:`Switch to dark theme`,type:`button`,variant:`ghost`,size:`icon`,onClick:e.onToggleTheme,children:e.theme===`dark`?(0,B.jsx)(dl,{icon:Vc,"aria-hidden":`true`}):(0,B.jsx)(dl,{icon:jc,"aria-hidden":`true`})}),(0,B.jsx)(cl,{className:`h-8 min-h-8 rounded-lg border border-white bg-white px-3 text-xs text-black shadow-none [box-shadow:none] hover:border-white hover:bg-white/90 hover:text-black focus-visible:ring-0 active:bg-white/85 disabled:bg-muted disabled:text-muted-foreground`,type:`button`,variant:`ghost`,disabled:!e.sessionsEnabled,onClick:e.onNewSession,children:`New session`})]})]})})}function Tl(e){return(0,B.jsxs)(`a`,{className:`flex h-8 min-h-8 items-center justify-between rounded-lg px-2 text-xs font-semibold text-sidebar-foreground/62 transition duration-200 hover:bg-sidebar-accent hover:text-sidebar-foreground`,href:e.href,target:`_blank`,rel:`noreferrer`,children:[(0,B.jsx)(`span`,{children:e.label}),(0,B.jsx)(dl,{icon:wc,"aria-hidden":`true`,className:`h-3 w-3 text-muted-foreground`})]})}function El(){let e=zs();return(0,B.jsxs)(`div`,{className:`grid h-[100dvh] min-h-0 overflow-hidden bg-background text-foreground lg:grid-cols-[228px_minmax(0,1fr)]`,children:[(0,B.jsx)(Cl,{activePage:e.activePage,evalsEnabled:e.evalsEnabled,hasAgents:e.hasAgents,knowledgeEnabled:e.knowledgeEnabled,mcpsEnabled:e.mcpsEnabled,memoryEnabled:e.memoryEnabled,pipelinesEnabled:e.pipelinesEnabled,sandboxesEnabled:e.sandboxesEnabled,sessionsEnabled:e.sessionsEnabled,status:e.status,statusEnabled:e.statusEnabled,toolsEnabled:e.toolsEnabled,tracesEnabled:e.tracesEnabled,knowledgeTab:e.knowledgeTab,onNavigate:e.navigatePage,onNavigateKnowledgeTab:e.navigateKnowledgeTab}),(0,B.jsxs)(`main`,{className:`grid h-[100dvh] min-w-0 grid-rows-[52px_minmax(0,1fr)] overflow-hidden bg-background/80`,children:[(0,B.jsx)(wl,{activePage:e.activePage,selectedAgentLabel:e.activePage===`sandboxes`?`Sandboxes`:e.selectedAgent?.name??e.selectedAgent?.id??`Agent`,sessionsEnabled:e.sessionsEnabled,theme:e.theme,onNavigate:e.navigatePage,onNewSession:()=>e.startNewChat(),onToggleTheme:e.toggleTheme}),(0,B.jsx)(Br,{})]}),(0,B.jsx)(C.Suspense,{fallback:null,children:(0,B.jsx)(Qs,{session:e.deleteCandidate,onOpenChange:t=>{t||e.setDeleteCandidate(void 0)},onConfirm:t=>{e.sessions.deleteSession(t).finally(()=>{e.setDeleteCandidate(void 0)})}})})]})}function Dl(e){let t=zs(),{activateRoute:n}=t;return(0,C.useEffect)(()=>{n(e)},[n,e]),t}function Ol(e){switch(e){case`dynamic-context`:case`dynamic-tools`:case`retrieval-log`:case`static-context`:return e;default:return`static-context`}}function kl(){let e=Dl(`agents`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Ws,{agents:e.agents,selectedAgentId:e.selectedAgentId})})}function Al(e){let[t,n]=(0,C.useState)(``),[r,i]=(0,C.useState)(),[a,o]=(0,C.useState)(`idle`);async function c(){let n=t||e.evals[0]?.id||``;if(!(n.length===0||a===`running`)){o(`running`),i(void 0),e.onError(``);try{let t=await fetch(`/evals/${encodeURIComponent(n)}/runs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({})});if(!t.ok)throw Error(await Vo(t,`Eval run failed`));i(await t.json()),e.onStatus(`Connected`)}catch(t){e.onError(s(t))}finally{o(`idle`)}}}return(0,B.jsx)(Gs,{evals:e.evals,selectedEvalId:t,enabled:e.enabled,runState:a,result:r,onSelectEval:e=>{n(e),i(void 0)},onRun:()=>void c()})}function jl(){let e=Dl(`evals`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Al,{evals:e.evals,enabled:e.evalsEnabled,onError:e.setError,onStatus:e.setStatus})})}function Ml(e){let[t,n]=(0,C.useState)(``),[r,i]=(0,C.useState)(),[a,o]=(0,C.useState)(`idle`),c=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0){i(void 0);return}o(`loading`);try{let e=await fetch(`/agents/${encodeURIComponent(t)}/tools`);if(!e.ok)throw Error(`Tools failed with HTTP ${e.status}`);i(await e.json())}catch(t){e.onError(s(t)),i(void 0)}finally{o(`idle`)}},[e.enabled,e.onError]);return(0,C.useEffect)(()=>{e.active&&c(t||e.selectedAgentId)},[e.active,c,e.selectedAgentId,t]),(0,B.jsx)(ec,{agents:e.agents,selectedAgentId:t||e.selectedAgentId,summary:r,enabled:e.enabled,loading:a===`loading`,onSelectAgent:e=>{n(e),c(e)}})}function Nl(e){let[t,n]=(0,C.useState)(``),[r,i]=(0,C.useState)(),[a,o]=(0,C.useState)(`idle`),c=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0){i(void 0);return}o(`loading`);try{let e=await fetch(`/agents/${encodeURIComponent(t)}/mcps`);if(!e.ok)throw Error(`MCPs failed with HTTP ${e.status}`);i(await e.json())}catch(t){e.onError(s(t)),i(void 0)}finally{o(`idle`)}},[e.enabled,e.onError]);return(0,C.useEffect)(()=>{e.active&&c(t||e.selectedAgentId)},[e.active,c,t,e.selectedAgentId]),(0,B.jsx)(qs,{agents:e.agents,selectedAgentId:t||e.selectedAgentId,summary:r,enabled:e.enabled,loading:a===`loading`,onSelectAgent:e=>{n(e),c(e)}})}function Pl(e){let[t,n]=(0,C.useState)(),[r,i]=(0,C.useState)(`idle`),a=(0,C.useCallback)(async()=>{if(!e.enabled){n(void 0);return}i(`loading`);try{let e=await fetch(`/knowledge?limit=25`);if(!e.ok)throw Error(`Knowledge failed with HTTP ${e.status}`);n(await e.json())}catch(t){e.onError(s(t))}finally{i(`idle`)}},[e.enabled,e.onError]);return(0,C.useEffect)(()=>{e.active&&a()},[e.active,a]),(0,B.jsx)(Ks,{activeTab:e.activeTab,enabled:e.enabled,summary:t,loading:r===`loading`,onOpenTrace:e.onOpenTrace,onRefresh:()=>void a()})}function Fl(){let e=Dl(`knowledge`),{setKnowledgeTab:t}=e,n=Ol(sr({strict:!1}).tab);return(0,C.useEffect)(()=>{t(n)},[t,n]),(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Pl,{active:!0,activeTab:n,enabled:e.knowledgeEnabled,onError:e.setError,onOpenTrace:e.traces.selectTrace})})}function Il(){let e=Dl(`mcps`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Nl,{active:!0,agents:e.agents,enabled:e.mcpsEnabled,selectedAgentId:e.selectedAgent?.id||e.selectedAgentId,onError:e.setError})})}function Ll(){let e=Dl(`memory`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Js,{agents:e.agents,enabled:e.memoryEnabled})})}var Rl=ua({endpoint:e=>e.endpoint,method:`POST`,format:`jsonl`,headers:{"content-type":`application/json`},body:e=>JSON.stringify(e.body)});function K(e){let[t,n]=(0,C.useState)(``),[r,i]=(0,C.useState)(),[a,o]=(0,C.useState)([]),[c,l]=(0,C.useState)([]),[u,d]=(0,C.useState)(`"Hello from Studio"`),[f,p]=(0,C.useState)(``),[m,h]=(0,C.useState)(``),[g,_]=(0,C.useState)(`idle`),[v,y]=(0,C.useState)(`idle`),[b,x]=(0,C.useState)(`idle`),[S,w]=(0,C.useState)(`idle`),T=(0,C.useRef)(0),E=(0,C.useRef)(0),D=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0)return E.current+=1,o([]),[];let n=E.current+1;E.current=n,y(`loading`);try{let e=new URLSearchParams({limit:`1000`}),r=await fetch(`/pipelines/${encodeURIComponent(t)}/logs?${e}`);if(!r.ok)throw Error(`Pipeline logs failed with HTTP ${r.status}`);let i=await r.json();return E.current===n&&o(i.logs),i.logs}catch(t){return E.current===n&&(e.onError(s(t)),o([])),[]}finally{E.current===n&&y(`idle`)}},[e.enabled,e.onError]),O=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0)return l([]),[];x(`loading`);try{let e=new URLSearchParams({limit:`50`}),n=await fetch(`/pipelines/${encodeURIComponent(t)}/runs?${e}`);if(!n.ok)throw Error(`Pipeline runs failed with HTTP ${n.status}`);let r=await n.json();return l(r.runs),r.runs}catch(t){return e.onError(s(t)),l([]),[]}finally{x(`idle`)}},[e.enabled,e.onError]),k=(0,C.useCallback)(async t=>{if(!e.enabled||t.length===0){T.current+=1,i(void 0),o([]),l([]);return}let r=T.current+1;T.current=r,_(`loading`),e.onError(``);try{let e=await fetch(`/pipelines/${encodeURIComponent(t)}`);if(!e.ok)throw Error(`Pipeline load failed with HTTP ${e.status}`);let a=await e.json();if(T.current!==r)return;n(t),i(a),await Promise.all([D(t),O(t)])}catch(t){T.current===r&&(e.onError(s(t)),i(void 0))}finally{T.current===r&&_(`idle`)}},[D,O,e.enabled,e.onError]);(0,C.useEffect)(()=>{if(!e.active)return;let n=t||e.pipelines[0]?.id||``;n.length>0&&k(n)},[e.active,e.pipelines,k,t]);async function A(e){for await(let t of e){if(Zr(t)){t.log.runId!==void 0&&h(e=>e||t.log.runId||``),ee(t.log),await rs();continue}if(Qr(t)){p(J(t.output)),await rs();continue}if($r(t))throw Error(JSON.stringify(t.error))}}async function j(){let n=t||e.pipelines[0]?.id||``;if(n.length===0||S===`running`)return;let r;try{r=JSON.parse(u)}catch{e.onError(`Pipeline input must be valid JSON`);return}w(`running`),p(``),h(``),e.onError(``);try{await A(Rl.send({endpoint:`/pipelines/${encodeURIComponent(n)}/runs`,body:{input:r,stream:!0,metadata:{source:`anvia-studio`}}})),await Promise.all([D(n),O(n)]),e.onStatus(`Connected`)}catch(t){e.onError(q(t,`Pipeline run failed`))}finally{w(`idle`)}}async function M(n){let r=t||e.pipelines[0]?.id||``;if(!(r.length===0||n.length===0||S===`running`)){w(`running`),p(``),h(``),e.onError(``);try{await A(Rl.send({endpoint:`/pipelines/${encodeURIComponent(r)}/runs/${encodeURIComponent(n)}/replay`,body:{stream:!0,metadata:{source:`anvia-studio`}}})),await Promise.all([D(r),O(r)]),e.onStatus(`Connected`)}catch(t){e.onError(q(t,`Pipeline replay failed`))}finally{w(`idle`)}}}function N(e){n(e),p(``),h(``),k(e)}function ee(e){o(t=>t.some(t=>t.id===e.id)?t:[...t,e].sort((e,t)=>e.sequence-t.sequence))}return{selectedPipelineId:t,pipelineDetail:r,pipelineLogs:a,pipelineRuns:c,activePipelineRunId:m,pipelineRunInput:u,pipelineRunOutput:f,pipelineDetailLoadState:g,pipelineLogLoadState:v,pipelineRunLoadState:b,pipelineRunState:S,setPipelineRunInput:d,selectPipeline:N,runPipeline:j,replayPipelineRun:M}}function q(e,t){return e instanceof Ji?Uo(e,t):s(e)}function J(e){return typeof e==`string`?e:JSON.stringify(e,null,2)}function Y(e){let t=K({active:e.active,enabled:e.enabled,pipelines:e.pipelines,onError:e.onError,onStatus:e.onStatus});return(0,B.jsx)(Ys,{pipelines:e.pipelines,selectedPipelineId:t.selectedPipelineId,detail:t.pipelineDetail,logs:t.pipelineLogs,activeRunId:t.activePipelineRunId,runs:t.pipelineRuns,enabled:e.enabled,detailLoading:t.pipelineDetailLoadState===`loading`,logsLoading:t.pipelineLogLoadState===`loading`,runsLoading:t.pipelineRunLoadState===`loading`,runState:t.pipelineRunState,runInput:t.pipelineRunInput,runOutput:t.pipelineRunOutput,theme:e.theme,activeTab:e.activeTab,onSelectPipeline:t.selectPipeline,onRunInputChange:t.setPipelineRunInput,onRun:()=>void t.runPipeline(),onTabChange:e.onTabChange,onReplayRun:e=>void t.replayPipelineRun(e)})}function X(){let e=Dl(`pipelines`),[t,n]=(0,C.useState)(()=>zl());(0,C.useEffect)(()=>{function e(){n(zl())}return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]);let r=(0,C.useCallback)(e=>{n(e);let t=new URL(window.location.href);t.searchParams.set(`tab`,e);let r=`${t.pathname}${t.search}${t.hash}`;`${window.location.pathname}${window.location.search}${window.location.hash}`!==r&&window.history.pushState(null,``,r)},[]);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Y,{active:!0,activeTab:t,pipelines:e.pipelines,enabled:e.pipelinesEnabled,theme:e.theme,onError:e.setError,onStatus:e.setStatus,onTabChange:r})})}function zl(){return Bl(window.location.search)}function Bl(e){let t=new URLSearchParams(e).get(`tab`);return t===`metadata`||t===`runs`||t===`logs`?t:`input`}function Vl(e,[t,n]){return Math.min(n,Math.max(t,e))}var Hl=Object.defineProperty,Ul=(e,t)=>Hl(e,`name`,{value:t,configurable:!0}),Wl=!!(typeof window<`u`&&window.document&&window.document.createElement);function Gl(e,t,{checkForDefaultPrevented:n=!0}={}){return Ul(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ul(Gl,`composeEventHandlers`);function Kl(e){if(!Wl)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ul(Kl,`getOwnerWindow`);function ql(e){if(!Wl)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ul(ql,`getOwnerDocument`);function Jl(e,t=!1){let{activeElement:n}=ql(e);if(!n?.nodeName)return null;if(Yl(n)&&n.contentDocument)return Jl(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ql(n).getElementById(e);if(t)return t}}return n}Ul(Jl,`getActiveElement`);function Yl(e){return e.tagName===`IFRAME`}Ul(Yl,`isFrame`);function Xl(e,t=[]){let n=[];function r(t,r){let i=C.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=C.useMemo(()=>o,Object.values(o));return(0,B.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=C.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>C.createContext(e));return function(n){let r=n?.[e]||t;return C.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Zl(i,...t)]}function Zl(...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 C.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Ql(e){let t=e+`CollectionProvider`,[n,r]=Xl(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=C.useRef(null),a=C.useRef(new Map).current;return(0,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Jc(s),l=C.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,B.jsx)(c,{ref:qc(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Jc(u),p=C.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=C.useRef(null),s=qc(t,o),c=a(u,n);return C.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return C.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 $l=C.createContext(void 0);function eu(e){let t=C.useContext($l);return e||t||`ltr`}var tu=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Jc(`Primitive.${t}`),r=C.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function nu(e,t){e&&fr.flushSync(()=>e.dispatchEvent(t))}function ru(e){let t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>((...e)=>t.current?.(...e)),[])}var iu=Object.defineProperty,au=(e,t)=>iu(e,`name`,{value:t,configurable:!0}),ou=`dismissableLayer.update`,su=`dismissableLayer.pointerDownOutside`,cu=`dismissableLayer.focusOutside`,lu,uu=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),du=C.forwardRef(au(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=C.useContext(uu),[d,f]=C.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=C.useState({}),h=qc(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=C.useRef(!1),w=mu(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:C.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),T=hu(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=ru(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return C.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),C.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(lu=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),gu(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=lu))}},[d,p,n,u]),C.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),gu())},[d,u]),C.useEffect(()=>{let e=au(()=>m({}),`handleUpdate`);return document.addEventListener(ou,e),()=>document.removeEventListener(ou,e)},[]),(0,B.jsx)(tu.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Gl(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Gl(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Gl(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function fu(){let e=C.useContext(uu),[t,n]=C.useState(null);return C.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}au(fu,`useDismissableLayerSurface`);var pu=au(()=>!0,`IS_TRUE`);function mu(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=pu}=t,s=ru(e),c=C.useRef(!1),l=C.useRef(!1),u=C.useRef(new Map),d=C.useRef(()=>{});return C.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}au(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}au(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}au(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}au(p,`handleInteractionBubble`);let m=au(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||_u(su,s,p,{discrete:!0})};if(au(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:au(()=>c.current=!0,`onPointerDownCapture`)}}au(mu,`usePointerDownOutside`);function hu(e,t=globalThis?.document){let n=ru(e),r=C.useRef(!1);return C.useEffect(()=>{let e=au(e=>{e.target&&!r.current&&_u(cu,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:au(()=>r.current=!0,`onFocusCapture`),onBlurCapture:au(()=>r.current=!1,`onBlurCapture`)}}au(hu,`useFocusOutside`);function gu(){let e=new CustomEvent(ou);document.dispatchEvent(e)}au(gu,`dispatchUpdate`);function _u(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?nu(i,a):i.dispatchEvent(a)}au(_u,`handleAndDispatchCustomEvent`);var vu=0,yu=null;function bu(){C.useEffect(()=>{yu||={start:xu(),end:xu()};let{start:e,end:t}=yu;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),vu++,()=>{vu===1&&(yu?.start.remove(),yu?.end.remove(),yu=null),vu=Math.max(0,vu-1)}},[])}function xu(){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 Su=Object.defineProperty,Cu=(e,t)=>Su(e,`name`,{value:t,configurable:!0}),wu=`focusScope.autoFocusOnMount`,Tu=`focusScope.autoFocusOnUnmount`,Eu={bubbles:!1,cancelable:!0},Du=C.forwardRef(Cu(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=C.useState(null),l=ru(i),u=ru(a),d=C.useRef(null),f=qc(t,c),p=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Pu(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Pu(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Pu(s)};Cu(e,`handleFocusIn`),Cu(t,`handleFocusOut`),Cu(n,`handleMutations`),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]),C.useEffect(()=>{if(s){Fu.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(wu,Eu);s.addEventListener(wu,l),s.dispatchEvent(t),t.defaultPrevented||(Ou(Ru(Au(s)),{select:!0}),document.activeElement===e&&Pu(s))}return()=>{s.removeEventListener(wu,l),setTimeout(()=>{let t=new CustomEvent(Tu,Eu);s.addEventListener(Tu,u),s.dispatchEvent(t),t.defaultPrevented||Pu(e??document.body,{select:!0}),s.removeEventListener(Tu,u),Fu.remove(p)},0)}}},[s,l,u,p]);let m=C.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]=ku(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Pu(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Pu(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,B.jsx)(tu.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Ou(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Pu(r,{select:t}),document.activeElement!==n)return}Cu(Ou,`focusFirst`);function ku(e){let t=Au(e);return[ju(t,e),ju(t.reverse(),e)]}Cu(ku,`getTabbableEdges`);function Au(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Cu(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Cu(Au,`getTabbableCandidates`);function ju(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Mu(r,{upTo:t})))return r}Cu(ju,`findVisible`);function Mu(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}Cu(Mu,`isHidden`);function Nu(e){return e instanceof HTMLInputElement&&`select`in e}Cu(Nu,`isSelectableInput`);function Pu(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Nu(e)&&t&&e.select()}}Cu(Pu,`focus`);var Fu=Iu();function Iu(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Lu(e,t),e.unshift(t)},remove(t){e=Lu(e,t),e[0]?.resume()}}}Cu(Iu,`createFocusScopesStack`);function Lu(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Cu(Lu,`arrayRemove`);function Ru(e){return e.filter(e=>e.tagName!==`A`)}Cu(Ru,`removeLinks`);var zu=globalThis?.document?C.useLayoutEffect:()=>{},Bu=C.useId||(()=>void 0),Vu=0;function Hu(e){let[t,n]=C.useState(Bu());return zu(()=>{e||n(e=>e??String(Vu++))},[e]),e||(t?`radix-${t}`:``)}var Uu=[`top`,`right`,`bottom`,`left`],Wu=Math.min,Z=Math.max,Gu=Math.round,Ku=Math.floor,qu=e=>({x:e,y:e}),Ju={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Yu(e,t,n){return Z(e,Wu(t,n))}function Xu(e,t){return typeof e==`function`?e(t):e}function Zu(e){return e.split(`-`)[0]}function Qu(e){return e.split(`-`)[1]}function $u(e){return e===`x`?`y`:`x`}function ed(e){return e===`y`?`height`:`width`}function td(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function nd(e){return $u(td(e))}function rd(e,t,n){n===void 0&&(n=!1);let r=Qu(e),i=nd(e),a=ed(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=fd(o)),[o,fd(o)]}function id(e){let t=fd(e);return[ad(e),t,ad(t)]}function ad(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var od=[`left`,`right`],sd=[`right`,`left`],cd=[`top`,`bottom`],ld=[`bottom`,`top`];function ud(e,t,n){switch(e){case`top`:case`bottom`:return n?t?sd:od:t?od:sd;case`left`:case`right`:return t?cd:ld;default:return[]}}function dd(e,t,n,r){let i=Qu(e),a=ud(Zu(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ad)))),a}function fd(e){let t=Zu(e);return Ju[t]+e.slice(t.length)}function pd(e){return{top:0,right:0,bottom:0,left:0,...e}}function md(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:pd(e)}function hd(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 gd(e,t,n){let{reference:r,floating:i}=e,a=td(t),o=nd(t),s=ed(o),c=Zu(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(Qu(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 _d(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}=Xu(t,e),p=md(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=hd(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=hd(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 vd=50,yd=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:_d},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=gd(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<vd&&(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}=gd(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Q=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}=Xu(e,t)||{};if(l==null)return{};let d=md(u),f={x:n,y:r},p=nd(i),m=ed(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=Wu(d[_],T),D=Wu(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Yu(O,A,k),M=!c.arrow&&Qu(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}}}),bd=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}=Xu(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Zu(r),_=td(o),v=Zu(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[fd(o)]:id(o)),x=p!==`none`;!d&&x&&b.push(...dd(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=rd(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`&&_!==td(t))||T.every(e=>td(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=td(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 xd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sd(e){return Uu.some(t=>e[t]>=0)}var Cd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Xu(e,t);switch(i){case`referenceHidden`:{let e=xd(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Sd(e)}}}case`escaped`:{let e=xd(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Sd(e)}}}default:return{}}}}},wd=new Set([`left`,`top`]);async function Td(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Zu(n),s=Qu(n),c=td(n)===`y`,l=wd.has(o)?-1:1,u=a&&c?-1:1,d=Xu(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 Ed=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 Td(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}}}}},Dd=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}=Xu(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=td(Zu(i)),p=$u(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=Yu(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=Yu(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}}}}}},Od=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}=Xu(e,t),u={x:n,y:r},d=td(i),f=$u(d),p=u[f],m=u[d],h=Xu(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=wd.has(Zu(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}}}},kd=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}=Xu(e,t),u=await o.detectOverflow(t,l),d=Zu(i),f=Qu(i),p=td(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=Wu(h-u[g],v),x=Wu(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=Z(u.left,0),t=Z(u.right,0),n=Z(u.top,0),r=Z(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Z(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Z(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 Ad(){return typeof window<`u`}function jd(e){return Nd(e)?(e.nodeName||``).toLowerCase():`#document`}function Md(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $(e){return((Nd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Nd(e){return Ad()?e instanceof Node||e instanceof Md(e).Node:!1}function Pd(e){return Ad()?e instanceof Element||e instanceof Md(e).Element:!1}function Fd(e){return Ad()?e instanceof HTMLElement||e instanceof Md(e).HTMLElement:!1}function Id(e){return!Ad()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Md(e).ShadowRoot}function Ld(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Jd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Rd(e){return/^(table|td|th)$/.test(jd(e))}function zd(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Bd=/transform|translate|scale|rotate|perspective|filter/,Vd=/paint|layout|strict|content/,Hd=e=>!!e&&e!==`none`,Ud;function Wd(e){let t=Pd(e)?Jd(e):e;return Hd(t.transform)||Hd(t.translate)||Hd(t.scale)||Hd(t.rotate)||Hd(t.perspective)||!Kd()&&(Hd(t.backdropFilter)||Hd(t.filter))||Bd.test(t.willChange||``)||Vd.test(t.contain||``)}function Gd(e){let t=Xd(e);for(;Fd(t)&&!qd(t);){if(Wd(t))return t;if(zd(t))return null;t=Xd(t)}return null}function Kd(){return Ud??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ud}function qd(e){return/^(html|body|#document)$/.test(jd(e))}function Jd(e){return Md(e).getComputedStyle(e)}function Yd(e){return Pd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xd(e){if(jd(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Id(e)&&e.host||$(e);return Id(t)?t.host:t}function Zd(e){let t=Xd(e);return qd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fd(t)&&Ld(t)?t:Zd(t)}function Qd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Zd(e),i=r===e.ownerDocument?.body,a=Md(r);if(i){let e=$d(a);return t.concat(a,a.visualViewport||[],Ld(r)?r:[],e&&n?Qd(e):[])}else return t.concat(r,Qd(r,[],n))}function $d(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ef(e){let t=Jd(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Fd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Gu(n)!==a||Gu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function tf(e){return Pd(e)?e:e.contextElement}function nf(e){let t=tf(e);if(!Fd(t))return qu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ef(t),o=(a?Gu(n.width):n.width)/r,s=(a?Gu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var rf=qu(0);function af(e){let t=Md(e);return!Kd()||!t.visualViewport?rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function of(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Md(e)?!1:t}function sf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=tf(e),o=qu(1);t&&(r?Pd(r)&&(o=nf(r)):o=nf(e));let s=of(a,n,r)?af(a):qu(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=Md(a),t=r&&Pd(r)?Md(r):r,n=e,i=$d(n);for(;i&&r&&t!==n;){let e=nf(i),t=i.getBoundingClientRect(),r=Jd(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=Md(i),i=$d(n)}}return hd({width:u,height:d,x:c,y:l})}function cf(e,t){let n=Yd(e).scrollLeft;return t?t.left+n:sf($(e)).left+n}function lf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-cf(e,n),y:n.top+t.scrollTop}}function uf(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=$(r),s=t?zd(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=qu(1),u=qu(0),d=Fd(r);if((d||!d&&!a)&&((jd(r)!==`body`||Ld(o))&&(c=Yd(r)),d)){let e=sf(r);l=nf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?lf(o,c):qu(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 df(e){return Array.from(e.getClientRects())}function ff(e){let t=$(e),n=Yd(e),r=e.ownerDocument.body,i=Z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+cf(e),s=-n.scrollTop;return Jd(r).direction===`rtl`&&(o+=Z(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var pf=25;function mf(e,t){let n=Md(e),r=$(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Kd();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=cf(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<=pf&&(a-=o)}else l<=pf&&(a+=l);return{width:a,height:o,x:s,y:c}}function hf(e,t){let n=sf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Fd(e)?nf(e):qu(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gf(e,t,n){let r;if(t===`viewport`)r=mf(e,n);else if(t===`document`)r=ff($(e));else if(Pd(t))r=hf(t,n);else{let n=af(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return hd(r)}function _f(e,t){let n=Xd(e);return n===t||!Pd(n)||qd(n)?!1:Jd(n).position===`fixed`||_f(n,t)}function vf(e,t){let n=t.get(e);if(n)return n;let r=Qd(e,[],!1).filter(e=>Pd(e)&&jd(e)!==`body`),i=null,a=Jd(e).position===`fixed`,o=a?Xd(e):e;for(;Pd(o)&&!qd(o);){let t=Jd(o),n=Wd(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ld(o)&&!n&&_f(e,o))?r=r.filter(e=>e!==o):i=t,o=Xd(o)}return t.set(e,r),r}function yf(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?zd(t)?[]:vf(t,this._c):[].concat(n),r],o=gf(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=gf(t,a[e],i);s=Z(n.top,s),c=Wu(n.right,c),l=Wu(n.bottom,l),u=Z(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function bf(e){let{width:t,height:n}=ef(e);return{width:t,height:n}}function xf(e,t,n){let r=Fd(t),i=$(t),a=n===`fixed`,o=sf(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=qu(0);function l(){c.x=cf(i)}if(r||!r&&!a)if((jd(t)!==`body`||Ld(i))&&(s=Yd(t)),r){let e=sf(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?lf(i,s):qu(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 Sf(e){return Jd(e).position===`static`}function Cf(e,t){if(!Fd(e)||Jd(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return $(e)===n&&(n=n.ownerDocument.body),n}function wf(e,t){let n=Md(e);if(zd(e))return n;if(!Fd(e)){let t=Xd(e);for(;t&&!qd(t);){if(Pd(t)&&!Sf(t))return t;t=Xd(t)}return n}let r=Cf(e,t);for(;r&&Rd(r)&&Sf(r);)r=Cf(r,t);return r&&qd(r)&&Sf(r)&&!Wd(r)?n:r||Gd(e)||n}var Tf=async function(e){let t=this.getOffsetParent||wf,n=this.getDimensions,r=await n(e.floating);return{reference:xf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ef(e){return Jd(e).direction===`rtl`}var Df={convertOffsetParentRelativeRectToViewportRelativeRect:uf,getDocumentElement:$,getClippingRect:yf,getOffsetParent:wf,getElementRects:Tf,getClientRects:df,getDimensions:bf,getScale:nf,isElement:Pd,isRTL:Ef};function Of(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kf(e,t){let n=null,r,i=$(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=Ku(d),h=Ku(i.clientWidth-(u+f)),g=Ku(i.clientHeight-(d+p)),_=Ku(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Z(0,Wu(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&&!Of(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 Af(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=tf(e),u=i||a?[...l?Qd(l):[],...t?Qd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?kf(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?sf(e):null;c&&g();function g(){let t=sf(e);h&&!Of(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 jf=Ed,Mf=Dd,Nf=bd,Pf=kd,Ff=Cd,If=Q,Lf=Od,Rf=(e,t,n)=>{let r=new Map,i={platform:Df,...n},a={...i.platform,_c:r};return yd(e,t,{...i,platform:a})},zf=typeof document<`u`?C.useLayoutEffect:function(){};function Bf(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(!Bf(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)&&!Bf(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Vf(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hf(e,t){let n=Vf(e);return Math.round(t*n)/n}function Uf(e){let t=C.useRef(e);return zf(()=>{t.current=e}),t}function Wf(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]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);Bf(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=Uf(c),O=Uf(i),k=Uf(l),A=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Rf(S.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Bf(T.current,t)&&(T.current=t,fr.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);zf(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=C.useRef(!1);zf(()=>(j.current=!0,()=>{j.current=!1}),[]),zf(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),N=C.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Hf(N.floating,u.x),r=Hf(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Vf(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var Gf=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?{}:If({element:r.current,padding:i}).fn(n):r?If({element:r,padding:i}).fn(n):{}}}},Kf=(e,t)=>{let n=jf(e);return{name:n.name,fn:n.fn,options:[e,t]}},qf=(e,t)=>{let n=Mf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jf=(e,t)=>({fn:Lf(e).fn,options:[e,t]}),Yf=(e,t)=>{let n=Nf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xf=(e,t)=>{let n=Pf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zf=(e,t)=>{let n=Ff(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qf=(e,t)=>{let n=Gf(e);return{name:n.name,fn:n.fn,options:[e,t]}};function $f(e){let[t,n]=C.useState(void 0);return zu(()=>{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 ep=Object.defineProperty,tp=(e,t)=>ep(e,`name`,{value:t,configurable:!0}),np=`Popper`,[rp,ip]=Xl(np),[ap,op]=rp(np),sp=tp(e=>{let{__scopePopper:t,children:n}=e,[r,i]=C.useState(null),[a,o]=C.useState(void 0);return(0,B.jsx)(ap,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),cp=`PopperAnchor`,lp=C.forwardRef(tp(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=op(cp,n),o=C.useRef(null),s=a.onAnchorChange,c=qc(t,C.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=C.useRef(null);C.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&gp(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,B.jsx)(tu.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),up=`PopperContent`,[dp,fp]=rp(up),pp=C.forwardRef(tp(function(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=op(up,n),[_,v]=C.useState(null),y=qc(t,v),[b,x]=C.useState(null),S=$f(b),w=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(mp),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:ee,middlewareData:P}=Wf({strategy:`fixed`,placement:E,whileElementsMounted:tp((...e)=>Af(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Kf({mainAxis:i+T,alignmentAxis:o}),c&&qf({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Jf():void 0,...A}),c&&Yf({...A}),Xf({...A,apply:tp(({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`)},`apply`)}),b&&Qf({element:b,padding:s}),hp({arrowWidth:w,arrowHeight:T}),f&&Zf({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),F=g.setPlacementState;zu(()=>(F(N),()=>{F(void 0)}),[N,F]);let[I,te]=gp(N),ne=ru(m);zu(()=>{ee&&ne?.()},[ee,ne]);let re=P.arrow?.x,ie=P.arrow?.y,L=P.arrow?.centerOffset!==0,[R,ae]=C.useState();return zu(()=>{_&&ae(window.getComputedStyle(_).zIndex)},[_]),(0,B.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ee?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:R,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,B.jsx)(dp,{scope:n,placedSide:I,placedAlign:te,onArrowChange:x,arrowX:re,arrowY:ie,shouldHideArrow:L,children:(0,B.jsx)(tu.div,{"data-side":I,"data-align":te,...h,ref:y,style:{...h.style,animation:ee?h.style?.animation:`none`}})})})},`PopperContent`));function mp(e){return e!==null}tp(mp,`isNotNull`);var hp=tp(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]=gp(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}}}}),`transformOrigin`);function gp(e){let[t,n=`center`]=e.split(`-`);return[t,n]}tp(gp,`getSideAndAlignFromPlacement`);var _p=sp,vp=lp,yp=pp,bp=Object.defineProperty,xp=C.forwardRef(((e,t)=>bp(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=C.useState(!1);zu(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?fr.createPortal((0,B.jsx)(tu.div,{...r,ref:t}),o):null},`Portal`)),Sp=Object.defineProperty,Cp=(e,t)=>Sp(e,`name`,{value:t,configurable:!0});function wp(e,t){return C.useReducer((e,n)=>t[e][n]??e,e)}Cp(wp,`useStateMachine`);var Tp=Cp(e=>{let{present:t,children:n}=e,r=Ep(t),i=typeof n==`function`?n({present:r.isPresent}):C.Children.only(n),a=Op(r.ref,Ap(i));return typeof n==`function`||r.isPresent?C.cloneElement(i,{ref:a}):null},`Presence`);function Ep(e){let[t,n]=C.useState(),r=C.useRef(null),i=C.useRef(e),a=C.useRef(`none`),o=C.useRef(void 0),[s,c]=wp(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return C.useEffect(()=>{s===`mounted`?(a.current=o.current??kp(r.current),o.current=void 0):a.current=`none`},[s]),zu(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=kp(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),zu(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Cp(a=>{let o=kp(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Cp(e=>{e.target===t&&(a.current=kp(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:C.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=kp(t)}else r.current=null;n(e)},[])}}Cp(Ep,`usePresence`);function Dp(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Cp(Dp,`setRef`);function Op(...e){let t=C.useRef(e);return t.current=e,C.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Dp(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Dp(n[e],null)}}},[])}Cp(Op,`useStableComposedRefs`);function kp(e){return e?.animationName||`none`}Cp(kp,`getAnimationName`);function Ap(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)}Cp(Ap,`getElementRef`);var jp=C.useEffectEvent,Mp=C.useInsertionEffect;function Np(e){if(typeof jp==`function`)return jp(e);let t=C.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Mp==`function`?Mp(()=>{t.current=e}):zu(()=>{t.current=e}),C.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Pp=Object.defineProperty,Fp=(e,t)=>Pp(e,`name`,{value:t,configurable:!0}),Ip=C.useInsertionEffect||zu;function Lp({prop:e,defaultProp:t,onChange:n=Fp(()=>{},`onChange`),caller:r}){let[i,a,o]=Rp({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,C.useCallback(t=>{if(s){let n=zp(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Fp(Lp,`useControllableState`);function Rp({defaultProp:e,onChange:t}){let[n,r]=C.useState(e),i=C.useRef(n),a=C.useRef(t);return Ip(()=>{a.current=t},[t]),C.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Fp(Rp,`useUncontrolledState`);function zp(e){return typeof e==`function`}Fp(zp,`isFunction`);var Bp=Symbol(`RADIX:SYNC_STATE`);function Vp(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Np(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=C.useReducer((t,n)=>{if(n.type===Bp)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=C.useRef(p);C.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=C.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return C.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Bp,state:i})},[i,d.state,c]),[h,f]}Fp(Vp,`useControllableStateReducer`);function Hp(e){let t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Up=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`}),Wp=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Gp=new WeakMap,Kp=new WeakMap,qp={},Jp=0,Yp=function(e){return e&&(e.host||Yp(e.parentNode))},Xp=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Yp(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})},Zp=function(e,t,n,r){var i=Xp(t,Array.isArray(e)?e:[e]);qp[n]||(qp[n]=new WeakMap);var a=qp[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=(Gp.get(e)||0)+1,l=(a.get(e)||0)+1;Gp.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Kp.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(),Jp++,function(){o.forEach(function(e){var t=Gp.get(e)-1,i=a.get(e)-1;Gp.set(e,t),a.set(e,i),t||(Kp.has(e)||e.removeAttribute(r),Kp.delete(e)),i||e.removeAttribute(n)}),Jp--,Jp||(Gp=new WeakMap,Gp=new WeakMap,Kp=new WeakMap,qp={})}},Qp=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Wp(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Zp(r,i,n,`aria-hidden`)):function(){return null}},$p=function(){return $p=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},$p.apply(this,arguments)};function em(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 tm(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 nm=`right-scroll-bar-position`,rm=`width-before-scroll-bar`,im=`with-scroll-bars-hidden`,am=`--removed-body-scroll-bar-size`;function om(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function sm(e,t){var n=(0,C.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 cm=typeof window<`u`?C.useLayoutEffect:C.useEffect,lm=new WeakMap;function um(e,t){var n=sm(t||null,function(t){return e.forEach(function(e){return om(e,t)})});return cm(function(){var t=lm.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||om(e,null)}),i.forEach(function(e){r.has(e)||om(e,a)})}lm.set(n,e)},[e]),n}function dm(e){return e}function fm(e,t){t===void 0&&(t=dm);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 pm(e){e===void 0&&(e={});var t=fm(null);return t.options=$p({async:!0,ssr:!1},e),t}var mm=function(e){var t=e.sideCar,n=em(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 C.createElement(r,$p({},n))};mm.isSideCarExport=!0;function hm(e,t){return e.useMedium(t),mm}var gm=pm(),_m=function(){},vm=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:_m,onWheelCapture:_m,onTouchMoveCapture:_m}),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=em(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=um([n,t]),w=$p($p({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:gm,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),$p($p({},w),{ref:S})):C.createElement(v,$p({},w,{className:c,ref:S}),s))});vm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vm.classNames={fullWidth:rm,zeroRight:nm};var ym,bm=function(){if(ym)return ym;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function xm(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=bm();return t&&e.setAttribute(`nonce`,t),e}function Sm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cm(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var wm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xm())&&(Sm(t,n),Cm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tm=function(){var e=wm();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Em=function(){var e=Tm();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Dm={left:0,top:0,right:0,gap:0},Om=function(e){return parseInt(e||``,10)||0},km=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[Om(n),Om(r),Om(i)]},Am=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Dm;var t=km(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])}},jm=Em(),Mm=`data-scroll-locked`,Nm=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
16
16
|
.${im} {
|
|
17
17
|
overflow: hidden ${r};
|
|
18
18
|
padding-right: ${s}px ${r};
|
|
@@ -52,5 +52,5 @@ Error generating stack: `+e.message+`
|
|
|
52
52
|
`},Pm=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Fm=function(){C.useEffect(function(){return document.body.setAttribute(Mm,(Pm()+1).toString()),function(){var e=Pm()-1;e<=0?document.body.removeAttribute(Mm):document.body.setAttribute(Mm,e.toString())}},[])},Im=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Fm();var a=C.useMemo(function(){return Am(i)},[i]);return C.createElement(jm,{styles:Nm(a,!t,i,n?``:`!important`)})},Lm=!1;if(typeof window<`u`)try{var Rm=Object.defineProperty({},`passive`,{get:function(){return Lm=!0,!0}});window.addEventListener(`test`,Rm,Rm),window.removeEventListener(`test`,Rm,Rm)}catch{Lm=!1}var zm=Lm?{passive:!1}:!1,Bm=function(e){return e.tagName===`TEXTAREA`},Vm=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Bm(e)&&n[t]===`visible`)},Hm=function(e){return Vm(e,`overflowY`)},Um=function(e){return Vm(e,`overflowX`)},Wm=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),qm(e,r)){var i=Jm(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gm=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Km=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},qm=function(e,t){return e===`v`?Hm(t):Um(t)},Jm=function(e,t){return e===`v`?Gm(t):Km(t)},Ym=function(e,t){return e===`h`&&t===`rtl`?-1:1},Xm=function(e,t,n,r,i){var a=Ym(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=Jm(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&qm(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},Zm=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Qm=function(e){return[e.deltaX,e.deltaY]},$m=function(e){return e&&`current`in e?e.current:e},eh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},th=function(e){return`
|
|
53
53
|
.block-interactivity-${e} {pointer-events: none;}
|
|
54
54
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
55
|
-
`},nh=0,rh=[];function ih(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(nh++)[0],a=C.useState(Em)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=tm([e.lockRef.current],(e.shards||[]).map($m),!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=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Zm(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=Wm(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Wm(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 Xm(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(!(!rh.length||rh[rh.length-1]!==a)){var r=`deltaY`in n?Qm(n):Zm(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&eh(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map($m).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=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ah(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=Zm(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,Qm(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,Zm(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return rh.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,zm),document.addEventListener(`touchmove`,c,zm),document.addEventListener(`touchstart`,u,zm),function(){rh=rh.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,zm),document.removeEventListener(`touchmove`,c,zm),document.removeEventListener(`touchstart`,u,zm)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:th(i)}):null,p?C.createElement(Im,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ah(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var oh=hm(gm,ih),sh=C.forwardRef(function(e,t){return C.createElement(vm,$p({},e,{ref:t,sideCar:oh}))});sh.classNames=vm.classNames;var ch=Object.defineProperty,lh=(e,t)=>ch(e,`name`,{value:t,configurable:!0}),uh=[` `,`Enter`,`ArrowUp`,`ArrowDown`],dh=[` `,`Enter`],fh=`Select`,[ph,mh,hh]=Ql(fh),[gh,_h]=Xl(fh,[hh,ip]),vh=ip(),[yh,bh]=gh(fh),[xh,Sh]=gh(fh);function Ch(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,internal_do_not_use_render:h}=e,g=vh(t),[_,v]=C.useState(null),[y,b]=C.useState(null),[x,S]=C.useState(!1),w=eu(l),[T,E]=Lp({prop:r,defaultProp:i??!1,onChange:a,caller:fh}),[D,O]=Lp({prop:o,defaultProp:s,onChange:c,caller:fh}),k=C.useRef(null),A=C.useRef(D);C.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=lh(()=>O(A.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=_?!!m||!!_.closest(`form`):!0,[M,N]=C.useState(new Set),ee=Hu(),P=Array.from(M).map(e=>e.props.value).join(`;`),F=C.useCallback(e=>{N(t=>new Set(t).add(e))},[]),I=C.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:ee,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:P,isFormControl:j};return(0,B.jsx)(_p,{...g,children:(0,B.jsx)(yh,{scope:t,...te,children:(0,B.jsx)(ph.Provider,{scope:t,children:(0,B.jsx)(xh,{scope:t,onNativeOptionAdd:F,onNativeOptionRemove:I,children:ag(h)?h(te):n})})})})}lh(Ch,`SelectProvider`);var wh=lh(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,B.jsx)(Ch,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,B.jsxs)(B.Fragment,{children:[n,e?(0,B.jsx)(ig,{__scopeSelect:t}):null]})})},`Select`),Th=`SelectTrigger`,Eh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=vh(n),o=bh(Th,n),s=o.disabled||r,c=qc(t,o.onTriggerChange),l=mh(n),u=C.useRef(`touch`),[d,f,p]=sg(e=>{let t=l().filter(e=>!e.disabled),n=cg(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=lh(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,B.jsx)(vp,{asChild:!0,...a,children:(0,B.jsx)(tu.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"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":og(o.value)?``:void 0,...i,ref:c,onClick:Gl(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Gl(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:Gl(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&uh.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),Dh=`SelectValue`,Oh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=bh(Dh,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=qc(t,c.onValueNodeChange);zu(()=>{l(u)},[l,u]);let f=og(c.value);return(0,B.jsx)(tu.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,B.jsx)(C.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),kh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,B.jsx)(tu.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Ah,jh]=gh(`SelectPortal`,{forceMount:void 0}),Mh=lh(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,B.jsx)(Ah,{scope:e.__scopeSelect,forceMount:n,children:(0,B.jsx)(xp,{asChild:!0,...r})})},`SelectPortal`),Nh=`SelectContent`,Ph=C.forwardRef(lh(function(e,t){let n=jh(Nh,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=bh(Nh,e.__scopeSelect),[o,s]=C.useState();return zu(()=>{s(new DocumentFragment)},[]),(0,B.jsx)(Tp,{present:r||a.open,children:({present:e})=>e?(0,B.jsx)(Bh,{...i,ref:t}):(0,B.jsx)(Fh,{...i,fragment:o})})},`SelectContent`)),Fh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?fr.createPortal((0,B.jsx)(Lh,{scope:n,children:(0,B.jsx)(ph.Slot,{scope:n,children:(0,B.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Ih=10,[Lh,Rh]=gh(Nh),zh=Jc(`SelectContent.RemoveScroll`),Bh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n}=e,{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=bh(Nh,n),[y,b]=C.useState(null),[x,S]=C.useState(null),w=qc(t,b),[T,E]=C.useState(null),[D,O]=C.useState(null),k=mh(n),[A,j]=C.useState(!1),M=C.useRef(!1);C.useEffect(()=>{if(y)return Qp(y)},[y]),bu();let N=C.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]),ee=C.useCallback(()=>N([T,y]),[N,T,y]);C.useEffect(()=>{A&&ee()},[A,ee]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;C.useEffect(()=>{if(y){let e={x:0,y:0},t=lh(t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},`handlePointerMove`),n=lh(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null},`handlePointerUp`);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,P,F]),C.useEffect(()=>{let e=lh(()=>P(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[I,te]=sg(e=>{let t=k().filter(e=>!e.disabled),n=cg(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=C.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]),re=C.useCallback(()=>y?.focus(),[y]),ie=C.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),L=r===`popper`?Hh:Vh,R=L===Hh?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,B.jsx)(Lh,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:T,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:ee,selectedItemText:D,position:r,isPositioned:A,searchRef:I,children:(0,B.jsx)(sh,{as:zh,allowPinchZoom:!0,children:(0,B.jsx)(Du,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Gl(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,B.jsx)(du,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,B.jsx)(L,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...R,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:Gl(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(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()}})})})})})})},`SelectContentImpl`)),Vh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=bh(Nh,n),o=Rh(Nh,n),[s,c]=C.useState(null),[l,u]=C.useState(null),d=qc(t,u),f=mh(n),p=C.useRef(!1),m=C.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=C.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-Ih,d=Vl(a,[Ih,Math.max(Ih,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-Ih,d=Vl(a,[Ih,Math.max(Ih,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Ih*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-Ih,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=`${Ih}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]);zu(()=>y(),[y]);let[b,x]=C.useState();return zu(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,B.jsx)(Uh,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,B.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,B.jsx)(tu.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Hh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Ih,...a}=e,o=vh(n);return(0,B.jsx)(yp,{...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)`}})},`SelectPopperPosition`)),[Uh,Wh]=gh(Nh,{}),Gh=`SelectViewport`,Kh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Rh(Gh,n),o=Wh(Gh,n),s=qc(t,a.onViewportChange),c=C.useRef(0);return(0,B.jsxs)(B.Fragment,{children:[(0,B.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,B.jsx)(ph.Slot,{scope:n,children:(0,B.jsx)(tu.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Gl(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-Ih*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})})})]})},`SelectViewport`)),[qh,Jh]=gh(`SelectGroup`),Yh=`SelectItem`,[Xh,Zh]=gh(Yh),Qh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=bh(Yh,n),c=Rh(Yh,n),l=s.value===r,[u,d]=C.useState(a??``),[f,p]=C.useState(!1),m=qc(t,ru(e=>c.itemRefCallback?.(e,r,i))),h=Hu(),g=C.useRef(`touch`),_=lh(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,B.jsx)(Xh,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:C.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,B.jsx)(ph.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,B.jsx)(tu.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:Gl(o.onFocus,()=>p(!0)),onBlur:Gl(o.onBlur,()=>p(!1)),onClick:Gl(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:Gl(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:Gl(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Gl(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Gl(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Gl(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(dh.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),$h=`SelectItemText`,eg=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=bh($h,n),s=Rh($h,n),c=Zh($h,n),l=Sh($h,n),[u,d]=C.useState(null),f=ru(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=qc(t,d,c.onItemTextChange,f),m=u?.textContent,h=C.useMemo(()=>(0,B.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return zu(()=>(g(h),()=>_(h)),[g,_,h]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(tu.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!og(o.value)?fr.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),tg=`SelectItemIndicator`,ng=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,...r}=e;return Zh(tg,n).isSelected?(0,B.jsx)(tu.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),rg=`SelectBubbleInput`,ig=C.forwardRef(lh(function({__scopeSelect:e,...t},n){let r=bh(rg,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=C.useRef(null),m=qc(n,p),h=i??``,g=Hp(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return C.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,B.jsxs)(tu.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Up,...t.style},ref:m,defaultValue:h,children:[og(i)&&!_?(0,B.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function ag(e){return typeof e==`function`}lh(ag,`isFunction`);function og(e){return e===``||e===void 0}lh(og,`shouldShowPlaceholder`);function sg(e){let t=ru(e),n=C.useRef(``),r=C.useRef(0),i=C.useCallback(e=>{let i=n.current+e;t(i),lh((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=C.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}lh(sg,`useTypeaheadSearch`);function cg(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=lg(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}lh(cg,`findNextItem`);function lg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}lh(lg,`wrapArray`);var ug=wh,dg=Oh;function fg({className:e,children:t,...n}){return(0,B.jsxs)(Eh,{className:a(`flex h-9 w-full items-center justify-between rounded-lg border border-input bg-card/90 px-3 text-sm text-foreground outline-none transition duration-200 hover:border-muted-foreground/45 focus:border-muted-foreground/60 focus:ring-2 focus:ring-muted-foreground/20 disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:[t,(0,B.jsx)(kh,{asChild:!0,children:(0,B.jsx)(dl,{icon:ic,className:`h-4 w-4 opacity-60`})})]})}function pg({className:e,children:t,position:n=`popper`,...r}){return(0,B.jsx)(Mh,{children:(0,B.jsx)(Ph,{position:n,className:a(`z-50 max-h-80 min-w-[8rem] overflow-hidden rounded-xl border border-border/90 bg-popover/98 text-popover-foreground shadow-xl shadow-black/45 backdrop-blur`,e),...r,children:(0,B.jsx)(Kh,{className:`p-1`,children:t})})})}function mg({className:e,children:t,...n}){return(0,B.jsxs)(Qh,{className:a(`relative flex min-h-8 cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none transition data-[disabled]:pointer-events-none data-[highlighted]:bg-muted/65 data-[highlighted]:text-foreground data-[disabled]:opacity-50`,e),...n,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,B.jsx)(ng,{children:(0,B.jsx)(dl,{icon:mc,className:`h-4 w-4`})})}),(0,B.jsx)(eg,{children:t})]})}function hg({className:e,...t}){return(0,B.jsx)(`section`,{className:a(`grid h-full min-h-0 min-w-0 max-h-full max-w-full overflow-hidden bg-background/45`,e),...t})}function gg({className:e,...t}){return(0,B.jsx)(`div`,{className:a(`min-h-0 min-w-0 overflow-hidden rounded-2xl border border-border/80 bg-card/70`,e),...t})}function _g(e){return(0,B.jsxs)(`div`,{className:a(`grid gap-1 rounded-xl border border-border/80 bg-card/45 p-4`,e.className),children:[(0,B.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:e.label}),(0,B.jsx)(`span`,{className:`text-lg font-semibold tabular-nums text-foreground`,children:e.value})]})}function vg(e){return(0,B.jsx)(`div`,{className:a(`grid min-h-80 place-items-center rounded-xl border border-dashed border-border/80 bg-card/35 px-6 text-center`,e.className),children:(0,B.jsxs)(`div`,{className:`grid max-w-md gap-2`,children:[(0,B.jsx)(`h2`,{className:`m-0 text-base font-semibold text-foreground`,children:e.title}),(0,B.jsx)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground`,children:e.text})]})})}function yg({className:e,...t}){return(0,B.jsx)(`span`,{className:a(`inline-flex items-center rounded-lg border border-border/80 bg-muted/55 px-2 py-1 text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground`,e),...t})}function bg({className:e,...t}){return(0,B.jsx)(`div`,{className:a(`grid gap-1 rounded-xl border border-border/80 bg-background p-1`,e),...t})}function xg({className:e,...t}){return(0,B.jsx)(`textarea`,{className:a(`min-h-9 w-full resize-none rounded-lg border border-input bg-card/90 px-3 py-2.5 leading-6 text-foreground outline-none transition duration-200 placeholder:text-muted-foreground/65 focus:border-muted-foreground/60 focus:ring-2 focus:ring-muted-foreground/20`,e),...t})}function Sg(e){let t=new Map,n=new Map(e.traceSummaries.map(e=>{let t=wg(e);return t===void 0?void 0:[e.id,t]}).filter(e=>e!==void 0)),r=e.logs.filter(e=>e.category===`run`&&(e.event===`run.completed`||e.event===`run.cancelled`||e.event===`run.failed`)).sort((e,t)=>e.sequence-t.sequence).map(Tg),i=0;for(let a of e.entries){if(!Cg(a))continue;let e=r[i];i+=1;let o=a.traceId===void 0?e:n.get(a.traceId)??e,s=Og(a.durationMs,o);s!==void 0&&t.set(a.entryId,s)}return t}function Cg(e){return e.kind===`message`&&e.role===`assistant`&&(e.text.trim().length>0||kg(e.durationMs)!==void 0)&&(!(`tone`in e)||e.tone!==`pending`)}function wg(e){let t=kg(e.durationMs),n=Eg(e.usage),r={};return t!==void 0&&(r.durationMs=t),n!==void 0&&(r.usage=n),Dg(r)}function Tg(e){let t=e.metadata;if(!c(t))return;let n=kg(t.durationMs),r=Eg(t.usage),i={};return n!==void 0&&(i.durationMs=n),r!==void 0&&(i.usage=r),Dg(i)}function Eg(e){if(!c(e))return;let t=Ag(e.inputTokens),n=Ag(e.outputTokens),r=Ag(e.totalTokens)??(t===void 0||n===void 0?void 0:t+n),i={};t!==void 0&&(i.inputTokens=t),n!==void 0&&(i.outputTokens=n),r!==void 0&&(i.totalTokens=r);let a=Ag(e.cachedInputTokens),o=Ag(e.cacheCreationInputTokens);return a!==void 0&&(i.cachedInputTokens=a),o!==void 0&&(i.cacheCreationInputTokens=o),Object.keys(i).length===0?void 0:i}function Dg(e){return e.durationMs===void 0&&e.usage===void 0?void 0:e}function Og(e,t){let n=kg(e);return n===void 0?t:{...t,durationMs:n}}function kg(e){let t=Ag(e);return t!==void 0&&t>=0?t:void 0}function Ag(e){return typeof e==`number`&&Number.isFinite(e)?e:void 0}var jg={getKey(e){return String(e.entryId)},getText(e){if(e.kind===`reasoning`||e.kind===`message`&&e.role===`assistant`)return e.text},withText(e,t){return e.kind===`reasoning`?{...e,text:t}:e.kind===`message`&&e.role===`assistant`?`tone`in e&&e.tone===`pending`?e:{...e,text:t}:e}};function Mg(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n?.kind===`message`&&n.role===`assistant`)return n.entryId;if(n?.kind===`message`&&n.role===`user`)return}}function Ng(e){let t=e.at(-1);return t?.kind===`message`&&t.role===`assistant`&&`tone`in t&&t.tone===`error`}function Pg(e){let[t,n]=(0,C.useState)(()=>Date.now()),r=e.startedAt!==void 0&&e.durationMs===void 0;(0,C.useEffect)(()=>{if(!r)return;n(Date.now());let e=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(e)},[r]);let i=e.durationMs??(e.startedAt===void 0?void 0:t-e.startedAt);return i===void 0?null:(0,B.jsxs)(`span`,{"aria-live":`off`,className:a(`inline-flex items-center gap-1.5 text-xs font-medium tabular-nums text-muted-foreground`,e.className),role:r?`timer`:void 0,children:[r?(0,B.jsx)(dl,{"aria-hidden":`true`,className:`h-3.5 w-3.5 shrink-0 animate-spin`,icon:Ac}):null,Fg(i,r?`working`:`finished`)]})}function Fg(e,t=`working`){let n=Math.floor((Number.isFinite(e)?Math.max(0,e):0)/1e3),r=Math.floor(n/60),i=n%60,a=r===0?`${i}s`:`${r}m ${i}s`;return`${t===`working`?`Working`:`Finished`} - ${a}`}var Ig=(0,C.lazy)(()=>Us(()=>import(`./transcript-item-BwDIsmS7.js`).then(e=>({default:e.TranscriptItem})),__vite__mapDeps([18,1,5,6,2])));function Lg(e){let t=Ro(e.messages,{adapter:jg,flushImmediately:Ng(e.messages),isStreaming:e.isStreaming,resetKey:e.resetKey}),n=(0,C.useMemo)(()=>new Map(e.messages.map(e=>[e.entryId,e])),[e.messages]),r=(0,C.useMemo)(()=>Sg({entries:e.messages,traceSummaries:e.sessionTraceSummaries,logs:e.sessionLogs}),[e.messages,e.sessionLogs,e.sessionTraceSummaries]),i=(0,C.useRef)(e.workingStartedAt),a=e.workingStartedAt??(t.isDraining?i.current:void 0),o=a===void 0?void 0:Mg(e.messages),s=t.items.some(e=>e.entryId===o)?o:void 0;return(0,C.useEffect)(()=>{e.workingStartedAt!==void 0&&(i.current=e.workingStartedAt),!t.isDraining&&e.workingStartedAt===void 0&&(i.current=void 0)},[e.workingStartedAt,t.isDraining]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(C.Suspense,{fallback:null,children:t.items.map(i=>(0,B.jsx)(Ig,{entry:n.get(i.entryId)??i,displayText:jg.getText(i),live:t.liveItemKey===String(i.entryId),metrics:r.get(i.entryId),workingStartedAt:i.entryId===s?a:void 0,decidingApprovals:e.decidingApprovals,answeringQuestions:e.answeringQuestions,onApprovalDecision:e.onApprovalDecision,onQuestionAnswer:e.onQuestionAnswer,onOpenTrace:e.onOpenTrace},i.entryId))}),a!==void 0&&s===void 0?(0,B.jsx)(`article`,{className:`max-w-[min(82ch,100%)] justify-self-start text-foreground`,children:(0,B.jsx)(Pg,{startedAt:a})}):null]})}function Rg(e){return(0,B.jsxs)(hg,{className:`grid-cols-[minmax(0,1fr)_minmax(0,460px)] max-xl:grid-cols-1`,children:[(0,B.jsx)(`div`,{className:`grid min-h-0 min-w-0`,children:(0,B.jsxs)(`div`,{className:`grid h-full min-h-0 min-w-0 grid-rows-[minmax(0,1fr)_auto]`,children:[(0,B.jsx)(`section`,{className:`min-h-0 overflow-y-auto overflow-x-hidden px-4 py-4 [overflow-anchor:none] [scrollbar-gutter:stable]`,ref:e.transcriptScrollerRef,onScroll:e.onTranscriptScroll,children:(0,B.jsxs)(`div`,{className:`mx-auto grid min-h-full w-full max-w-235 content-start items-start gap-6 pb-8`,"data-studio-transcript-content":``,children:[e.hasMessages?null:(0,B.jsx)(`div`,{className:`grid min-h-96 place-items-center text-sm font-medium text-muted-foreground`,children:(0,B.jsxs)(`div`,{className:`grid max-w-xl gap-4 text-center`,children:[(0,B.jsx)(`div`,{className:`mx-auto h-px w-28 bg-muted/55`}),(0,B.jsx)(`h1`,{className:`m-0 text-4xl font-semibold leading-tight text-foreground text-balance`,children:`What should this agent work on?`}),(0,B.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.`})]})}),(0,B.jsx)(Lg,{answeringQuestions:e.answeringQuestions,decidingApprovals:e.decidingApprovals,isStreaming:e.isStreaming,messages:e.messages,resetKey:e.transcriptResetKey,sessionLogs:e.sessionLogs,sessionTraceSummaries:e.sessionTraceSummaries,workingStartedAt:e.workingStartedAt,onApprovalDecision:e.onApprovalDecision,onOpenTrace:e.onOpenTrace,onQuestionAnswer:e.onQuestionAnswer})]})}),(0,B.jsxs)(`form`,{className:`grid gap-3 bg-gradient-to-t from-card via-card/95 to-card/0 px-4 pb-4 pt-2`,onSubmit:t=>{t.preventDefault(),e.onRunPrompt(e.prompt)},children:[e.hasMessages||e.selectedAgentQuickPrompts.length===0?null:(0,B.jsx)(`div`,{className:`mx-auto grid w-full max-w-235 grid-cols-3 gap-2 max-md:grid-cols-1`,children:e.selectedAgentQuickPrompts.map(t=>(0,B.jsx)(cl,{className:`h-auto min-h-16 justify-start whitespace-normal rounded-lg 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-border/80 hover:bg-muted/45 hover:text-foreground`,type:`button`,variant:`ghost`,disabled:e.runState===`running`||e.selectedAgentId.length===0,onClick:()=>e.onRunPrompt(t),children:(0,B.jsx)(`span`,{className:`min-w-0 whitespace-normal wrap-break-words`,children:t})},t))}),(0,B.jsxs)(`div`,{className:`mx-auto grid w-full max-w-235 gap-2 rounded-xl border border-border/80 bg-card/95 p-2.5 backdrop-blur`,children:[(0,B.jsx)(xg,{className:`min-h-16 min-w-0 resize-none rounded-lg border-0 bg-transparent px-3 py-3 text-base leading-7 text-foreground shadow-none outline-none ring-0 placeholder:text-muted-foreground/70 focus:border-transparent focus:ring-0`,ref:e.promptRef,rows:1,value:e.prompt,onChange:e.onPromptChange,onKeyDown:e.onPromptKeyDown,placeholder:`Ask anything...`}),e.attachments.length===0?null:(0,B.jsx)(`div`,{className:`flex min-w-0 flex-wrap gap-1.5 px-2`,children:e.attachments.map(t=>(0,B.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-lg border border-border/80 bg-muted/55 px-2 py-1 text-xs font-medium text-muted-foreground`,children:[(0,B.jsxs)(`span`,{className:`min-w-0 truncate`,children:[t.kind===`image`?`Image`:`Doc`,` / `,t.name]}),(0,B.jsx)(cl,{"aria-label":`Remove ${t.name}`,className:`h-5 min-h-5 w-5 rounded-md border-0 bg-transparent p-0 text-muted-foreground shadow-none hover:bg-accent hover:text-foreground [&_svg]:h-3 [&_svg]:w-3`,size:`icon`,type:`button`,variant:`ghost`,onClick:()=>e.onRemovePromptAttachment(t.id),children:(0,B.jsx)(dl,{icon:dc,"aria-hidden":`true`})})]},t.id))}),(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,B.jsx)(`input`,{ref:e.attachmentInputRef,className:`hidden`,type:`file`,multiple:!0,accept:Xr,onChange:e.onAddPromptAttachments}),(0,B.jsx)(cl,{"aria-label":`Attach image or document`,className:`h-8 min-h-8 w-8 border-0 bg-transparent p-0 text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground`,size:`icon`,type:`button`,variant:`ghost`,disabled:e.runState===`running`,onClick:()=>e.attachmentInputRef.current?.click(),children:(0,B.jsx)(dl,{icon:lc,"aria-hidden":`true`})})]}),(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[e.selectedAgentModels.length===0?null:(0,B.jsxs)(ug,{value:e.selectedModelRef,onValueChange:e.onSelectModel,disabled:e.runState===`running`,children:[(0,B.jsx)(fg,{"aria-label":`Select model`,className:`flex h-8 min-h-8 w-auto max-w-44 gap-2 border-0 bg-transparent px-2 py-1 text-xs font-medium text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground sm:max-w-72`,children:(0,B.jsx)(dg,{placeholder:`Model`})}),(0,B.jsx)(pg,{align:`end`,children:e.selectedAgentModels.map(e=>(0,B.jsx)(mg,{value:e.ref,children:ii(e)},e.ref))})]}),e.agents.length>1?(0,B.jsxs)(ug,{value:e.selectedAgent?.id??e.selectedAgentId,onValueChange:e.onSelectAgent,disabled:e.runState===`running`,children:[(0,B.jsx)(fg,{"aria-label":`Select agent`,className:`flex h-8 min-h-8 w-auto max-w-64 gap-2 border-0 bg-transparent px-2 py-1 text-xs font-medium text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground`,children:(0,B.jsx)(dg,{placeholder:`Agent`})}),(0,B.jsx)(pg,{align:`end`,children:e.agents.map(e=>(0,B.jsx)(mg,{value:e.id,children:e.name??e.id},e.id))})]}):null,(0,B.jsx)(cl,{"aria-label":e.isStreaming?`Stop generating`:e.runState===`running`?`Running`:`Send message`,className:`h-9 min-h-9 w-9 rounded-full border-white bg-white text-black hover:bg-white/90`,size:`icon`,type:e.isStreaming?`button`:`submit`,disabled:!e.isStreaming&&(e.runState===`running`||e.selectedAgentId.length===0),onClick:e.isStreaming?e.onStopPrompt:void 0,children:(0,B.jsx)(dl,{fill:e.isStreaming?`currentColor`:void 0,icon:e.isStreaming?Bc:cc})})]})]})]})]})]})}),(0,B.jsx)(zg,{sessions:e.allSessions,selectedSessionId:e.selectedSessionId,runState:e.runState,onDeleteSession:e.onDeleteSession,onLoadSession:e.onLoadSession})]})}function zg(e){return(0,B.jsx)(`aside`,{className:`grid h-full min-h-0 min-w-0 max-h-full overflow-hidden border-l border-sidebar-border bg-sidebar text-sidebar-foreground max-xl:hidden`,"aria-label":`Sessions`,children:(0,B.jsx)(`nav`,{className:`grid min-h-0 content-start gap-0.5 overflow-auto px-3 py-3`,"aria-label":`Sessions`,children:e.sessions.map(t=>(0,B.jsx)(Bg,{session:t,active:t.id===e.selectedSessionId,disabled:e.runState===`running`,onDeleteSession:e.onDeleteSession,onLoadSession:e.onLoadSession},t.id))})})}function Bg(e){let t=e.session.title??`Untitled chat`;return(0,B.jsxs)(`div`,{className:`group relative min-w-0`,children:[(0,B.jsxs)(cl,{className:a(`studio-sidebar-nav-button h-9 min-h-9 w-full justify-start gap-3 rounded-lg bg-transparent px-2.5 py-0.5 pr-9 text-base font-medium text-sidebar-foreground/62 shadow-none transition duration-200 hover:text-sidebar-foreground active:translate-y-px [&_svg]:h-[17px] [&_svg]:w-[17px]`,e.active&&`studio-sidebar-nav-button-active text-sidebar-accent-foreground`),type:`button`,variant:`ghost`,disabled:e.disabled,onClick:()=>e.onLoadSession(e.session.id),children:[(0,B.jsx)(dl,{icon:pc,"aria-hidden":`true`}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:t})]}),(0,B.jsx)(cl,{"aria-label":`Delete ${t}`,className:`absolute right-1 top-1/2 hidden h-7 min-h-7 w-7 -translate-y-1/2 rounded-lg border-0 bg-transparent p-0 text-muted-foreground opacity-70 shadow-none hover:bg-sidebar-accent hover:text-destructive hover:opacity-100 group-hover:inline-flex group-focus-within:inline-flex [&_svg]:h-4 [&_svg]:w-4`,size:`icon`,type:`button`,variant:`ghost`,disabled:e.disabled,onClick:()=>e.onDeleteSession(e.session),children:(0,B.jsx)(dl,{icon:rc,"aria-hidden":`true`})})]})}function Vg(){let e=Dl(`playground`),t=sr({strict:!1}).sessionId,n=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(n.current!==t&&e.pageEnabled(`playground`)){if(e.runState===`running`){n.current=t;return}if(t===void 0){n.current=t,e.startNewChat({updatePath:!1});return}e.sessionsEnabled&&(n.current=t,t!==e.sessions.selectedSessionId&&e.sessions.loadSession(t,{updatePath:!1}))}},[t,e]),(0,B.jsx)(Rg,{agents:e.agents,allSessions:e.sessions.allSessions,answeringQuestions:e.answeringQuestions,attachments:e.attachments,decidingApprovals:e.decidingApprovals,hasMessages:e.hasMessages,isStreaming:e.isStreaming,workingStartedAt:e.workingStartedAt,messages:e.messages,prompt:e.prompt,runState:e.runState,selectedAgent:e.selectedAgent,selectedAgentId:e.selectedAgentId,selectedAgentModels:e.selectedAgentModels,selectedAgentQuickPrompts:e.selectedAgentQuickPrompts,selectedModelRef:e.selectedModelRef,selectedSessionId:e.sessions.selectedSessionId,sessionLogs:e.sessions.sessionLogs,sessionTraceSummaries:e.sessionTraceSummaries,attachmentInputRef:e.attachmentInputRef,promptRef:e.promptRef,transcriptScrollerRef:e.transcriptScrollerRef,transcriptResetKey:e.transcriptResetKey,onAddPromptAttachments:e.addPromptAttachments,onApprovalDecision:e.decideToolApproval,onDeleteSession:e.setDeleteCandidate,onLoadSession:t=>void e.sessions.loadSession(t),onOpenTrace:e.traces.selectTrace,onPromptChange:e.updatePrompt,onPromptKeyDown:e.handlePromptKeyDown,onQuestionAnswer:e.answerToolQuestion,onRemovePromptAttachment:e.removePromptAttachment,onRunPrompt:e.runPrompt,onStopPrompt:e.stopPrompt,onSelectAgent:e.selectPlaygroundAgent,onSelectModel:e.setSelectedModelRef,onTranscriptScroll:e.updateTranscriptStickiness})}function Hg(){let e=Dl(`sandboxes`),t=sr({strict:!1}),n=lr();return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Zs,{enabled:e.sandboxesEnabled,onError:e.setError,onSelectSandbox:e=>{n({to:`/sandboxes/$sandboxRef`,params:{sandboxRef:e}})},...t.sandboxRef===void 0?{}:{initialSandboxRef:t.sandboxRef}})})}function Ug(){let e=Dl(`sessions`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Xs,{agents:e.agents,sessions:e.sessions.allSessions,sessionsEnabled:e.sessionsEnabled,sessionLoadState:e.sessions.sessionLoadState,selectedSessionId:e.sessions.selectedSessionId,onOpenSession:t=>void e.sessions.loadSession(t),onViewSessionTracing:t=>void e.traces.showSessionTraces(t),onDeleteSession:e.setDeleteCandidate})})}function Wg(){let e=Dl(`status`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)($s,{enabled:e.statusEnabled})})}function Gg(){let e=Dl(`tools`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Ml,{active:!0,agents:e.agents,enabled:e.toolsEnabled,selectedAgentId:e.selectedAgent?.id||e.selectedAgentId,onError:e.setError})})}function Kg(){let e=Dl(`tracing`),t=sr({strict:!1}),n=(0,C.useRef)(``);return(0,C.useEffect)(()=>{let r=t.sessionId===void 0?`trace:${t.traceId??``}`:`session:${t.sessionId}`;if(n.current!==r&&e.pageEnabled(`tracing`)){if(n.current=r,t.sessionId!==void 0){e.traces.showSessionTraces(t.sessionId,{updatePath:!1});return}e.traces.setTraceLocation(t.traceId??``,void 0)}},[t.sessionId,t.traceId,e]),(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(tc,{agents:e.agents,traces:e.traces.traces,tracesEnabled:e.tracesEnabled,traceLoadState:e.traces.traceLoadState,selectedTraceId:e.traces.selectedTraceId,traceSessionDetailId:e.traces.traceSessionDetailId,onRefresh:()=>void e.traces.loadTraces(),onSelectTrace:e.traces.selectTrace,onShowSessionTraces:t=>void e.traces.showSessionTraces(t)})})}var qg=kr({component:El}),Jg=Dr({getParentRoute:()=>qg,path:`/`,component:()=>(0,B.jsx)(ur,{to:`/playground`,replace:!0})}),Yg=Dr({getParentRoute:()=>qg,path:`playground`,component:Vg}),Xg=Dr({getParentRoute:()=>qg,path:`playground/$sessionId`,component:Vg}),Zg=Dr({getParentRoute:()=>qg,path:`tracing`,component:Kg}),Qg=Dr({getParentRoute:()=>qg,path:`tracing/$traceId`,component:Kg}),$g=Dr({getParentRoute:()=>qg,path:`tracing/sessions/$sessionId`,component:Kg}),e_=Dr({getParentRoute:()=>qg,path:`sessions`,component:Ug}),t_=Dr({getParentRoute:()=>qg,path:`agents`,component:kl}),n_=Dr({getParentRoute:()=>qg,path:`tools`,component:Gg}),r_=Dr({getParentRoute:()=>qg,path:`sandboxes`,component:Hg}),i_=Dr({getParentRoute:()=>qg,path:`sandboxes/$sandboxRef`,component:Hg}),a_=Dr({getParentRoute:()=>qg,path:`mcps`,component:Il}),o_=Dr({getParentRoute:()=>qg,path:`pipelines`,component:X}),s_=Dr({getParentRoute:()=>qg,path:`evals`,component:jl}),c_=Dr({getParentRoute:()=>qg,path:`knowledge`,component:Fl}),l_=Dr({getParentRoute:()=>qg,path:`knowledge/$tab`,component:Fl}),u_=Dr({getParentRoute:()=>qg,path:`memory`,component:Ll}),d_=Dr({getParentRoute:()=>qg,path:`status`,component:Wg}),f_=Gr({routeTree:qg.addChildren([Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_])});function p_(){let[e,t]=(0,C.useState)(),[n,r]=(0,C.useState)(``),i=us(),{messages:a,setMessages:o}=i,[c,l]=(0,C.useState)([]),[u,d]=(0,C.useState)(``),[f,p]=(0,C.useState)([]),[m,h]=(0,C.useState)(`playground`),{theme:g,toggleTheme:_}=yi(),[v,y]=(0,C.useState)(Fs),[b,x]=(0,C.useState)(),[S,w]=(0,C.useState)(`Loading`),[,T]=(0,C.useState)(``),[E,D]=(0,C.useState)(`idle`),[O,k]=(0,C.useState)(0),A=(0,C.useRef)(null),j=(0,C.useRef)(null),M=(0,C.useRef)(null),N=(0,C.useRef)(!0);function ee(){let e=M.current;e!==null&&(N.current=e.scrollHeight-e.scrollTop-e.clientHeight<80)}(0,C.useEffect)(()=>{if(m!==`playground`||a.length===0||!N.current)return;let e=window.requestAnimationFrame(()=>{let e=M.current;e!==null&&(e.scrollTop=e.scrollHeight)});return()=>window.cancelAnimationFrame(e)},[m,a]),(0,C.useEffect)(()=>{if(m!==`playground`||typeof ResizeObserver>`u`)return;let e=M.current;if(e===null)return;let t=e.querySelector(`[data-studio-transcript-content]`);if(t===null)return;let n=new ResizeObserver(()=>{N.current&&(e.scrollTop=e.scrollHeight)});return n.observe(t),()=>n.disconnect()},[m]);let P=(0,C.useCallback)(async()=>{w(`Loading`),T(``);try{let e=await fetch(`/config`);if(e.status===401){w(`Authentication required`);return}if(!e.ok)throw Error(`Config failed with HTTP ${e.status}`);let n=await e.json();t(n),r(e=>e||n.agents[0]?.id||``),w(`Connected`)}catch(e){T(s(e)),w(`Config error`)}},[]);(0,C.useEffect)(()=>{P()},[P]);let F=e?.capabilities.sessions?.enabled===!0,I=e?.capabilities.traces?.enabled===!0,te=e?.capabilities.knowledge?.enabled===!0,ne=e?.capabilities.mcps?.enabled===!0,re=e?.capabilities.tools?.enabled===!0,ie=e?.capabilities.sandboxes?.enabled===!0,L=e?.capabilities.pipelines?.enabled===!0,R=e?.capabilities.evals?.enabled===!0,ae=e?.capabilities.memory?.enabled===!0,oe=e?.capabilities.status?.enabled===!0,z=e?.agents??[],se=e?.pipelines??[],ce=e?.evals??[],le=z.length>0,ue=(0,C.useCallback)(()=>{h(`tracing`)},[]),de=(0,C.useCallback)(e=>{if(e===void 0){f_.navigate({to:`/playground`});return}f_.navigate({to:`/playground/$sessionId`,params:{sessionId:e}})},[]),fe=(0,C.useCallback)(()=>{f_.navigate({to:`/tracing`})},[]),pe=Ls({activePage:m,enabled:I,initialTraceId:``,initialTraceSessionId:void 0,onError:T,onNavigateTracing:ue,onOpenTrace:(0,C.useCallback)(e=>{f_.navigate({to:`/tracing/$traceId`,params:{traceId:e}})},[]),onOpenTraceIndex:fe,onOpenTraceSession:(0,C.useCallback)(e=>{f_.navigate({to:`/tracing/sessions/$sessionId`,params:{sessionId:e}})},[])}),me=(0,C.useMemo)(()=>({hasAgents:le,sessionsEnabled:F,tracesEnabled:I,toolsEnabled:re,sandboxesEnabled:ie,mcpsEnabled:ne,pipelinesEnabled:L,evalsEnabled:R,memoryEnabled:ae,statusEnabled:oe,knowledgeEnabled:te}),[le,F,I,re,ie,ne,L,R,ae,oe,te]),he=z.find(e=>e.id===n)??z[0]??void 0,ge=he?.id,_e=he?.quickPrompts??[],{selectedAgentModels:ve,selectedModelRef:ye,setSelectedModelRef:be}=bi({enabled:e?.models!==void 0,selectedAgentId:ge,onError:T}),xe=a.length>0,Se=(0,C.useCallback)((e,t,n)=>{k(e=>e+1),Ko(Qo(e.transcript)),r(e.agentId),be(ni(e)),l(t),o(ti(e.transcript,t)),p([]),n.updatePath!==!1&&(h(`playground`),de(e.id))},[de,o,be]),Ce=(0,C.useCallback)((e,t)=>{pe.removeSessionTraces(e),t&&(qo(),k(e=>e+1),o([]),l([]),d(``),p([]),m===`playground`&&de(void 0))},[m,de,o,pe]),we=Os({activePage:m,currentAgentId:he?.id??n,enabled:F,loadSessionTraceSummaries:pe.loadSessionTraceSummaries,runState:E,selectedModelRef:ye,onError:T,onSessionCreated:de,onSessionDeleted:Ce,onSessionLoaded:Se,onStatus:w}),{answeringQuestions:Te,decidingApprovals:Ee,isStreaming:De,workingStartedAt:Oe,answerToolQuestion:ke,decideToolApproval:Ae,runPrompt:je,stopPrompt:Me}=is({attachments:f,messages:a,promptRef:A,runState:E,selectedAgent:he,selectedAgentId:n,selectedModelRef:ye,sessions:we,sessionsEnabled:F,traces:pe,transcript:i,onActivePageChange:h,onAttachmentsChange:p,onBeforeRun:()=>{N.current=!0},onError:T,onPromptChange:d,onRunStateChange:D,onSessionTraceSummariesChange:l,onStatus:w}),Ne=(0,C.useCallback)((e={})=>{E!==`running`&&(qo(),k(e=>e+1),we.clearSelectedSession(),o([]),l([]),d(``),p([]),h(`playground`),T(``),e.updatePath!==!1&&de(void 0),requestAnimationFrame(()=>Xo(A.current)))},[de,E,we,o]),Pe=(0,C.useCallback)(e=>{E===`running`||e===n||(r(e),be(``),qo(),k(e=>e+1),we.clearSelectedSession(),o([]),l([]),d(``),p([]),h(`playground`),T(``),de(void 0),requestAnimationFrame(()=>Xo(A.current)))},[de,E,n,we,o,be]);function Fe(e){d(Yo(e)),Xo(e.currentTarget)}async function Ie(e){let t=Array.from(e.currentTarget.files??[]);if(e.currentTarget.value=``,t.length!==0)try{let e=await Promise.all(t.map(ai));p(t=>[...t,...e])}catch(e){T(s(e))}}function Le(e){p(t=>t.filter(t=>t.id!==e))}function Re(e){e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),je(u))}let ze=(0,C.useCallback)(e=>ks(e,me),[me]),Be=(0,C.useCallback)(e=>{if(ks(e,me)){if(h(e),e===`tracing`){pe.clearTraceSelection(),f_.navigate({to:`/tracing`});return}if(e===`knowledge`){pe.clearTraceSelection(),f_.navigate({to:`/knowledge/$tab`,params:{tab:v}});return}if(pe.clearTraceSelection(),e===`playground`&&we.selectedSessionId.length>0){de(we.selectedSessionId);return}f_.navigate({to:`/${e}`})}},[v,de,me,we.selectedSessionId,pe]),Ve=(0,C.useCallback)(e=>{Be(As(e,me))},[Be,me]);function He(e){h(`knowledge`),y(e),pe.clearTraceSelection(),f_.navigate({to:`/knowledge/$tab`,params:{tab:e}})}let Ue={activePage:m,agents:z,answeringQuestions:Te,attachments:f,decidingApprovals:Ee,deleteCandidate:b,evals:ce,evalsEnabled:R,hasAgents:le,hasMessages:xe,isStreaming:De,workingStartedAt:Oe,knowledgeEnabled:te,knowledgeTab:v,mcpsEnabled:ne,memoryEnabled:ae,messages:a,pageEnabled:ze,pipelines:se,pipelinesEnabled:L,prompt:u,runState:E,sandboxesEnabled:ie,selectedAgent:he,selectedAgentId:n,selectedAgentModels:ve,selectedAgentQuickPrompts:_e,selectedModelRef:ye,sessionTraceSummaries:c,sessions:we,sessionsEnabled:F,status:S,statusEnabled:oe,theme:g,toolsEnabled:re,traces:pe,tracesEnabled:I,attachmentInputRef:j,promptRef:A,transcriptScrollerRef:M,transcriptResetKey:O,activateRoute:(0,C.useCallback)(e=>{if(!ks(e,me)){Ve(e);return}h(e),e!==`tracing`&&pe.clearTraceSelection()},[Ve,me,pe]),navigateFallback:Ve,navigatePage:Be,navigateKnowledgeTab:He,setDeleteCandidate:x,setError:T,setKnowledgeTab:y,setSelectedModelRef:be,setStatus:w,startNewChat:Ne,selectPlaygroundAgent:Pe,addPromptAttachments:Ie,decideToolApproval:Ae,updatePrompt:Fe,handlePromptKeyDown:Re,answerToolQuestion:ke,removePromptAttachment:Le,runPrompt:je,stopPrompt:Me,toggleTheme:_,updateTranscriptStickiness:ee};return(0,B.jsx)(Rs.Provider,{value:Ue,children:(0,B.jsx)(Jr,{router:f_})})}var m_=document.getElementById(`anvia-ui`);m_!==null&&(0,S.createRoot)(m_).render((0,B.jsx)(p_,{}));export{Tc as $,Vl as A,nc as B,du as C,eu as D,tu as E,yl as F,fc as G,ac as H,dl as I,_c as J,pc as K,cl as L,hl as M,vl as N,Xl as O,_l as P,Cc as Q,Jc as R,bu as S,ru as T,oc as U,ic as V,sc as W,yc as X,vc as Y,Sc as Z,Tp as _,hg as a,Ic as at,zu as b,bg as c,ts as ct,mg as d,b as dt,Ec as et,fg as f,Lp as g,Qp as h,_g as i,Fc as it,fl as j,Gl as k,ug as l,Vo as lt,sh as m,xg as n,Mc as nt,yg as o,Rc as ot,dg as p,hc as q,vg as r,Nc as rt,gg as s,Wc as st,Pg as t,Oc as tt,pg as u,Qn as ut,xp as v,fu as w,Du as x,Hu as y,qc as z};
|
|
56
|
-
//# sourceMappingURL=index-
|
|
55
|
+
`},nh=0,rh=[];function ih(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(nh++)[0],a=C.useState(Em)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=tm([e.lockRef.current],(e.shards||[]).map($m),!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=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Zm(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=Wm(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Wm(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 Xm(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(!(!rh.length||rh[rh.length-1]!==a)){var r=`deltaY`in n?Qm(n):Zm(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&eh(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map($m).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=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ah(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=Zm(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,Qm(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,Zm(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return rh.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,zm),document.addEventListener(`touchmove`,c,zm),document.addEventListener(`touchstart`,u,zm),function(){rh=rh.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,zm),document.removeEventListener(`touchmove`,c,zm),document.removeEventListener(`touchstart`,u,zm)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:th(i)}):null,p?C.createElement(Im,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ah(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var oh=hm(gm,ih),sh=C.forwardRef(function(e,t){return C.createElement(vm,$p({},e,{ref:t,sideCar:oh}))});sh.classNames=vm.classNames;var ch=Object.defineProperty,lh=(e,t)=>ch(e,`name`,{value:t,configurable:!0}),uh=[` `,`Enter`,`ArrowUp`,`ArrowDown`],dh=[` `,`Enter`],fh=`Select`,[ph,mh,hh]=Ql(fh),[gh,_h]=Xl(fh,[hh,ip]),vh=ip(),[yh,bh]=gh(fh),[xh,Sh]=gh(fh);function Ch(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,internal_do_not_use_render:h}=e,g=vh(t),[_,v]=C.useState(null),[y,b]=C.useState(null),[x,S]=C.useState(!1),w=eu(l),[T,E]=Lp({prop:r,defaultProp:i??!1,onChange:a,caller:fh}),[D,O]=Lp({prop:o,defaultProp:s,onChange:c,caller:fh}),k=C.useRef(null),A=C.useRef(D);C.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=lh(()=>O(A.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=_?!!m||!!_.closest(`form`):!0,[M,N]=C.useState(new Set),ee=Hu(),P=Array.from(M).map(e=>e.props.value).join(`;`),F=C.useCallback(e=>{N(t=>new Set(t).add(e))},[]),I=C.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:ee,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:P,isFormControl:j};return(0,B.jsx)(_p,{...g,children:(0,B.jsx)(yh,{scope:t,...te,children:(0,B.jsx)(ph.Provider,{scope:t,children:(0,B.jsx)(xh,{scope:t,onNativeOptionAdd:F,onNativeOptionRemove:I,children:ag(h)?h(te):n})})})})}lh(Ch,`SelectProvider`);var wh=lh(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,B.jsx)(Ch,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,B.jsxs)(B.Fragment,{children:[n,e?(0,B.jsx)(ig,{__scopeSelect:t}):null]})})},`Select`),Th=`SelectTrigger`,Eh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=vh(n),o=bh(Th,n),s=o.disabled||r,c=qc(t,o.onTriggerChange),l=mh(n),u=C.useRef(`touch`),[d,f,p]=sg(e=>{let t=l().filter(e=>!e.disabled),n=cg(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=lh(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,B.jsx)(vp,{asChild:!0,...a,children:(0,B.jsx)(tu.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"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":og(o.value)?``:void 0,...i,ref:c,onClick:Gl(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Gl(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:Gl(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&uh.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),Dh=`SelectValue`,Oh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=bh(Dh,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=qc(t,c.onValueNodeChange);zu(()=>{l(u)},[l,u]);let f=og(c.value);return(0,B.jsx)(tu.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,B.jsx)(C.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),kh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,B.jsx)(tu.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Ah,jh]=gh(`SelectPortal`,{forceMount:void 0}),Mh=lh(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,B.jsx)(Ah,{scope:e.__scopeSelect,forceMount:n,children:(0,B.jsx)(xp,{asChild:!0,...r})})},`SelectPortal`),Nh=`SelectContent`,Ph=C.forwardRef(lh(function(e,t){let n=jh(Nh,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=bh(Nh,e.__scopeSelect),[o,s]=C.useState();return zu(()=>{s(new DocumentFragment)},[]),(0,B.jsx)(Tp,{present:r||a.open,children:({present:e})=>e?(0,B.jsx)(Bh,{...i,ref:t}):(0,B.jsx)(Fh,{...i,fragment:o})})},`SelectContent`)),Fh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?fr.createPortal((0,B.jsx)(Lh,{scope:n,children:(0,B.jsx)(ph.Slot,{scope:n,children:(0,B.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Ih=10,[Lh,Rh]=gh(Nh),zh=Jc(`SelectContent.RemoveScroll`),Bh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n}=e,{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=bh(Nh,n),[y,b]=C.useState(null),[x,S]=C.useState(null),w=qc(t,b),[T,E]=C.useState(null),[D,O]=C.useState(null),k=mh(n),[A,j]=C.useState(!1),M=C.useRef(!1);C.useEffect(()=>{if(y)return Qp(y)},[y]),bu();let N=C.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]),ee=C.useCallback(()=>N([T,y]),[N,T,y]);C.useEffect(()=>{A&&ee()},[A,ee]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;C.useEffect(()=>{if(y){let e={x:0,y:0},t=lh(t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},`handlePointerMove`),n=lh(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null},`handlePointerUp`);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,P,F]),C.useEffect(()=>{let e=lh(()=>P(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[I,te]=sg(e=>{let t=k().filter(e=>!e.disabled),n=cg(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=C.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]),re=C.useCallback(()=>y?.focus(),[y]),ie=C.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),L=r===`popper`?Hh:Vh,R=L===Hh?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,B.jsx)(Lh,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:T,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:ee,selectedItemText:D,position:r,isPositioned:A,searchRef:I,children:(0,B.jsx)(sh,{as:zh,allowPinchZoom:!0,children:(0,B.jsx)(Du,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Gl(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,B.jsx)(du,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,B.jsx)(L,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...R,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:Gl(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(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()}})})})})})})},`SelectContentImpl`)),Vh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=bh(Nh,n),o=Rh(Nh,n),[s,c]=C.useState(null),[l,u]=C.useState(null),d=qc(t,u),f=mh(n),p=C.useRef(!1),m=C.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=C.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-Ih,d=Vl(a,[Ih,Math.max(Ih,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-Ih,d=Vl(a,[Ih,Math.max(Ih,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Ih*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-Ih,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=`${Ih}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]);zu(()=>y(),[y]);let[b,x]=C.useState();return zu(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,B.jsx)(Uh,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,B.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,B.jsx)(tu.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Hh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Ih,...a}=e,o=vh(n);return(0,B.jsx)(yp,{...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)`}})},`SelectPopperPosition`)),[Uh,Wh]=gh(Nh,{}),Gh=`SelectViewport`,Kh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Rh(Gh,n),o=Wh(Gh,n),s=qc(t,a.onViewportChange),c=C.useRef(0);return(0,B.jsxs)(B.Fragment,{children:[(0,B.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,B.jsx)(ph.Slot,{scope:n,children:(0,B.jsx)(tu.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Gl(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-Ih*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})})})]})},`SelectViewport`)),[qh,Jh]=gh(`SelectGroup`),Yh=`SelectItem`,[Xh,Zh]=gh(Yh),Qh=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=bh(Yh,n),c=Rh(Yh,n),l=s.value===r,[u,d]=C.useState(a??``),[f,p]=C.useState(!1),m=qc(t,ru(e=>c.itemRefCallback?.(e,r,i))),h=Hu(),g=C.useRef(`touch`),_=lh(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,B.jsx)(Xh,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:C.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,B.jsx)(ph.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,B.jsx)(tu.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:Gl(o.onFocus,()=>p(!0)),onBlur:Gl(o.onBlur,()=>p(!1)),onClick:Gl(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:Gl(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:Gl(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Gl(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Gl(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Gl(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(dh.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),$h=`SelectItemText`,eg=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=bh($h,n),s=Rh($h,n),c=Zh($h,n),l=Sh($h,n),[u,d]=C.useState(null),f=ru(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=qc(t,d,c.onItemTextChange,f),m=u?.textContent,h=C.useMemo(()=>(0,B.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return zu(()=>(g(h),()=>_(h)),[g,_,h]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(tu.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!og(o.value)?fr.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),tg=`SelectItemIndicator`,ng=C.forwardRef(lh(function(e,t){let{__scopeSelect:n,...r}=e;return Zh(tg,n).isSelected?(0,B.jsx)(tu.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),rg=`SelectBubbleInput`,ig=C.forwardRef(lh(function({__scopeSelect:e,...t},n){let r=bh(rg,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=C.useRef(null),m=qc(n,p),h=i??``,g=Hp(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return C.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,B.jsxs)(tu.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Up,...t.style},ref:m,defaultValue:h,children:[og(i)&&!_?(0,B.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function ag(e){return typeof e==`function`}lh(ag,`isFunction`);function og(e){return e===``||e===void 0}lh(og,`shouldShowPlaceholder`);function sg(e){let t=ru(e),n=C.useRef(``),r=C.useRef(0),i=C.useCallback(e=>{let i=n.current+e;t(i),lh((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=C.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}lh(sg,`useTypeaheadSearch`);function cg(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=lg(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}lh(cg,`findNextItem`);function lg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}lh(lg,`wrapArray`);var ug=wh,dg=Oh;function fg({className:e,children:t,...n}){return(0,B.jsxs)(Eh,{className:a(`flex h-9 w-full items-center justify-between rounded-lg border border-input bg-card/90 px-3 text-sm text-foreground outline-none transition duration-200 hover:border-muted-foreground/45 focus:border-muted-foreground/60 focus:ring-2 focus:ring-muted-foreground/20 disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:[t,(0,B.jsx)(kh,{asChild:!0,children:(0,B.jsx)(dl,{icon:ic,className:`h-4 w-4 opacity-60`})})]})}function pg({className:e,children:t,position:n=`popper`,...r}){return(0,B.jsx)(Mh,{children:(0,B.jsx)(Ph,{position:n,className:a(`z-50 max-h-80 min-w-[8rem] overflow-hidden rounded-xl border border-border/90 bg-popover/98 text-popover-foreground shadow-xl shadow-black/45 backdrop-blur`,e),...r,children:(0,B.jsx)(Kh,{className:`p-1`,children:t})})})}function mg({className:e,children:t,...n}){return(0,B.jsxs)(Qh,{className:a(`relative flex min-h-8 cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none transition data-[disabled]:pointer-events-none data-[highlighted]:bg-muted/65 data-[highlighted]:text-foreground data-[disabled]:opacity-50`,e),...n,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,B.jsx)(ng,{children:(0,B.jsx)(dl,{icon:mc,className:`h-4 w-4`})})}),(0,B.jsx)(eg,{children:t})]})}function hg({className:e,...t}){return(0,B.jsx)(`section`,{className:a(`grid h-full min-h-0 min-w-0 max-h-full max-w-full overflow-hidden bg-background/45`,e),...t})}function gg({className:e,...t}){return(0,B.jsx)(`div`,{className:a(`min-h-0 min-w-0 overflow-hidden rounded-2xl border border-border/80 bg-card/70`,e),...t})}function _g(e){return(0,B.jsxs)(`div`,{className:a(`grid gap-1 rounded-xl border border-border/80 bg-card/45 p-4`,e.className),children:[(0,B.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:e.label}),(0,B.jsx)(`span`,{className:`text-lg font-semibold tabular-nums text-foreground`,children:e.value})]})}function vg(e){return(0,B.jsx)(`div`,{className:a(`grid min-h-80 place-items-center rounded-xl border border-dashed border-border/80 bg-card/35 px-6 text-center`,e.className),children:(0,B.jsxs)(`div`,{className:`grid max-w-md gap-2`,children:[(0,B.jsx)(`h2`,{className:`m-0 text-base font-semibold text-foreground`,children:e.title}),(0,B.jsx)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground`,children:e.text})]})})}function yg({className:e,...t}){return(0,B.jsx)(`span`,{className:a(`inline-flex items-center rounded-lg border border-border/80 bg-muted/55 px-2 py-1 text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground`,e),...t})}function bg({className:e,...t}){return(0,B.jsx)(`div`,{className:a(`grid gap-1 rounded-xl border border-border/80 bg-background p-1`,e),...t})}function xg({className:e,...t}){return(0,B.jsx)(`textarea`,{className:a(`min-h-9 w-full resize-none rounded-lg border border-input bg-card/90 px-3 py-2.5 leading-6 text-foreground outline-none transition duration-200 placeholder:text-muted-foreground/65 focus:border-muted-foreground/60 focus:ring-2 focus:ring-muted-foreground/20`,e),...t})}function Sg(e){let t=new Map,n=new Map(e.traceSummaries.map(e=>{let t=wg(e);return t===void 0?void 0:[e.id,t]}).filter(e=>e!==void 0)),r=e.logs.filter(e=>e.category===`run`&&(e.event===`run.completed`||e.event===`run.cancelled`||e.event===`run.failed`)).sort((e,t)=>e.sequence-t.sequence).map(Tg),i=0;for(let a of e.entries){if(!Cg(a))continue;let e=r[i];i+=1;let o=a.traceId===void 0?e:n.get(a.traceId)??e,s=Og(a.durationMs,o);s!==void 0&&t.set(a.entryId,s)}return t}function Cg(e){return e.kind===`message`&&e.role===`assistant`&&(e.text.trim().length>0||kg(e.durationMs)!==void 0)&&(!(`tone`in e)||e.tone!==`pending`)}function wg(e){let t=kg(e.durationMs),n=Eg(e.usage),r={};return t!==void 0&&(r.durationMs=t),n!==void 0&&(r.usage=n),Dg(r)}function Tg(e){let t=e.metadata;if(!c(t))return;let n=kg(t.durationMs),r=Eg(t.usage),i={};return n!==void 0&&(i.durationMs=n),r!==void 0&&(i.usage=r),Dg(i)}function Eg(e){if(!c(e))return;let t=Ag(e.inputTokens),n=Ag(e.outputTokens),r=Ag(e.totalTokens)??(t===void 0||n===void 0?void 0:t+n),i={};t!==void 0&&(i.inputTokens=t),n!==void 0&&(i.outputTokens=n),r!==void 0&&(i.totalTokens=r);let a=Ag(e.cachedInputTokens),o=Ag(e.cacheCreationInputTokens);return a!==void 0&&(i.cachedInputTokens=a),o!==void 0&&(i.cacheCreationInputTokens=o),Object.keys(i).length===0?void 0:i}function Dg(e){return e.durationMs===void 0&&e.usage===void 0?void 0:e}function Og(e,t){let n=kg(e);return n===void 0?t:{...t,durationMs:n}}function kg(e){let t=Ag(e);return t!==void 0&&t>=0?t:void 0}function Ag(e){return typeof e==`number`&&Number.isFinite(e)?e:void 0}var jg={getKey(e){return String(e.entryId)},getText(e){if(e.kind===`reasoning`||e.kind===`message`&&e.role===`assistant`)return e.text},withText(e,t){return e.kind===`reasoning`?{...e,text:t}:e.kind===`message`&&e.role===`assistant`?`tone`in e&&e.tone===`pending`?e:{...e,text:t}:e}};function Mg(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n?.kind===`message`&&n.role===`assistant`)return n.entryId;if(n?.kind===`message`&&n.role===`user`)return}}function Ng(e){let t=e.at(-1);return t?.kind===`message`&&t.role===`assistant`&&`tone`in t&&t.tone===`error`}function Pg(e){let[t,n]=(0,C.useState)(()=>Date.now()),r=e.startedAt!==void 0&&e.durationMs===void 0;(0,C.useEffect)(()=>{if(!r)return;n(Date.now());let e=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(e)},[r]);let i=e.durationMs??(e.startedAt===void 0?void 0:t-e.startedAt);return i===void 0?null:(0,B.jsxs)(`span`,{"aria-live":`off`,className:a(`inline-flex items-center gap-1.5 text-xs font-medium tabular-nums text-muted-foreground`,e.className),role:r?`timer`:void 0,children:[r?(0,B.jsx)(dl,{"aria-hidden":`true`,className:`h-3.5 w-3.5 shrink-0 animate-spin`,icon:Ac}):null,Fg(i,r?`working`:`finished`)]})}function Fg(e,t=`working`){let n=Math.floor((Number.isFinite(e)?Math.max(0,e):0)/1e3),r=Math.floor(n/60),i=n%60,a=r===0?`${i}s`:`${r}m ${i}s`;return`${t===`working`?`Working`:`Finished`} - ${a}`}var Ig=(0,C.lazy)(()=>Us(()=>import(`./transcript-item-B0HTdQVL.js`).then(e=>({default:e.TranscriptItem})),__vite__mapDeps([18,1,5,6,2])));function Lg(e){let t=Ro(e.messages,{adapter:jg,flushImmediately:Ng(e.messages),isStreaming:e.isStreaming,resetKey:e.resetKey}),n=(0,C.useMemo)(()=>new Map(e.messages.map(e=>[e.entryId,e])),[e.messages]),r=(0,C.useMemo)(()=>Sg({entries:e.messages,traceSummaries:e.sessionTraceSummaries,logs:e.sessionLogs}),[e.messages,e.sessionLogs,e.sessionTraceSummaries]),i=(0,C.useRef)(e.workingStartedAt),a=e.workingStartedAt??(t.isDraining?i.current:void 0),o=a===void 0?void 0:Mg(e.messages),s=t.items.some(e=>e.entryId===o)?o:void 0;return(0,C.useEffect)(()=>{e.workingStartedAt!==void 0&&(i.current=e.workingStartedAt),!t.isDraining&&e.workingStartedAt===void 0&&(i.current=void 0)},[e.workingStartedAt,t.isDraining]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(C.Suspense,{fallback:null,children:t.items.map(i=>(0,B.jsx)(Ig,{entry:n.get(i.entryId)??i,displayText:jg.getText(i),live:t.liveItemKey===String(i.entryId),metrics:r.get(i.entryId),workingStartedAt:i.entryId===s?a:void 0,decidingApprovals:e.decidingApprovals,answeringQuestions:e.answeringQuestions,onApprovalDecision:e.onApprovalDecision,onQuestionAnswer:e.onQuestionAnswer,onOpenTrace:e.onOpenTrace},i.entryId))}),a!==void 0&&s===void 0?(0,B.jsx)(`article`,{className:`max-w-[min(82ch,100%)] justify-self-start text-foreground`,children:(0,B.jsx)(Pg,{startedAt:a})}):null]})}function Rg(e){return(0,B.jsxs)(hg,{className:`grid-cols-[minmax(0,1fr)_minmax(0,460px)] max-xl:grid-cols-1`,children:[(0,B.jsx)(`div`,{className:`grid min-h-0 min-w-0`,children:(0,B.jsxs)(`div`,{className:`grid h-full min-h-0 min-w-0 grid-rows-[minmax(0,1fr)_auto]`,children:[(0,B.jsx)(`section`,{className:`min-h-0 overflow-y-auto overflow-x-hidden px-4 py-4 [overflow-anchor:none] [scrollbar-gutter:stable]`,ref:e.transcriptScrollerRef,onScroll:e.onTranscriptScroll,children:(0,B.jsxs)(`div`,{className:`mx-auto grid min-h-full w-full max-w-235 content-start items-start gap-6 pb-8`,"data-studio-transcript-content":``,children:[e.hasMessages?null:(0,B.jsx)(`div`,{className:`grid min-h-96 place-items-center text-sm font-medium text-muted-foreground`,children:(0,B.jsxs)(`div`,{className:`grid max-w-xl gap-4 text-center`,children:[(0,B.jsx)(`div`,{className:`mx-auto h-px w-28 bg-muted/55`}),(0,B.jsx)(`h1`,{className:`m-0 text-4xl font-semibold leading-tight text-foreground text-balance`,children:`What should this agent work on?`}),(0,B.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.`})]})}),(0,B.jsx)(Lg,{answeringQuestions:e.answeringQuestions,decidingApprovals:e.decidingApprovals,isStreaming:e.isStreaming,messages:e.messages,resetKey:e.transcriptResetKey,sessionLogs:e.sessionLogs,sessionTraceSummaries:e.sessionTraceSummaries,workingStartedAt:e.workingStartedAt,onApprovalDecision:e.onApprovalDecision,onOpenTrace:e.onOpenTrace,onQuestionAnswer:e.onQuestionAnswer})]})}),(0,B.jsxs)(`form`,{className:`grid gap-3 bg-gradient-to-t from-card via-card/95 to-card/0 px-4 pb-4 pt-2`,onSubmit:t=>{t.preventDefault(),e.onRunPrompt(e.prompt)},children:[e.hasMessages||e.selectedAgentQuickPrompts.length===0?null:(0,B.jsx)(`div`,{className:`mx-auto grid w-full max-w-235 grid-cols-3 gap-2 max-md:grid-cols-1`,children:e.selectedAgentQuickPrompts.map(t=>(0,B.jsx)(cl,{className:`h-auto min-h-16 justify-start whitespace-normal rounded-lg 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-border/80 hover:bg-muted/45 hover:text-foreground`,type:`button`,variant:`ghost`,disabled:e.runState===`running`||e.selectedAgentId.length===0,onClick:()=>e.onRunPrompt(t),children:(0,B.jsx)(`span`,{className:`min-w-0 whitespace-normal wrap-break-words`,children:t})},t))}),(0,B.jsxs)(`div`,{className:`mx-auto grid w-full max-w-235 gap-2 rounded-xl border border-border/80 bg-card/95 p-2.5 backdrop-blur`,children:[(0,B.jsx)(xg,{className:`min-h-16 min-w-0 resize-none rounded-lg border-0 bg-transparent px-3 py-3 text-base leading-7 text-foreground shadow-none outline-none ring-0 placeholder:text-muted-foreground/70 focus:border-transparent focus:ring-0`,ref:e.promptRef,rows:1,value:e.prompt,onChange:e.onPromptChange,onKeyDown:e.onPromptKeyDown,placeholder:`Ask anything...`}),e.attachments.length===0?null:(0,B.jsx)(`div`,{className:`flex min-w-0 flex-wrap gap-1.5 px-2`,children:e.attachments.map(t=>(0,B.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-lg border border-border/80 bg-muted/55 px-2 py-1 text-xs font-medium text-muted-foreground`,children:[(0,B.jsxs)(`span`,{className:`min-w-0 truncate`,children:[t.kind===`image`?`Image`:`Doc`,` / `,t.name]}),(0,B.jsx)(cl,{"aria-label":`Remove ${t.name}`,className:`h-5 min-h-5 w-5 rounded-md border-0 bg-transparent p-0 text-muted-foreground shadow-none hover:bg-accent hover:text-foreground [&_svg]:h-3 [&_svg]:w-3`,size:`icon`,type:`button`,variant:`ghost`,onClick:()=>e.onRemovePromptAttachment(t.id),children:(0,B.jsx)(dl,{icon:dc,"aria-hidden":`true`})})]},t.id))}),(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,B.jsx)(`input`,{ref:e.attachmentInputRef,className:`hidden`,type:`file`,multiple:!0,accept:Xr,onChange:e.onAddPromptAttachments}),(0,B.jsx)(cl,{"aria-label":`Attach image or document`,className:`h-8 min-h-8 w-8 border-0 bg-transparent p-0 text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground`,size:`icon`,type:`button`,variant:`ghost`,disabled:e.runState===`running`,onClick:()=>e.attachmentInputRef.current?.click(),children:(0,B.jsx)(dl,{icon:lc,"aria-hidden":`true`})})]}),(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[e.selectedAgentModels.length===0?null:(0,B.jsxs)(ug,{value:e.selectedModelRef,onValueChange:e.onSelectModel,disabled:e.runState===`running`,children:[(0,B.jsx)(fg,{"aria-label":`Select model`,className:`flex h-8 min-h-8 w-auto max-w-44 gap-2 border-0 bg-transparent px-2 py-1 text-xs font-medium text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground sm:max-w-72`,children:(0,B.jsx)(dg,{placeholder:`Model`})}),(0,B.jsx)(pg,{align:`end`,children:e.selectedAgentModels.map(e=>(0,B.jsx)(mg,{value:e.ref,children:ii(e)},e.ref))})]}),e.agents.length>1?(0,B.jsxs)(ug,{value:e.selectedAgent?.id??e.selectedAgentId,onValueChange:e.onSelectAgent,disabled:e.runState===`running`,children:[(0,B.jsx)(fg,{"aria-label":`Select agent`,className:`flex h-8 min-h-8 w-auto max-w-64 gap-2 border-0 bg-transparent px-2 py-1 text-xs font-medium text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground`,children:(0,B.jsx)(dg,{placeholder:`Agent`})}),(0,B.jsx)(pg,{align:`end`,children:e.agents.map(e=>(0,B.jsx)(mg,{value:e.id,children:e.name??e.id},e.id))})]}):null,(0,B.jsx)(cl,{"aria-label":e.isStreaming?`Stop generating`:e.runState===`running`?`Running`:`Send message`,className:`h-9 min-h-9 w-9 rounded-full border-white bg-white text-black hover:bg-white/90`,size:`icon`,type:e.isStreaming?`button`:`submit`,disabled:!e.isStreaming&&(e.runState===`running`||e.selectedAgentId.length===0),onClick:e.isStreaming?e.onStopPrompt:void 0,children:(0,B.jsx)(dl,{fill:e.isStreaming?`currentColor`:void 0,icon:e.isStreaming?Bc:cc})})]})]})]})]})]})}),(0,B.jsx)(zg,{sessions:e.allSessions,selectedSessionId:e.selectedSessionId,runState:e.runState,onDeleteSession:e.onDeleteSession,onLoadSession:e.onLoadSession})]})}function zg(e){return(0,B.jsx)(`aside`,{className:`grid h-full min-h-0 min-w-0 max-h-full overflow-hidden border-l border-sidebar-border bg-sidebar text-sidebar-foreground max-xl:hidden`,"aria-label":`Sessions`,children:(0,B.jsx)(`nav`,{className:`grid min-h-0 content-start gap-0.5 overflow-auto px-3 py-3`,"aria-label":`Sessions`,children:e.sessions.map(t=>(0,B.jsx)(Bg,{session:t,active:t.id===e.selectedSessionId,disabled:e.runState===`running`,onDeleteSession:e.onDeleteSession,onLoadSession:e.onLoadSession},t.id))})})}function Bg(e){let t=e.session.title??`Untitled chat`;return(0,B.jsxs)(`div`,{className:`group relative min-w-0`,children:[(0,B.jsxs)(cl,{className:a(`studio-sidebar-nav-button h-9 min-h-9 w-full justify-start gap-3 rounded-lg bg-transparent px-2.5 py-0.5 pr-9 text-base font-medium text-sidebar-foreground/62 shadow-none transition duration-200 hover:text-sidebar-foreground active:translate-y-px [&_svg]:h-[17px] [&_svg]:w-[17px]`,e.active&&`studio-sidebar-nav-button-active text-sidebar-accent-foreground`),type:`button`,variant:`ghost`,disabled:e.disabled,onClick:()=>e.onLoadSession(e.session.id),children:[(0,B.jsx)(dl,{icon:pc,"aria-hidden":`true`}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:t})]}),(0,B.jsx)(cl,{"aria-label":`Delete ${t}`,className:`absolute right-1 top-1/2 hidden h-7 min-h-7 w-7 -translate-y-1/2 rounded-lg border-0 bg-transparent p-0 text-muted-foreground opacity-70 shadow-none hover:bg-sidebar-accent hover:text-destructive hover:opacity-100 group-hover:inline-flex group-focus-within:inline-flex [&_svg]:h-4 [&_svg]:w-4`,size:`icon`,type:`button`,variant:`ghost`,disabled:e.disabled,onClick:()=>e.onDeleteSession(e.session),children:(0,B.jsx)(dl,{icon:rc,"aria-hidden":`true`})})]})}function Vg(){let e=Dl(`playground`),t=sr({strict:!1}).sessionId,n=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(n.current!==t&&e.pageEnabled(`playground`)){if(e.runState===`running`){n.current=t;return}if(t===void 0){n.current=t,e.startNewChat({updatePath:!1});return}e.sessionsEnabled&&(n.current=t,t!==e.sessions.selectedSessionId&&e.sessions.loadSession(t,{updatePath:!1}))}},[t,e]),(0,B.jsx)(Rg,{agents:e.agents,allSessions:e.sessions.allSessions,answeringQuestions:e.answeringQuestions,attachments:e.attachments,decidingApprovals:e.decidingApprovals,hasMessages:e.hasMessages,isStreaming:e.isStreaming,workingStartedAt:e.workingStartedAt,messages:e.messages,prompt:e.prompt,runState:e.runState,selectedAgent:e.selectedAgent,selectedAgentId:e.selectedAgentId,selectedAgentModels:e.selectedAgentModels,selectedAgentQuickPrompts:e.selectedAgentQuickPrompts,selectedModelRef:e.selectedModelRef,selectedSessionId:e.sessions.selectedSessionId,sessionLogs:e.sessions.sessionLogs,sessionTraceSummaries:e.sessionTraceSummaries,attachmentInputRef:e.attachmentInputRef,promptRef:e.promptRef,transcriptScrollerRef:e.transcriptScrollerRef,transcriptResetKey:e.transcriptResetKey,onAddPromptAttachments:e.addPromptAttachments,onApprovalDecision:e.decideToolApproval,onDeleteSession:e.setDeleteCandidate,onLoadSession:t=>void e.sessions.loadSession(t),onOpenTrace:e.traces.selectTrace,onPromptChange:e.updatePrompt,onPromptKeyDown:e.handlePromptKeyDown,onQuestionAnswer:e.answerToolQuestion,onRemovePromptAttachment:e.removePromptAttachment,onRunPrompt:e.runPrompt,onStopPrompt:e.stopPrompt,onSelectAgent:e.selectPlaygroundAgent,onSelectModel:e.setSelectedModelRef,onTranscriptScroll:e.updateTranscriptStickiness})}function Hg(){let e=Dl(`sandboxes`),t=sr({strict:!1}),n=lr();return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Zs,{enabled:e.sandboxesEnabled,onError:e.setError,onSelectSandbox:e=>{n({to:`/sandboxes/$sandboxRef`,params:{sandboxRef:e}})},...t.sandboxRef===void 0?{}:{initialSandboxRef:t.sandboxRef}})})}function Ug(){let e=Dl(`sessions`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Xs,{agents:e.agents,sessions:e.sessions.allSessions,sessionsEnabled:e.sessionsEnabled,sessionLoadState:e.sessions.sessionLoadState,selectedSessionId:e.sessions.selectedSessionId,onOpenSession:t=>void e.sessions.loadSession(t),onViewSessionTracing:t=>void e.traces.showSessionTraces(t),onDeleteSession:e.setDeleteCandidate})})}function Wg(){let e=Dl(`status`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)($s,{enabled:e.statusEnabled})})}function Gg(){let e=Dl(`tools`);return(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(Ml,{active:!0,agents:e.agents,enabled:e.toolsEnabled,selectedAgentId:e.selectedAgent?.id||e.selectedAgentId,onError:e.setError})})}function Kg(){let e=Dl(`tracing`),t=sr({strict:!1}),n=(0,C.useRef)(``);return(0,C.useEffect)(()=>{let r=t.sessionId===void 0?`trace:${t.traceId??``}`:`session:${t.sessionId}`;if(n.current!==r&&e.pageEnabled(`tracing`)){if(n.current=r,t.sessionId!==void 0){e.traces.showSessionTraces(t.sessionId,{updatePath:!1});return}e.traces.setTraceLocation(t.traceId??``,void 0)}},[t.sessionId,t.traceId,e]),(0,B.jsx)(C.Suspense,{fallback:(0,B.jsx)(G,{}),children:(0,B.jsx)(tc,{agents:e.agents,traces:e.traces.traces,tracesEnabled:e.tracesEnabled,traceLoadState:e.traces.traceLoadState,selectedTraceId:e.traces.selectedTraceId,traceSessionDetailId:e.traces.traceSessionDetailId,onRefresh:()=>void e.traces.loadTraces(),onSelectTrace:e.traces.selectTrace,onShowSessionTraces:t=>void e.traces.showSessionTraces(t)})})}var qg=kr({component:El}),Jg=Dr({getParentRoute:()=>qg,path:`/`,component:()=>(0,B.jsx)(ur,{to:`/playground`,replace:!0})}),Yg=Dr({getParentRoute:()=>qg,path:`playground`,component:Vg}),Xg=Dr({getParentRoute:()=>qg,path:`playground/$sessionId`,component:Vg}),Zg=Dr({getParentRoute:()=>qg,path:`tracing`,component:Kg}),Qg=Dr({getParentRoute:()=>qg,path:`tracing/$traceId`,component:Kg}),$g=Dr({getParentRoute:()=>qg,path:`tracing/sessions/$sessionId`,component:Kg}),e_=Dr({getParentRoute:()=>qg,path:`sessions`,component:Ug}),t_=Dr({getParentRoute:()=>qg,path:`agents`,component:kl}),n_=Dr({getParentRoute:()=>qg,path:`tools`,component:Gg}),r_=Dr({getParentRoute:()=>qg,path:`sandboxes`,component:Hg}),i_=Dr({getParentRoute:()=>qg,path:`sandboxes/$sandboxRef`,component:Hg}),a_=Dr({getParentRoute:()=>qg,path:`mcps`,component:Il}),o_=Dr({getParentRoute:()=>qg,path:`pipelines`,component:X}),s_=Dr({getParentRoute:()=>qg,path:`evals`,component:jl}),c_=Dr({getParentRoute:()=>qg,path:`knowledge`,component:Fl}),l_=Dr({getParentRoute:()=>qg,path:`knowledge/$tab`,component:Fl}),u_=Dr({getParentRoute:()=>qg,path:`memory`,component:Ll}),d_=Dr({getParentRoute:()=>qg,path:`status`,component:Wg}),f_=Gr({routeTree:qg.addChildren([Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_])});function p_(){let[e,t]=(0,C.useState)(),[n,r]=(0,C.useState)(``),i=us(),{messages:a,setMessages:o}=i,[c,l]=(0,C.useState)([]),[u,d]=(0,C.useState)(``),[f,p]=(0,C.useState)([]),[m,h]=(0,C.useState)(`playground`),{theme:g,toggleTheme:_}=yi(),[v,y]=(0,C.useState)(Fs),[b,x]=(0,C.useState)(),[S,w]=(0,C.useState)(`Loading`),[,T]=(0,C.useState)(``),[E,D]=(0,C.useState)(`idle`),[O,k]=(0,C.useState)(0),A=(0,C.useRef)(null),j=(0,C.useRef)(null),M=(0,C.useRef)(null),N=(0,C.useRef)(!0);function ee(){let e=M.current;e!==null&&(N.current=e.scrollHeight-e.scrollTop-e.clientHeight<80)}(0,C.useEffect)(()=>{if(m!==`playground`||a.length===0||!N.current)return;let e=window.requestAnimationFrame(()=>{let e=M.current;e!==null&&(e.scrollTop=e.scrollHeight)});return()=>window.cancelAnimationFrame(e)},[m,a]),(0,C.useEffect)(()=>{if(m!==`playground`||typeof ResizeObserver>`u`)return;let e=M.current;if(e===null)return;let t=e.querySelector(`[data-studio-transcript-content]`);if(t===null)return;let n=new ResizeObserver(()=>{N.current&&(e.scrollTop=e.scrollHeight)});return n.observe(t),()=>n.disconnect()},[m]);let P=(0,C.useCallback)(async()=>{w(`Loading`),T(``);try{let e=await fetch(`/config`);if(e.status===401){w(`Authentication required`);return}if(!e.ok)throw Error(`Config failed with HTTP ${e.status}`);let n=await e.json();t(n),r(e=>e||n.agents[0]?.id||``),w(`Connected`)}catch(e){T(s(e)),w(`Config error`)}},[]);(0,C.useEffect)(()=>{P()},[P]);let F=e?.capabilities.sessions?.enabled===!0,I=e?.capabilities.traces?.enabled===!0,te=e?.capabilities.knowledge?.enabled===!0,ne=e?.capabilities.mcps?.enabled===!0,re=e?.capabilities.tools?.enabled===!0,ie=e?.capabilities.sandboxes?.enabled===!0,L=e?.capabilities.pipelines?.enabled===!0,R=e?.capabilities.evals?.enabled===!0,ae=e?.capabilities.memory?.enabled===!0,oe=e?.capabilities.status?.enabled===!0,z=e?.agents??[],se=e?.pipelines??[],ce=e?.evals??[],le=z.length>0,ue=(0,C.useCallback)(()=>{h(`tracing`)},[]),de=(0,C.useCallback)(e=>{if(e===void 0){f_.navigate({to:`/playground`});return}f_.navigate({to:`/playground/$sessionId`,params:{sessionId:e}})},[]),fe=(0,C.useCallback)(()=>{f_.navigate({to:`/tracing`})},[]),pe=Ls({activePage:m,enabled:I,initialTraceId:``,initialTraceSessionId:void 0,onError:T,onNavigateTracing:ue,onOpenTrace:(0,C.useCallback)(e=>{f_.navigate({to:`/tracing/$traceId`,params:{traceId:e}})},[]),onOpenTraceIndex:fe,onOpenTraceSession:(0,C.useCallback)(e=>{f_.navigate({to:`/tracing/sessions/$sessionId`,params:{sessionId:e}})},[])}),me=(0,C.useMemo)(()=>({hasAgents:le,sessionsEnabled:F,tracesEnabled:I,toolsEnabled:re,sandboxesEnabled:ie,mcpsEnabled:ne,pipelinesEnabled:L,evalsEnabled:R,memoryEnabled:ae,statusEnabled:oe,knowledgeEnabled:te}),[le,F,I,re,ie,ne,L,R,ae,oe,te]),he=z.find(e=>e.id===n)??z[0]??void 0,ge=he?.id,_e=he?.quickPrompts??[],{selectedAgentModels:ve,selectedModelRef:ye,setSelectedModelRef:be}=bi({enabled:e?.models!==void 0,selectedAgentId:ge,onError:T}),xe=a.length>0,Se=(0,C.useCallback)((e,t,n)=>{k(e=>e+1),Ko(Qo(e.transcript)),r(e.agentId),be(ni(e)),l(t),o(ti(e.transcript,t)),p([]),n.updatePath!==!1&&(h(`playground`),de(e.id))},[de,o,be]),Ce=(0,C.useCallback)((e,t)=>{pe.removeSessionTraces(e),t&&(qo(),k(e=>e+1),o([]),l([]),d(``),p([]),m===`playground`&&de(void 0))},[m,de,o,pe]),we=Os({activePage:m,currentAgentId:he?.id??n,enabled:F,loadSessionTraceSummaries:pe.loadSessionTraceSummaries,runState:E,selectedModelRef:ye,onError:T,onSessionCreated:de,onSessionDeleted:Ce,onSessionLoaded:Se,onStatus:w}),{answeringQuestions:Te,decidingApprovals:Ee,isStreaming:De,workingStartedAt:Oe,answerToolQuestion:ke,decideToolApproval:Ae,runPrompt:je,stopPrompt:Me}=is({attachments:f,messages:a,promptRef:A,runState:E,selectedAgent:he,selectedAgentId:n,selectedModelRef:ye,sessions:we,sessionsEnabled:F,traces:pe,transcript:i,onActivePageChange:h,onAttachmentsChange:p,onBeforeRun:()=>{N.current=!0},onError:T,onPromptChange:d,onRunStateChange:D,onSessionTraceSummariesChange:l,onStatus:w}),Ne=(0,C.useCallback)((e={})=>{E!==`running`&&(qo(),k(e=>e+1),we.clearSelectedSession(),o([]),l([]),d(``),p([]),h(`playground`),T(``),e.updatePath!==!1&&de(void 0),requestAnimationFrame(()=>Xo(A.current)))},[de,E,we,o]),Pe=(0,C.useCallback)(e=>{E===`running`||e===n||(r(e),be(``),qo(),k(e=>e+1),we.clearSelectedSession(),o([]),l([]),d(``),p([]),h(`playground`),T(``),de(void 0),requestAnimationFrame(()=>Xo(A.current)))},[de,E,n,we,o,be]);function Fe(e){d(Yo(e)),Xo(e.currentTarget)}async function Ie(e){let t=Array.from(e.currentTarget.files??[]);if(e.currentTarget.value=``,t.length!==0)try{let e=await Promise.all(t.map(ai));p(t=>[...t,...e])}catch(e){T(s(e))}}function Le(e){p(t=>t.filter(t=>t.id!==e))}function Re(e){e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),je(u))}let ze=(0,C.useCallback)(e=>ks(e,me),[me]),Be=(0,C.useCallback)(e=>{if(ks(e,me)){if(h(e),e===`tracing`){pe.clearTraceSelection(),f_.navigate({to:`/tracing`});return}if(e===`knowledge`){pe.clearTraceSelection(),f_.navigate({to:`/knowledge/$tab`,params:{tab:v}});return}if(pe.clearTraceSelection(),e===`playground`&&we.selectedSessionId.length>0){de(we.selectedSessionId);return}f_.navigate({to:`/${e}`})}},[v,de,me,we.selectedSessionId,pe]),Ve=(0,C.useCallback)(e=>{Be(As(e,me))},[Be,me]);function He(e){h(`knowledge`),y(e),pe.clearTraceSelection(),f_.navigate({to:`/knowledge/$tab`,params:{tab:e}})}let Ue={activePage:m,agents:z,answeringQuestions:Te,attachments:f,decidingApprovals:Ee,deleteCandidate:b,evals:ce,evalsEnabled:R,hasAgents:le,hasMessages:xe,isStreaming:De,workingStartedAt:Oe,knowledgeEnabled:te,knowledgeTab:v,mcpsEnabled:ne,memoryEnabled:ae,messages:a,pageEnabled:ze,pipelines:se,pipelinesEnabled:L,prompt:u,runState:E,sandboxesEnabled:ie,selectedAgent:he,selectedAgentId:n,selectedAgentModels:ve,selectedAgentQuickPrompts:_e,selectedModelRef:ye,sessionTraceSummaries:c,sessions:we,sessionsEnabled:F,status:S,statusEnabled:oe,theme:g,toolsEnabled:re,traces:pe,tracesEnabled:I,attachmentInputRef:j,promptRef:A,transcriptScrollerRef:M,transcriptResetKey:O,activateRoute:(0,C.useCallback)(e=>{if(!ks(e,me)){Ve(e);return}h(e),e!==`tracing`&&pe.clearTraceSelection()},[Ve,me,pe]),navigateFallback:Ve,navigatePage:Be,navigateKnowledgeTab:He,setDeleteCandidate:x,setError:T,setKnowledgeTab:y,setSelectedModelRef:be,setStatus:w,startNewChat:Ne,selectPlaygroundAgent:Pe,addPromptAttachments:Ie,decideToolApproval:Ae,updatePrompt:Fe,handlePromptKeyDown:Re,answerToolQuestion:ke,removePromptAttachment:Le,runPrompt:je,stopPrompt:Me,toggleTheme:_,updateTranscriptStickiness:ee};return(0,B.jsx)(Rs.Provider,{value:Ue,children:(0,B.jsx)(Jr,{router:f_})})}var m_=document.getElementById(`anvia-ui`);m_!==null&&(0,S.createRoot)(m_).render((0,B.jsx)(p_,{}));export{Tc as $,Vl as A,nc as B,du as C,eu as D,tu as E,yl as F,fc as G,ac as H,dl as I,_c as J,pc as K,cl as L,hl as M,vl as N,Xl as O,_l as P,Cc as Q,Jc as R,bu as S,ru as T,oc as U,ic as V,sc as W,yc as X,vc as Y,Sc as Z,Tp as _,hg as a,Ic as at,zu as b,bg as c,ts as ct,mg as d,b as dt,Ec as et,fg as f,Lp as g,Qp as h,_g as i,Fc as it,fl as j,Gl as k,ug as l,Vo as lt,sh as m,xg as n,Mc as nt,yg as o,Rc as ot,dg as p,hc as q,vg as r,Nc as rt,gg as s,Wc as st,Pg as t,Oc as tt,pg as u,Qn as ut,xp as v,fu as w,Du as x,Hu as y,qc as z};
|
|
56
|
+
//# sourceMappingURL=index-CaB9mtgz.js.map
|